Merge pull request #336 from alvr/language_theme_fix

Language selector change theme fix
This commit is contained in:
zzossig 2020-10-28 02:51:06 +09:00 committed by GitHub
commit e09bbc6d4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -3,7 +3,7 @@
<button class="dropdown-trigger navbar__slide-down" aria-label="Select Language Button" data-ani="{{ $.Site.Params.enableUiAnimation | default "true" }}">
{{ partial "svgs/etc/translate.svg" (dict "width" 22 "height" 22) }}
</button>
<div class="dropdown-content select-theme">
<div class="dropdown-content">
{{ $siteLanguages := .Site.Languages }}
{{ $pageLang := .Page.Lang }}
{{ range .Page.AllTranslations }}
@ -13,11 +13,11 @@
{{ $selected := false }}
{{ if eq $pageLang .Lang }}
{{ if .LanguageName }}
<a href="{{ $translation.Permalink }}" data-lang="{{ .Lang }}" class="dropdown-item select-theme__item is-active">{{ .LanguageName }}</a>
<a href="{{ $translation.Permalink }}" data-lang="{{ .Lang }}" class="dropdown-item is-active">{{ .LanguageName }}</a>
{{ end }}
{{ else }}
{{ if .LanguageName }}
<a href="{{ $translation.Permalink }}" data-lang="{{ .Lang }}" class="dropdown-item ">{{ .LanguageName }}</a>
<a href="{{ $translation.Permalink }}" data-lang="{{ .Lang }}" class="dropdown-item">{{ .LanguageName }}</a>
{{ end }}
{{ end }}
{{ end }}

View File

@ -3,7 +3,7 @@
<button class="dropdown-trigger navbar__slide-down navbar-search" aria-label="Search Button" data-ani="{{ $.Site.Params.enableUiAnimation | default "true" }}">
{{ partial "svgs/etc/search.svg" (dict "width" 22 "height" 22) }}
</button>
<div class="dropdown-content select-theme">
<div class="dropdown-content">
</div>
</div>
</div>