From 900888ee077e2d8c30a2d02b019eca2bdbbb1958 Mon Sep 17 00:00:00 2001 From: BOTAlex Date: Sat, 31 May 2025 17:00:48 +0000 Subject: [PATCH] Fixed random themes at first login. (this commit is from a macbook in Bilka) --- src/app.html | 68 ++++++++++++++++++++++++++-------------------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/src/app.html b/src/app.html index f3253b6..c6713a7 100644 --- a/src/app.html +++ b/src/app.html @@ -1,42 +1,42 @@ - - - - - - + + + + + + - - - %sveltekit.head% + + + %sveltekit.head% - + window.AvailableThemes = ["green", "netherrack", "dark", "pink"]; - + if (!theme) { + // const randomNumber = Math.floor(Math.random() * 4); + // console.log("Slecting: " + AvailableThemes[randomNumber]); + // document.documentElement.setAttribute('data-theme', AvailableThemes[randomNumber]); + localStorage.setItem("theme", AvailableThemes[0]); + } + //else { + // console.log("Slecting: " + theme); + // document.documentElement.setAttribute('data-theme', theme); + //} + + - -
- %sveltekit.body% -
- + +
%sveltekit.body%
+