mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2026-07-20 23:13:23 +10:00
refactor(v4.0.0-alpha): beginning of a new era
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
(function initializeTheme() {
|
||||
try {
|
||||
if (
|
||||
localStorage.theme === "dark" ||
|
||||
window.matchMedia("(prefers-color-scheme: dark)").matches
|
||||
) {
|
||||
document.documentElement.classList.add("dark");
|
||||
} else {
|
||||
document.documentElement.classList.remove("dark");
|
||||
}
|
||||
} catch (_) {
|
||||
// pass
|
||||
}
|
||||
})();
|
||||
Reference in New Issue
Block a user