-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathindex.html
More file actions
56 lines (53 loc) · 1.9 KB
/
Copy pathindex.html
File metadata and controls
56 lines (53 loc) · 1.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>OpenACP</title>
<meta name="theme-color" content="#131010" />
<script>
(function () {
// Keep in sync with THEMES registry in src/openacp/lib/themes.ts.
// verifyThemeRegistry() in themes.ts warns at DEV startup on drift.
var MODES = {
"default-light": "light",
"default-dark": "dark",
"amoled-dark": "dark",
"catppuccin-latte": "light",
"catppuccin-mocha": "dark",
"tokyo-night-dark": "dark",
"gruvbox-dark": "dark",
"nord-dark": "dark",
"one-dark": "dark",
"github-light": "light",
"github-dark": "dark"
};
var id = null;
try { id = localStorage.getItem("theme-id"); } catch (e) {}
// Legacy migration: old key was "theme-hint" (values "light" | "dark")
if (!id) {
var hint = null;
try { hint = localStorage.getItem("theme-hint"); } catch (e) {}
if (hint === "light") id = "default-light";
else if (hint === "dark") id = "default-dark";
try {
if (id) {
localStorage.setItem("theme-id", id);
localStorage.removeItem("theme-hint");
}
} catch (e) {}
}
if (!id || !MODES[id]) id = "default-dark";
var mode = MODES[id];
var r = document.documentElement;
r.setAttribute("data-theme", id);
r.setAttribute("data-mode", mode);
window.__THEME_MODES__ = MODES;
})();
</script>
</head>
<body class="antialiased overscroll-none">
<div id="root" class="flex flex-col h-dvh overflow-hidden"></div>
<script src="/src/openacp/main.tsx" type="module"></script>
</body>
</html>