Add theme toggle and update MineGeo branding

This commit is contained in:
2026-10-08 20:37:50 +05:00
parent 0b08672f4a
commit bf01d9801d
11 changed files with 574 additions and 5 deletions

5
shared/theme.ts Normal file
View File

@@ -0,0 +1,5 @@
export type Theme = "dark" | "light";
export const themeStorageKey = "minegeo-theme-v1";
// Apply the saved choice before paint; storage can be disabled in private browsers.
export const themeInitScript = `(function(){try{var t=localStorage.getItem("${themeStorageKey}");if(t==="light"||t==="dark")document.documentElement.dataset.theme=t}catch(e){}})()`;