feat(site): new home page, docs, and design system (#566)

Co-authored-by: Darius Cepulis <dcepulis@mux.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Ronald Urbina
2026-03-06 16:19:27 -06:00
committed by GitHub
co-authored by Darius Cepulis Claude Opus 4.6
parent f2f9e6ddc3
commit 351a3e8bda
255 changed files with 3574 additions and 1532 deletions
+18 -12
View File
@@ -5,29 +5,35 @@ import { THEME_KEY } from '@/consts';
{/* Dark mode initialization script - runs before paint to prevent FOUC */}
<script is:inline define:vars={{ localStorageKey: THEME_KEY }}>
if (
typeof localStorage !== 'undefined' &&
typeof document !== 'undefined' &&
typeof document.documentElement !== 'undefined'
typeof localStorage !== "undefined" &&
typeof document !== "undefined" &&
typeof document.documentElement !== "undefined"
) {
let localStorageValue = localStorage[localStorageKey];
const isValidKey = localStorageValue === 'light' || localStorageValue === 'dark' || localStorageValue === 'system';
const isValidKey =
localStorageValue === "light" ||
localStorageValue === "dark" ||
localStorageValue === "system";
if (!localStorageValue || !isValidKey) {
localStorage[localStorageKey] = 'system';
localStorageValue = 'system';
localStorage[localStorageKey] = "system";
localStorageValue = "system";
}
let isDark = false;
if (localStorageValue === 'dark') {
document.documentElement.classList.add('dark');
if (localStorageValue === "dark") {
document.documentElement.classList.add("dark");
isDark = true;
} else if (localStorageValue === 'system') {
if (typeof window.matchMedia !== 'undefined' && window.matchMedia('(prefers-color-scheme: dark)').matches) {
document.documentElement.classList.add('dark');
} else if (localStorageValue === "system") {
if (
typeof window.matchMedia !== "undefined" &&
window.matchMedia("(prefers-color-scheme: dark)").matches
) {
document.documentElement.classList.add("dark");
isDark = true;
}
}
const themeColorMeta = document.querySelector('meta[name="theme-color"]');
if (themeColorMeta) {
themeColorMeta.setAttribute('content', isDark ? '#393836' : '#ebe4c1');
themeColorMeta.setAttribute("content", isDark ? "#393836" : "#ebe4c1");
}
}
</script>