#187, Use .Permalink for lang switch, align icons

This commit is contained in:
Alex Shpak 2020-04-03 17:42:48 +02:00
parent 6e146b1bf1
commit 1eeabcad67

View File

@ -9,7 +9,7 @@
<div class="book-languages" tabindex="0" aria-haspopup="true"> <div class="book-languages" tabindex="0" aria-haspopup="true">
<ul> <ul>
<li class="flex"> <li class="flex align-center">
<img src="{{ "svg/translate.svg" | relURL }}" class="book-icon" alt="Languages" /> <img src="{{ "svg/translate.svg" | relURL }}" class="book-icon" alt="Languages" />
{{ $.Site.Language.LanguageName }} {{ $.Site.Language.LanguageName }}
</li> </li>
@ -18,12 +18,11 @@
<ul class="book-languages-list"> <ul class="book-languages-list">
{{ range .Site.Languages }}{{ with index $translations .Lang }} {{ range .Site.Languages }}{{ with index $translations .Lang }}
<li class="{{ if (eq $.Site.Language .Language) }}active{{ end }}"> <li class="{{ if (eq $.Site.Language .Language) }}active{{ end }}">
<a href="{{ .RelPermalink }}" class="flex"> <a href="{{ .Permalink }}" class="flex align-center">
<img src="{{ "svg/translate.svg" | relURL }}" class="book-icon" alt="Languages" /> <img src="{{ "svg/translate.svg" | relURL }}" class="book-icon" alt="Languages" />
{{ .Language.LanguageName }} {{ .Language.LanguageName }}
</a> </a>
</li> </li>
{{ end }}{{ end }} {{ end }}{{ end }}
</ul> </ul>
</div> </div>