switch theme on every page

This commit is contained in:
Jörg Henke
2023-09-29 17:29:08 +02:00
parent 3535dbf237
commit 0cc5cdb945
14 changed files with 45 additions and 14 deletions

View File

@ -226,13 +226,17 @@ body {
.version {
font-size: small;
color: silver;
color: black;
position: absolute;
padding-top: 36px;
padding-left: 22px;
z-index: 0;
}
[data-bs-theme="dark"] .version {
color: white;
}
.fc-content {
cursor: pointer;
}

View File

@ -1,8 +1,8 @@
toggleTheme = function() {
toggleTheme = function(urlprefix) {
var oldValue = $("html").attr("data-bs-theme");
var newValue = oldValue == "dark" ? "light" : "dark";
$("html").attr("data-bs-theme", newValue);
var url = "profile/" + newValue;
var url = urlprefix + "/profile/" + newValue;
$.ajax({
url: url,
dataType: 'json',