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,9 +81,11 @@
|
|||
<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>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ if and .Site.Params.showRSSButton .Site.RSSLink }}
|
||||
<a class="nav-item" href="{{ .Site.RSSLink }}"><i class="fa fa-rss"></i></a>
|
||||
|
|
Loading…
Reference in a new issue