mirror of
https://git.adityakumar.xyz/hugo-theme-introduction.git
synced 2024-12-22 22:52:54 +00:00
Only show languages in nav bar if there is more then one
This commit is contained in:
parent
1096f450fc
commit
32d393c2df
1 changed files with 3 additions and 1 deletions
|
@ -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 }}
|
||||||
|
|
Loading…
Reference in a new issue