diff --git a/site-redesign/assets/theme-auto.svg b/site-redesign/assets/theme-auto.svg new file mode 100644 index 000000000..73cf2542b --- /dev/null +++ b/site-redesign/assets/theme-auto.svg @@ -0,0 +1 @@ + diff --git a/site-redesign/assets/theme-dark.svg b/site-redesign/assets/theme-dark.svg new file mode 100644 index 000000000..85827a842 --- /dev/null +++ b/site-redesign/assets/theme-dark.svg @@ -0,0 +1 @@ + diff --git a/site-redesign/assets/theme-light.svg b/site-redesign/assets/theme-light.svg new file mode 100644 index 000000000..cb22c4f72 --- /dev/null +++ b/site-redesign/assets/theme-light.svg @@ -0,0 +1 @@ + diff --git a/site-redesign/assets/window-agent-light.webp b/site-redesign/assets/window-agent-light.webp new file mode 100644 index 000000000..f809b98e2 Binary files /dev/null and b/site-redesign/assets/window-agent-light.webp differ diff --git a/site-redesign/assets/window-editor-light.webp b/site-redesign/assets/window-editor-light.webp new file mode 100644 index 000000000..1c30d2263 Binary files /dev/null and b/site-redesign/assets/window-editor-light.webp differ diff --git a/site-redesign/flutter-window.css b/site-redesign/flutter-window.css index feaa670d6..857d5c4c0 100644 --- a/site-redesign/flutter-window.css +++ b/site-redesign/flutter-window.css @@ -1810,3 +1810,102 @@ .app-window.is-winos .win-mode-usage .traffic-lights { display: none; } .app-window.is-winos .win-mode-usage .fl-sidepanel-actions { visibility: hidden; } .win-mode-usage { position: relative; } + +/* Theme: Bao Light (bao-light-color-theme.json), the window on the site's + light page (head.js's data-theme), whichever theme it was given. The + few colors its markup and scripts give once (var(--x-…, )) have + their light ones here too. */ +:root[data-theme="light"] .app-window { + --w-chrome: #f3f3f1; + --w-surface: #fcfbfa; + --w-panel: #ecece9; + --w-panel-border: #d3d1ce; + --w-drawer: #efefec; + --w-card: #f0efec; + --w-chip-border: #dddcd9; + --w-border: #e6e6e3; + --w-hairline: rgba(41, 41, 39, 0.08); + --w-sel: #e3e2de; + --w-act: #dcdad6; + --w-input: #fcfbfa; + --w-track: #e9e8e5; + --w-hover: rgba(37, 35, 30, 0.07); + --w-active-bg: rgba(37, 35, 30, 0.12); + --w-line-hl: rgba(37, 35, 30, 0.035); + + --w-fg: #292927; + --w-fg-hi: #1a1a18; + --w-fg-2: #656360; + --w-fg-3: #95948f; + --w-icon: #656360; + --w-tab-muted: #6e6c68; + + --w-accent: #e2b373; + --w-accent-hi: #d9a862; + --w-accent-fg: #282624; + --w-accent-border: rgba(196, 151, 90, 0.6); + --w-accent-border-hi: rgba(196, 151, 90, 0.85); + --w-tab-top: #b39364; + --w-focus-border: #c4975a; + --w-add: #5c7f37; + --w-del: #b0443a; + --w-caution: #8f6528; + --w-ssh-bg: rgba(79, 115, 152, 0.12); + --w-ssh-fg: #4f7398; + + --tok-cm: #008000; + --tok-kw: #af00db; + --tok-mod: #0000ff; + --tok-ty: #267f99; + --tok-fn: #795e26; + --tok-var: #001080; + --tok-str: #a31515; + --tok-num: #098658; + --tok-op: #000000; + + --x-icon: #656360; + --x-dim: #95948f; + --x-fg: #292927; + --x-grey: #8e8c87; + --x-spark: #c4975a; + --x-spark-fill: rgba(196, 151, 90, 0.18); + --x-grid: rgba(41, 41, 39, 0.08); + --x-hl: rgba(196, 151, 90, 0.2); + --x-up: #5c7f37; + --x-down: #b0443a; + --x-corp: #6e6c68; + --x-codex: #1a1a18; + + color-scheme: light; +} +:where(:root[data-theme="light"]) .app-window { + box-shadow: + 0 1px 0 rgba(255, 255, 255, 0.8) inset, + 0 40px 100px -30px rgba(40, 32, 20, 0.3), + 0 0 0 1px rgba(0, 0, 0, 0.06); +} + +:root[data-theme="light"] .app-window .ide-editor::after { background: rgba(41, 41, 39, 0.18); } +:root[data-theme="light"] .app-window .vs-scrollbar { border-left-color: rgba(0, 0, 0, 0.05); } +:root[data-theme="light"] .app-window .vs-scrollbar i { background: rgba(100, 98, 93, 0.3); } +:root[data-theme="light"] .app-window .fl-ctx-reserve { background: repeating-linear-gradient(-50deg, rgba(41, 41, 39, 0.2), rgba(41, 41, 39, 0.2) 2px, transparent 2px, transparent 5px); } +:root[data-theme="light"] .app-window .fl-chip { border-color: rgba(0, 0, 0, 0.1); } +:root[data-theme="light"] .app-window .fl-web-badges i { box-shadow: 0 0 0 1.5px var(--w-surface), inset 0 0 0 1px rgba(0, 0, 0, 0.08); } +:root[data-theme="light"] .app-window :is(.fl-plancard-body, .fl-agentmsg-body) code { background: rgba(0, 0, 0, 0.05); } +:root[data-theme="light"] .app-window .fl-step-body { background: rgba(0, 0, 0, 0.02); } +:root[data-theme="light"] .app-window :is(.fl-img-box, .fl-ft-img) { background: rgba(0, 0, 0, 0.03); } +:root[data-theme="light"] .app-window .fl-img-box.is-making::after { background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.7) 50%, transparent 70%); } +:root[data-theme="light"] .app-window .fl-mp-logo { background: rgba(0, 0, 0, 0.04); } +:root[data-theme="light"] .app-window :is(.fl-mp-add, .fl-mp-use) { color: #8f6528; } +:root[data-theme="light"] .app-window .fl-term-body .t-path { color: var(--w-ssh-fg); } +:root[data-theme="light"] .app-window .fl-term-body .t-user { color: var(--w-add); } + +/* The browser in the window: Chrome's light look. */ +:root[data-theme="light"] .app-window .fl-chrome { border-color: #dadce0; background: #dee1e6; box-shadow: 0 18px 40px -18px rgba(40, 32, 20, 0.25); } +:root[data-theme="light"] .app-window .fl-cr-tabs { background: #dee1e6; } +:root[data-theme="light"] .app-window .fl-cr-tab { color: #45474a; } +:root[data-theme="light"] .app-window .fl-cr-tab.is-active { background: #ffffff; color: #202124; } +:root[data-theme="light"] .app-window :is(.fl-cr-tab iconify-icon, .fl-cr-new, .fl-cr-url iconify-icon) { color: #5f6368; } +:root[data-theme="light"] .app-window .fl-cr-fav { background: #bdc1c6; } +:root[data-theme="light"] .app-window .fl-cr-bar { background: #ffffff; color: #5f6368; border-bottom: 1px solid #e3e3e3; } +:root[data-theme="light"] .app-window .fl-cr-url { background: #f1f3f4; color: #202124; } diff --git a/site-redesign/flutter-window.js b/site-redesign/flutter-window.js index 3b2ca400b..1a0dbcf85 100644 --- a/site-redesign/flutter-window.js +++ b/site-redesign/flutter-window.js @@ -15,7 +15,7 @@ function init() { "use strict"; const mount = document.getElementById("baocodeWindowMount"); if (!mount) return; - mount.innerHTML = "\n
\n \n
\n \n
\n
\n \n \n \n \n
\n\n
\n \n \n \n \n
\n \n BaoCode\n
\n
\n\n
\n \n \n \n \n \n \n
\n
\n\n \n
\n \n \n\n \n \n\n \n
\n
\n
\n \"\"\n file_service.dart\n \n
\n
\n \"\"\n tunnel_mux.dart\n
\n
\n \"\"\n README.md\n
\n
\n
\n baocode\n lib\n ide\n \"\"\n file_service.dart\n \n IdeHostFiles\n
\n
\n
\n
41 /// Copies [from] to [to] over local or remote SSH host.
\n
42 Future<void> copy(String from, String to);
\n
43
\n
44 /// Deletes [path] on the target machine for good.
\n
45 Future<void> delete(String path);
\n
46
\n
47 /// Writes raw bytes directly across the bidirectional tunnel.
\n
48 Future<void> writeBytes(String path, Uint8List bytes);
\n
49}
\n
50
\n
51/// A file service on another machine (Linux / macOS / Windows):
\n
52/// bridges remote Claude Code seamlessly back to your desktop.
\n
53abstract interface class IdeHostFiles implements IdeFileService {
\n
54 /// [path]'s bytes, streamed with zero base64 overhead.
\n
55 Future<Uint8List> readBytes(String path);
\n
56
\n
57 /// Watches live file changes at 360Hz frame-paced sync.
\n
58 Stream<void> watchDirectory(String directory);
\n
59
\n
60 /// Lists project files or delegates search straight to host.
\n
61 Future<IdeFileListing> listProject(String root, {int limit = 5000});
\n
62
\n
63 Stream<MatchHit> searchText(String root, IdeTextQuery query);
\n
64}
\n
65
\n
66/// Reads a range without holding up agent output or UI frames.
\n
67abstract interface class IdeRangeFiles {
\n
68 Future<({Uint8List bytes, int size})> readRange(String path, int offset);
\n
69}
\n
\n
\n
\n
\n\n \n
\n \n
\n \n \n
\n \n \n
\n
\n\n \n
\n
Editedprotocol_schema.dart+387
\n
Thought 3s
\n
Editedtunnel_mux.dart+106
\n
Ran 2 commands · thought 8s
\n
Editedadb_bridge.dart+518-1
\n
Running
\n\n \n
\n \n Doodling in the margins..\n
\n\n \n
\n \n \n 18m 03s\n \n \n \n 174.60 tok/s\n \n \n \n 100.63k tokens\n \n
\n
\n\n \n
\n \n
\n \n
\n

