From 69efcfa1dda78747d123daa582c50f0d2ee39bc3 Mon Sep 17 00:00:00 2001 From: UNITRONIX <36471318+UNITRONIX@users.noreply.github.com> Date: Sat, 6 Jun 2026 09:37:42 +0200 Subject: [PATCH] style(sidebar): enhance sidebar behavior for settings page - Updated sidebar logic to collapse when on the settings page, improving user experience. - Added CSS margin-top property to the table element for better layout consistency. --- web-nodejs/public/css/main.css | 1 + web-nodejs/views/partials/sidebar.ejs | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/web-nodejs/public/css/main.css b/web-nodejs/public/css/main.css index d65dc38b..bc7566d5 100644 --- a/web-nodejs/public/css/main.css +++ b/web-nodejs/public/css/main.css @@ -411,6 +411,7 @@ table { padding: var(--space-sm) var(--space-md); border-top: 1px solid var(--border-primary); flex-shrink: 0; + margin-top: auto; } diff --git a/web-nodejs/views/partials/sidebar.ejs b/web-nodejs/views/partials/sidebar.ejs index 79af9d60..baead79e 100644 --- a/web-nodejs/views/partials/sidebar.ejs +++ b/web-nodejs/views/partials/sidebar.ejs @@ -340,6 +340,11 @@ if (activeRail) { activeCategory = activeRail.dataset.category; showPanel(activeCategory); + } else if ('<%= currentPage %>' === 'settings') { + // Settings is a direct rail link — no flyout sub-menu, keep sidebar collapsed + isCollapsed = true; + sidebar.dataset.collapsed = 'true'; + document.documentElement.style.setProperty('--sidebar-current-width', 'var(--sidebar-width-collapsed)'); } function showPanel(category) {