feat: group the sidebar, add a settings hub and move account actions to a header user menu

This commit is contained in:
fromme committed 2026-11-12 11:13:30 +01:00
1 parent acd8e78e55
commit 7095456d36
16 files changed
+487 -477

No files matched your search

+25 -28
View File
@@ -1,33 +1,30 @@
{% extends 'base.html.twig' %}
{% block body %}
<div class="max-w-screen-2xl mx-auto px-4 lg:px-8 lg:grid lg:grid-cols-[14.5rem_minmax(0,1fr)] gap-8 py-8">
<div class="lg:col-span-full flex items-center justify-between pb-4 lg:pb-0">
<a href="{{ path(app.user ? app.user.defaultRoute : 'app_security_login') }}">
<img class="h-8 w-auto" src="{{ asset('build/images/logo.svg') }}" alt="E&amp;P Team">
</a>
{% if app.user %}
<div class="flex items-center space-x-4">
{% if app.user.teamer and app.user.teamer.photo %}
<a href="{{ path('app_teamer_profile_index') }}" title="Mein Profil">
<img src="{{ asset(app.user.teamer.photo | upload_filename_full | imagine_filter('profile')) }}"
class="h-8 w-auto rounded-full"
alt="{{ app.user.teamer.firstName }}">
</a>
{% elseif is_granted('ROLE_ADMINISTRATIVE') %}
<a href="{{ path('app_administrative_profile_index') }}" title="Mein Profil">
{{ icon('user', 'w-8 h-8') }}
</a>
{% endif %}
<button type="button"
class="lg:hidden"
{{ stimulus_controller('mobilenav', [], [], { 'mobilenav': '#mobilenav' }) }}
{{ stimulus_action('mobilenav', 'trigger', null, { 'mode': 'open' }) }}>
{{ icon('menu', 'w-8 h-8 text-gray-700') }}
</button>
</div>
{% endif %}
{# E&P header as in the apps portal (EP/apps) and epbms: logo with the app name, brand bar #}
<header>
<div class="border-b border-line bg-white">
<div class="max-w-screen-2xl mx-auto px-4 lg:px-8 py-3 flex items-center justify-between gap-x-4">
<a href="{{ path(app.user ? app.user.defaultRoute : 'app_security_login') }}">
{% include '_partials/_brand.html.twig' %}
</a>
{% if app.user %}
<div class="flex items-center gap-x-4">
{% include '_partials/_user_menu.html.twig' %}
<button type="button"
class="lg:hidden"
{{ stimulus_controller('mobilenav', [], [], { 'mobilenav': '#mobilenav' }) }}
{{ stimulus_action('mobilenav', 'trigger', null, { 'mode': 'open' }) }}>
<span class="sr-only">Menü</span>
{{ icon('menu', 'w-8 h-8 text-brand') }}
</button>
</div>
{% endif %}
</div>
</div>
<div class="h-2 bg-brand" aria-hidden="true"></div>
</header>
<div class="max-w-screen-2xl mx-auto px-4 lg:px-8 lg:grid lg:grid-cols-[14.5rem_minmax(0,1fr)] gap-8 py-8">
<div class="hidden lg:block">
{% block main_menu %}{% endblock %}
</div>
@@ -39,9 +36,9 @@
class="fixed z-50 top-0 left-0 inset-0 pr-16 bg-black/70 -translate-x-full"
{{ stimulus_controller('mobilenav', [], { 'closed': '-translate-x-full' }, { 'mobilenav': '#mobilenav' }) }}
>
<div class="h-screen w-full bg-white">
<div class="h-screen w-full bg-page">
<div class="flex justify-between p-8">
<img src="{{ asset('build/images/logo.svg') }}" alt="" class="block w-auto h-8">
<img src="{{ asset('build/images/ep-logo.svg') }}" alt="" class="block w-auto h-9">
<button type="button"
{{ stimulus_action('mobilenav', 'trigger', null, { 'mode': 'close' }) }}>
{{ icon('close', 'w-8 h-8') }}