fix: 分站加载动画跟随主题色

- 添加 --page-bg/--page-spinner CSS 变量,各主题定义自己的颜色
- body 背景改用 CSS 变量,不再硬编码黑色
- SiteContext 获取站点信息后立即应用主题类到 body
- localStorage 缓存主题类,刷新时在 React 加载前恢复,防止闪烁
- 浅色主题(clean/corporate/claude)加载时显示白色/米色背景+对应色 spinner

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
abingyydsandClaude Opus 4.6 committed 2026-03-27 21:29:53 +09:00
1 parent 16c42412bc
commit 91e673aabd
36 files changed
+419 -12

No files matched your search

+9 -2
View File
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="en" class="dark">
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
@@ -8,7 +8,14 @@
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Noto+Sans+SC:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet" />
<title>AI Platform</title>
</head>
<body class="bg-black text-white antialiased">
<body class="antialiased">
<script>
// Restore theme class from cache to prevent flash on reload
try {
var tc = localStorage.getItem('dist-theme-class');
if (tc) document.body.className = tc + ' antialiased';
} catch(e) {}
</script>
<div id="root"></div>
<script type="module" src="/src/main.jsx"></script>
</body>