Hide lang switch separator if not multilang

This commit is contained in:
Dawid Wróbel 2024-04-25 17:56:36 +02:00
parent 5e61be5903
commit 5dc09b99d8

View File

@ -72,7 +72,8 @@
{{- $lang := .Lang}}
{{- $separator := or $label_text (not site.Params.disableThemeToggle)}}
{{- with site.Home.AllTranslations }}
{{- if gt (len site.Home.AllTranslations) 1 }}
{{ with site.Home.AllTranslations }}
<ul class="lang-switch">
{{- if $separator }}<li>|</li>{{ end }}
{{- range . -}}
@ -91,6 +92,7 @@
{{- end}}
</ul>
{{- end }}
{{- end }}
</div>
</div>
{{- $currentPage := . }}