2019-11-10 00:23:06 +01:00
|
|
|
<!-- Merge home and current page translations -->
|
2021-01-21 11:42:26 +01:00
|
|
|
{{ $bookTranslatedOnly := default false .Site.Params.BookTranslatedOnly }}
|
2020-02-10 22:05:17 +01:00
|
|
|
{{ $translations := dict }}
|
2021-01-21 11:42:26 +01:00
|
|
|
{{ if (eq $bookTranslatedOnly false ) }}
|
2021-08-18 11:12:50 +02:00
|
|
|
{{ range .Site.Home.Translations }}
|
2021-01-21 11:42:26 +01:00
|
|
|
{{ $translations = merge $translations (dict .Language.Lang .) }}
|
|
|
|
{{ end }}
|
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 }}
|
|
|
|
|
2021-08-18 11:12:50 +02:00
|
|
|
<ul class="book-languages">
|
|
|
|
<li>
|
|
|
|
<input type="checkbox" id="languages" class="toggle" />
|
|
|
|
<label for="languages" class="flex justify-between">
|
|
|
|
<a role="button" class="flex align-center">
|
2019-12-09 11:05:49 +01:00
|
|
|
<img src="{{ "svg/translate.svg" | relURL }}" class="book-icon" alt="Languages" />
|
2021-08-18 11:12:50 +02:00
|
|
|
{{ $.Site.Language.LanguageName }}
|
2019-11-10 00:23:06 +01:00
|
|
|
</a>
|
2021-08-18 11:12:50 +02:00
|
|
|
</label>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
{{ range .Site.Languages }}{{ with index $translations .Lang }}
|
|
|
|
<li>
|
|
|
|
<a href="{{ .Permalink }}">
|
|
|
|
{{ .Language.LanguageName }}
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
{{ end }}{{ end }}
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
</ul>
|