menu: current lang indicator

This commit is contained in:
He4eT 2025-04-20 06:27:11 +02:00 committed by Alexey
commit e01227237b
2 changed files with 10 additions and 1 deletions

View file

@ -176,3 +176,7 @@ header.menu .nav-langs .lang-separator {
header.menu .nav-langs .lang-separator:first-child { header.menu .nav-langs .lang-separator:first-child {
display: none; display: none;
} }
header.menu .nav-langs a.active {
border-color: var(--color-fg);
}

View file

@ -51,7 +51,12 @@
{% else %} {% else %}
{% set lang_href = page.url | locale_url(lang) %} {% set lang_href = page.url | locale_url(lang) %}
{% endif %} {% endif %}
<a href="{{ lang_href }}">{{ lang }}</a> <a
class="{% if lang === page.lang %} active {% endif %}"
href="{{ lang_href }}"
>
{{ lang }}
</a>
</li> </li>
{%- endfor %} {%- endfor %}
</ul> </ul>