Implement bidirectional SSH tunnel, zero-copy local file/port forwarding, and USB-C ADB bridge with passing integration tests.

\n
Last check Core tunnel_mux tests green; verifying ADB port reverse over SSH.
\n
\n
\n\n \n
\n
\n Context window\n 296.7k / 400.0k (74%) · 70.3k until auto-compact\n \n
\n
\n \n
\n \n \n \n \n \n \n \n \n
\n\n \n
\n \n \n \n \n \n \n \n
\n Reserved for compaction33.0k\n
\n
\n\n \n \n\n \n
\n Prompt cache\n
\n \n \n \n
\n 97%\n 98% overall\n
\n\n \n
\n
\n Plan usage\n This session $4.61\n
\n
\n 5-hour limit\n
\n 10%\n resets in 1h 56m\n
\n
\n Weekly limit\n
\n 10%\n resets in 4d 20h\n
\n
\n
\n
\n\n \n
\n
\n \n
\n \n \n
\n
\n \n
\n\n \n
\n
Stream \"\"file_service.dart:51-58 without base64, the trace is Pasted text #1+42 lines and the panel should look like \"\"Image 1
\n
\n
\n Agent \n Full access \n Default · 400K · High \n
\n
\n \n \n \n
\n
\n
\n
\n
\n
\n\n \n
\n
\n main\n 0   0\n {} dart\n
\n
\n Ln 53, Col 66\n Spaces: 2\n UTF-8\n LF\n Dart\n \n
\n
\n
\n\n \n
\n \n \n\n \n
\n
\n \n \n
\n\n
\n
\n Multi-protocol adapter\n
\n \n \n
\n
\n\n
\n
Searched 3 patterns, read 9 files · thought 32s
\n
Three upstreams disagree on tool calls: Anthropic sends tool_use blocks, Responses sends function_call items, Gemini sends functionCall parts.
\n
Editedmessage_types.dart+96
\n
Ran 2 commands · thought 6s
\n
Editedgemini_parts.dart+211
\n
Mapping every upstream onto one schema first: Claude Messages stays the source of truth, everything else adapts to it.
\n
Read 6 files · thought 21s
\n
Editedupstream_registry.dart+142
\n
Editedtool_schema_bridge.dart+268
\n
Searched 4 patterns · thought 9s
\n
Responses streams reasoning items on their own, so the decoder holds them until the matching output_text arrives.
\n
Searched 2 patterns, ran 5 commands · thought 44s
\n
Editedopenai_responses.dart+764
\n
Ran 4 commands · thought 14s
\n
Editedcodex_service.dart+13
\n
Editedpricing_schedule.dart+914
\n
\n Now wiring the core translator (Claude Messages ⇄ OpenAI / Gemini), preserving cache breakpoints, tool schemas, and exact peak/holiday pricing telemetry.\n
\n
Editedstream_decoder.dart+544
\n\n
\n \n Cogitating..\n
\n\n
\n \n \n 17m 16s\n \n \n \n 169.50 tok/s\n \n \n \n 93.63k tokens\n \n
\n
\n\n
\n
\n \n
\n

