feat: 暗色主题 + /2026 详情页 + 逐页标题 — 对齐原站剩余缺口

- 暗色主题 1:1:ThemeModeProvider 原逻辑(localStorage 'theme'
  light/dark/system、system 跟随 prefers-color-scheme、<html> class 切换),
  CSS tokens 按原站 .dark 块翻值(--label/--background-deep/--code-*);
  shellMedia 重构为 useSyncExternalStore 单例 store(Header 与 Canvas 共享)
- WebGL 主题分支:BackgroundFX 暗色渐变(#2c4bd5/#00000d/#00344C +
  outputMix .95/edgeIntensity -.82,原 sj 配置)、DotOverlay #0F1111、
  LoadingCurtain #191b1b、玻璃模型暗色参数组(shininess 100/fresnel .72/
  brightness .6/uDark=1 Hard-Light)与暗色 tint(hello #64c3ff、
  footer #8e9dc4/#64c3ff)
- /2026 路由:rewrite 补 2026(此前 404),workArticles 增加 /2026 占位文章
  (原站内容被服务端口令保密无法读取,已注释说明);解锁屏→刷新→服务端
  放行全链路 CDP 验证通过
- 逐页 <title>:app/work/[slug]/layout.tsx generateMetadata 映射作品名
  (reunimos→Reunimos™),受保护 /2026 未解锁时 SSR 'Protected'(原站行为),
  根标题改回原站 'HAOQI©2026'
This commit is contained in:
2026-09-02 14:31:28 +08:00
parent 696cfa8c2c
commit d5a1228aac
10 changed files with 337 additions and 68 deletions
+44 -14
View File
@@ -1,34 +1,40 @@
@import "tailwindcss";
/* Theme color indirection: utilities (text-l1, bg-b1, …) reference these
tokens, and the .dark block (below) flips their values — the same
light/dark token pairs the original stylesheet emits. */
@theme {
--font-sans: var(--font-tiktok), sans-serif;
--font-mono: var(--font-mono), monospace;
--font-mono-2: var(--font-mono-2), monospace;
--color-l1: rgba(0, 0, 0, 1);
--color-l2: rgba(54, 54, 48, 0.6);
--color-l3: rgba(54, 54, 48, 0.32);
--color-line: rgba(54, 54, 48, 0.1);
--color-b1: rgb(251, 250, 244);
--color-be: #efede7;
--color-l1: var(--label-1);
--color-l2: var(--label-2);
--color-l3: var(--label-3);
--color-line: var(--line);
--color-b1: rgb(var(--background-deep));
--color-be: var(--background-elevated);
--color-selection: #c0fe04;
}
:root {
--bg-color: rgb(251, 250, 244);
--text-color: rgba(0, 0, 0, 1);
--grid-dot: rgba(54, 54, 48, 0.1);
--bg-color: rgb(var(--background-deep));
--text-color: var(--label-1);
--grid-dot: var(--line);
--selection-bg: #c0fe04;
/* Original label tokens (light theme): --label-1 = primary label,
--label-3 = tertiary label (link underline decoration color). */
/* Light theme tokens (chunk 635eb04122aa774f.css :root). */
--label: 0, 0, 0;
--label-d: 54, 54, 48;
--background-deep: 251, 250, 244;
--background-elevated: #efede7;
--label-1: rgba(var(--label), 1);
--label-2: rgba(var(--label-d), 0.6);
--label-3: rgba(var(--label-d), 0.32);
--label-4: rgba(var(--label-d), 0.18);
--line: rgba(var(--label-d), 0.1);
/* Original code token colors (light theme, chunk 635eb04122aa774f.css) —
the MDX CodeBlock maps prism token types to these vars. */
/* Original code token colors (light theme). */
--code-comment: rgba(var(--label-d), 0.45);
--code-string: lab(43.8263% -47.6118 18.596);
--code-number: lab(46.7992% 8.99872 72.9973);
@@ -38,6 +44,30 @@
--code-operator: rgba(var(--label-d), 0.75);
}
/* Dark theme (original .dark block: ThemeModeProvider adds the class to
<html>; localStorage "theme" ∈ light|dark|system, system follows
prefers-color-scheme). */
.dark {
color-scheme: dark;
--label: 255, 255, 255;
--label-d: 230, 232, 232;
--background-deep: 15, 17, 17;
--background-elevated: #191b1b;
--label-1: rgba(var(--label), 1);
--label-2: rgba(var(--label-d), 0.6);
--label-3: rgba(var(--label-d), 0.32);
--label-4: rgba(var(--label-d), 0.16);
--line: rgba(var(--label-d), 0.08);
--code-comment: rgba(var(--label-d), 0.5);
--code-string: lab(80.5863% -36.0539 14.2351);
--code-number: lab(81.7507% 5.58251 51.1676);
--code-keyword: lab(74.3615% 26.3244 -70.4223);
--code-function: lab(78.8788% -11.9607 -42.8116);
--code-tag: lab(76.4079% 47.9123 21.2271);
--code-operator: rgba(var(--label-d), 0.85);
}
/* Background lives on the ROOT only — per CSS painting it propagates to the
canvas backdrop, so it stays BEHIND the original's -z-1 fixed WebGL host.
A body-level background would paint as normal-flow content and cover the