feat: add theming support
This commit is contained in:
@ -6,6 +6,18 @@
|
||||
<link rel="icon" href="%sveltekit.assets%/svelte.svg" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
%sveltekit.head%
|
||||
<script>
|
||||
var store = localStorage.getItem("node-settings");
|
||||
if (store) {
|
||||
try {
|
||||
var value = JSON.parse(store);
|
||||
var themes = ["dark", "light", "catppuccin"];
|
||||
if (themes[value.theme]) {
|
||||
document.body.classList.add("theme-" + themes[value.theme]);
|
||||
}
|
||||
} catch (e) { }
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body data-sveltekit-preload-data="hover">
|
||||
|
Reference in New Issue
Block a user