24 lines
914 B
HTML
24 lines
914 B
HTML
{{ range .Site.Menus.main.ByWeight }}
|
|
<a href="{{ relLangURL .URL }}">{{ .Name }}</a>
|
|
{{ end }}
|
|
<a href='mailto:{{ .Site.Params.email }}?subject={{ i18n "email-subject" }}"{{ default .Site.Title .Page.Title }}"'>Email</a>
|
|
<a href="{{ .Site.Language.Params.params.blogPath }}/index.xml">RSS</a>
|
|
|
|
<!-- Convert this page's translations into a dict -->
|
|
{{ $translations := dict }}
|
|
{{ range .Translations }}
|
|
{{ $translations = merge $translations (dict .Language.Lang .) }}
|
|
{{ end }}
|
|
|
|
<!-- Create a link to every translation -->
|
|
{{ range where .Site.Languages "Lang" "!=" .Page.Lang }}
|
|
{{ with (index $translations .Lang) }}
|
|
<a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a>
|
|
{{ else }}
|
|
<!-- The complicated setup was necessary to make a grayed out link -->
|
|
{{ if not .Params.hideUntranslated }}
|
|
<a class="disabled" href="">{{ .LanguageName }}</a>
|
|
{{ end }}
|
|
{{ end }}
|
|
{{ end }}
|