tUse localization for menu and fix styling of language hyperlinks - andersdamsg… | |
git clone git://src.adamsgaard.dk/andersdamsgaard.com | |
Log | |
Files | |
Refs | |
Submodules | |
README | |
LICENSE | |
--- | |
commit dfc117981ec113bef69c45578aac0ef96044d2af | |
parent a47c8c0612fe1b0d8f9073e9efb96f8f76ae32af | |
Author: Anders Damsgaard <[email protected]> | |
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(-) | |
--- | |
diff --git a/themes/tale-mod/layouts/index.html b/themes/tale-mod/layouts/index… | |
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" . }} | |
diff --git a/themes/tale-mod/layouts/partials/header.html b/themes/tale-mod/lay… | |
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<… | |
+ <li><a href="{{ .Site.BaseURL }}prints">Køb b… | |
+ <li><a href="{{ .Site.BaseURL }}about">Om</a><… | |
+ {{- else }} | |
<li><a href="{{ .Site.BaseURL }}">Portfolio</a… | |
<li><a href="{{ .Site.BaseURL }}prints">Prints… | |
<li><a href="{{ .Site.BaseURL }}about">About</… | |
+ {{- end }} | |
</ul> | |
</div> | |
</nav> |