Files
make-cad/editor-web/index.html
T
NiJingzhe d8a654c162 feat(editor): light mode
Follows the system theme, with a header button cycling system/light/dark
(remembered). The page colors are CSS variables for both palettes; the 3D
viewport (background, edges, grid, axes, vertex points, selection), the
code editor and the loading veil switch with it, in place.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-13 15:30:22 +08:00

28 lines
931 B
HTML

<!doctype html>
<html lang="en" class="dark">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>SimpleCAD Studio</title>
<script>
// Pick the theme before first paint (no flash): the saved choice, else the system.
// Keep in step with src/lib/theme.ts.
(function () {
var choice = "system";
try {
choice = localStorage.getItem("sca-theme") || "system";
} catch (e) {}
var dark =
choice === "dark" ||
(choice !== "light" && window.matchMedia("(prefers-color-scheme: dark)").matches);
document.documentElement.classList.toggle("dark", dark);
document.documentElement.style.colorScheme = dark ? "dark" : "light";
})();
</script>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>