diff --git a/static/hub.css b/static/hub.css index d7b3a2f..6ce25c1 100644 --- a/static/hub.css +++ b/static/hub.css @@ -18,6 +18,10 @@ --radius: 14px; --font: "IBM Plex Sans", "Segoe UI", sans-serif; --font-display: "Orbitron", "IBM Plex Sans", sans-serif; + --hub-title-size: 1.75rem; + --hub-title-lh: 1.25; + --hub-title-h: calc(var(--hub-title-size) * var(--hub-title-lh)); + --hub-title-gap: calc(var(--hub-title-h) * 1.1); } * { box-sizing: border-box; } html, body { min-height: 100%; } @@ -50,14 +54,15 @@ a:hover { color: #7dd3fc; } .topbar-brand { display: block; - margin: 0 auto 12px; + margin: 0 auto var(--hub-title-gap); + padding-top: var(--hub-title-gap); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; - font-size: 1.75rem; + font-size: var(--hub-title-size); font-weight: 700; letter-spacing: 0; text-indent: 0; color: #dbe4ff; - line-height: 1.25; + line-height: var(--hub-title-lh); text-align: center; } .topbar-brand:hover { @@ -68,7 +73,7 @@ a:hover { color: #7dd3fc; } grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 10px 12px; - margin: 0 0 12px; + margin: 0 0 var(--hub-title-gap); } .topbar-nav { grid-column: 2; @@ -186,10 +191,7 @@ a:hover { color: #7dd3fc; } } } @media (max-width: 720px) { - .topbar-brand { - margin-bottom: 12px; - font-size: 1rem; - } + :root { --hub-title-size: 1rem; } .topbar-nav a { padding: 8px 12px; font-size: 0.78rem; @@ -204,7 +206,7 @@ a:hover { color: #7dd3fc; } width: 100%; max-width: 1200px; margin: 0 auto; - padding: 14px clamp(6px, 1vw, 14px) 16px; + padding: 0 clamp(6px, 1vw, 14px) 16px; } /* 总览/实例与客户端一致: 铺满,带鱼屏锁 1800 */ body.page-dashboard .main, @@ -212,7 +214,7 @@ body.page-instances .main { max-width: none; width: 100%; margin: 0 auto; - padding: 14px clamp(6px, 1vw, 14px) 16px; + padding: 0 clamp(6px, 1vw, 14px) 16px; } @media (min-aspect-ratio: 21/9) { body.page-dashboard .main, @@ -224,7 +226,7 @@ body.page-desk .main { max-width: none; width: 100%; margin: 0; - padding: 10px 12px 14px; + padding: 0 12px 14px; } body.page-login { min-height: 100vh; diff --git a/templates/base.html b/templates/base.html index 54818d4..9ae4b2e 100644 --- a/templates/base.html +++ b/templates/base.html @@ -4,7 +4,7 @@