mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-10-26 15:10:36 +08:00
We read the theme before any of the svelte code is loaded. The benefit is that it is executed first and there's no flickering if the stored theme differs from the initial theme that is set in the design system. The drawback is that this code isn't type-checked and will need to be updated manually if we change the theme switching code in Svelte.
72 lines
1.9 KiB
HTML
72 lines
1.9 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<script>
|
|
// Avoid flickering on app start.
|
|
if (localStorage.getItem("theme") === "dark") {
|
|
document.documentElement.setAttribute("data-theme", "dark");
|
|
}
|
|
</script>
|
|
<meta charset="UTF-8" />
|
|
<link rel="icon" href="/radicle.svg" type="image/svg+xml" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title>Radicle</title>
|
|
<link
|
|
rel="preload"
|
|
href="/fonts/Inter-Regular.woff2"
|
|
as="font"
|
|
type="font/woff2"
|
|
crossorigin="anonymous" />
|
|
<link
|
|
rel="preload"
|
|
href="/fonts/Inter-Medium.woff2"
|
|
as="font"
|
|
type="font/woff2"
|
|
crossorigin="anonymous" />
|
|
<link
|
|
rel="preload"
|
|
href="/fonts/Inter-SemiBold.woff2"
|
|
as="font"
|
|
type="font/woff2"
|
|
crossorigin="anonymous" />
|
|
<link
|
|
rel="preload"
|
|
href="/fonts/Inter-Bold.woff2"
|
|
as="font"
|
|
type="font/woff2"
|
|
crossorigin="anonymous" />
|
|
<link
|
|
rel="preload"
|
|
href="/fonts/JetBrainsMono-Regular.woff2"
|
|
as="font"
|
|
type="font/woff2"
|
|
crossorigin="anonymous" />
|
|
<link
|
|
rel="preload"
|
|
href="/fonts/JetBrainsMono-Medium.woff2"
|
|
as="font"
|
|
type="font/woff2"
|
|
crossorigin="anonymous" />
|
|
<link
|
|
rel="preload"
|
|
href="/fonts/JetBrainsMono-SemiBold.woff2"
|
|
as="font"
|
|
type="font/woff2"
|
|
crossorigin="anonymous" />
|
|
<link
|
|
rel="preload"
|
|
href="/fonts/JetBrainsMono-Bold.woff2"
|
|
as="font"
|
|
type="font/woff2"
|
|
crossorigin="anonymous" />
|
|
|
|
<link rel="stylesheet" type="text/css" href="/index.css" />
|
|
<link rel="stylesheet" type="text/css" href="/typography.css" />
|
|
<link rel="stylesheet" type="text/css" href="/colors.css" />
|
|
</head>
|
|
|
|
<body>
|
|
<script type="module" src="/src/main.ts"></script>
|
|
</body>
|
|
</html>
|