From a3f270408b070838ca94273a13ffb44cebf3af77 Mon Sep 17 00:00:00 2001 From: fs Date: Mon, 6 Apr 2026 22:21:39 +0200 Subject: [PATCH] feat(layout): migrate to full-width topbar with mobile drawer navigation Move topbar outside the grid container as a standalone sticky header (Shopify/Stripe pattern). Sidebar and icon bar use position:sticky relative to topbar height. Mobile uses drawer pattern with backdrop, focus trap, ESC close, and scroll lock. Tenant branding moved from sidebar header into the topbar. Co-Authored-By: Claude Opus 4.6 --- i18n/default_de.json | 4 +- i18n/default_en.json | 4 +- templates/default.phtml | 3 +- templates/partials/app-main-aside.phtml | 43 +---- templates/partials/app-topbar.phtml | 67 ++++--- web/css/base/variables.base.css | 6 + web/css/components/app-details.css | 2 +- web/css/layout/app-aside-icon-bar.css | 238 +++++++++++++----------- web/css/layout/app-shell.css | 53 ++++-- web/css/layout/app-sidebar.css | 129 ++++++------- web/css/layout/app-topbar.css | 188 ++++++++++++------- web/js/app-boot.js | 12 +- web/js/components/app-toggle-sidebar.js | 134 +++++++++++++ 13 files changed, 543 insertions(+), 340 deletions(-) diff --git a/i18n/default_de.json b/i18n/default_de.json index 339a2b6..bc6c2fd 100644 --- a/i18n/default_de.json +++ b/i18n/default_de.json @@ -1435,5 +1435,7 @@ "Remove selected file": "Ausgewaehlte Datei entfernen", "Replace": "Ersetzen", "Delete this image?": "Dieses Bild löschen?", - "Current image": "Aktuelles Bild" + "Current image": "Aktuelles Bild", + "Open navigation": "Navigation öffnen", + "Close navigation": "Navigation schließen" } diff --git a/i18n/default_en.json b/i18n/default_en.json index 7dc456a..6187170 100644 --- a/i18n/default_en.json +++ b/i18n/default_en.json @@ -1435,5 +1435,7 @@ "Remove selected file": "Remove selected file", "Replace": "Replace", "Delete this image?": "Delete this image?", - "Current image": "Current image" + "Current image": "Current image", + "Open navigation": "Open navigation", + "Close navigation": "Close navigation" } diff --git a/templates/default.phtml b/templates/default.phtml index b38d631..6652a0e 100644 --- a/templates/default.phtml +++ b/templates/default.phtml @@ -320,12 +320,12 @@ $componentPageConfig['moduleRuntimeComponents'] = $moduleRuntimeComponents; +
-
@@ -333,6 +333,7 @@ $componentPageConfig['moduleRuntimeComponents'] = $moduleRuntimeComponents;
+ diff --git a/templates/partials/app-main-aside.phtml b/templates/partials/app-main-aside.phtml index 5d7ceaa..cadc273 100644 --- a/templates/partials/app-main-aside.phtml +++ b/templates/partials/app-main-aside.phtml @@ -25,9 +25,8 @@ $docsDefaultPath = 'admin/docs/' . $docsDefaultSlug; $hasOrganization = $canViewTenants || $canViewDepartments || $canViewUsers; $hasUsersSection = $canViewRoles || $canViewPermissions; $hasAutomationSection = $canViewImports || $canViewJobs; -$hasMonitoringSection = $canViewStats; $hasLogsSection = $canViewMailLog; -$hasSystemSection = $canViewSettings; +$hasSystemSection = $canViewSettings || $canViewStats; $hasAdminPanel = layoutHasAdminPanel($layoutAuth); // Declarative nav config for admin panel groups @@ -105,21 +104,6 @@ $adminNavGroups = [ ], ], ], - [ - 'key' => 'admin-monitoring', - 'label' => t('Monitoring'), - 'icon' => 'bi-graph-up', - 'visible' => $hasMonitoringSection, - 'items' => [ - [ - 'label' => t('Statistics'), - 'path' => 'admin/stats', - 'active' => navActive('admin/stats', true), - 'visible' => $canViewStats, - 'withTenant' => false, - ], - ], - ], [ 'key' => 'admin-logs', 'label' => t('Logs'), @@ -148,6 +132,13 @@ $adminNavGroups = [ 'visible' => $canViewSettings, 'withTenant' => false, ], + [ + 'label' => t('Statistics'), + 'path' => 'admin/stats', + 'active' => navActive('admin/stats', true), + 'visible' => $canViewStats, + 'withTenant' => false, + ], ], ], ]; @@ -281,24 +272,6 @@ $moduleSlots = is_array($layoutNav['moduleSlots'] ?? null) ? $layoutNav['moduleS $modulePanelSlots = is_array($moduleSlots['aside.tab_panel'] ?? null) ? $moduleSlots['aside.tab_panel'] : []; ?>