mirror of
https://git.arson.gg/lilith/discord-bot.git
synced 2025-12-05 03:34:49 +01:00
what the helk!?
This commit is contained in:
parent
7c210ee7a6
commit
bfb14f4b15
14 changed files with 771 additions and 3 deletions
9
src/server/static/theme.js
Normal file
9
src/server/static/theme.js
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
// Set theme to the user's preferred color scheme
|
||||
function updateTheme() {
|
||||
const colorMode = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
||||
document.querySelector("html").setAttribute("data-bs-theme", colorMode);
|
||||
}
|
||||
|
||||
updateTheme()
|
||||
|
||||
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', updateTheme)
|
||||
Loading…
Add table
Add a link
Reference in a new issue