blob: 4fa1f46e5b38dec3c0a7c5bc100964f89925cb8c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
<!-- Merge home and current page translations -->
{{ $langs := dict }}
{{ range .Site.Home.AllTranslations }}
{{ $langs = merge $langs (dict .Language.Lang .) }}
{{ end }}
{{ range .Translations }}
{{ $langs = merge $langs (dict .Language.Lang .) }}
{{ end }}
<div class="book-languages">
<ul>
<li class="flex">
<img src="{{ "svg/translate.svg" | relURL }}" class="book-icon" alt="Languages" />
{{ $.Site.Language.LanguageName }}
</li>
</ul>
<ul class="book-languages-list">
{{ range sort $langs }}
<li class="{{ if (eq $.Site.Language .Language ) }}active{{ end }}">
<a href="{{ .Permalink }}" class="flex">
<img src="{{ "svg/translate.svg" | relURL }}" class="book-icon" alt="Languages" />
{{ .Language.LanguageName }}
</a>
</li>
{{ end }}
</ul>
</div>
|