Skip to content

Commit

Permalink
refactor: improve sidebar bottom menu accessibility
Browse files Browse the repository at this point in the history
  • Loading branch information
FarrelF committed Feb 23, 2024
1 parent 8f2bfb2 commit 8d303d7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions layouts/partials/sidebar/left.html
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,16 @@ <h2 class="site-description">{{ .Site.Params.sidebar.subtitle }}</h2>
</a>
</li>
{{ end }}
</ol>

<div class="menu-bottom-section">
<ol class="menu">
{{- $currentLanguageCode := .Language.Lang -}}
{{ if ( compare.Gt .Site.Home.AllTranslations 1 ) }}
{{ with .Site.Home.AllTranslations }}
<li id="i18n-switch">
{{ partial "helper/icon" "language" }}
<select name="language" onchange="window.location.href = this.selectedOptions[0].value">
<select name="language" title="language" onchange="window.location.href = this.selectedOptions[0].value">
{{ range . }}
<option value="{{ .Permalink }}" {{ if eq .Language.Lang $currentLanguageCode }}selected{{ end }}>{{ .Language.LanguageName }}</option>
{{ end }}
Expand All @@ -118,6 +120,6 @@ <h2 class="site-description">{{ .Site.Params.sidebar.subtitle }}</h2>
<span>{{ T "darkMode" }}</span>
</li>
{{ end }}
</ol>
</div>
</ol>
</aside>

0 comments on commit 8d303d7

Please sign in to comment.