fix(bs): lang selector

This commit is contained in:
nevfy 2024-04-20 15:11:45 +03:00 committed by Inex Code
parent e31b2da345
commit e61c1cd8c5
1 changed files with 9 additions and 7 deletions

View File

@ -1,10 +1,12 @@
{{/* Link directly to documentation etc., if possible. */}}
{{ $langPage := cond (gt (len .Translations) 0) . .Site.Home }}
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="fas fa-globe ml-2"></i>
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
{{ range $langPage.AllTranslations }}
<a class="dropdown-item" href="{{ .RelPermalink }}">{{ .Language.LanguageName }}</a>
{{ end }}
<div class="dropdown">
<a role="button" class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="fas fa-globe ml-2"></i>
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
{{ range $langPage.AllTranslations }}
<li><a class="dropdown-item" href="{{ .RelPermalink }}">{{ .Language.LanguageName }}</a></li>
{{ end }}
</ul>
</div>