66 lines
3.1 KiB
Twig
66 lines
3.1 KiB
Twig
<nav class="bg-white border-b border-gris-clair shadow-sm py-4 px-6 sticky top-0 z-50 font-sora">
|
|
|
|
<div class="max-w-7xl mx-auto flex flex-col md:flex-row items-center justify-between gap-4">
|
|
|
|
<div class="flex flex-col md:flex-row items-center gap-4 md:gap-8 w-full md:w-auto">
|
|
|
|
<a href="{{ path('app_home') }}" class="flex items-center gap-2 transition-transform hover:scale-105">
|
|
<img src="{{ asset('img/logo.svg') }}" alt="Logo de l'association" class="h-10 w-auto object-contain">
|
|
</a>
|
|
|
|
<ul class="flex flex-wrap justify-center md:justify-start gap-2 md:gap-4">
|
|
|
|
{# Onglet : Mon profil #}
|
|
<li>
|
|
<a href="{{ path('app_user') }}"
|
|
class="px-4 py-2 text-sm font-semibold transition-colors block
|
|
{{ app.request.attributes.get('_route') == 'app_user'
|
|
? 'bg-bouton/20 border border-bouton text-text rounded-lg'
|
|
: 'text-gris-fonce hover:bg-gris-clair hover:text-text rounded-lg border border-transparent' }}">
|
|
Mon profil
|
|
</a>
|
|
</li>
|
|
|
|
{# Onglet : Mon offre #}
|
|
<li>
|
|
{# TODO : créer la route {{ path('app_offres') }} #}
|
|
<a href="#"
|
|
class="px-4 py-2 text-sm font-semibold transition-colors block text-gris-fonce hover:bg-gris-clair hover:text-text rounded-lg border border-transparent flex items-center gap-1">
|
|
Mon offre
|
|
</a>
|
|
</li>
|
|
|
|
{# Onglet : Gérer mes mots de passe #}
|
|
<li>
|
|
<a href="{{ path('app_user_edit_password') }}"
|
|
class="px-4 py-2 text-sm font-semibold transition-colors block
|
|
{{ app.request.attributes.get('_route') == 'app_user_edit_password'
|
|
? 'bg-bouton/20 border border-bouton text-text rounded-lg'
|
|
: 'text-gris-fonce hover:bg-gris-clair hover:text-text rounded-lg border border-transparent' }}">
|
|
Gérer mes mots de passe
|
|
</a>
|
|
</li>
|
|
|
|
{# Onglet : Mon organisation (ne s'affiche que si on a le rôle adéquat) #}
|
|
{% if is_granted('ROLE_ADMIN_ORGANISATION') %}
|
|
<li>
|
|
<a href="#"
|
|
class="px-4 py-2 text-sm font-semibold transition-colors block text-gris-fonce hover:bg-gris-clair hover:text-text rounded-lg border border-transparent">
|
|
Mon organisation
|
|
</a>
|
|
</li>
|
|
{% endif %}
|
|
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="flex-shrink-0 mt-4 md:mt-0">
|
|
<a href="{{ path('app_logout') }}"
|
|
class="px-4 py-2 text-sm font-bold bg-danger text-white rounded-lg hover:bg-danger-hover transition-colors shadow flex items-center gap-2">
|
|
Se déconnecter
|
|
</a>
|
|
</div>
|
|
|
|
</div>
|
|
</nav>
|