Skip to content

Commit

Permalink
Highlight current language in dropdown
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasjuhrich committed Oct 9, 2023
1 parent d36b0e3 commit cc04447
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion sipa/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,14 @@
</a>
<div class="dropdown-menu dropdown-menu-end" role="menu">
{% for locale in possible_locales() %}
<a href="{{ url_self(locale=locale.language) }}" class="dropdown-item">
<a
href="{{ url_self(locale=locale.language) }}"
{%- if locale == get_locale() -%}
class="dropdown-item active"
{%- else -%}
class="dropdown-item"
{%- endif -%}
>
{{ locale_image_and_text(locale) }}
</a>
{% endfor %}
Expand Down

0 comments on commit cc04447

Please sign in to comment.