This commit is contained in:
Maksim Iakunin 2021-11-07 18:16:42 +03:00
parent 07cd76e783
commit 94ae51278b
No known key found for this signature in database
GPG Key ID: 629DE6EA48DAF1F4

View File

@ -1,16 +1,15 @@
{{ if .IsTranslated }} <ul class="language-select">
{{ $pageLang := .Page.Lang}} {{ $pageLang := .Page.Lang}}
<ul class="language-select"> {{ $translations := .AllTranslations }}
{{ range .AllTranslations }} {{ if not .IsTranslated }}
{{ if eq .Lang $pageLang }} {{ $translations = $.Site.Home.AllTranslations }}
<li> {{ end }}
{{ .Language.LanguageName }}
</li> {{ range $translations }}
{{ else }} {{ if eq .Lang $pageLang }}
<li> <li>{{ .Language.LanguageName }}</li>
<a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a> {{ else }}
</li> <li><a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a></li>
{{ end }}
{{ end }} {{ end }}
</ul> {{ end }}
{{ end }} </ul>