Only show languages in nav bar if there is more then one

This commit is contained in:
Hanzei 2018-07-06 14:10:50 +02:00
parent 1096f450fc
commit 32d393c2df
No known key found for this signature in database
GPG key ID: 69A2DEFD98937BA0

View file

@ -81,8 +81,10 @@
<a class="nav-item" href="{{ if $isHome }}#{{ .File.TranslationBaseName }}{{ else }}{{ printf "/#%s" .File.TranslationBaseName | relLangURL }}{{ end }}">{{ .Title }}</a> <a class="nav-item" href="{{ if $isHome }}#{{ .File.TranslationBaseName }}{{ else }}{{ printf "/#%s" .File.TranslationBaseName | relLangURL }}{{ end }}">{{ .Title }}</a>
{{ end }} {{ end }}
{{ if gt (len $.Site.Home.AllTranslations.ByWeight) 1 }}
{{ range $.Site.Home.AllTranslations.ByWeight }} {{ 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 }} {{ end }}
{{ if and .Site.Params.showRSSButton .Site.RSSLink }} {{ if and .Site.Params.showRSSButton .Site.RSSLink }}