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
33 lines
2.7 KiB
CSS
33 lines
2.7 KiB
CSS
/* Sheet (components/v2/AppSheet.jsx), owned by the Apps 1 chat. */
|
|
.av-sh-btn { display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 20px 0 22px; border-radius: 999px; border: 1px solid var(--line); background: var(--x-raised); color: var(--ink); font: 500 16px/1 var(--sans); cursor: pointer; transition: border-color .25s, background .25s; }
|
|
.av-sh-btn svg { color: var(--ac, var(--ink)); transition: transform .45s cubic-bezier(.16, 1, .3, 1); }
|
|
.av-sh-btn:hover { border-color: rgba(0, 0, 0, .2); }
|
|
.av-sh-btn:hover svg { transform: rotate(90deg); }
|
|
.av-sh-btn:focus-visible { outline: 2px solid var(--ac, #737373); outline-offset: 3px; }
|
|
.av-dark .av-sh-btn { background: transparent; color: #f5f5f7; border-color: rgba(255, 255, 255, .22); }
|
|
|
|
.av-sh { position: fixed; inset: 0; z-index: 900; visibility: hidden; transition: visibility 0s .5s; }
|
|
.av-sh.open { visibility: visible; transition: visibility 0s; }
|
|
.av-sh-back { position: absolute; inset: 0; background: rgba(0, 0, 0, .32); opacity: 0; transition: opacity .4s ease; }
|
|
.av-sh.open .av-sh-back { opacity: 1; }
|
|
.av-sh-panel { position: absolute; top: 12px; right: 12px; bottom: 12px; width: min(620px, calc(100% - 24px)); background: var(--x-raised); color: var(--ink); border-radius: 28px; box-shadow: 0 40px 120px -20px rgba(0, 0, 0, .4); display: flex; flex-direction: column; overflow: hidden;
|
|
transform: translate3d(calc(100% + 24px), 0, 0); transition: transform .45s cubic-bezier(.7, 0, .84, 0); }
|
|
.av-sh.open .av-sh-panel { transform: none; transition: transform .7s cubic-bezier(.16, 1, .3, 1); }
|
|
.av-sh-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 28px 28px 20px; border-bottom: 1px solid var(--line); }
|
|
.av-sh-top .av-sh-sub { margin-top: 10px; }
|
|
.av-sh-title { margin: 0; font-size: 28px; font-weight: 600; letter-spacing: -.025em; line-height: 1.1; }
|
|
.av-sh-x { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--x-raised); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
|
|
.av-sh-x:hover { border-color: rgba(0, 0, 0, .2); }
|
|
.av-sh-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 8px 28px 40px; }
|
|
|
|
@media (prefers-reduced-motion: reduce) {
|
|
.av-sh-panel, .av-sh.open .av-sh-panel, .av-sh-back { transition: none; }
|
|
}
|
|
@media (max-width: 900px) {
|
|
.av-sh-panel { top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; max-height: 86svh; border-radius: 24px; transform: translate3d(0, calc(100% + 24px), 0); }
|
|
.av-sh-top { padding: 22px 20px 16px; }
|
|
.av-sh-title { font-size: 24px; }
|
|
.av-sh-body { padding: 4px 20px 32px; }
|
|
.av-sh-btn { height: 52px; }
|
|
}
|