Skip to content

Commit

Permalink
Add missing nav-link classes and fix data- attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasjuhrich committed Oct 7, 2023
1 parent 9975c5b commit 84a4661
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions sipa/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@
{%- macro user_nav_items() -%}
{% if current_user.is_anonymous -%}
<li>
<a href="{{ url_for('generic.login') }}">
<a href="{{ url_for('generic.login') }}" class="nav-link">
<span class="glyphicon glyphicon-user"></span>
{{ _("Login") }}
</a>
</li>
{%- else -%}
<li>
<a href="{{ url_for('usersuite.index') }}">
<a href="{{ url_for('usersuite.index') }}" class="nav-link">
<span class="glyphicon glyphicon-user"></span>
{{ current_user.realname.value }}
</a>
</li>

<li>
<a href="{{ url_for('generic.logout') }}">
<a href="{{ url_for('generic.logout') }}" class="nav-link">
<span class="glyphicon glyphicon-off"></span>
{{ _("Logout") }}
</a>
Expand Down Expand Up @@ -92,24 +92,24 @@
<div class="collapse navbar-collapse" id="navbar">
<ul class="nav navbar-nav" role="menu">
<li class="dropdown">
<a href="#" data-toggle="dropdown" class="dropdown-toggle">
<a href="#" data-bs-toggle="dropdown" class="nav-link dropdown-toggle">
{{ _("News") }}<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li>
<a href="{{ url_for('news.show', start=0) }}">
<a href="{{ url_for('news.show', start=0) }}" class="nav-link">
<span class="glyphicon glyphicon-fast-backward"></span>
&nbsp; {{ _("Neueste") }}
</a>
</li>
<li>
<a href="{{ url_for('news.show', end=-1) }}">
<a href="{{ url_for('news.show', end=-1) }}" class="nav-link">
<span class="glyphicon glyphicon-fast-forward"></span>
&nbsp; {{ _("Älteste") }}
</a>
</li>
<li>
<a href="{{ url_for('news.show', start=0, end=-1) }}">
<a href="{{ url_for('news.show', start=0, end=-1) }}" class="nav-link">
<span class="glyphicon glyphicon-book"></span>
&nbsp; {{ _("Alle") }}
</a>
Expand All @@ -119,14 +119,14 @@
{% for c in cf_pages.categories -%}
{% if c.index -%}
<li class="dropdown">
<a href="#" data-toggle="dropdown" class="dropdown-toggle">
<a href="#" data-bs-toggle="dropdown" class="nav-link dropdown-toggle">
{{ c.name }}<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
{%- for article in c.articles -%}
{%- if not article.id == 'index' and article.title and not article.hidden -%}
<li>
<a href="{{ url_for('pages.show', category_id=c.id, article_id=article.id) }}">
<a href="{{ url_for('pages.show', category_id=c.id, article_id=article.id) }}" class="nav-link">
<span class="glyphicon {{ article.glyphicon }}"></span>
&nbsp; {{ article.title }}
</a>
Expand All @@ -144,7 +144,7 @@
<li>
<button id="language-dropdown-button" type="button"
class="btn btn-default navbar-btn"
data-toggle="dropdown" aria-label="Toggle Menu">
data-bs-toggle="dropdown" aria-label="Toggle Menu">
<span class="glyphicon glyphicon glyphicon-cog" aria-hidden="true"></span>
</button>
<ul class="dropdown-menu" role="menu"
Expand All @@ -160,7 +160,7 @@
<li {% if get_locale() == locale -%}
class="active"
{%- endif %}>
<a href="{{ url_self(locale=locale.language) }}">
<a href="{{ url_self(locale=locale.language) }}" class="nav-link">
<img src="{{ url_for('static', filename='img/{}.png'.format(locale.language)) }}"
alt="{{ locale.display_name }}"/>
{{ locale.display_name }}
Expand All @@ -179,15 +179,15 @@
{{ user_nav_items() }}

<li>
<a href="#" data-toggle="dropdown" class="dropdown-toggle">
<a href="#" data-bs-toggle="dropdown" class="nav-link dropdown-toggle">
<img src="{{ url_for('static', filename='img/{}.png'.format(get_locale().language)) }}"
alt="{{ get_locale().display_name }}"/>
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
{% for locale in possible_locales() %}
<li>
<a href="{{ url_self(locale=locale.language) }}">
<a href="{{ url_self(locale=locale.language) }}" class="nav-link">
<img src="{{ url_for('static', filename='img/{}.png'.format(locale.language)) }}"
alt="{{ locale.display_name }}"/>
{{ locale.display_name }}
Expand Down

0 comments on commit 84a4661

Please sign in to comment.