diff options
author | Hanzei <hanzei@mailbox.org> | 2018-07-06 15:10:50 +0300 |
---|---|---|
committer | Hanzei <hanzei@mailbox.org> | 2018-07-06 15:10:50 +0300 |
commit | 32d393c2dfcf426a79be70824dfcfdd415105911 (patch) | |
tree | c4f2a2fc0fd0da7110c91d97a1e084d0a7c981bc | |
parent | 1096f450fc7afc74944fe0590b8ad00527d6a199 (diff) |
Only show languages in nav bar if there is more then one
-rw-r--r-- | layouts/partials/nav.html | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html index ec72077..46850c7 100644 --- a/layouts/partials/nav.html +++ b/layouts/partials/nav.html @@ -81,8 +81,10 @@ <a class="nav-item" href="{{ if $isHome }}#{{ .File.TranslationBaseName }}{{ else }}{{ printf "/#%s" .File.TranslationBaseName | relLangURL }}{{ end }}">{{ .Title }}</a> {{ end }} + {{ if gt (len $.Site.Home.AllTranslations.ByWeight) 1 }} {{ range $.Site.Home.AllTranslations.ByWeight }} - <a class="nav-item" href="{{ .Permalink }}">{{ .Language.LanguageName }}</a> + <a class="nav-item" href="{{ .Permalink }}">{{ .Language.LanguageName }}</a> + {{ end }} {{ end }} {{ if and .Site.Params.showRSSButton .Site.RSSLink }} |