2019-11-10 00:23:06 +01:00
|
|
|
<!-- Merge home and current page translations -->
|
2020-02-10 22:05:17 +01:00
|
|
|
{{ $translations := dict }}
|
2019-11-10 00:23:06 +01:00
|
|
|
{{ range .Site.Home.AllTranslations }}
|
2020-02-10 22:05:17 +01:00
|
|
|
{{ $translations = merge $translations (dict .Language.Lang .) }}
|
2019-11-10 00:23:06 +01:00
|
|
|
{{ end }}
|
|
|
|
{{ range .Translations }}
|
2020-02-10 22:05:17 +01:00
|
|
|
{{ $translations = merge $translations (dict .Language.Lang .) }}
|
2019-11-10 00:23:06 +01:00
|
|
|
{{ end }}
|
|
|
|
|
2020-02-10 18:39:07 +01:00
|
|
|
<div class="book-languages" tabindex="0" aria-haspopup="true">
|
2019-11-10 00:23:06 +01:00
|
|
|
<ul>
|
|
|
|
<li class="flex">
|
2019-12-09 11:05:49 +01:00
|
|
|
<img src="{{ "svg/translate.svg" | relURL }}" class="book-icon" alt="Languages" />
|
2019-11-10 00:23:06 +01:00
|
|
|
{{ $.Site.Language.LanguageName }}
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
<ul class="book-languages-list">
|
2020-02-10 22:05:17 +01:00
|
|
|
{{ range .Site.Languages }}{{ with index $translations .Lang }}
|
2020-02-10 18:39:07 +01:00
|
|
|
<li class="{{ if (eq $.Site.Language .Language) }}active{{ end }}">
|
2020-02-10 22:05:17 +01:00
|
|
|
<a href="{{ .RelPermalink }}" class="flex">
|
2019-12-09 11:05:49 +01:00
|
|
|
<img src="{{ "svg/translate.svg" | relURL }}" class="book-icon" alt="Languages" />
|
2019-11-10 00:23:06 +01:00
|
|
|
{{ .Language.LanguageName }}
|
|
|
|
</a>
|
|
|
|
</li>
|
2020-02-10 22:05:17 +01:00
|
|
|
{{ end }}{{ end }}
|
2019-11-10 00:23:06 +01:00
|
|
|
</ul>
|
|
|
|
|
|
|
|
</div>
|