tUse localization for menu and fix styling of language hyperlinks - andersdamsgaard.com - my photography webpage
(HTM) git clone git://src.adamsgaard.dk/andersdamsgaard.com
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) Submodules
(DIR) README
(DIR) LICENSE
---
(DIR) commit dfc117981ec113bef69c45578aac0ef96044d2af
(DIR) parent a47c8c0612fe1b0d8f9073e9efb96f8f76ae32af
(HTM) Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Sun, 4 Nov 2018 22:28:52 +0100
Use localization for menu and fix styling of language hyperlinks
Diffstat:
M themes/tale-mod/layouts/index.html | 13 ++++++++-----
M themes/tale-mod/layouts/partials/h… | 6 ++++++
2 files changed, 14 insertions(+), 5 deletions(-)
---
(DIR) diff --git a/themes/tale-mod/layouts/index.html b/themes/tale-mod/layouts/index.html
t@@ -27,10 +27,13 @@
</center>
</main>
-<ul>
-{{ range $.Site.Home.AllTranslations }}
-<li><a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a></li>
-{{ end }}
-</ul>
+<br>
+<p>
+ <center>
+ {{ range $.Site.Home.AllTranslations }}
+ <a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a>
+ {{ end }}
+ </center>
+</p>
{{ partial "footer.html" . }}
(DIR) diff --git a/themes/tale-mod/layouts/partials/header.html b/themes/tale-mod/layouts/partials/header.html
t@@ -10,9 +10,15 @@
<h2 class="nav-title">{{ .Site.Title }}</h2>
</a>
<ul>
+ {{- if eq .Lang "da" }}
+ <li><a href="{{ .Site.BaseURL }}">Portefølje</a></li>
+ <li><a href="{{ .Site.BaseURL }}prints">Køb billeder</a></li>
+ <li><a href="{{ .Site.BaseURL }}about">Om</a></li>
+ {{- else }}
<li><a href="{{ .Site.BaseURL }}">Portfolio</a></li>
<li><a href="{{ .Site.BaseURL }}prints">Prints</a></li>
<li><a href="{{ .Site.BaseURL }}about">About</a></li>
+ {{- end }}
</ul>
</div>
</nav>