Translate Claude Messages ⇄ OpenAI Responses / Codex / Gemini with zero edits to ~/.claude and exact peak/holiday pricing.

\n
Last check Prompt cache hit rate verified at 98.3% across 219 requests.
\n
\n
\n\n
\n
\n \n
\n \n \n
\n
\n \n
\n\n \n
\n
Map \"\"codex_service.dart:120-148 onto the adapter, the failing request is Pasted text #1+86 lines and pricing should render like \"\"Image 1
\n
\n
\n Agent \n Full access \n Default · 400K · High \n
\n
\n \n \n
\n
\n
\n
\n
\n\n \n
\n \n \n main*\n \n \n \n \n \n \n \n 282K / 400K\n \n
\n
\n\n \n
\n
\n Files\n \n Changes13\n \n Terminal\n Usage\n
\n \n \n
\n
\n\n
\n \n
\n Kind: All\n Agent: All\n Failed only\n \n
\n\n \n
\n
\n
Tokens
\n
\n 36.4M\n \n \n \n \n \n \n
\n 36.3M in · 143K out\n
\n\n
\n
Cost
\n
\n $15.03\n \n \n \n \n \n
\n At configured rates\n
\n\n
\n
Calls
\n
\n 219\n \n \n \n \n \n
\n 228 tool calls asked\n
\n\n
\n
Cache hit rate
\n
\n 98.3%\n \n \n \n \n \n
\n $135.39 saved · 35.6M\n
\n\n
\n
Time to first token
\n
\n 2.4s\n \n \n \n \n \n
\n 6.6s per call on avg\n
\n\n
\n
Output speed
\n
\n 224\n \n \n \n \n \n
\n tok/s · 143K output\n
\n
\n\n \n
\n
\n
Context growth
\n
282K now · peak 365K · 219 reqs · Cost $15.03
\n
\n
\n Cache read\n Input\n Cache write\n Output\n
\n \n
\n
\n \n \n #219/219\n \n \n 20:11 · claude-opus-5-5 · $0.205 · 100% cache\n 282K +547\n
\n
\n \n \n \n \n \n
\n
\n
CLAUDE.md & rules4,9942%
\n
Skills3,2741%
\n
MCP1,1770%
\n
Conversation35.7K13%
\n
Tool results237K84%
\n
\n
\n
\n
\n
\n
"; + mount.innerHTML = "\n
\n \n
\n \n
\n
\n \n \n \n \n
\n\n
\n \n \n \n \n
\n \n BaoCode\n
\n
\n\n
\n \n \n \n \n \n \n
\n
\n\n \n
\n \n \n\n \n \n\n \n
\n
\n
\n \"\"\n file_service.dart\n \n
\n
\n \"\"\n tunnel_mux.dart\n
\n
\n \"\"\n README.md\n
\n
\n
\n baocode\n lib\n ide\n \"\"\n file_service.dart\n \n IdeHostFiles\n
\n
\n
\n
41 /// Copies [from] to [to] over local or remote SSH host.
\n
42 Future<void> copy(String from, String to);
\n
43
\n
44 /// Deletes [path] on the target machine for good.
\n
45 Future<void> delete(String path);
\n
46
\n
47 /// Writes raw bytes directly across the bidirectional tunnel.
\n
48 Future<void> writeBytes(String path, Uint8List bytes);
\n
49}
\n
50
\n
51/// A file service on another machine (Linux / macOS / Windows):
\n
52/// bridges remote Claude Code seamlessly back to your desktop.
\n
53abstract interface class IdeHostFiles implements IdeFileService {
\n
54 /// [path]'s bytes, streamed with zero base64 overhead.
\n
55 Future<Uint8List> readBytes(String path);
\n
56
\n
57 /// Watches live file changes at 360Hz frame-paced sync.
\n
58 Stream<void> watchDirectory(String directory);
\n
59
\n
60 /// Lists project files or delegates search straight to host.
\n
61 Future<IdeFileListing> listProject(String root, {int limit = 5000});
\n
62
\n
63 Stream<MatchHit> searchText(String root, IdeTextQuery query);
\n
64}
\n
65
\n
66/// Reads a range without holding up agent output or UI frames.
\n
67abstract interface class IdeRangeFiles {
\n
68 Future<({Uint8List bytes, int size})> readRange(String path, int offset);
\n
69}
\n
\n
\n
\n
\n\n \n
\n \n
\n \n \n
\n \n \n
\n
\n\n \n
\n
Editedprotocol_schema.dart+387
\n
Thought 3s
\n
Editedtunnel_mux.dart+106
\n
Ran 2 commands · thought 8s
\n
Editedadb_bridge.dart+518-1
\n
Running
\n\n \n
\n \n Doodling in the margins..\n
\n\n \n
\n \n \n 18m 03s\n \n \n \n 174.60 tok/s\n \n \n \n 100.63k tokens\n \n
\n
\n\n \n
\n \n
\n \n
\n

