Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

index.html

99 lines2.9 KB

1<!doctype html>
2<html lang="en">
3 <head>
4 <meta charset="UTF-8" />
5 <meta
6 name="viewport"
7 content="width=device-width, initial-scale=1.0, viewport-fit=cover, interactive-widget=resizes-content"
8 />
9 <meta name="theme-color" content="#ffffff" media="(prefers-color-scheme: light)" />
10 <meta name="theme-color" content="#161616" media="(prefers-color-scheme: dark)" />
11 <meta name="theme-color" content="#161616" />
12 <link rel="icon" href="/favicon.ico" sizes="48x48" />
13 <link rel="apple-touch-icon" href="/apple-touch-icon.png" />
14 <script>
15 (() => {
16 const LIGHT_BACKGROUND = "#ffffff";
17 const DARK_BACKGROUND = "#161616";
18 const themeColorMeta = document.querySelector('meta[name="theme-color"]');
19 try {
20 const storedTheme = window.localStorage.getItem("t3code:theme");
21 const theme =
22 storedTheme === "light" || storedTheme === "dark" || storedTheme === "system"
23 ? storedTheme
24 : "system";
25 const prefersDark = window.matchMedia("(prefers-color-scheme: dark)").matches;
26 const isDark = theme === "dark" || (theme === "system" && prefersDark);
27 document.documentElement.classList.toggle("dark", isDark);
28 const chromeColor = isDark ? DARK_BACKGROUND : LIGHT_BACKGROUND;
29 document.documentElement.style.backgroundColor = chromeColor;
30 themeColorMeta?.setAttribute("content", chromeColor);
31 } catch {
32 document.documentElement.classList.add("dark");
33 document.documentElement.style.backgroundColor = DARK_BACKGROUND;
34 themeColorMeta?.setAttribute("content", DARK_BACKGROUND);
35 }
36 })();
37 </script>
38 <style>
39 html,
40 body,
41 #root {
42 width: 100%;
43 height: 100%;
44 margin: 0;
45 }
46​
47 body {
48 background: #ffffff;
49 color: #262626;
50 font-family:
51 "DM Sans Variable",
52 "DM Sans",
53 -apple-system,
54 BlinkMacSystemFont,
55 "Segoe UI",
56 system-ui,
57 sans-serif;
58 }
59​
60 html.dark body {
61 background: #161616;
62 color: #f5f5f5;
63 }
64​
65 #boot-shell {
66 display: flex;
67 min-height: 100%;
68 align-items: center;
69 justify-content: center;
70 background: inherit;
71 }
72​
73 #boot-shell-card {
74 display: flex;
75 align-items: center;
76 justify-content: center;
77 width: 96px;
78 height: 96px;
79 }
80​
81 #boot-shell-logo {
82 width: 64px;
83 height: 64px;
84 object-fit: contain;
85 }
86 </style>
87 <title>T3 Code (Alpha)</title>
88 </head>
89 <body>
90 <div id="root">
91 <div id="boot-shell">
92 <div id="boot-shell-card" aria-label="T3 Code splash screen">
93 <img id="boot-shell-logo" src="/apple-touch-icon.png" alt="T3 Code" />
94 </div>
95 </div>
96 </div>
97 <script type="module" src="/src/main.tsx"></script>
98 </body>
99</html>