Share language and theme across the sites; prepare the 0.1.0 release (#13)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Yaowei Zheng
2026-07-21 18:00:11 +08:00
committed by GitHub
parent d4faee3a1e
commit 0e134e9c6c
27 changed files with 206 additions and 36 deletions
+7 -3
View File
@@ -18,11 +18,15 @@
<meta name="twitter:card" content="summary" />
<link rel="icon" type="image/svg+xml" href="./penguin-logo.svg" />
<title>PenguinHarness Docs</title>
<!-- Apply the stored/system theme before first paint so text-heavy doc pages
don't flash the wrong background while React boots. -->
<!-- Apply the stored/system theme before first paint so the page doesn't flash the
wrong background while React boots. Reads the key shared with the sibling site
(see src/state/site-prefs.ts), falling back to the retired per-site keys. -->
<script>
try {
var m = localStorage.getItem("penguin-docs.theme");
var m =
localStorage.getItem("penguin-site.theme") ||
localStorage.getItem("penguin-landing.theme") ||
localStorage.getItem("penguin-docs.theme");
if (m === "dark" || (m !== "light" && matchMedia("(prefers-color-scheme: dark)").matches))
document.documentElement.classList.add("dark");
} catch {}