mirror of
https://github.com/hanzoai/site.git
synced 2026-11-20 21:21:13 +00:00
- Theme before paint: app/layout.jsx runs live hanzo.ai's own pre-paint script (localStorage "hanzo.appearance.painted", else prefers-color-scheme) and sets light/dark + t_light/t_dark, color-scheme and data-scheme; it re-applies when the device setting changes. Measured: "dark t_dark" at first paint, after hydration and after client navigation; no flash; JS off stays bright. theme-color follows the scheme (#0A0A0A dark, as live). No appearance switch: no captured live menu shows one, so no new words. - Tokens: html.dark gives --ink/--soft/--faint/--line/--card/--bg and Hanzo's --foreground/ --background/--primary/--border/--hover/--muted Hanzo's own dark values (public/hanzo.css: page #0d0d0d, text #e5e5e5, muted #a3a3a3, borders white 10%, #171717 / #0f0f0f / #262626 surfaces); rooms (system.css) too. New --x-raised/--x-on-ink/--x-fill/--x-sunk/--x-knob/--x-e10..15 replace hard-coded whites in shared rules (Hanzo already defines --card/--raised on inner elements, so the new names are prefixed). One-off greys keep their exact light value via light-dark(); html.light/html.dark pin color-scheme. - Dark-correct: cookie banner and preferences, announcement strip, sign-in buttons, buttons, search palette and scrims, menus and the menu feature card, sheets, drawers, pause buttons, related cards, every components/v2/*.css; the hero dot field draws in the page ink at 17% and redraws on a theme change. Hanzo's header and footer go dark through hanzo.css. - docs/DARK-MODE.md: how a page chat converts its pages; scripts/darkcheck.mjs (what is still bright in dark) and scripts/lightcheck.mjs (bright mode unchanged vs an older server). Checks: bright mode 0 computed-colour diffs vs the base commit on / /pricing /chat (1470, 375) and /enso /kai /api /affiliate /beta /about /dev /security /payments /models (1470); page text identical (only the live tokens/s counters move); 0 console/page errors in both modes on / /pricing /chat at 1470x801 and 375x812 (home's media requests to hanzo.ai are blocked in this sandbox, same in light); taste, unique OK; build exits 0 with HZ_LIVE_OFFLINE=1 (live figure hosts are blocked here). Page-owned CSS left for the page chats: /pricing .xpr-*, /chat .cht-*, home .xs-*/.xh-pause. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01P5YBdxPteCvBL7f74SauJt
19 lines
2.0 KiB
CSS
19 lines
2.0 KiB
CSS
/* Drawer (v2) - see Drawer.jsx */
|
|
.v2-dr { position: fixed; inset: 0; z-index: 1300; visibility: hidden; pointer-events: none; }
|
|
.v2-dr:not(.live) { display: none; } /* closed: still in the HTML, but takes no box at all */
|
|
.v2-dr.live { visibility: visible; }
|
|
.v2-dr.open { pointer-events: auto; }
|
|
.v2-dr-bg { position: absolute; inset: 0; background: rgba(10, 10, 10, .32); opacity: 0; }
|
|
.v2-dr-p { position: absolute; top: 76px; bottom: 16px; left: 50%; width: min(100% - 32px, 1392px); translate: -50% 0; overflow: auto; overscroll-behavior: contain; border-radius: 28px; background: var(--x-raised); box-shadow: 0 60px 140px -40px rgba(0, 0, 0, .45); clip-path: inset(0px 0px 0px 0px round 28px); }
|
|
.v2-dr-in { padding: clamp(24px, 3.4vw, 52px); }
|
|
.v2-dr-top { position: sticky; top: calc(-1 * clamp(24px, 3.4vw, 52px)); z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: calc(-1 * clamp(24px, 3.4vw, 52px)) calc(-1 * clamp(24px, 3.4vw, 52px)) 0; padding: clamp(20px, 2.4vw, 32px) clamp(24px, 3.4vw, 52px); background: rgba(255, 255, 255, .96); border-bottom: 1px solid var(--line); }
|
|
.v2-dr-h { margin: 0; font-size: clamp(24px, 2.4vw, 36px); font-weight: 600; letter-spacing: -.035em; color: var(--ink); }
|
|
.v2-dr-x { position: relative; flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--x-raised); cursor: pointer; transition: transform .3s cubic-bezier(.16, 1, .3, 1), background .2s; }
|
|
.v2-dr-x:hover { transform: rotate(90deg); background: var(--x-fill); }
|
|
.v2-dr-x:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
|
|
.v2-dr-x i::before, .v2-dr-x i::after { content: ''; position: absolute; left: 50%; top: 50%; width: 16px; height: 1.5px; margin: -.75px 0 0 -8px; border-radius: 2px; background: var(--ink); transform: rotate(45deg); }
|
|
.v2-dr-x i::after { transform: rotate(-45deg); }
|
|
@media (max-width: 900px) {
|
|
.v2-dr-p { top: 64px; bottom: 0; width: 100%; border-radius: 24px 24px 0 0; }
|
|
}
|