highlight active items in top navbar

This commit is contained in:
Patrick Jentsch 2024-11-18 12:35:53 +01:00
parent 460257294d
commit 9f56647cf7

View File

@ -13,7 +13,7 @@
{# shown for large devices #} {# shown for large devices #}
<ul class="hide-on-med-and-down" style="margin-left: calc(57px + 1.5rem);"> <ul class="hide-on-med-and-down" style="margin-left: calc(57px + 1.5rem);">
{# dashboard #} {# dashboard #}
<li> <li {% if request.path == url_for('main.dashboard') %}class="active"{% endif %}>
<a href="{{ url_for('main.dashboard') }}"> <a href="{{ url_for('main.dashboard') }}">
<i class="material-icons left">dashboard</i> <i class="material-icons left">dashboard</i>
Dashboard Dashboard
@ -29,7 +29,7 @@
</li> </li>
{# contributions #} {# contributions #}
<li> <li {% if request.path == url_for('contributions.index') %}class="active"{% endif %}>
<a href="{{ url_for('contributions.index') }}"> <a href="{{ url_for('contributions.index') }}">
<i class="material-icons left">new_label</i> <i class="material-icons left">new_label</i>
Contributions Contributions
@ -37,7 +37,7 @@
</li> </li>
{# social #} {# social #}
<li> <li {% if request.path == url_for('main.social') %}class="active"{% endif %}>
<a href="{{ url_for('main.social') }}"> <a href="{{ url_for('main.social') }}">
<i class="material-icons left">groups</i> <i class="material-icons left">groups</i>
Social Social
@ -62,14 +62,14 @@
{# large devices #} {# large devices #}
<ul class="right hide-on-med-and-down" style="height: 64px;"> <ul class="right hide-on-med-and-down" style="height: 64px;">
{# manual #} {# manual #}
<li class="tooltipped" data-position="bottom" data-tooltip="Manual"> <li class="tooltipped {% if request.path == url_for('main.manual') %}active{% endif %}" data-position="bottom" data-tooltip="Manual">
<a href="{{ url_for('main.manual') }}"> <a href="{{ url_for('main.manual') }}">
<i class="material-icons">help_outline</i> <i class="material-icons">help_outline</i>
</a> </a>
</li> </li>
{# news #} {# news #}
<li class="tooltipped" data-position="bottom" data-tooltip="News"> <li class="tooltipped {% if request.path == url_for('main.news') %}active{% endif %}" data-position="bottom" data-tooltip="News">
<a href="{{ url_for('main.news') }}"> <a href="{{ url_for('main.news') }}">
<i class="material-icons">email</i> <i class="material-icons">email</i>
</a> </a>