Implement bidirectional SSH tunnel, zero-copy local file/port forwarding, and USB-C ADB bridge with passing integration tests.

\n
Last check Core tunnel_mux tests green; verifying ADB port reverse over SSH.
\n
\n
\n\n \n
\n
\n Context window\n 296.7k / 400.0k (74%) · 70.3k until auto-compact\n \n
\n
\n \n
\n \n \n \n \n \n \n \n \n
\n\n \n
\n \n \n \n \n \n \n \n
\n Reserved for compaction33.0k\n
\n
\n\n \n \n\n \n
\n Prompt cache\n
\n \n \n \n
\n 97%\n 98% overall\n
\n\n \n
\n
\n Plan usage\n This session $4.61\n
\n
\n 5-hour limit\n
\n 10%\n resets in 1h 56m\n
\n
\n Weekly limit\n
\n 10%\n resets in 4d 20h\n
\n
\n
\n
\n\n \n
\n
\n \n
\n \n \n
\n
\n \n
\n\n \n
\n
Stream \"\"file_service.dart:51-58 without base64, the trace is Pasted text #1+42 lines and the panel should look like \"\"Image 1
\n
\n
\n Agent \n Full access \n Default · 400K · High \n
\n
\n \n \n \n
\n
\n
\n
\n
\n
\n\n \n
\n
\n main\n 0   0\n {} dart\n
\n
\n Ln 53, Col 66\n Spaces: 2\n UTF-8\n LF\n Dart\n \n
\n
\n
\n\n \n
\n \n \n\n \n
\n
\n \n \n
\n\n
\n
\n Multi-protocol adapter\n
\n \n \n
\n
\n\n
\n
Searched 3 patterns, read 9 files · thought 32s
\n
Three upstreams disagree on tool calls: Anthropic sends tool_use blocks, Responses sends function_call items, Gemini sends functionCall parts.
\n
Editedmessage_types.dart+96
\n
Ran 2 commands · thought 6s
\n
Editedgemini_parts.dart+211
\n
Mapping every upstream onto one schema first: Claude Messages stays the source of truth, everything else adapts to it.
\n
Read 6 files · thought 21s
\n
Editedupstream_registry.dart+142
\n
Editedtool_schema_bridge.dart+268
\n
Searched 4 patterns · thought 9s
\n
Responses streams reasoning items on their own, so the decoder holds them until the matching output_text arrives.
\n
Searched 2 patterns, ran 5 commands · thought 44s
\n
Editedopenai_responses.dart+764
\n
Ran 4 commands · thought 14s
\n
Editedcodex_service.dart+13
\n
Editedpricing_schedule.dart+914
\n
\n Now wiring the core translator (Claude Messages ⇄ OpenAI / Gemini), preserving cache breakpoints, tool schemas, and exact peak/holiday pricing telemetry.\n
\n
Editedstream_decoder.dart+544
\n\n
\n \n Cogitating..\n
\n\n
\n \n \n 17m 16s\n \n \n \n 169.50 tok/s\n \n \n \n 93.63k tokens\n \n
\n
\n\n
\n
\n \n
\n

Translate Claude Messages ⇄ OpenAI Responses / Codex / Gemini with zero edits to ~/.claude and exact peak/holiday pricing.

