From 4997ca75abc01317be2e831f40bb666961043e8c Mon Sep 17 00:00:00 2001 From: NW Date: Wed, 8 Jul 2026 14:00:20 +0100 Subject: [PATCH] fix(admin): header logo alignment + sidebar version tag MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Move app-logo out of flex-grow-1 div to be direct child of app-header (matches SmartAdmin CSS expectations for .app-header .app-logo) - Remove inline style padding-left from logo, rely on SCSS padding - Remove data-prefix attribute that positioned version text absolutely - Override .app-logo > svg.sa-icon min-width (was 11rem) to natural icon size (1.5rem) so icon and text align inline - Add .logo-text class for proper text sizing and nowrap - Fix conflicting responsive classes on header buttons (d-sm-block d-sm-none → d-none d-lg-block) - Fix fullscreen button aria-label (was 'Toggle Dark Mode') - Remove w-100 from header inner div that pushed buttons off-screen - Replace wifi icon in nav-footer with tag icon + version text v1.0 --- src/admin/views/layout.ejs | 22 ++++++++++++++++++++++ src/admin/views/partials/app-header.ejs | 12 ++++++------ src/admin/views/partials/app-logo.ejs | 4 ++-- src/admin/views/partials/app-sidebar.ejs | 9 ++++++--- 4 files changed, 36 insertions(+), 11 deletions(-) diff --git a/src/admin/views/layout.ejs b/src/admin/views/layout.ejs index ba9787b..bd896f7 100644 --- a/src/admin/views/layout.ejs +++ b/src/admin/views/layout.ejs @@ -82,6 +82,28 @@ .apex-charts.sparkline { min-height: 50px; } + + /* ====== Logo fix: icon + text inline alignment ====== */ + /* Override the smartapp default that stretches SVG logo to --logo-width (11rem) */ + .app-logo > svg.sa-icon { + width: var(--sa-icon-size, 1.5rem); + height: var(--sa-icon-size, 1.5rem); + min-width: 0; + flex-shrink: 0; + } + .app-logo .logo-text { + white-space: nowrap; + line-height: 1; + font-size: 1.125rem; + } + /* Sidebar logo text: show on full nav, hide on minified */ + .set-nav-minified:not(.set-nav-collapsed) .app-sidebar:not(:hover) .app-logo .logo-text { + display: none; + } + /* Header logo: always show text (logo is hidden in header when sidebar-full) */ + .app-header .app-logo .logo-text { + display: inline; + } diff --git a/src/admin/views/partials/app-header.ejs b/src/admin/views/partials/app-header.ejs index 2100867..e1d43fe 100644 --- a/src/admin/views/partials/app-header.ejs +++ b/src/admin/views/partials/app-header.ejs @@ -1,9 +1,9 @@
- -
+ + <%- include('./app-logo') %> - - <%- include('./app-logo') %> + +
- -