hugo-theme-anubis2/layouts/partials/post-language-switcher.html
2021-12-19 14:32:24 +03:00

18 lines
518 B
HTML

{{ if .IsTranslated }}
{{ $pageLang := .Page.Lang}}
<span>
<ul class="post-translations">
{{ range .AllTranslations }}
{{ if eq .Lang $pageLang }}
<li>
{{ upper .Lang }}
</li>
{{ else }}
<li>
<a href="{{ .Permalink }}">{{ upper .Lang }}</a>
</li>
{{ end }}
{{ end }}
</ul>
</span>
{{ end }}