From e118365157e39cb92e1d6b6eddb9741b3da86653 Mon Sep 17 00:00:00 2001 From: codex Date: Sat, 24 Oct 2026 18:25:06 +0800 Subject: [PATCH] feat(web): unify site branding across pages --- web/public/cloud/account.css | 1 - web/public/cloud/client.css | 1 - web/public/cloud/styles.css | 5 -- web/public/theme/venix/css/admin-home.css | 22 ++++++ web/public/theme/venix/css/home.css | 18 ----- web/public/theme/venix/css/site-brand.css | 21 ++++++ .../views/venix/admin/static_header.tpl | 13 ++-- .../views/venix/auth/layout_header.tpl | 3 +- web/resources/views/venix/cloud/page.tpl | 1 + .../venix/components/site_brand_mark.tpl | 1 + .../views/venix/home/layout_header.tpl | 1 + .../views/venix/home/site_footer.tpl | 2 +- .../views/venix/home/site_header.tpl | 2 +- web/resources/views/venix/layout_assets.tpl | 2 +- web/resources/views/venix/user/disable.tpl | 4 +- .../views/venix/user/layout_header.tpl | 1 + .../views/venix/user/layout_plain_header.tpl | 1 + .../views/venix/user/panel_sidebar.tpl | 4 +- web/tests/LegalPagesContractTest.php | 2 +- web/tests/SiteBrandContractTest.php | 74 +++++++++++++++++++ 20 files changed, 139 insertions(+), 40 deletions(-) create mode 100644 web/public/theme/venix/css/site-brand.css create mode 100644 web/resources/views/venix/components/site_brand_mark.tpl create mode 100644 web/tests/SiteBrandContractTest.php diff --git a/web/public/cloud/account.css b/web/public/cloud/account.css index deac54cb..87bb65c1 100644 --- a/web/public/cloud/account.css +++ b/web/public/cloud/account.css @@ -1355,7 +1355,6 @@ body.venix-auth .auth-legal-consent a:hover { text-decoration: underline; } } body.venix-auth .auth-site-nav { min-height: 68px; padding: 13px 16px; } body.venix-auth .auth-site-nav .home-brand { font-size: 17px; } - body.venix-auth .auth-site-nav .brand-mark { width: 30px; height: 30px; } body.venix-auth .auth-site-nav nav a { padding: 7px 8px; font-size: 12px; } body.venix-auth .auth-shell { align-items: start; padding: 28px 14px; } body.venix-auth .auth-panel { padding: 26px 20px; border-radius: 15px; } diff --git a/web/public/cloud/client.css b/web/public/cloud/client.css index 973d8092..0d91ccd0 100644 --- a/web/public/cloud/client.css +++ b/web/public/cloud/client.css @@ -10,7 +10,6 @@ .panel-sidebar-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 9px; } .sidebar a.sidebar-brand { min-width: 0; max-width: 100%; overflow: hidden; text-decoration: none; } .sidebar-brand > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } -.sidebar-brand small { overflow: hidden; text-overflow: ellipsis; } .panel-nav-toggle { display: none; min-height: 36px; align-items: center; gap: 6px; padding: 7px 9px; border: 1px solid #294255; border-radius: 8px; background: #172c3e; color: #b9ccd8; font-size: 11px; font-weight: 700; } .cloud-sidebar-nav .sidebar-section-label:not(:first-child) { margin-top: 25px; } .cloud-sidebar-nav .sidebar-link { width: 100%; text-decoration: none; } diff --git a/web/public/cloud/styles.css b/web/public/cloud/styles.css index cfa6a58c..1363d419 100644 --- a/web/public/cloud/styles.css +++ b/web/public/cloud/styles.css @@ -8,10 +8,6 @@ button:disabled{cursor:not-allowed;opacity:.52} input,select{outline:none} input:focus,select:focus,button:focus-visible{outline:3px solid rgba(18,166,176,.22);outline-offset:2px} .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0} -.brand-mark{display:inline-flex;width:34px;height:34px;align-items:center;justify-content:center;border-radius:10px;background:#2ac6ca;box-shadow:0 7px 17px rgba(16,172,184,.18);flex:none} -.brand-mark:before,.brand-mark span{content:"";display:block;width:11px;height:17px;border:3px solid #0c2a3f;transform:skewY(-22deg);border-radius:2px} -.brand-mark:before{border-right:0;margin-right:-1px} -.brand-mark span{border-left:0;margin-left:-1px} .boot-screen{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;gap:13px;background:#f4f7fb;color:#607087;font-size:14px;z-index:50} .login-layout{min-height:100vh;display:grid;grid-template-columns:minmax(390px,48%) 1fr;background:#fff} .login-art{position:relative;min-height:650px;overflow:hidden;background:radial-gradient(circle at 78% 44%,#174c64 0,#122d44 36%,#0d1d31 75%);color:#fff} @@ -79,7 +75,6 @@ input:focus,select:focus,button:focus-visible{outline:3px solid rgba(18,166,176, .dashboard{min-height:100vh;display:grid;grid-template-columns:244px minmax(0,1fr)} .sidebar{position:sticky;top:0;height:100vh;background:#101d2c;color:#d2dce6;padding:32px 15px 22px;display:flex;flex-direction:column} .sidebar-brand{display:flex;align-items:center;gap:11px;padding:0 13px 46px;font-size:19px;color:#fff;letter-spacing:-.3px;font-weight:800} -.sidebar-brand small{display:block;color:#668197;font-size:8px;letter-spacing:.2em;margin-top:2px} .sidebar-section-label{color:#64798f;text-transform:uppercase;letter-spacing:.14em;font-size:10px;font-weight:800;margin:0 15px 16px} .sidebar-link{height:43px;display:flex;align-items:center;gap:13px;padding:0 14px;border-radius:9px;color:#8da2b6;font-size:13px;font-weight:700} .sidebar-button{width:100%;border:0;background:transparent;text-align:left;font:inherit;cursor:pointer}.sidebar-button:hover{background:#1a3445;color:#d0eeee} diff --git a/web/public/theme/venix/css/admin-home.css b/web/public/theme/venix/css/admin-home.css index 09251ebc..712a5494 100644 --- a/web/public/theme/venix/css/admin-home.css +++ b/web/public/theme/venix/css/admin-home.css @@ -85,6 +85,28 @@ gap: 10px; } +.admin-template .logo .admin-site-brand { + max-width: 205px; + display: flex; + align-items: center; + gap: 11px; + color: #fff; + font-size: 18px; + font-weight: 850; + letter-spacing: -.03em; + line-height: 1; +} + +.admin-template .logo .admin-site-brand > span:last-child { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.admin-template .logo .logo-sm { + line-height: 1; +} + .admin-template .logo-dark { display: none; } diff --git a/web/public/theme/venix/css/home.css b/web/public/theme/venix/css/home.css index 3d9b4f77..056a76ce 100644 --- a/web/public/theme/venix/css/home.css +++ b/web/public/theme/venix/css/home.css @@ -60,23 +60,6 @@ body.venix-home ::selection { color: #04191b; background: var(--landing-teal-bri text-decoration: none; white-space: nowrap; } -.landing-brand-mark { - position: relative; - width: 31px; - height: 31px; - display: inline-block; - flex: 0 0 auto; - color: var(--landing-teal-bright); - transform: rotate(45deg); -} -.landing-brand-mark i { - position: absolute; - display: block; - border: 6px solid currentColor; - border-radius: 4px; -} -.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 { margin-left: auto; display: flex; align-items: center; justify-content: flex-end; gap: 34px; } .landing-main-nav a { position: relative; @@ -395,7 +378,6 @@ body.venix-home > main.home-error { width: 100%; min-height: 100vh; min-height: .landing-site-header { min-height: 76px; } .landing-site-header::before { height: 76px; } .landing-brand { font-size: 16px; } - .landing-brand-mark { width: 27px; height: 27px; } .landing-hero { min-height: auto; padding: 126px 18px 66px; } .landing-hero h1 { font-size: clamp(43px, 13vw, 63px); } .landing-hero-copy > p { font-size: 14px; line-height: 1.75; } diff --git a/web/public/theme/venix/css/site-brand.css b/web/public/theme/venix/css/site-brand.css new file mode 100644 index 00000000..e1313284 --- /dev/null +++ b/web/public/theme/venix/css/site-brand.css @@ -0,0 +1,21 @@ +/* Canonical site mark shared by public, authentication, user and admin pages. */ +.site-brand-mark { + position: relative; + width: 31px; + height: 31px; + display: inline-block; + flex: 0 0 auto; + color: #2de2c2; + transform: rotate(45deg); +} + +.site-brand-mark i { + position: absolute; + display: block; + border: 6px solid currentColor; + border-radius: 4px; + box-sizing: border-box; +} + +.site-brand-mark i:first-child { inset: 2px 11px 11px 2px; } +.site-brand-mark i:last-child { inset: 11px 2px 2px 11px; opacity: .58; } diff --git a/web/resources/views/venix/admin/static_header.tpl b/web/resources/views/venix/admin/static_header.tpl index 52e65296..b9fbaca0 100644 --- a/web/resources/views/venix/admin/static_header.tpl +++ b/web/resources/views/venix/admin/static_header.tpl @@ -10,6 +10,7 @@ + {if isset($admin_extra_css)}{$admin_extra_css}{/if} @@ -122,13 +123,13 @@