Change UI of pywallter

This commit is contained in:
2025-09-05 01:49:14 +02:00
parent 4b4a6fd295
commit b0190336b0
46 changed files with 859 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
/*!
* Minimal theme switcher
*
* Pico.css - https://picocss.com
* Copyright 2020 - Licensed under MIT
*/
const themeSwitcher = {
// Config
buttonsTarget: "a[data-theme-switcher]",
buttonAttribute: "data-theme-switcher",
rootAttribute: "data-theme",
// Init
init() {
document.querySelectorAll(this.buttonsTarget).forEach(
function (button) {
button.addEventListener(
"click",
function (event) {
event.preventDefault();
document
.querySelector("html")
.setAttribute(
this.rootAttribute,
event.target.getAttribute(this.buttonAttribute)
);
}.bind(this),
false
);
}.bind(this)
);
},
};
// Init
themeSwitcher.init();