Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/blankoworld/hugo_theme_adam_eve.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier DOSSMANN <git@dossmann.net>2019-04-24 18:13:41 +0300
committerOlivier DOSSMANN <git@dossmann.net>2019-04-24 18:13:41 +0300
commit9cb590433fc5796b55c3504a07e6c115a6701159 (patch)
tree71fbfdf493132c09d668f29cf19d15dc8f33496f
parenta2c20bfb0b9c926396e82c185677fa5b351d54c6 (diff)
Add homepage link on all pages. Except homepage (obviously)
-rw-r--r--i18n/en.toml3
-rw-r--r--i18n/fr.toml3
-rw-r--r--layouts/partials/menu.html3
3 files changed, 9 insertions, 0 deletions
diff --git a/i18n/en.toml b/i18n/en.toml
index cf15484..7ed7969 100644
--- a/i18n/en.toml
+++ b/i18n/en.toml
@@ -1,3 +1,6 @@
+[homepage]
+other = "Homepage"
+
[toc]
other = "Table of contents"
diff --git a/i18n/fr.toml b/i18n/fr.toml
index ec254db..5f0210f 100644
--- a/i18n/fr.toml
+++ b/i18n/fr.toml
@@ -1,3 +1,6 @@
+[homepage]
+other = "Accueil"
+
[toc]
other = "Table des matières"
diff --git a/layouts/partials/menu.html b/layouts/partials/menu.html
index 1e4a176..c3472ce 100644
--- a/layouts/partials/menu.html
+++ b/layouts/partials/menu.html
@@ -1,4 +1,7 @@
<nav>
+ {{ if not .Page.IsHome }}
+ <a href="{{ .Site.BaseURL | absLangURL }}"><span class='homepage'>⌂</span>&nbsp;{{ i18n "homepage" }}</a>
+ {{ end }}
{{ $currentPage := . }}
{{ range .Site.Menus.main }}
<a class="nav-item{{if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }} active{{end}}" href="{{.URL | absLangURL}}">{{ .Pre}} {{ .Name }}</a>