Fixing UX-issue with language-switcher
This commit is contained in:
parent
837417e19f
commit
07cd76e783
@ -1,5 +1,16 @@
|
||||
<ul class="language-select">
|
||||
{{ range $.Site.Home.AllTranslations }}
|
||||
<li><a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a></li>
|
||||
{{ if .IsTranslated }}
|
||||
{{ $pageLang := .Page.Lang}}
|
||||
<ul class="language-select">
|
||||
{{ range .AllTranslations }}
|
||||
{{ if eq .Lang $pageLang }}
|
||||
<li>
|
||||
{{ .Language.LanguageName }}
|
||||
</li>
|
||||
{{ else }}
|
||||
<li>
|
||||
<a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
</ul>
|
Loading…
Reference in New Issue
Block a user