Files
MahdiandCursor b0088c35d1 Replace the landing with the artifact design and rebuild the admin in Ant Design.
Adds consultation leads, section editors, and the one-time content reset for this release.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-01 20:36:06 +03:30

23 lines
639 B
TypeScript

const STORAGE_KEY = "montech_theme";
/** The initial class is applied by the inline boot script in `nuxt.config.ts` before first paint. */
export function useTheme() {
const isDark = useState("theme-dark", () => false);
function sync() {
isDark.value = document.documentElement.classList.contains("dark");
}
function toggle() {
isDark.value = !isDark.value;
document.documentElement.classList.toggle("dark", isDark.value);
try {
localStorage.setItem(STORAGE_KEY, isDark.value ? "dark" : "light");
} catch {
/* storage unavailable (private mode) */
}
}
return { isDark, sync, toggle };
}