From 8d276844ef09f99eff27a1f1d56ad1f5b4794e03 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 14 Jul 2026 23:51:31 +0800 Subject: [PATCH] fix(frontend): remove blank gap above nav on non-home pages Complete the fixed-nav contract: when body.nav-fixed and the header is not the hero overlay (show-slide), take .header out of flow so body padding alone reserves space. Avoids double offset from sticky nav still occupying document flow on single/archive pages. --- assets/css/frontend/nav/base.css | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/assets/css/frontend/nav/base.css b/assets/css/frontend/nav/base.css index 11691006..69d0e89a 100644 --- a/assets/css/frontend/nav/base.css +++ b/assets/css/frontend/nav/base.css @@ -3,6 +3,24 @@ body.nav-fixed { padding-top: var(--nav-height, 60px); } +/* Fixed nav without hero overlay: take header out of flow. + body.nav-fixed already reserves --nav-height via padding-top. */ +body.nav-fixed .header:not(.show-slide) { + position: fixed; + top: 0; + left: 0; + right: 0; + width: 100%; + z-index: 1000; +} + +/* Nav lives inside the fixed header — don't keep sticky (double offset). */ +body.nav-fixed .header:not(.show-slide) .site-nav, +body.nav-fixed .header:not(.show-slide) .navbar.navbar-top { + position: relative; + top: auto; +} + /* Hero sits under transparent fixed/absolute header (zibll slide-header) */ body.nav-fixed .header-slider-container, body.nav-fixed .header-components-container,