style: align with the ep-corporate-design skill

This commit is contained in:
fromme committed 2026-11-12 15:24:35 +01:00
1 parent 50ef662dd3
commit ebad54e989
162 files changed
+768 -640

No files matched your search

+41 -42
View File
@@ -1,52 +1,51 @@
{% extends 'base.html.twig' %}
{#
Sidebar layout of the E&P corporate design (ep-corporate-design, layout_sidebar.html.twig): the
main menu in a left sidebar from lg up, below that in a drawer behind the "Menü" button. The area
layouts fill `main_menu` and `mobile_menu` with the same KnpMenu menu.
#}
{% block body %}
{# 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>
<div {{ stimulus_controller('drawer') }}>
{% embed '_partials/_header.html.twig' with {
home_path: path(app.user ? app.user.defaultRoute : 'app_security_login'),
header_width: 'mx-auto max-w-screen-2xl px-4 lg:px-8',
} %}
{% block header_end %}
{% if app.user %}
<div class="flex items-center gap-x-4">
<div class="flex items-center">
{% 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>
<button type="button" class="btn-tool self-center lg:hidden" aria-haspopup="dialog"
{{ stimulus_action('drawer', 'open') }}>
{{ icon('menu', 'w-4 h-4') }}
Menü
</button>
{% endif %}
{% endblock %}
{% endembed %}
<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">
<nav aria-label="Hauptmenü" class="hidden lg:block">
{% block main_menu %}{% endblock %}
</nav>
<main id="content" tabindex="-1" class="min-w-0 outline-none">
{% block content %}{% endblock %}
</main>
</div>
<dialog class="drawer" aria-label="Hauptmenü" {{ stimulus_target('drawer', 'dialog') }}
{{ stimulus_action('drawer', 'closeOnBackdrop', 'click') }}>
{# fills the dialog, so only clicks beside the drawer reach the dialog element itself #}
<div class="flex h-full flex-col">
<div class="flex items-center justify-between p-4">
<img src="{{ asset('build/images/ep-logo.svg') }}" alt="" class="h-9 w-auto">
<button type="button" class="btn-tool" {{ stimulus_action('drawer', 'close') }}>Schließen</button>
</div>
<nav class="flex-1 overflow-y-auto px-4 pb-8">
{% block mobile_menu %}{% endblock %}
</nav>
</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>
<div>
{% block content %}{% endblock %}
</div>
</div>
<div id="mobilenav"
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-page">
<div class="flex justify-between p-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') }}
</button>
</div>
<div class="w-full h-full p-8 pt-0 overflow-y-auto">
{% block mobile_menu %}{% endblock %}
</div>
</div>
</dialog>
</div>
{% endblock %}