From 19768d1cfead2c510c11ea5df348910d17bea632 Mon Sep 17 00:00:00 2001
From: Olivier Maury <Olivier.Maury@inrae.fr>
Date: Mon, 11 Dec 2023 17:44:58 +0100
Subject: [PATCH 1/8] Squelette de page d'accueil

---
 config/_default/hugo.toml                     | 20 +++++++++++++++++++
 content/_index.md                             |  6 ++----
 .../layouts/partials/menu-footer.html         |  5 +----
 3 files changed, 23 insertions(+), 8 deletions(-)

diff --git a/config/_default/hugo.toml b/config/_default/hugo.toml
index 9787d84..149df3d 100644
--- a/config/_default/hugo.toml
+++ b/config/_default/hugo.toml
@@ -121,3 +121,23 @@ France"""
     name = "Contactez-nous"
     url = "/contact.html"
     weight = 7
+
+    [[languages.fr.menu.toplinks]]
+    name = "Découvrir"
+    url = "/decouvrir.html"
+    weight = 1
+
+    [[languages.fr.menu.toplinks]]
+    name = "Guides"
+    url = "/guides.html"
+    weight = 2
+
+    [[languages.fr.menu.toplinks]]
+    name = "Références"
+    url = "/references.html"
+    weight = 3
+
+    [[languages.fr.menu.toplinks]]
+    name = "Explications"
+    url = "/Explications.html"
+    weight = 4
diff --git a/content/_index.md b/content/_index.md
index c5ddd22..0eb7b5a 100644
--- a/content/_index.md
+++ b/content/_index.md
@@ -3,10 +3,8 @@ title: Accueil
 date: 2023-09-12
 lastmod: 2023-09-12
 description: Page d’accueil d’AgroMetInfo - mise à disposition d’indicateurs agroclimatiques et des indicateurs de suivi de culture d’hiver (culture type  blé tendre) et de printemps (culture type maïs) par le modèle STICS en temps réel sous forme de cartes et de graphiques.
-archetype: home
-hideDocumentTime: true
-hideSidebar: true
-hideTopbar: true
+type: home
+layout: index
 ---
 
 ## Qu’est-ce qu’AgroMetInfo ?
diff --git a/themes/hugo-theme-relearn/layouts/partials/menu-footer.html b/themes/hugo-theme-relearn/layouts/partials/menu-footer.html
index 9ab044c..3f70fb5 100644
--- a/themes/hugo-theme-relearn/layouts/partials/menu-footer.html
+++ b/themes/hugo-theme-relearn/layouts/partials/menu-footer.html
@@ -1,4 +1 @@
-<!--
-	    <p>Built with <a href="https://github.com/McShelby/hugo-theme-relearn" title="love"><i class="fas fa-heart"></i></a> by <a href="https://gohugo.io/">Hugo</a></p>
--->
-	<div class="license">Sauf mention contraire, tous les textes de ce site sont sous <a href="https://www.etalab.gouv.fr/licence-ouverte-open-licence/" target="_blank">licence etalab-2.0</a>.</div>
+<div class="license">Sauf mention contraire, tous les textes de ce site sont sous <a href="https://www.etalab.gouv.fr/licence-ouverte-open-licence/" target="_blank">licence etalab-2.0</a>.</div>
\ No newline at end of file
-- 
GitLab


From 4c2eb27c2ce3860d4e5a4ae92400596776fa7982 Mon Sep 17 00:00:00 2001
From: Olivier Maury <Olivier.Maury@inrae.fr>
Date: Tue, 12 Dec 2023 11:54:31 +0100
Subject: [PATCH 2/8] Squelette de la maquette de la page d'accueil. refs
 agroclim/agrometinfo/AgroMetInfo_2.0#59

---
 config/_default/hugo.toml                     |  13 ++
 content/_index.en.md                          |  12 ++
 content/_index.md                             |   2 +
 .../layouts/home/index.html                   |  95 +++++++++++
 .../layouts/partials/menu-footer.html         |   2 +-
 themes/hugo-theme-relearn/static/css/home.css | 156 ++++++++++++++++++
 6 files changed, 279 insertions(+), 1 deletion(-)
 create mode 100644 content/_index.en.md
 create mode 100644 themes/hugo-theme-relearn/layouts/home/index.html
 create mode 100644 themes/hugo-theme-relearn/static/css/home.css

diff --git a/config/_default/hugo.toml b/config/_default/hugo.toml
index 149df3d..6d9d819 100644
--- a/config/_default/hugo.toml
+++ b/config/_default/hugo.toml
@@ -47,6 +47,7 @@ France"""
 [languages]
     [languages.en]
     landingPageName = "<i class='fas fa-home'></i> Home"
+    license = "Unless otherwise stated, all text on this site is licensed under the <a href=\"https://www.etalab.gouv.fr/licence-ouverte-open-licence/\" target=\"_blank\">etalab-2.0 licence</a>."
 
     [[languages.en.menu.shortcuts]]
     name = "Cookies"
