mirror of
https://github.com/Wonderfall/hugo-WonderMod.git
synced 2024-11-22 02:21:37 +01:00
Hide lang switch separator if not multilang
This commit is contained in:
parent
5e61be5903
commit
5dc09b99d8
@ -72,24 +72,26 @@
|
|||||||
|
|
||||||
{{- $lang := .Lang}}
|
{{- $lang := .Lang}}
|
||||||
{{- $separator := or $label_text (not site.Params.disableThemeToggle)}}
|
{{- $separator := or $label_text (not site.Params.disableThemeToggle)}}
|
||||||
{{- with site.Home.AllTranslations }}
|
{{- if gt (len site.Home.AllTranslations) 1 }}
|
||||||
<ul class="lang-switch">
|
{{ with site.Home.AllTranslations }}
|
||||||
{{- if $separator }}<li>|</li>{{ end }}
|
<ul class="lang-switch">
|
||||||
{{- range . -}}
|
{{- if $separator }}<li>|</li>{{ end }}
|
||||||
{{- if ne $lang .Lang }}
|
{{- range . -}}
|
||||||
<li>
|
{{- if ne $lang .Lang }}
|
||||||
<a href="{{- .Permalink -}}" title="{{ .Language.Params.languageAltTitle | default (.Language.LanguageName | emojify) | default (.Lang | title) }}"
|
<li>
|
||||||
aria-label="{{ .Language.LanguageName | default (.Lang | title) }}">
|
<a href="{{- .Permalink -}}" title="{{ .Language.Params.languageAltTitle | default (.Language.LanguageName | emojify) | default (.Lang | title) }}"
|
||||||
{{- if (and site.Params.displayFullLangName (.Language.LanguageName)) }}
|
aria-label="{{ .Language.LanguageName | default (.Lang | title) }}">
|
||||||
{{- .Language.LanguageName | emojify -}}
|
{{- if (and site.Params.displayFullLangName (.Language.LanguageName)) }}
|
||||||
{{- else }}
|
{{- .Language.LanguageName | emojify -}}
|
||||||
{{- .Lang | title -}}
|
{{- else }}
|
||||||
{{- end -}}
|
{{- .Lang | title -}}
|
||||||
</a>
|
{{- end -}}
|
||||||
</li>
|
</a>
|
||||||
{{- end -}}
|
</li>
|
||||||
{{- end}}
|
{{- end -}}
|
||||||
</ul>
|
{{- end}}
|
||||||
|
</ul>
|
||||||
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user