mirror of
https://github.com/alex-shpak/hugo-book.git
synced 2024-11-25 12:46:44 +00:00
#187, Use .Permalink for lang switch, align icons
This commit is contained in:
parent
6e146b1bf1
commit
1eeabcad67
@ -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>
|
||||||
|
Loading…
Reference in New Issue
Block a user