@@ -83,9 +84,16 @@ France"""
     url = "../contact.html"
     weight = 7
 
+    [[languages.en.menu.toplinks]]
+    name = "Interactive map"
+    url = "../app/"
+    weight = 1
+
     [languages.fr]
     landingPageName = "<i class='fas fa-home'></i> Accueil"
     languageCode = "fr-fr"
+    license = "Sauf mention contraire, tous les textes de ce site sont sous <a href=\"https://www.etalab.gouv.fr/licence-ouverte-open-licence/\" target=\"_blank\">licence etalab-2.0</a>."
+    toggleTheme = "Changer de thème"
 
     [[languages.fr.menu.shortcuts]]
     name = "Cookies"
@@ -141,3 +149,8 @@ France"""
     name = "Explications"
     url = "/Explications.html"
     weight = 4
+
+    [[languages.fr.menu.toplinks]]
+    name = "Carte interactive"
+    url = "/app/"
+    weight = 5
diff --git a/content/_index.en.md b/content/_index.en.md
new file mode 100644
index 0000000..7d93da9
--- /dev/null
+++ b/content/_index.en.md
@@ -0,0 +1,12 @@
+---
+title: Home
+date: 2023-12-12
+lastmod: 2023-12-12
+description: AgroMetInfo home page - provision of agroclimatic indicators and indicators for monitoring winter crops (soft wheat) and spring crops (maize) using the STICS model in real time in the form of maps and graphs.
+type: home
+layout: index
+---
+
+AgroMetInfo documentation is [in French](../).
+
+<div class="app"><a href="../app/" role="button"><span class="fas fa-map"/> Browse our interactive map</a></div>
\ No newline at end of file
diff --git a/content/_index.md b/content/_index.md
index 0eb7b5a..ad38c54 100644
--- a/content/_index.md
+++ b/content/_index.md
@@ -15,6 +15,8 @@ AgroMetInfo met à disposition des indicateurs agroclimatiques et des indicateur
 
 Cette application est portée par l’unité de service [AgroClim](http://www6.paca.inrae.fr/agroclim/).
 
+<div class="app"><a href="app/" role="button"><span class="fas fa-map"/> Découvrir notre carte interactive</a></div>
+
 ## Comment se retrouver dans ces pages ?
 
 La documentation est structurée en 4 parties :
diff --git a/themes/hugo-theme-relearn/layouts/home/index.html b/themes/hugo-theme-relearn/layouts/home/index.html
new file mode 100644
index 0000000..cd7a736
--- /dev/null
+++ b/themes/hugo-theme-relearn/layouts/home/index.html
@@ -0,0 +1,95 @@
+{{- $assetBusting := not .Site.Params.disableAssetsBusting }}
+{{- $page := . }}
+{{- $themevariants := slice | append (.Site.Params.themeVariant | default "auto" ) }}
+<!DOCTYPE html>
+<html lang="{{ .Page.Language | default " en" }}" dir="{{ T " Reading-direction" | default "ltr" }}">
+<head>
+  <link href="{{"css/fontawesome-all.min.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;">
+  <link href="{{"css/home.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
+  <link href="{{"css/fonts.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;">
+  <title>{{ .Page.Title }}</title>
+  <base href="{{ .Site.BaseURL }}">
+  {{- partialCached "favicon.html" . }}
+  <script>
+    function setTheme(theme) {
+      console.log("set theme " + theme);
+      document.documentElement.setAttribute("data-theme", theme);
+      localStorage.setItem('theme', theme);
+      var classes = "fas fa-toggle-on";
+      if (theme == "dark") {
+        classes = "fas fa-toggle-off";
+      }
+      var elem = document.getElementById("toggle-theme").className = classes;
+    }
+    function getTheme() {
+      //default to light
+      var theme="light";
+      //local storage is used to override OS theme settings
+      if (localStorage.getItem("theme")) {
+        if (localStorage.getItem("theme") == "dark") {
+          theme = "dark";
+        }
+      } else if (document.documentElement.getAttribute("data-theme")) {
+        if (document.documentElement.getAttribute("data-theme") == "dark") {
+          theme = "dark";
+        }
+      } else if(window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches) {
+        //OS theme setting detected as dark
+        theme = "dark";
+      }
+      return theme;
+    }
+    function toggleTheme() {
+      const theme = getTheme();
+      if (theme === 'dark') {
+        setTheme('light');
+      } else {
+        setTheme('dark');
+      }
+    }
+    console.log("get theme : " + getTheme());
+    setTheme(getTheme());
+  </script>
+</head>
+<body>
+  <nav>
+    {{- partial "agroclimapps.html" }}
+    <ul>
+      <li class="brand">
+        <img alt="logo" src="{{ "images/logo_etat-agrometinfo.svg" | relURL }}" />
+      </li>
+      {{- with .Site.Menus.toplinks }}
+        {{- range sort . "Weight" }}
+          {{- $shortcut := . }}
+          {{- with $page.Site.GetPage (printf "%s" $shortcut.URL ) }}
+            {{- $to := . }}
+        <li>{{ $shortcut.Pre }}<a class="padding" href="{{ partial "relLangPrettyUglyURL.hugo" (dict "to" $to) }}">{{ safeHTML $shortcut.Name }}</a>{{ $shortcut.Post }}</li>
+          {{- else }}
+        <li>{{ $shortcut.Pre }}<a class="padding" href="{{ $shortcut.URL | relLangURL }}">{{ safeHTML $shortcut.Name }}</a>{{ $shortcut.Post }}</li>
+          {{- end }}
+        {{- end }}
+      {{- end }}
+    </ul>
+  </nav>
+  <article>
+    {{- .Content }}
+  </article>
+  <footer>
+      {{- with .Site.Menus.shortcuts }}
+      <ul>
+        {{- range sort . "Weight" }}
+        {{- $shortcut := . }}
+        {{- with $page.Site.GetPage (printf "%s" $shortcut.URL ) }}
+        {{- $to := . }}
+        <li>{{ $shortcut.Pre }}<a class="padding" href="{{ partial "relLangPrettyUglyURL.hugo" (dict "to" $to) }}">{{ safeHTML $shortcut.Name }}</a>{{ $shortcut.Post }}</li>
+        {{- else }}
+        <li>{{ $shortcut.Pre }}<a class="padding" href="{{ $shortcut.URL | relLangURL }}">{{ safeHTML $shortcut.Name }}</a>{{ $shortcut.Post }}</li>
+        {{- end }}
+        {{- end }}
+        <li><a id="toggle-theme" class="fas fa-toggle-on" onclick="toggleTheme()" title="{{ .Site.Params.toggleTheme }}"></a></li>
+      </ul>
+      {{- end }}
+      <div class="license">{{ .Site.Params.license | safeHTML }}</div>
+    </footer>
+</body>
+</html>
\ No newline at end of file
diff --git a/themes/hugo-theme-relearn/layouts/partials/menu-footer.html b/themes/hugo-theme-relearn/layouts/partials/menu-footer.html
index 3f70fb5..134008d 100644
--- a/themes/hugo-theme-relearn/layouts/partials/menu-footer.html
+++ b/themes/hugo-theme-relearn/layouts/partials/menu-footer.html
@@ -1 +1 @@
-<div class="license">Sauf mention contraire, tous les textes de ce site sont sous <a href="https://www.etalab.gouv.fr/licence-ouverte-open-licence/" target="_blank">licence etalab-2.0</a>.</div>
\ No newline at end of file
+<div class="license">{{ .Site.Params.license | safeHTML }}</div>
\ No newline at end of file
diff --git a/themes/hugo-theme-relearn/static/css/home.css b/themes/hugo-theme-relearn/static/css/home.css
new file mode 100644
index 0000000..98644cd
--- /dev/null
+++ b/themes/hugo-theme-relearn/static/css/home.css
@@ -0,0 +1,156 @@
+a {
+    color: var(--INTERNAL-MAIN-LINK-color);
+}
+
+article {
+    background-color: var(--INTERNAL-MAIN-BG-color);
+    margin-left: auto;
+    margin-right: auto;
+    padding: 1em;
+}
+
+@media (min-width:768px) {
+    article {
+      width:750px
+    }
+}
+
+@media (min-width: 1200px) {
+    article {
+      width: 1170px;
+    }
+}
+
+body {
+    background-color: var(--INTERNAL-MENU-SECTIONS-BG-color);
+    color: var(--INTERNAL-MAIN-TEXT-color);
+    font-family: var(--INTERNAL-MAIN-font);
+    font-size: 1.015625rem;
+    font-weight: 300;
+    line-height: 1.574;
+}
+
+footer>ul,
+nav>ul {
+    align-items: baseline;
+    display: flex;
+    flex-wrap: wrap;
+    list-style: none;
+    max-width: 100%;
+    padding-left: 0.5em;
+    padding-right: 0.5em;
+    width: 100%;
+}
+
+footer>ul>li,
+nav>ul>li {
+    padding: 1rem;
+}
+
+p {
+    margin: 1rem 0;
+}
+
+.agroclim-apps {
+    cursor: pointer;
+    position: absolute;
+    right: 0.5em;
+    top: 50px;
+    z-index: 1000;
+}
+
+.agroclim-apps .menu {
+    background-color: var(--INTERNAL-MENU-SECTIONS-BG-color);
+    display: none;
+    margin-top: 2em;
+    padding: 15px;
+}
+
+.agroclim-apps i {
+    background-color: var(--INTERNAL-MAIN-BG-color);
+    color: var(--INTERNAL-MAIN-LINK-color);
+    float: right;
+}
+
+.agroclim-apps img {
+    height: 60px;
+    width: 60px;
+}
+
+.agroclim-apps ul {
+    box-sizing: content-box;
+    list-style: none;
+    padding-left: 0;
+    width: 210px;
+}
+
+.agroclim-apps:hover .menu {
+    display: block;
+}
+
+.agroclim-apps li {
+    display: inline-block;
+    padding-bottom: 15px;
+    text-align: center;
+    width: 100px;
+}
+
+.agrometinfo li>a {
+    display: block;
+    padding-bottom: 0px;
+    padding-top: 0px;
+}
+
+.app {
+    text-align: center;
+}
+
+.app > a {
+    background-color: var(--INTERNAL-MAIN-LINK-color);;
+    border: 1px solid;
+    border-color: var(--INTERNAL-MAIN-LINK-color);;
+    color: var(--INTERNAL-MAIN-BG-color);
+    padding: 1rem 2rem;
+    font-size: 14px;
+    font-weight: 600;
+    line-height: 1.33;
+    border-radius: 6px;
+    text-decoration: none;
+}
+
+.app > a:hover {
+    background-color: #eee;
+    border-color: #eee;
+    color: var(--INTERNAL-MAIN-LINK-color);
+}
+
+.brand img {
+    background-color: #ffffff;
+    max-width: 128px;
+}
+
+.license {
+    font-size: 0.75em;
+    padding: 1em 1em 0 1em;
+}
+
+
+:root {
+    color-scheme: light dark;
+    --INTERNAL-MAIN-font: "Work Sans", "Helvetica", "Tahoma", "Geneva", "Arial", sans-serif;
+    --INTERNAL-MAIN-LINK-color: rgba(72, 106, 201, 1);
+}
+
+[data-theme="light"] {
+    --INTERNAL-MAIN-BG-color: rgba(255, 255, 255, 1);
+    --INTERNAL-MAIN-TEXT-color: rgba(16, 16, 16, 1);
+    --INTERNAL-MENU-SECTIONS-BG-color: #f7f7f7;
+    --MENU-HOME-LINK-color: rgba( 64, 64, 64, 1 );
+}
+
+[data-theme="dark"] {
+    --INTERNAL-MAIN-BG-color: rgba(32, 32, 32, 1);
+    --INTERNAL-MAIN-TEXT-color: rgba(224, 224, 224, 1);
+    --INTERNAL-MENU-SECTIONS-BG-color: rgba(39, 39, 39, 1);
+    --MENU-HOME-LINK-color: rgba( 224, 224, 224, 1 );
+}
\ No newline at end of file
-- 
GitLab


From a86c5bf27fc627d3c4bd46794a29520a8b330374 Mon Sep 17 00:00:00 2001
From: Olivier Maury <Olivier.Maury@inrae.fr>
Date: Tue, 12 Dec 2023 11:57:33 +0100
Subject: [PATCH 3/8] correction 4c2eb27c

---
 themes/hugo-theme-relearn/layouts/home/index.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/themes/hugo-theme-relearn/layouts/home/index.html b/themes/hugo-theme-relearn/layouts/home/index.html
index cd7a736..f862c03 100644
--- a/themes/hugo-theme-relearn/layouts/home/index.html
+++ b/themes/hugo-theme-relearn/layouts/home/index.html
@@ -86,7 +86,7 @@
         <li>{{ $shortcut.Pre }}<a class="padding" href="{{ $shortcut.URL | relLangURL }}">{{ safeHTML $shortcut.Name }}</a>{{ $shortcut.Post }}</li>
         {{- end }}
         {{- end }}
-        <li><a id="toggle-theme" class="fas fa-toggle-on" onclick="toggleTheme()" title="{{ .Site.Params.toggleTheme }}"></a></li>
+        <li><a id="toggle-theme" class="fas fa-toggle-on" onclick="toggleTheme()" title="{{ $page.Site.Params.toggleTheme }}"></a></li>
       </ul>
       {{- end }}
       <div class="license">{{ .Site.Params.license | safeHTML }}</div>
-- 
GitLab


From 5a556afc0bc8a008c2e3f5723fd8a33cafcbe4e2 Mon Sep 17 00:00:00 2001
From: Olivier Maury <Olivier.Maury@inrae.fr>
Date: Tue, 12 Dec 2023 12:10:31 +0100
Subject: [PATCH 4/8] correction 4c2eb27c

---
 config/_default/hugo.toml                                     | 4 ++--
 content/_index.en.md                                          | 2 +-
 content/_index.md                                             | 2 +-
 .../layouts/shortcodes/agrometinfoAppUrl.html                 | 1 +
 4 files changed, 5 insertions(+), 4 deletions(-)
 create mode 100644 themes/hugo-theme-relearn/layouts/shortcodes/agrometinfoAppUrl.html

diff --git a/config/_default/hugo.toml b/config/_default/hugo.toml
index 6d9d819..cc0d281 100644
--- a/config/_default/hugo.toml
+++ b/config/_default/hugo.toml
@@ -86,7 +86,7 @@ France"""
 
     [[languages.en.menu.toplinks]]
     name = "Interactive map"
-    url = "../app/"
+    url = "https://www.agrometinfo.fr/app/"
     weight = 1
 
     [languages.fr]
@@ -152,5 +152,5 @@ France"""
 
     [[languages.fr.menu.toplinks]]
     name = "Carte interactive"
-    url = "/app/"
+    url = "https://www.agrometinfo.fr/app/"
     weight = 5
diff --git a/content/_index.en.md b/content/_index.en.md
index 7d93da9..7aa7241 100644
--- a/content/_index.en.md
+++ b/content/_index.en.md
@@ -9,4 +9,4 @@ layout: index
 
 AgroMetInfo documentation is [in French](../).
 
-<div class="app"><a href="../app/" role="button"><span class="fas fa-map"/> Browse our interactive map</a></div>
\ No newline at end of file
+<div class="app"><a href="{{< agrometinfoAppUrl >}}" role="button"><span class="fas fa-map"/> Browse our interactive map</a></div>
\ No newline at end of file
diff --git a/content/_index.md b/content/_index.md
index ad38c54..775c42c 100644
--- a/content/_index.md
+++ b/content/_index.md
@@ -15,7 +15,7 @@ AgroMetInfo met à disposition des indicateurs agroclimatiques et des indicateur
 
 Cette application est portée par l’unité de service [AgroClim](http://www6.paca.inrae.fr/agroclim/).
 
-<div class="app"><a href="app/" role="button"><span class="fas fa-map"/> Découvrir notre carte interactive</a></div>
+<div class="app"><a href="{{< agrometinfoAppUrl >}}" role="button"><span class="fas fa-map"/> Découvrir notre carte interactive</a></div>
 
 ## Comment se retrouver dans ces pages ?
 
diff --git a/themes/hugo-theme-relearn/layouts/shortcodes/agrometinfoAppUrl.html b/themes/hugo-theme-relearn/layouts/shortcodes/agrometinfoAppUrl.html
new file mode 100644
index 0000000..9c10b91
--- /dev/null
+++ b/themes/hugo-theme-relearn/layouts/shortcodes/agrometinfoAppUrl.html
@@ -0,0 +1 @@
+{{ .Page.Site.Params.baseURL }}app/
\ No newline at end of file
-- 
GitLab


From ee8ba6370f61b3ead51f4a1f2f8dd9bbaf71453f Mon Sep 17 00:00:00 2001
From: Olivier Maury <Olivier.Maury@inrae.fr>
Date: Tue, 12 Dec 2023 12:16:07 +0100
Subject: [PATCH 5/8] correction 4c2eb27c

---
 bin/check.sh              | 2 +-
 bin/deploy.sh             | 2 +-
 config/_default/hugo.toml | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/bin/check.sh b/bin/check.sh
index 5623aea..3d35759 100755
--- a/bin/check.sh
+++ b/bin/check.sh
@@ -25,7 +25,7 @@ if [ ! -d $INPUT_DIR ]; then
 fi
 
 echo_bold_green "- Checking links in $INPUT_DIR..."
-$BIN_DIR/lychee --offline $INPUT_DIR
+$BIN_DIR/lychee --offline --exclude '.*/app$' $INPUT_DIR
 if [ $? -ne 0 ]; then
 	echo_bold_red "Errors were found"
 	exit 1
diff --git a/bin/deploy.sh b/bin/deploy.sh
index e53c114..2f4dcd0 100755
--- a/bin/deploy.sh
+++ b/bin/deploy.sh
@@ -76,7 +76,7 @@ echo_bold_green "- Launching Hugo server..."
 hugo server &
 sleep 1
 echo_bold_green "- Checking links..."
-bin/lychee http://localhost:1313/
+bin/lychee --exclude '.*/app$' http://localhost:1313/
 if [ $? -ne 0 ]; then
 	echo_bold_red "Errors were found"
 	pkill hugo
diff --git a/config/_default/hugo.toml b/config/_default/hugo.toml
index cc0d281..6d9d819 100644
--- a/config/_default/hugo.toml
+++ b/config/_default/hugo.toml
@@ -86,7 +86,7 @@ France"""
 
     [[languages.en.menu.toplinks]]
     name = "Interactive map"
-    url = "https://www.agrometinfo.fr/app/"
+    url = "../app/"
     weight = 1
 
     [languages.fr]
@@ -152,5 +152,5 @@ France"""
 
     [[languages.fr.menu.toplinks]]
     name = "Carte interactive"
-    url = "https://www.agrometinfo.fr/app/"
+    url = "/app/"
     weight = 5
-- 
GitLab


From ee42692bfc4e8c668566e4f3dec845f4617be859 Mon Sep 17 00:00:00 2001
From: Olivier Maury <Olivier.Maury@inrae.fr>
Date: Tue, 12 Dec 2023 12:34:56 +0100
Subject: [PATCH 6/8] =?UTF-8?q?conserver=20le=20th=C3=A8me=20entre=20l'acc?=
 =?UTF-8?q?ueil=20et=20les=20autres=20pages?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../hugo-theme-relearn/layouts/home/index.html   | 16 ++++++++--------
 themes/hugo-theme-relearn/static/css/home.css    | 11 +++++++----
 2 files changed, 15 insertions(+), 12 deletions(-)

diff --git a/themes/hugo-theme-relearn/layouts/home/index.html b/themes/hugo-theme-relearn/layouts/home/index.html
index f862c03..2a65bee 100644
--- a/themes/hugo-theme-relearn/layouts/home/index.html
+++ b/themes/hugo-theme-relearn/layouts/home/index.html
@@ -11,10 +11,11 @@
   <base href="{{ .Site.BaseURL }}">
   {{- partialCached "favicon.html" . }}
   <script>
+    const baseUriFull='{{ trim .Site.BaseURL "/" | safeJS }}/';
+    const localStorageThemeKey = baseUriFull + 'variant';
     function setTheme(theme) {
-      console.log("set theme " + theme);
       document.documentElement.setAttribute("data-theme", theme);
-      localStorage.setItem('theme', theme);
+      localStorage.setItem(localStorageThemeKey, "zen-" + theme);
       var classes = "fas fa-toggle-on";
       if (theme == "dark") {
         classes = "fas fa-toggle-off";
@@ -23,10 +24,10 @@
     }
     function getTheme() {
       //default to light
-      var theme="light";
+      var theme = "light";
       //local storage is used to override OS theme settings
-      if (localStorage.getItem("theme")) {
-        if (localStorage.getItem("theme") == "dark") {
+      if (localStorage.getItem(localStorageThemeKey)) {
+        if (localStorage.getItem(localStorageThemeKey) == "zen-dark") {
           theme = "dark";
         }
       } else if (document.documentElement.getAttribute("data-theme")) {
@@ -47,7 +48,6 @@
         setTheme('dark');
       }
     }
-    console.log("get theme : " + getTheme());
     setTheme(getTheme());
   </script>
 </head>
@@ -81,9 +81,9 @@
         {{- $shortcut := . }}
         {{- with $page.Site.GetPage (printf "%s" $shortcut.URL ) }}
         {{- $to := . }}
-        <li>{{ $shortcut.Pre }}<a class="padding" href="{{ partial "relLangPrettyUglyURL.hugo" (dict "to" $to) }}">{{ safeHTML $shortcut.Name }}</a>{{ $shortcut.Post }}</li>
+        <li>{{ $shortcut.Pre }}<a href="{{ partial "relLangPrettyUglyURL.hugo" (dict "to" $to) }}">{{ safeHTML $shortcut.Name }}</a>{{ $shortcut.Post }}</li>
         {{- else }}
-        <li>{{ $shortcut.Pre }}<a class="padding" href="{{ $shortcut.URL | relLangURL }}">{{ safeHTML $shortcut.Name }}</a>{{ $shortcut.Post }}</li>
+        <li>{{ $shortcut.Pre }}<a href="{{ $shortcut.URL | relLangURL }}">{{ safeHTML $shortcut.Name }}</a>{{ $shortcut.Post }}</li>
         {{- end }}
         {{- end }}
         <li><a id="toggle-theme" class="fas fa-toggle-on" onclick="toggleTheme()" title="{{ $page.Site.Params.toggleTheme }}"></a></li>
diff --git a/themes/hugo-theme-relearn/static/css/home.css b/themes/hugo-theme-relearn/static/css/home.css
index 98644cd..21b4c76 100644
--- a/themes/hugo-theme-relearn/static/css/home.css
+++ b/themes/hugo-theme-relearn/static/css/home.css
@@ -26,7 +26,7 @@ body {
     color: var(--INTERNAL-MAIN-TEXT-color);
     font-family: var(--INTERNAL-MAIN-font);
     font-size: 1.015625rem;
-    font-weight: 300;
+    font-weight: var(--FONT-WEIGHT);
     line-height: 1.574;
 }
 
@@ -44,7 +44,7 @@ nav>ul {
 
 footer>ul>li,
 nav>ul>li {
-    padding: 1rem;
+    padding-left: 1rem;
 }
 
 p {
@@ -131,25 +131,28 @@ p {
 
 .license {
     font-size: 0.75em;
-    padding: 1em 1em 0 1em;
+    padding: 1em 1em 0 2em;
 }
 
 
 :root {
     color-scheme: light dark;
     --INTERNAL-MAIN-font: "Work Sans", "Helvetica", "Tahoma", "Geneva", "Arial", sans-serif;
-    --INTERNAL-MAIN-LINK-color: rgba(72, 106, 201, 1);
 }
 
 [data-theme="light"] {
+    --FONT-WEIGHT: 300;
     --INTERNAL-MAIN-BG-color: rgba(255, 255, 255, 1);
+    --INTERNAL-MAIN-LINK-color: rgba(72, 106, 201, 1);
     --INTERNAL-MAIN-TEXT-color: rgba(16, 16, 16, 1);
     --INTERNAL-MENU-SECTIONS-BG-color: #f7f7f7;
     --MENU-HOME-LINK-color: rgba( 64, 64, 64, 1 );
 }
 
 [data-theme="dark"] {
+    --FONT-WEIGHT: 400;
     --INTERNAL-MAIN-BG-color: rgba(32, 32, 32, 1);
+    --INTERNAL-MAIN-LINK-color: rgb(129, 159, 245);
     --INTERNAL-MAIN-TEXT-color: rgba(224, 224, 224, 1);
     --INTERNAL-MENU-SECTIONS-BG-color: rgba(39, 39, 39, 1);
     --MENU-HOME-LINK-color: rgba( 224, 224, 224, 1 );
-- 
GitLab


From 73c6cceca67dd89e511bb200b9146192b4243c5e Mon Sep 17 00:00:00 2001
From: Olivier Maury <Olivier.Maury@inrae.fr>
Date: Tue, 12 Dec 2023 14:48:10 +0100
Subject: [PATCH 7/8] =?UTF-8?q?Correction=20adaptabilit=C3=A9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 content/_index.en.md                          |  2 +-
 content/_index.md                             | 14 +++++-----
 .../layouts/home/index.html                   |  3 ++-
 themes/hugo-theme-relearn/static/css/home.css | 26 ++++++++++++++-----
 4 files changed, 29 insertions(+), 16 deletions(-)

diff --git a/content/_index.en.md b/content/_index.en.md
index 7aa7241..eac8cec 100644
--- a/content/_index.en.md
+++ b/content/_index.en.md
@@ -9,4 +9,4 @@ layout: index
 
 AgroMetInfo documentation is [in French](../).
 
-<div class="app"><a href="{{< agrometinfoAppUrl >}}" role="button"><span class="fas fa-map"/> Browse our interactive map</a></div>
\ No newline at end of file
+<div class="app"><a href="{{< agrometinfoAppUrl >}}" role="button"><span class="fas fa-map"></span> Browse our interactive map</a></div>
diff --git a/content/_index.md b/content/_index.md
index 775c42c..fe918f3 100644
--- a/content/_index.md
+++ b/content/_index.md
@@ -7,19 +7,19 @@ type: home
 layout: index
 ---
 
-## Qu’est-ce qu’AgroMetInfo ?
+## Qu’est-ce qu’AgroMetInfo&#8239;?
 
-AgroMetInfo met à disposition des indicateurs agroclimatiques et des indicateurs de suivi de culture d’hiver (culture type  blé tendre) et de printemps (culture type maïs) par le modèle STICS en temps réel sous forme de cartes et de graphiques. Ils sont calculés à partir des variables climatiques issues de la réanalyse SAFRAN produite chaque jour par Météo-France (mailles de 8x8km de résolution sur le territoire métropolitiain et la Corse). Toutefois, AgroMetInfo n’utilise que les mailles dont l’altitude moyenne est inférieure à 800 mètres. Ainsi, AgroMetInfo fournit deux types d’éléments, à partir de deux démarches :
-- la première caractérise les conditions agroclimatiques en « temps réel » à partir d’indicateurs usuels de type somme des températures, évolution d’un bilan hydrique simplifié, cumul des précipitations,
-- la seconde la simulation par STICS d’une culture de blé tendre et de maïs sur la base d’une agriculture « simplifiée » (panel limité d’itinéraires techniques, de conditions variétales, de types de sols.). Les résultats produits sont des indicateurs permettant de caractériser des conditions agroclimatiques de l’année en cours et  de les comparer à des conditions passées.
+AgroMetInfo met à disposition des indicateurs agroclimatiques et des indicateurs de suivi de culture d’hiver (culture type  blé tendre) et de printemps (culture type maïs) par le modèle STICS en temps réel sous forme de cartes et de graphiques. Ils sont calculés à partir des variables climatiques issues de la réanalyse SAFRAN produite chaque jour par Météo-France (mailles de 8x8km de résolution sur le territoire métropolitiain et la Corse). Toutefois, AgroMetInfo n’utilise que les mailles dont l’altitude moyenne est inférieure à 800 mètres. Ainsi, AgroMetInfo fournit deux types d’éléments, à partir de deux démarches&nbsp;:
+- la première caractérise les conditions agroclimatiques en «&nbsp;temps réel&nbsp;» à partir d’indicateurs usuels de type somme des températures, évolution d’un bilan hydrique simplifié, cumul des précipitations,
+- la seconde la simulation par STICS d’une culture de blé tendre et de maïs sur la base d’une agriculture «&nbsp;simplifiée&nbsp;» (panel limité d’itinéraires techniques, de conditions variétales, de types de sols). Les résultats produits sont des indicateurs permettant de caractériser des conditions agroclimatiques de l’année en cours et  de les comparer à des conditions passées.
 
 Cette application est portée par l’unité de service [AgroClim](http://www6.paca.inrae.fr/agroclim/).
 
-<div class="app"><a href="{{< agrometinfoAppUrl >}}" role="button"><span class="fas fa-map"/> Découvrir notre carte interactive</a></div>
+<div class="app"><a href="{{< agrometinfoAppUrl >}}" role="button"><span class="fas fa-map"></span> Découvrir notre carte interactive</a></div>
 
-## Comment se retrouver dans ces pages ?
+## Comment se retrouver dans ces pages&#8239;?
 
-La documentation est structurée en 4 parties :
+La documentation est structurée en 4 parties&nbsp;:
 
 * [Découvrir AgroMetInfo](decouvrir.html) vous guide dans la prise en main de l’application,
 * [Guides pratiques](guides.html) présente des cas concrets d’utilisation,
diff --git a/themes/hugo-theme-relearn/layouts/home/index.html b/themes/hugo-theme-relearn/layouts/home/index.html
index 2a65bee..826359c 100644
--- a/themes/hugo-theme-relearn/layouts/home/index.html
+++ b/themes/hugo-theme-relearn/layouts/home/index.html
@@ -4,6 +4,7 @@
 <!DOCTYPE html>
 <html lang="{{ .Page.Language | default " en" }}" dir="{{ T " Reading-direction" | default "ltr" }}">
 <head>
+  {{- partial "meta.html" . }}
   <link href="{{"css/fontawesome-all.min.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;">
   <link href="{{"css/home.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
   <link href="{{"css/fonts.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;">
@@ -92,4 +93,4 @@
       <div class="license">{{ .Site.Params.license | safeHTML }}</div>
     </footer>
 </body>
-</html>
\ No newline at end of file
+</html>
diff --git a/themes/hugo-theme-relearn/static/css/home.css b/themes/hugo-theme-relearn/static/css/home.css
index 21b4c76..06f9a0e 100644
--- a/themes/hugo-theme-relearn/static/css/home.css
+++ b/themes/hugo-theme-relearn/static/css/home.css
@@ -28,6 +28,11 @@ body {
     font-size: 1.015625rem;
     font-weight: var(--FONT-WEIGHT);
     line-height: 1.574;
+    margin: 0;
+}
+
+nav>ul {
+    margin-top: 0;
 }
 
 footer>ul,
@@ -37,7 +42,7 @@ nav>ul {
     flex-wrap: wrap;
     list-style: none;
     max-width: 100%;
-    padding-left: 0.5em;
+    padding-left: 0;
     padding-right: 0.5em;
     width: 100%;
 }
@@ -47,6 +52,10 @@ nav>ul>li {
     padding-left: 1rem;
 }
 
+li.brand {
+	padding-left: 0;
+}
+
 p {
     margin: 1rem 0;
 }
@@ -55,7 +64,7 @@ p {
     cursor: pointer;
     position: absolute;
     right: 0.5em;
-    top: 50px;
+    top: 0.5em;
     z-index: 1000;
 }
 
@@ -84,6 +93,7 @@ p {
     width: 210px;
 }
 
+.agroclim-apps:focus .menu,
 .agroclim-apps:hover .menu {
     display: block;
 }
@@ -110,9 +120,7 @@ p {
     border: 1px solid;
     border-color: var(--INTERNAL-MAIN-LINK-color);;
     color: var(--INTERNAL-MAIN-BG-color);
-    padding: 1rem 2rem;
-    font-size: 14px;
-    font-weight: 600;
+    padding: 1rem;
     line-height: 1.33;
     border-radius: 6px;
     text-decoration: none;
@@ -124,13 +132,17 @@ p {
     color: var(--INTERNAL-MAIN-LINK-color);
 }
 
+.app > a > span {
+    padding-right: 0.5rem;
+}
+
 .brand img {
     background-color: #ffffff;
     max-width: 128px;
 }
 
 .license {
-    font-size: 0.75em;
+    font-size: 0.75rem;
     padding: 1em 1em 0 2em;
 }
 
@@ -156,4 +168,4 @@ p {
     --INTERNAL-MAIN-TEXT-color: rgba(224, 224, 224, 1);
     --INTERNAL-MENU-SECTIONS-BG-color: rgba(39, 39, 39, 1);
     --MENU-HOME-LINK-color: rgba( 224, 224, 224, 1 );
-}
\ No newline at end of file
+}
-- 
GitLab


From 4d1e2b6365e0582ee6395d3410e382100a9374f4 Mon Sep 17 00:00:00 2001
From: Olivier Maury <Olivier.Maury@inrae.fr>
Date: Mon, 18 Dec 2023 16:09:36 +0100
Subject: [PATCH 8/8] Mise en page du pied de page

---
 themes/hugo-theme-relearn/static/css/home.css | 28 +++++++++++++++++--
 1 file changed, 25 insertions(+), 3 deletions(-)

diff --git a/themes/hugo-theme-relearn/static/css/home.css b/themes/hugo-theme-relearn/static/css/home.css
index 06f9a0e..f5721d2 100644
--- a/themes/hugo-theme-relearn/static/css/home.css
+++ b/themes/hugo-theme-relearn/static/css/home.css
@@ -1,22 +1,29 @@
 a {
     color: var(--INTERNAL-MAIN-LINK-color);
+    text-decoration: none;
 }
 
 article {
     background-color: var(--INTERNAL-MAIN-BG-color);
+}
+
+article,
+footer {
     margin-left: auto;
     margin-right: auto;
     padding: 1em;
 }
 
 @media (min-width:768px) {
-    article {
+    article,
+    footer {
       width:750px
     }
 }
 
 @media (min-width: 1200px) {
-    article {
+    article,
+    footer {
       width: 1170px;
     }
 }
@@ -35,6 +42,11 @@ nav>ul {
     margin-top: 0;
 }
 
+footer>ul {
+    box-shadow: inset 0 1px 0 0 var(--INTERNAL-BORDER-color);
+    padding: .5rem 0 1rem;
+}
+
 footer>ul,
 nav>ul {
     align-items: baseline;
@@ -47,9 +59,17 @@ nav>ul {
     width: 100%;
 }
 
+footer>ul>li {
+    border-left: 1px solid var(--INTERNAL-BORDER-color);
+}
+footer>ul>li:first-child {
+    border-left: none;
+}
+
 footer>ul>li,
 nav>ul>li {
-    padding-left: 1rem;
+    padding-left: 0.5rem;
+    padding-right: 0.5rem;
 }
 
 li.brand {
@@ -154,6 +174,7 @@ p {
 
 [data-theme="light"] {
     --FONT-WEIGHT: 300;
+    --INTERNAL-BORDER-color: #dddddd;
     --INTERNAL-MAIN-BG-color: rgba(255, 255, 255, 1);
     --INTERNAL-MAIN-LINK-color: rgba(72, 106, 201, 1);
     --INTERNAL-MAIN-TEXT-color: rgba(16, 16, 16, 1);
@@ -163,6 +184,7 @@ p {
 
 [data-theme="dark"] {
     --FONT-WEIGHT: 400;
+    --INTERNAL-BORDER-color: #656565;
     --INTERNAL-MAIN-BG-color: rgba(32, 32, 32, 1);
     --INTERNAL-MAIN-LINK-color: rgb(129, 159, 245);
     --INTERNAL-MAIN-TEXT-color: rgba(224, 224, 224, 1);
-- 
GitLab