Add a mirror site to lang-switch

This commit is contained in:
Daniil Krymov 2023-03-05 19:34:20 +01:00
parent e8f3a81369
commit d718955485
No known key found for this signature in database
GPG Key ID: 49FF57C32BD36752

View File

@ -75,9 +75,9 @@
<div class="logo-switches">
{{- $lang := .Lang}}
{{- $separator := or $label_text (not site.Params.disableThemeToggle)}}
{{- with site.Home.AllTranslations }}
<ul class="lang-switch">
{{- if $separator }}<li>|</li>{{ end }}
{{- if site.Params.mirrorSite }}
<li>
<a href="{{- site.Params.mirrorSite -}}" title="{{ site.Params.mirrorSiteLanguageAltTitle }}"
@ -90,6 +90,8 @@
</a>
</li>
{{ end }}
{{- with site.Home.AllTranslations }}
{{- range . -}}
{{- if ne $lang .Lang }}
<li>
@ -103,9 +105,9 @@
</a>
</li>
{{- end -}}
{{- end}}
{{- end }}
{{- end }}
</ul>
{{- end }}
</div>
</div>
{{- $currentPage := . }}