nav tweaks

This commit is contained in:
anarsec 2024-11-21 17:31:04 -05:00
parent 6715821694
commit 2ff9666bad
No known key found for this signature in database
2 changed files with 3 additions and 5 deletions

View file

@ -584,6 +584,7 @@ a
li.lang-switcher
list-style: none
cursor: pointer
.lang-switcher .lang-switcher-icon
width: 1.25rem
@ -596,6 +597,7 @@ li.lang-switcher
text-align: center
left:50%
transform: translatex(-50%) !important
margin-top: 0.55rem
.dropdown-content
position: absolute !important

View file

@ -1,5 +1,4 @@
<li class="lang-switcher navbar-item">
<details class="dropdown">
<details class="dropdown lang-switcher navbar-item navbar-link is-arrowless has-text-weight-semibold">
<summary class="nav" role="button" aria-haspopup="true" title="{{ trans(key="language_selection", lang=lang) }}" aria-label="{{ trans(key="language_selection", lang=lang) }}">
<span class="lang-switcher-icon icon is-small">
<img src="/images/globe.png">
@ -10,7 +9,6 @@
{{ trans(key="language_name", lang=lang) | upper }}
{#- Loop through all the available languages in the config -#}
{%- for lcode, ldetails in config.languages -%}
<div>
{#- Skip the current language to avoid linking to the current page -#}
{%- if lang == lcode -%}
{%- continue -%}
@ -31,8 +29,6 @@
{#- If it's not, replace the current language code in the URL with the new one -#}
<a role="menuitem" lang="{{ lcode }}" aria-label="{{ language_name }}" href="{{ current_url | replace(from='/' ~ lang ~ '/', to='/' ~ lcode ~ '/') }}">{{ lcode | upper }}</a>
{%- endif -%}
</div>
{%- endfor -%}
</div>
</details>
</li>