This commit is contained in:
parent
5ff92ea181
commit
275e8ef463
38
layouts/partials/sidebar/left.html
Normal file
38
layouts/partials/sidebar/left.html
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
// layouts/partials/sidebar/left.html
|
||||||
|
<li class="menu-bottom-section">
|
||||||
|
<ol class="menu">
|
||||||
|
{{- $currentLanguageCode := .Language.Lang -}}
|
||||||
|
{{- $otherLanguage := "" -}}
|
||||||
|
{{ if (compare.Gt .Site.Home.AllTranslations.Len 1) }}
|
||||||
|
{{ with .Site.Home.AllTranslations }}
|
||||||
|
{{ range . }}
|
||||||
|
{{ if ne .Language.Lang $currentLanguageCode }}
|
||||||
|
{{- $otherLanguage = . -}}
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
<li id="i18n-switch">
|
||||||
|
{{ partial "helper/icon" "language" }}
|
||||||
|
<a href="{{ $otherLanguage.Permalink }}">
|
||||||
|
{{ $otherLanguage.Language.LanguageName }}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if (default false .Site.Params.colorScheme.toggle) }}
|
||||||
|
<li id="dark-mode-toggle">
|
||||||
|
{{ partial "helper/icon" "toggle-left" }}
|
||||||
|
{{ partial "helper/icon" "toggle-right" }}
|
||||||
|
<span>{{ T "darkMode" }}</span>
|
||||||
|
</li>
|
||||||
|
{{ end }}
|
||||||
|
</ol>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
// assets/scss/partials/sidebar.scss
|
||||||
|
#i18n-switch {
|
||||||
|
color: var(--body-text-color);
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: var(--menu-icon-separation);
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user