From 06faa2dc309dfb4c1dae739a55c4e46296a8464e Mon Sep 17 00:00:00 2001 From: codex Date: Sat, 24 Oct 2026 18:18:03 +0800 Subject: [PATCH] fix(web): pin and right-align landing navigation --- web/public/theme/venix/css/home.css | 7 ++++--- web/resources/views/venix/layout_assets.tpl | 2 +- web/tests/LegalPagesContractTest.php | 5 ++++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/web/public/theme/venix/css/home.css b/web/public/theme/venix/css/home.css index 797e36a0..3d9b4f77 100644 --- a/web/public/theme/venix/css/home.css +++ b/web/public/theme/venix/css/home.css @@ -27,7 +27,7 @@ body.venix-home ::selection { color: #04191b; background: var(--landing-teal-bri .landing-shell { min-height: 100vh; overflow: hidden; } .landing-site-header { - position: absolute; + position: fixed; inset: 0 0 auto; z-index: 30; width: min(1240px, calc(100% - 48px)); @@ -35,7 +35,7 @@ body.venix-home ::selection { color: #04191b; background: var(--landing-teal-bri margin: 0 auto; display: flex; align-items: center; - justify-content: space-between; + justify-content: flex-start; gap: 28px; color: #fff; } @@ -77,7 +77,7 @@ body.venix-home ::selection { color: #04191b; background: var(--landing-teal-bri } .landing-brand-mark i:first-child { inset: 2px 11px 11px 2px; } .landing-brand-mark i:last-child { inset: 11px 2px 2px 11px; opacity: .58; } -.landing-main-nav { display: flex; align-items: center; justify-content: center; gap: 34px; } +.landing-main-nav { margin-left: auto; display: flex; align-items: center; justify-content: flex-end; gap: 34px; } .landing-main-nav a { position: relative; color: rgba(255, 255, 255, .68); @@ -121,6 +121,7 @@ body.venix-home ::selection { color: #04191b; background: var(--landing-teal-bri .landing-mobile-menu { width: 42px; height: 42px; + margin-left: auto; display: none; place-items: center; padding: 0; diff --git a/web/resources/views/venix/layout_assets.tpl b/web/resources/views/venix/layout_assets.tpl index 0582d36c..98129287 100644 --- a/web/resources/views/venix/layout_assets.tpl +++ b/web/resources/views/venix/layout_assets.tpl @@ -1,2 +1,2 @@ {* Shared Venix CSS/JS cache key. Increment whenever a shared browser asset changes. *} -{assign var=venix_asset_version value='2026102415' scope='global'} +{assign var=venix_asset_version value='2026102416' scope='global'} diff --git a/web/tests/LegalPagesContractTest.php b/web/tests/LegalPagesContractTest.php index a50130fa..e0296d6d 100644 --- a/web/tests/LegalPagesContractTest.php +++ b/web/tests/LegalPagesContractTest.php @@ -50,6 +50,9 @@ $css = $read('web/public/theme/venix/css/home.css'); $assert(str_contains($landing, 'landing-console') && str_contains($landing, 'id="capabilities"') && str_contains($landing, 'landing-workflow') && str_contains($css, '.landing-hero'), 'The approved console-led landing page was not integrated.'); +$assert(preg_match('/\.landing-site-header\s*\{[^}]*position:\s*fixed;/s', $css) === 1 + && preg_match('/\.landing-main-nav\s*\{[^}]*margin-left:\s*auto;[^}]*justify-content:\s*flex-end;/s', $css) === 1, + 'Landing navigation is not fixed to the top and right aligned.'); $assert(str_contains($legal, '{$legal_document.content_html nofilter}') && str_contains($legal, 'legal_document.outline') && str_contains($css, '.legal-layout'), 'Published legal content or its responsive information architecture is missing.'); @@ -70,7 +73,7 @@ $assert(str_contains($auth, "Config::get('tos_reg') === 'true'") 'Legal consent is only client-side and can be bypassed.'); $assets = $read('web/resources/views/venix/layout_assets.tpl'); -$assert(str_contains($assets, "value='2026102415'") +$assert(str_contains($assets, "value='2026102416'") && str_contains($admin, '?v={$venix_asset_version}') && str_contains($read('web/resources/views/venix/home/layout_header.tpl'), '?v={$venix_asset_version}'), 'Shared browser asset version was not coupled to the new assets.');