24 lines
1.1 KiB
Twig
Raw Normal View History

2024-07-16 11:44:30 +02:00
{% set currentRoute = app.request.attributes.get('_route') %}
2024-07-15 23:04:23 +02:00
<div id="nav_menu">
2024-07-16 11:04:21 +02:00
<nav>
<div class="mb-3">
2024-07-16 11:44:30 +02:00
<a href="{{ path('app_index') }}"
class="{% if currentRoute == 'app_index' %}active{% endif %}"
>{{ 'common.homepage'|trans }}</a>
2024-07-16 11:04:21 +02:00
{% if app.user %}
2024-07-16 11:44:30 +02:00
<a
class="account-link {% if currentRoute == 'app_account' %}active{% endif %}"
href="{{ path('app_account') }}">{{ app.user.userIdentifier }}</a>
, <a href="{{ path('app_logout') }}">{{ 'user.logout'|trans }}</a>
2024-07-16 10:58:47 +02:00
2024-07-16 11:04:21 +02:00
{% else %}
2024-07-16 11:44:30 +02:00
<a class="account-link {% if currentRoute == 'app_login' %}active{% endif %}"
href="{{ path('app_login') }}">{{ 'user.login'|trans }}</a>
<a class="account-link {% if currentRoute == 'app_register' %}active{% endif %}"
href="{{ path('app_register') }}">{{ 'user.register'|trans }}</a>
2024-07-16 11:04:21 +02:00
{% endif %}
2024-07-16 10:58:47 +02:00
</div>
2024-07-16 11:04:21 +02:00
{# <a href="{{path('admin')}}">Admin</a> #}
2024-07-15 23:04:23 +02:00
</nav>
</div>