Mobile Menüführung

This commit is contained in:
2026-04-08 23:47:30 +02:00
parent f08b77a7fa
commit e16217a116
5 changed files with 39 additions and 44 deletions
+7 -7
View File
@@ -772,7 +772,7 @@ $marketing = app_marketing_messages();
</div>
</div>
</details>
<button type="button" class="site-mobile__toggle" data-mobile-drawer-open>Mehr</button>
<button type="button" class="site-mobile__toggle" data-mobile-drawer-open>Me</button>
<?php endif; ?>
</div>
</div>
@@ -781,19 +781,19 @@ $marketing = app_marketing_messages();
<?php if ($auth !== null): ?>
<div class="mobile-drawer" data-mobile-drawer>
<button type="button" class="mobile-drawer__scrim" aria-label="Menü schließen" data-mobile-drawer-close></button>
<aside class="mobile-drawer__panel" aria-label="Mobile Navigation">
<aside class="mobile-drawer__panel" aria-label="Menü">
<div class="mobile-drawer__header">
<div>
<h2 class="mobile-drawer__title">Mehr</h2>
<h2 class="mobile-drawer__title">Me</h2>
<p class="mobile-drawer__subtitle"><?= h((string) ($auth['tenant_name'] ?? 'Bereich')) ?></p>
</div>
<button type="button" class="mobile-drawer__close" aria-label="Schließen" data-mobile-drawer-close>&times;</button>
</div>
<?php if ($mobileDrawerPrimaryItems !== []): ?>
<?php if ($headerNavItems !== []): ?>
<div class="mobile-drawer__section">
<div class="mobile-drawer__label">Weitere Kernfunktionen</div>
<div class="mobile-drawer__label">Kernnavigation</div>
<div class="mobile-drawer__links">
<?php foreach ($mobileDrawerPrimaryItems as $item): ?>
<?php foreach ($headerNavItems as $item): ?>
<a href="<?= h((string) ($item['href'] ?? '/')) ?>" class="mobile-drawer__link <?= $page === (string) ($item['key'] ?? '') ? 'active' : '' ?>" <?= $page === (string) ($item['key'] ?? '') ? 'aria-current="page"' : '' ?>><?= h((string) ($item['label'] ?? 'Link')) ?></a>
<?php endforeach; ?>
</div>
@@ -1743,7 +1743,7 @@ $marketing = app_marketing_messages();
<?php endforeach; ?>
<button type="button" class="mobile-bottom-nav__toggle" data-mobile-drawer-open>
<span class="mobile-bottom-nav__icon">+</span>
<span class="mobile-bottom-nav__label">Mehr</span>
<span class="mobile-bottom-nav__label">Me</span>
</button>
</nav>
<?php endif; ?>
+8 -14
View File
@@ -395,15 +395,10 @@ try {
$tenantNavItems = app_tenant_navigation_items($auth, $tenantLicense);
$tenantNavGroups = app_tenant_navigation_groups($tenantNavItems);
foreach ($tenantNavItems as $item) {
if (in_array((string) ($item['key'] ?? ''), ['dashboard', 'members', 'ledger'], true)) {
if (in_array((string) ($item['key'] ?? ''), ['dashboard', 'ledger', 'payments'], true)) {
$tenantHeaderNavItems[] = $item;
$mobileBottomNavItems[] = $item;
}
if ((string) ($item['key'] ?? '') === 'payments') {
$tenantHeaderNavItems[] = $item;
$mobileDrawerPrimaryItems[] = $item;
}
}
$surveyTablesReady = scripts_table_exists($pdo, 'surveys')
&& scripts_table_exists($pdo, 'survey_questions')
@@ -536,7 +531,7 @@ $themeCss = app_tenant_theme_root_css($tenantSettings);
<form method="post" action="/logout/"><button type="submit" class="button secondary" style="width:100%">Abmelden</button></form>
</div>
</details>
<button type="button" class="site-mobile__toggle" data-mobile-drawer-open>Mehr</button>
<button type="button" class="site-mobile__toggle" data-mobile-drawer-open>Me</button>
</div>
</div>
</header>
@@ -544,19 +539,19 @@ $themeCss = app_tenant_theme_root_css($tenantSettings);
<?php if ($mobileBottomNavItems !== []): ?>
<div class="mobile-drawer" data-mobile-drawer>
<button type="button" class="mobile-drawer__scrim" aria-label="Menü schließen" data-mobile-drawer-close></button>
<aside class="mobile-drawer__panel" aria-label="Mobile Navigation">
<aside class="mobile-drawer__panel" aria-label="Menü">
<div class="mobile-drawer__header">
<div>
<h2 class="mobile-drawer__title">Mehr</h2>
<h2 class="mobile-drawer__title">Me</h2>
<p class="mobile-drawer__subtitle"><?= survey_h((string) ($auth['tenant_name'] ?? 'Bereich')) ?></p>
</div>
<button type="button" class="mobile-drawer__close" aria-label="Schließen" data-mobile-drawer-close>&times;</button>
</div>
<?php if ($mobileDrawerPrimaryItems !== []): ?>
<?php if ($tenantHeaderNavItems !== []): ?>
<div class="mobile-drawer__section">
<div class="mobile-drawer__label">Weitere Kernfunktionen</div>
<div class="mobile-drawer__label">Kernnavigation</div>
<div class="mobile-drawer__links">
<?php foreach ($mobileDrawerPrimaryItems as $item): ?>
<?php foreach ($tenantHeaderNavItems as $item): ?>
<a class="mobile-drawer__link <?= (($item['key'] ?? '') === 'surveys') ? 'active' : '' ?>" href="<?= survey_h((string) ($item['href'] ?? '/')) ?>" <?= (($item['key'] ?? '') === 'surveys') ? 'aria-current="page"' : '' ?>><?= survey_h((string) ($item['label'] ?? 'Link')) ?></a>
<?php endforeach; ?>
</div>
@@ -781,7 +776,6 @@ $themeCss = app_tenant_theme_root_css($tenantSettings);
<a class="mobile-bottom-nav__link <?= (($item['key'] ?? '') === 'surveys') ? 'active' : '' ?>" href="<?= survey_h((string) ($item['href'] ?? '/')) ?>" <?= (($item['key'] ?? '') === 'surveys') ? 'aria-current="page"' : '' ?>>
<span class="mobile-bottom-nav__icon"><?= match ((string) ($item['key'] ?? '')) {
'dashboard' => 'U',
'members' => 'M',
'ledger' => 'B',
'payments' => 'Z',
default => '•',
@@ -791,7 +785,7 @@ $themeCss = app_tenant_theme_root_css($tenantSettings);
<?php endforeach; ?>
<button type="button" class="mobile-bottom-nav__toggle" data-mobile-drawer-open>
<span class="mobile-bottom-nav__icon">+</span>
<span class="mobile-bottom-nav__label">Mehr</span>
<span class="mobile-bottom-nav__label">Me</span>
</button>
</nav>
<?php endif; ?>
+10 -7
View File
@@ -1306,8 +1306,8 @@
@if ($layoutMobileHasDrawer)
<button type="button" class="mobile-bottom-nav__more" data-mobile-drawer-open>
<span class="mobile-bottom-nav__label">Mehr</span>
<span class="mobile-bottom-nav__meta">Menü</span>
<span class="mobile-bottom-nav__label">Menü</span>
<span class="mobile-bottom-nav__meta">Bereiche</span>
</button>
@endif
</nav>
@@ -1316,10 +1316,10 @@
@if ($layoutMobileHasDrawer)
<div class="mobile-drawer" data-mobile-drawer>
<button type="button" class="mobile-drawer__scrim" aria-label="Menü schließen" data-mobile-drawer-close></button>
<aside class="mobile-drawer__panel" role="dialog" aria-label="Weitere Navigation">
<aside class="mobile-drawer__panel" role="dialog" aria-label="Menü">
<div class="mobile-drawer__header">
<div>
<p class="mobile-drawer__title">Mehr Bereiche</p>
<p class="mobile-drawer__title">Menü</p>
<p class="mobile-drawer__copy">
@if (is_array($layoutAuth))
{{ $layoutAuth['tenant_name'] ?? 'Tenant' }} · {{ $layoutCurrentLabel }}
@@ -1332,11 +1332,14 @@
</div>
<div class="mobile-drawer__sections">
@if ($layoutMobileDrawerPrimaryItems !== [])
@php
$layoutDrawerCoreItems = is_array($layoutAuth) ? $layoutHeaderNavItems : $layoutPrimaryNavItems;
@endphp
@if ($layoutDrawerCoreItems !== [])
<section class="mobile-drawer__section">
<div class="mobile-drawer__label">Weitere Kernfunktionen</div>
<div class="mobile-drawer__label">Kernnavigation</div>
<div class="mobile-drawer__links">
@foreach ($layoutMobileDrawerPrimaryItems as $item)
@foreach ($layoutDrawerCoreItems as $item)
@php
$itemHref = rtrim((string) ($item['href'] ?? '/'), '/');
$itemHref = $itemHref === '' ? '/' : $itemHref;
@@ -394,7 +394,7 @@
<form method="post" action="/logout/"><button type="submit" class="button button--ghost" style="width:100%">Abmelden</button></form>
</div>
</details>
<button type="button" class="site-mobile__toggle" data-mobile-drawer-open>Mehr</button>
<button type="button" class="site-mobile__toggle" data-mobile-drawer-open>Me</button>
</div>
</div>
</header>
@@ -402,19 +402,19 @@
<?php if ($mobileBottomNavItems !== []): ?>
<div class="mobile-drawer" data-mobile-drawer>
<button type="button" class="mobile-drawer__scrim" aria-label="Menü schließen" data-mobile-drawer-close></button>
<aside class="mobile-drawer__panel" aria-label="Mobile Navigation">
<aside class="mobile-drawer__panel" aria-label="Menü">
<div class="mobile-drawer__header">
<div>
<h2 class="mobile-drawer__title">Mehr</h2>
<h2 class="mobile-drawer__title">Me</h2>
<p class="mobile-drawer__subtitle"><?= support_h((string) ($auth['tenant_name'] ?? 'Bereich')) ?></p>
</div>
<button type="button" class="mobile-drawer__close" aria-label="Schließen" data-mobile-drawer-close>&times;</button>
</div>
<?php if ($mobileDrawerPrimaryItems !== []): ?>
<?php if ($tenantHeaderNavItems !== []): ?>
<div class="mobile-drawer__section">
<div class="mobile-drawer__label">Weitere Kernfunktionen</div>
<div class="mobile-drawer__label">Kernnavigation</div>
<div class="mobile-drawer__links">
<?php foreach ($mobileDrawerPrimaryItems as $item): ?>
<?php foreach ($tenantHeaderNavItems as $item): ?>
<a href="<?= support_h((string) ($item['href'] ?? '/')) ?>" class="mobile-drawer__link <?= (($item['key'] ?? '') === 'support') ? 'active' : '' ?>" <?= (($item['key'] ?? '') === 'support') ? 'aria-current="page"' : '' ?>><?= support_h((string) ($item['label'] ?? 'Link')) ?></a>
<?php endforeach; ?>
</div>
@@ -712,7 +712,6 @@
<a href="<?= support_h((string) ($item['href'] ?? '/')) ?>" class="mobile-bottom-nav__link <?= (($item['key'] ?? '') === 'support') ? 'active' : '' ?>" <?= (($item['key'] ?? '') === 'support') ? 'aria-current="page"' : '' ?>>
<span class="mobile-bottom-nav__icon"><?= match ((string) ($item['key'] ?? '')) {
'dashboard' => 'U',
'members' => 'M',
'ledger' => 'B',
'payments' => 'Z',
default => '•',
@@ -722,7 +721,7 @@
<?php endforeach; ?>
<button type="button" class="mobile-bottom-nav__toggle" data-mobile-drawer-open>
<span class="mobile-bottom-nav__icon">+</span>
<span class="mobile-bottom-nav__label">Mehr</span>
<span class="mobile-bottom-nav__label">Me</span>
</button>
</nav>
<?php endif; ?>
@@ -356,7 +356,7 @@
<form method="post" action="/logout/"><button type="submit" class="button button--ghost" style="width:100%">Abmelden</button></form>
</div>
</details>
<button type="button" class="site-mobile__toggle" data-mobile-drawer-open>Mehr</button>
<button type="button" class="site-mobile__toggle" data-mobile-drawer-open>Me</button>
</div>
</div>
</header>
@@ -364,19 +364,19 @@
<?php if ($mobileBottomNavItems !== []): ?>
<div class="mobile-drawer" data-mobile-drawer>
<button type="button" class="mobile-drawer__scrim" aria-label="Menü schließen" data-mobile-drawer-close></button>
<aside class="mobile-drawer__panel" aria-label="Mobile Navigation">
<aside class="mobile-drawer__panel" aria-label="Menü">
<div class="mobile-drawer__header">
<div>
<h2 class="mobile-drawer__title">Mehr</h2>
<h2 class="mobile-drawer__title">Me</h2>
<p class="mobile-drawer__subtitle"><?= tenant_roles_h((string) ($auth['tenant_name'] ?? 'Bereich')) ?></p>
</div>
<button type="button" class="mobile-drawer__close" aria-label="Schließen" data-mobile-drawer-close>&times;</button>
</div>
<?php if ($mobileDrawerPrimaryItems !== []): ?>
<?php if ($tenantHeaderNavItems !== []): ?>
<div class="mobile-drawer__section">
<div class="mobile-drawer__label">Weitere Kernfunktionen</div>
<div class="mobile-drawer__label">Kernnavigation</div>
<div class="mobile-drawer__links">
<?php foreach ($mobileDrawerPrimaryItems as $item): ?>
<?php foreach ($tenantHeaderNavItems as $item): ?>
<a class="mobile-drawer__link <?= (($item['key'] ?? '') === 'roles') ? 'active' : '' ?>" href="<?= tenant_roles_h((string) ($item['href'] ?? '/')) ?>" <?= (($item['key'] ?? '') === 'roles') ? 'aria-current="page"' : '' ?>><?= tenant_roles_h((string) ($item['label'] ?? 'Link')) ?></a>
<?php endforeach; ?>
</div>
@@ -564,7 +564,6 @@
<a class="mobile-bottom-nav__link <?= (($item['key'] ?? '') === 'roles') ? 'active' : '' ?>" href="<?= tenant_roles_h((string) ($item['href'] ?? '/')) ?>" <?= (($item['key'] ?? '') === 'roles') ? 'aria-current="page"' : '' ?>>
<span class="mobile-bottom-nav__icon"><?= match ((string) ($item['key'] ?? '')) {
'dashboard' => 'U',
'members' => 'M',
'ledger' => 'B',
'payments' => 'Z',
default => '•',
@@ -574,7 +573,7 @@
<?php endforeach; ?>
<button type="button" class="mobile-bottom-nav__toggle" data-mobile-drawer-open>
<span class="mobile-bottom-nav__icon">+</span>
<span class="mobile-bottom-nav__label">Mehr</span>
<span class="mobile-bottom-nav__label">Me</span>
</button>
</nav>
<?php endif; ?>