\n
Last check Prompt cache hit rate verified at 98.3% across 219 requests.
\n
\n
\n\n
\n
\n \n
\n \n \n
\n
\n \n
\n\n \n
\n
Map \"\"codex_service.dart:120-148 onto the adapter, the failing request is Pasted text #1+86 lines and pricing should render like \"\"Image 1
\n
\n
\n Agent \n Full access \n Default · 400K · High \n
\n
\n \n \n
\n
\n
\n
\n
\n\n \n
\n \n \n main*\n \n \n \n \n \n \n \n 282K / 400K\n \n
\n
\n\n \n
\n
\n Files\n \n Changes13\n \n Terminal\n Usage\n
\n \n \n
\n
\n\n
\n \n
\n Kind: All\n Agent: All\n Failed only\n \n
\n\n \n
\n
\n
Tokens
\n
\n 36.4M\n \n \n \n \n \n \n
\n 36.3M in · 143K out\n
\n\n
\n
Cost
\n
\n $15.03\n \n \n \n \n \n
\n At configured rates\n
\n\n
\n
Calls
\n
\n 219\n \n \n \n \n \n
\n 228 tool calls asked\n
\n\n
\n
Cache hit rate
\n
\n 98.3%\n \n \n \n \n \n
\n $135.39 saved · 35.6M\n
\n\n
\n
Time to first token
\n
\n 2.4s\n \n \n \n \n \n
\n 6.6s per call on avg\n
\n\n
\n
Output speed
\n
\n 224\n \n \n \n \n \n
\n tok/s · 143K output\n
\n
\n\n \n
\n
\n
Context growth
\n
282K now · peak 365K · 219 reqs · Cost $15.03
\n
\n
\n Cache read\n Input\n Cache write\n Output\n
\n \n
\n
\n \n \n #219/219\n \n \n 20:11 · claude-opus-5-5 · $0.205 · 100% cache\n 282K +547\n
\n
\n \n \n \n \n \n
\n
\n
CLAUDE.md & rules4,9942%
\n
Skills3,2741%
\n
MCP1,1770%
\n
Conversation35.7K13%
\n
Tool results237K84%
\n
\n
\n
\n
\n
\n
"; const desktopWin = document.getElementById('desktopWindow'); @@ -659,8 +659,8 @@ function init() { [0, 100, 200, 300, 400].forEach((k) => { const y = yOf(k).toFixed(1); - out += ``; - out += `${k === 0 ? '0' : k + 'K'}`; + out += ``; + out += `${k === 0 ? '0' : k + 'K'}`; }); const N = USAGE_POINTS.length; @@ -669,7 +669,7 @@ function init() { if (interactive) { const hx = (padL + selectedUsageIdx * step - 0.6).toFixed(1); - out += ``; + out += ``; } USAGE_POINTS.forEach((pt, i) => { @@ -698,7 +698,7 @@ function init() { if (pt.compacted) { const cx = (padL + i * step + barW / 2).toFixed(1); const cy = yOf(398).toFixed(1); - out += ``; + out += ``; } out += ``; }); @@ -706,7 +706,7 @@ function init() { const times = ['19:38', '19:44', '19:47', '19:55', '19:57', '20:01', '20:02', '20:06']; times.forEach((lbl, idx) => { const tx = (padL + 12 + (idx / (times.length - 1)) * (plotW - 28)).toFixed(1); - out += `${lbl}`; + out += `${lbl}`; }); svg.innerHTML = out; @@ -727,7 +727,7 @@ function init() { if (deltaEl) { const sign = pt.deltaTok >= 0 ? '+' : ''; deltaEl.textContent = `${sign}${pt.deltaTok}`; - deltaEl.style.color = pt.deltaTok >= 0 ? '#9DC08B' : '#E8877A'; + deltaEl.style.color = pt.deltaTok >= 0 ? 'var(--x-up, #9DC08B)' : 'var(--x-down, #E8877A)'; } } @@ -1602,10 +1602,10 @@ function init() { const UPSTREAMS = [ { id: 'claude', icon: 'simple-icons:claude', color: '#d97757', name: 'Claude Code (this machine’s setup)', badge: 'Built-in', sub: 'Your own login and settings, nothing changed' }, - { id: 'corp', icon: 'lucide:building-2', color: '#c9c7bf', name: 'corp-gateway', sub: 'OpenAI Responses · llm.corp.internal · 3 models' }, + { id: 'corp', icon: 'lucide:building-2', color: 'var(--x-corp, #c9c7bf)', name: 'corp-gateway', sub: 'OpenAI Responses · llm.corp.internal · 3 models' }, { id: 'deepseek', icon: 'simple-icons:deepseek', color: '#5b7bff', name: 'DeepSeek', sub: 'Anthropic Messages · api.deepseek.com · 2 models' }, { id: 'gemini', icon: 'simple-icons:googlegemini', color: '#8ab4ff', name: 'Antigravity', sub: 'Google account · 4 models' }, - { id: 'codex', icon: 'simple-icons:openai', color: '#e8e7e2', name: 'Codex', sub: 'ChatGPT account · 3 models' }, + { id: 'codex', icon: 'simple-icons:openai', color: 'var(--x-codex, #e8e7e2)', name: 'Codex', sub: 'ChatGPT account · 3 models' }, { id: 'openrouter', icon: 'simple-icons:openrouter', color: '#a3a8ff', name: 'OpenRouter', sub: 'OpenAI Chat Completions · 12 models' } ]; diff --git a/site-redesign/style.css b/site-redesign/style.css index 6baec5929..69ea9b7fb 100644 --- a/site-redesign/style.css +++ b/site-redesign/style.css @@ -1,22 +1,43 @@ /* The site's pages but the home page (which carries its own): download, changelog, upstreams, push, import, activate and the privacy notes, in - the home page's look: dark, one column of text under the same header. */ + the home page's look: dark, or light (the system's or picked, head.js), + one column of text under the same header. */ :root { --bg: #111110; --card: #161615; --card-hi: #1b1b19; - --ink: #f5f5f3; --body: #c2c0b9; --muted: #989792; --faint: #63625d; - --rule: rgba(255, 255, 255, .08); --rule-hi: rgba(255, 255, 255, .14); - --gold: #e5ba7d; --tint: rgba(255, 255, 255, .05); + --ink: #f5f5f3; --head: #ffffff; --body: #c2c0b9; --muted: #989792; --faint: #63625d; + --rule: rgba(255, 255, 255, .08); --rule-hi: rgba(255, 255, 255, .14); --rule-hover: rgba(255, 255, 255, .28); + --underline: rgba(152, 151, 146, .45); + --gold: #e5ba7d; --gold-ink: #e5ba7d; --tint: rgba(255, 255, 255, .05); + --ok: #9dc08b; --err: #e0866a; --selection-ink: #ffffff; + --bar: rgba(17, 17, 16, .97); + /* The primary button: white on the dark page. */ + --cta: #ffffff; --cta-ink: #111110; --cta-hover: #f2f1ed; --cta-on: #2a2a28; --cta-on-ink: #ffffff; + --backdrop: rgba(0, 0, 0, .55); --shadow-dialog: 0 32px 80px -24px rgba(0, 0, 0, .85); --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Text", "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; --mono: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace; --text: 720px; --wide: 1136px; color-scheme: dark; } +:root[data-theme="light"] { + --bg: #f8f8f6; --card: #ffffff; --card-hi: #f6f6f3; + --ink: #1d1c1a; --head: #121110; --body: #3f3e3a; --muted: #64625d; --faint: #98968f; + --rule: rgba(0, 0, 0, .08); --rule-hi: rgba(0, 0, 0, .13); --rule-hover: rgba(0, 0, 0, .3); + --underline: rgba(100, 98, 93, .4); + --gold-ink: #96682a; --tint: rgba(0, 0, 0, .05); + --ok: #4d8a3a; --err: #c4503a; --selection-ink: #121110; + --bar: rgba(248, 248, 246, .97); + --cta: #1b1a17; --cta-ink: #ffffff; --cta-hover: #34322e; --cta-on: #e6e5e1; --cta-on-ink: #121110; + --backdrop: rgba(20, 18, 14, .3); --shadow-dialog: 0 30px 70px -24px rgba(40, 32, 20, .3); + color-scheme: light; +} +/* A switch shows at once, nothing easing over to it. */ +.theme-switching, .theme-switching *, .theme-switching *::before, .theme-switching *::after { transition: none !important; } * { box-sizing: border-box; } html { background: var(--bg); color: var(--body); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; scroll-padding-top: 88px; } body { margin: 0; font: 16px/1.75 var(--sans); } -::selection { background: rgba(229, 186, 125, .32); color: #ffffff; } -a { color: var(--ink); text-decoration: underline; text-decoration-color: rgba(152, 151, 146, .45); text-decoration-thickness: 1px; text-underline-offset: 3px; transition: text-decoration-color .14s ease, color .14s ease; } +::selection { background: rgba(229, 186, 125, .32); color: var(--selection-ink); } +a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--underline); text-decoration-thickness: 1px; text-underline-offset: 3px; transition: text-decoration-color .14s ease, color .14s ease; } a:hover { text-decoration-color: var(--ink); } /* The old pages' background grid: not in this look. */ @@ -26,7 +47,7 @@ a:hover { text-decoration-color: var(--ink); } /* The header: the home page's bar, the mark and wordmark at the left, the pages and the language at the right, Download as its white pill. */ .top { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 22px; height: 64px; - padding: 0 max(24px, calc((100% - var(--wide)) / 2)); background: rgba(17, 17, 16, .97); border-bottom: 1px solid var(--rule); + padding: 0 max(24px, calc((100% - var(--wide)) / 2)); background: var(--bar); border-bottom: 1px solid var(--rule); font: 13.5px var(--sans); } .top a { display: inline-flex; align-items: center; text-decoration: none; color: var(--muted); white-space: nowrap; } .top a:hover { color: var(--ink); } @@ -35,13 +56,29 @@ a:hover { text-decoration-color: var(--ink); } .top .brand img { display: none; } .top .brand::before { content: ""; width: 20px; height: 15px; margin-top: -1px; background: currentColor; -webkit-mask: url(/assets/logo.svg) center / contain no-repeat; mask: url(/assets/logo.svg) center / contain no-repeat; } -/* As on the home page: the language, then Download last. */ -.top .lang { order: 1; } -.top a[href$="/download"]:not(.lang) { order: 2; height: 34px; padding: 0 16px; border-radius: 999px; background: #ffffff; color: #111110; font-weight: 600; } -.top a[href$="/download"]:not(.lang):hover { opacity: .9; color: #111110; } -.top a[href$="/download"]:not(.lang)[aria-current="page"] { background: #2a2a28; color: #ffffff; } +/* As on the home page: light or dark, the language, then Download last. */ +.top .lang, .top .theme { order: 1; } +.top a[href$="/download"]:not(.lang) { order: 2; height: 34px; padding: 0 16px; border-radius: 999px; background: var(--cta); color: var(--cta-ink); font-weight: 600; } +.top a[href$="/download"]:not(.lang):hover { opacity: .9; color: var(--cta-ink); } +.top a[href$="/download"]:not(.lang)[aria-current="page"] { background: var(--cta-on); color: var(--cta-on-ink); } .top .lang { height: 34px; padding: 0 13px; border: 1px solid var(--rule-hi); border-radius: 999px; } -.top .lang:hover { border-color: rgba(255, 255, 255, .28); } +.top .lang:hover { border-color: var(--rule-hover); } +/* Light or dark (head.js): the mark of the one picked, the system's, light + or dark. */ +.top .theme { position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0; + border: 1px solid var(--rule-hi); border-radius: 999px; background: none; color: var(--muted); cursor: pointer; transition: color .15s ease, border-color .15s ease; } +.top .theme:hover { color: var(--ink); border-color: var(--rule-hover); } +.top .theme::before { content: ""; width: 15px; height: 15px; background: currentColor; + -webkit-mask: url(/assets/theme-auto.svg) center / contain no-repeat; mask: url(/assets/theme-auto.svg) center / contain no-repeat; } +:root[data-theme-pick="light"] .top .theme::before { -webkit-mask-image: url(/assets/theme-light.svg); mask-image: url(/assets/theme-light.svg); } +:root[data-theme-pick="dark"] .top .theme::before { -webkit-mask-image: url(/assets/theme-dark.svg); mask-image: url(/assets/theme-dark.svg); } +/* Its name and the one picked, under it, on a screen with a mouse. */ +@media (hover: hover) and (pointer: fine) { + .top .theme::after { content: attr(data-tip); position: absolute; top: calc(100% + 8px); left: 50%; z-index: 50; padding: 5px 9px; border-radius: 7px; + background: var(--cta); color: var(--cta-ink); font: 500 12px/1.4 var(--sans); letter-spacing: 0; white-space: nowrap; pointer-events: none; + opacity: 0; transform: translate(-50%, -3px); transition: opacity .12s ease, transform .12s ease; } + .top .theme:is(:hover, :focus-visible)::after { opacity: 1; transform: translate(-50%, 0); transition-delay: .5s; } +} .top svg.ic { width: 15px; height: 15px; margin-right: 6px; } /* A channel (channels.json, site.js): its logo and name for the brand. */ .top .brand:has(.channel-logo)::before { content: none; } @@ -49,24 +86,28 @@ a:hover { text-decoration-color: var(--ink); } .channel-pending .top .brand, .channel-pending [data-channel-title], .channel-pending [data-channel-subtitle] { visibility: hidden; } @media (max-width: 560px) { .top { gap: 14px; padding: 0 16px; overflow-x: auto; } - .top a[href*="changelog"] { display: none; } + .top a[href*="changelog"]:not(.lang) { display: none; } .top .brand { font-size: 15px; } + /* GitHub its mark alone, as on the home page. */ + .top a[href^="https://github.com"] { font-size: 0; } + .top a[href^="https://github.com"] svg.ic { margin-right: 0; } } +@media (max-width: 400px) { .top { gap: 10px; } } /* Text in a middle column. */ .page { display: grid; grid-template-columns: 1fr min(var(--text), 100% - 48px) 1fr; padding: 64px 0 112px; counter-reset: h2; } .page > * { grid-column: 2; } -h1 { margin: 0; font: 700 clamp(32px, 4vw, 44px)/1.12 var(--sans); letter-spacing: -.032em; color: #ffffff; } +h1 { margin: 0; font: 700 clamp(32px, 4vw, 44px)/1.12 var(--sans); letter-spacing: -.032em; color: var(--head); } .subtitle { margin: 14px 0 0; font-size: 17px; line-height: 1.6; color: var(--muted); } .meta { margin: 16px 0 0; font: 13px/1.6 var(--sans); color: var(--faint); } .meta span { display: inline-block; } .meta span:not(:last-child)::after { content: "·"; margin: 0 8px; } -h2 { margin: 64px 0 16px; font: 650 24px/1.3 var(--sans); letter-spacing: -.02em; color: #ffffff; counter-increment: h2; } +h2 { margin: 64px 0 16px; font: 650 24px/1.3 var(--sans); letter-spacing: -.02em; color: var(--head); counter-increment: h2; } h2::before { content: counter(h2); display: inline-block; min-width: 1.5em; color: var(--faint); font-weight: 500; } h2.plain { counter-increment: none; } h2.plain::before { content: none; } h2 svg.ic { margin-right: .4em; color: var(--muted); vertical-align: -.12em; } -h3 { margin: 32px 0 10px; font: 620 17px/1.4 var(--sans); color: #ffffff; } +h3 { margin: 32px 0 10px; font: 620 17px/1.4 var(--sans); color: var(--head); } p { margin: 0 0 1.1em; } ul, ol { margin: 0 0 1.1em; padding-left: 1.3em; } li { margin: 0 0 .45em; } @@ -76,7 +117,7 @@ code { padding: .12em .4em; border-radius: 5px; background: var(--tint); color: kbd { padding: .05em .4em; border: 1px solid var(--rule-hi); border-bottom-width: 2px; border-radius: 5px; color: var(--ink); font: .8em var(--sans); } pre { margin: 0 0 1.1em; padding: 14px 16px; overflow-x: auto; border: 1px solid var(--rule); border-radius: 12px; background: var(--card); font: 13px/1.65 var(--mono); } pre code { padding: 0; background: none; font: inherit; white-space: pre-wrap; overflow-wrap: anywhere; } -mark.todo { padding: 0 .2em; border-radius: 3px; background: rgba(229, 186, 125, .25); color: var(--gold); } +mark.todo { padding: 0 .2em; border-radius: 3px; background: rgba(229, 186, 125, .25); color: var(--gold-ink); } svg.ic { width: 1em; height: 1em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; } svg.ic.logo { stroke: none; } footer { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--rule); font: 12.5px/1.6 var(--sans); color: var(--faint); } @@ -87,14 +128,14 @@ footer { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--rule); .button { display: inline-flex; align-items: center; height: 40px; padding: 0 18px; border: 1px solid var(--rule-hi); border-radius: 999px; background: transparent; color: var(--ink); font: 600 14px var(--sans); white-space: nowrap; text-decoration: none; cursor: pointer; transition: border-color .15s ease, background-color .15s ease, opacity .15s ease; } -.button:hover { border-color: rgba(255, 255, 255, .3); } -.button.primary { background: #ffffff; border-color: #ffffff; color: #111110; } -.button.primary:hover { background: #f2f1ed; } +.button:hover { border-color: var(--rule-hover); } +.button.primary { background: var(--cta); border-color: var(--cta); color: var(--cta-ink); } +.button.primary:hover { background: var(--cta-hover); } .button svg.ic { width: 17px; height: 17px; margin-right: 8px; } .button:disabled { opacity: .6; cursor: default; } [data-shown][hidden] { display: none; } .pill-new { display: inline-block; margin-left: 10px; padding: 1px 9px; font: 600 12px/1.5 var(--sans); vertical-align: .3em; - color: var(--gold); background: rgba(229, 186, 125, .12); border: 1px solid rgba(229, 186, 125, .35); border-radius: 999px; } + color: var(--gold-ink); background: rgba(229, 186, 125, .12); border: 1px solid rgba(229, 186, 125, .35); border-radius: 999px; } .beta { display: inline-block; margin-left: 8px; padding: 1px 8px; font: 500 11.5px/1.5 var(--sans); vertical-align: .35em; color: var(--muted); border: 1px solid var(--rule-hi); border-radius: 999px; } @@ -102,7 +143,7 @@ footer { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--rule); .table { margin: 28px 0 32px; } table { width: 100%; border-collapse: collapse; font: 14px/1.55 var(--sans); font-variant-numeric: tabular-nums; } th, td { padding: 10px 14px 10px 0; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; } -thead th { border-bottom-color: var(--rule-hi); font-weight: 600; color: #ffffff; } +thead th { border-bottom-color: var(--rule-hi); font-weight: 600; color: var(--head); } td { color: var(--body); } tbody td:first-child { color: var(--ink); } .table .caption { margin-top: 12px; font-size: 13px; color: var(--muted); } @@ -112,7 +153,7 @@ tbody td:first-child { color: var(--ink); } .platform { display: flex; flex-direction: column; padding: 22px 24px 24px; border: 1px solid var(--rule); border-radius: 18px; background: var(--card); transition: border-color .2s ease; } .platform:hover { border-color: var(--rule-hi); } .platform h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; font-size: 20px; } -.platform h2 svg.ic { margin: 0; width: 20px; height: 20px; color: #ffffff; } +.platform h2 svg.ic { margin: 0; width: 20px; height: 20px; color: var(--head); } .platform p { flex: 1; margin: 0 0 20px; font-size: 14px; line-height: 1.6; color: var(--muted); } .platform .get { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; } .platform[data-os="linux"] { grid-column: 1 / -1; } @@ -127,24 +168,24 @@ tbody td:first-child { color: var(--ink); } .qr { position: absolute; inset: 0 0 64px; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 12px 20px; border-radius: 17px 17px 0 0; background: var(--card); opacity: 0; visibility: hidden; transition: opacity .16s ease, visibility 0s .16s; } [data-phones] .platform:hover .qr, [data-phones] .platform.qr-open .qr { opacity: 1; visibility: visible; transition: opacity .16s ease; } -.qr img { width: 148px; height: 148px; padding: 8px; border-radius: 12px; background: #ffffff; } +.qr img { width: 148px; height: 148px; padding: 8px; border-radius: 12px; background: #ffffff; box-shadow: 0 0 0 1px var(--rule); } @media (prefers-reduced-motion: reduce) { .qr { transition: none; } } .hashes code { overflow-wrap: anywhere; } /* The changelog (tool/build_changelog.dart): a version a section. */ .release { margin-top: 56px; padding-top: 4px; } .release h2 { margin: 0 0 14px; font-size: 24px; } -.release h2 a { color: #ffffff; text-decoration: none; } -.release h2 a:hover { color: var(--gold); } +.release h2 a { color: var(--head); text-decoration: none; } +.release h2 a:hover { color: var(--gold-ink); } .release :is(p, li) { font-size: 15.5px; } .release p:has(+ ul) { margin: 22px 0 6px; font: 600 12.5px/1.5 var(--sans); letter-spacing: .02em; color: var(--muted); } .release h2 + p:has(+ ul) { margin-top: 0; } -.release:target h2 a { color: var(--gold); } +.release:target h2 a { color: var(--gold-ink); } /* Dialogs: the download's thanks (download.js), saying a word (site.js). */ dialog.star { width: min(460px, calc(100vw - 40px)); padding: 26px 28px 24px; border: 1px solid var(--rule-hi); border-radius: 16px; - background: var(--card); color: var(--body); box-shadow: 0 32px 80px -24px rgba(0, 0, 0, .85); } -dialog.star::backdrop { background: rgba(0, 0, 0, .55); } + background: var(--card); color: var(--body); box-shadow: var(--shadow-dialog); } +dialog.star::backdrop { background: var(--backdrop); } dialog.star h2 { margin: 0 0 8px; font-size: 20px; } dialog.star p { margin: 0 0 20px; font-size: 14px; line-height: 1.6; color: var(--muted); } dialog.star .get { display: flex; flex-wrap: wrap; gap: 8px; } @@ -154,7 +195,7 @@ dialog.say .field em { margin-left: 8px; font-style: normal; color: var(--faint) dialog.say :is(textarea, input) { display: block; width: 100%; padding: 9px 11px; border: 1px solid var(--rule-hi); border-radius: 9px; background: var(--bg); color: var(--ink); font: 14px/1.5 var(--sans); resize: vertical; } dialog.say :is(textarea, input):focus { outline: none; border-color: rgba(229, 186, 125, .55); box-shadow: 0 0 0 3px rgba(229, 186, 125, .14); } dialog.say p.hint { margin: -2px 0 20px; font-size: 12.5px; color: var(--faint); } -dialog.say .say-status { margin: 12px 0 0; font-size: 13px; color: #e0866a; } +dialog.say .say-status { margin: 12px 0 0; font-size: 13px; color: var(--err); } dialog.say .say-status:empty { display: none; } dialog.say .done, dialog.say.sent form { display: none; } dialog.say.sent .done { display: block; } @@ -173,7 +214,7 @@ dl.import dd[data-field="url"], dl.import dd[data-field="key"] { font-family: va .copyable pre { max-height: 360px; overflow-y: auto; padding-right: 76px; } .copyable .copy { position: absolute; top: 8px; right: 8px; height: 28px; padding: 0 11px; border: 1px solid var(--rule-hi); border-radius: 999px; background: var(--card-hi); color: var(--muted); font: 500 12.5px var(--sans); cursor: pointer; } -.copyable .copy:hover { color: var(--ink); border-color: rgba(255, 255, 255, .28); } +.copyable .copy:hover { color: var(--ink); border-color: var(--rule-hover); } /* /upstreams: BaoCode's marks for sites' buttons, each on the ground it is for. */ .assets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0 0 1.1em; } @@ -194,17 +235,18 @@ dl.import dd[data-field="url"], dl.import dd[data-field="key"] { font-family: va .pick:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; } .pick:target .sample { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--gold); } .pick::after { content: attr(data-hint); position: absolute; bottom: calc(100% + 9px); left: 50%; z-index: 1; padding: 4px 9px; border-radius: 6px; - background: #ffffff; color: #111110; font: 500 12px/1.4 var(--sans); white-space: nowrap; opacity: 0; pointer-events: none; + background: var(--cta); color: var(--cta-ink); font: 500 12px/1.4 var(--sans); white-space: nowrap; opacity: 0; pointer-events: none; transform: translate(-50%, 4px); transition: opacity .14s ease, transform .14s ease; } .pick:hover::after, .pick:focus-visible::after, .pick.copied::after { opacity: 1; transform: translate(-50%, 0); } -.pick.copied::after { background: #9dc08b; } +.pick.copied::after { background: #9dc08b; color: #111110; } /* /upstreams: BaoCode's Settings → Models drawn in Bao Light, as the app shows it to someone on the light theme: a site's card at the top, the site just imported below. Its own colors. */ .mock { --bg: #FDFCF8; --side: #F5F4EE; --card: #F4F2EC; --sel: #E8E5DC; --line: #E9E7DF; --text: #2B2925; --dim: #69655A; --faint: #8E8A7E; --sand: #E2B373; --sand-text: #8F6528; --green: #5C8B4C; margin: 34px -32px 8px; font: 13px/1.4 var(--sans); color: var(--text); user-select: none; } -.mock .win { display: flex; position: relative; overflow: hidden; border: 1px solid rgba(255, 255, 255, .12); border-radius: 14px; background: var(--bg); box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .8); } +.mock .win { display: flex; position: relative; overflow: hidden; border: 1px solid var(--rule-hi); border-radius: 14px; background: var(--bg); box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .8); } +:root[data-theme="light"] .mock .win { box-shadow: 0 24px 60px -28px rgba(40, 32, 20, .3); } .mock .win { --focus: 39% 30%; } .mock .win::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse 70% 135% at var(--focus), transparent 20%, rgba(253, 252, 248, .4) 50%, rgba(253, 252, 248, .78) 82%, rgba(253, 252, 248, .92) 100%); } diff --git a/site-redesign/zcode-style.html b/site-redesign/zcode-style.html index c51ed00d4..df895b53e 100644 --- a/site-redesign/zcode-style.html +++ b/site-redesign/zcode-style.html @@ -7,27 +7,154 @@ - +