hugo-theme-anubis2/layouts/partials/post-language-switcher.html
2021-07-08 23:32:45 +03:00

16 lines
443 B
HTML

{{ if .IsTranslated }}
{{ $pageLang := .Page.Lang}}
<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>
{{ end }}