mirror of
https://github.com/anand34577/ferrum.git
synced 2026-10-14 00:19:49 +00:00
30893aecc4
Flattened radii to instrument-panel bezels, retuned the caution color hierarchy, replaced glossy gradients with flat panel surfaces, added a persistent master-caution bar, condensed Oswald display type, corner-frame targeting brackets on instrument tiles, and a blueprint grid ground.
15 lines
674 B
JavaScript
15 lines
674 B
JavaScript
// Runs before first paint so returning dark-mode users never see a light
|
|
// flash. Kept as an external file so the CSP (script-src 'self') stays
|
|
// free of inline-script allowances.
|
|
(function () {
|
|
try {
|
|
var stored = localStorage.getItem("ferrum-theme");
|
|
var dark = stored === "dark" || (stored !== "light" && window.matchMedia("(prefers-color-scheme: dark)").matches);
|
|
if (dark) document.documentElement.classList.add("dark");
|
|
var meta = document.querySelector('meta[name="theme-color"]');
|
|
if (meta) meta.setAttribute("content", dark ? "#090b0e" : "#ffffff");
|
|
} catch {
|
|
/* no storage / no matchMedia — default light theme applies */
|
|
}
|
|
})();
|