Introduce a script in `index.html` that detects and applies the user's preferred color scheme (light or dark) based on system settings or stored preferences. This enhancement improves the visual consistency and accessibility of the application by adapting to user preferences.
47 lines
2.3 KiB
HTML
47 lines
2.3 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<link rel="icon" type="image/svg+xml" href="/mark.svg" />
|
|
<script>
|
|
(function () {
|
|
try {
|
|
var apply = function (mode) {
|
|
var resolved =
|
|
mode === "system"
|
|
? window.matchMedia("(prefers-color-scheme: dark)").matches
|
|
? "dark"
|
|
: "light"
|
|
: mode;
|
|
var root = document.documentElement;
|
|
root.style.colorScheme = resolved;
|
|
root.dataset.kbTheme = resolved;
|
|
return mode;
|
|
};
|
|
var stored = localStorage.getItem("kb-color-mode");
|
|
if (stored) apply(stored);
|
|
else localStorage.setItem("kb-color-mode", apply("dark"));
|
|
} catch (e) {}
|
|
})();
|
|
</script>
|
|
<link href="/src/index.css" rel="stylesheet">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title>Diffusion Studio</title>
|
|
<meta name="description" content="The video editor built on an infinite canvas. Create and edit videos with design-tool freedom and export up to 4K. Multi-track timeline, AI-powered workflows, and full creative control. Built for creators and professionals." />
|
|
|
|
<meta property="og:type" content="website" />
|
|
<meta property="og:title" content="Diffusion Studio — The creative platform for video and motion graphics." />
|
|
<meta property="og:description" content="The video editor built on an infinite canvas. Create and edit videos with design-tool freedom and export up to 4K. Multi-track timeline, AI-powered workflows, and full creative control. Built for creators and professionals." />
|
|
<meta property="og:image" content="/og-default.png" />
|
|
|
|
<meta name="twitter:card" content="summary_large_image" />
|
|
<meta name="twitter:title" content="Diffusion Studio — The creative platform for video and motion graphics." />
|
|
<meta name="twitter:description" content="The video editor built on an infinite canvas. Create and edit videos with design-tool freedom and export up to 4K. Multi-track timeline, AI-powered workflows, and full creative control. Built for creators and professionals." />
|
|
<meta name="twitter:image" content="/og-default.png" />
|
|
</head>
|
|
<body>
|
|
<div id="root"></div>
|
|
<script type="module" src="/src/index.tsx"></script>
|
|
</body>
|
|
</html>
|