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

+11 -4
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" />
@@ -7,10 +7,17 @@
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<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>
<script type="module" crossorigin src="/assets/index-B_drRjZu.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-CMfnmeTI.css">
<script type="module" crossorigin src="/assets/index-ZavRXCeN.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-DKPYwtVl.css">
</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>
</body>
</html>