fix: Implement stylemods again in 3k

This commit is contained in:
jamesread
2026-01-11 22:02:07 +00:00
parent 87913a6ff3
commit 9b032196be
2 changed files with 38 additions and 0 deletions
+14
View File
@@ -230,6 +230,8 @@ function updateHeaderFromInit() {
showLoginLink.value = false
}
applyStyleMods()
renderNavigation()
applyTheme()
@@ -366,6 +368,18 @@ function applyTheme() {
}
}
function applyStyleMods() {
if (!window.initResponse || !window.initResponse.styleMods) {
return
}
for (const styleMod of window.initResponse.styleMods) {
if (styleMod) {
document.body.classList.add(styleMod)
}
}
}
function handleThemeDialogClick(event) {
if (event.target === themeDialog.value) {
closeThemeDialog()
+24
View File
@@ -38,4 +38,28 @@ div.buttons button svg {
section.small {
border-radius: .4em;
}
.sm-side-icons .action-button button {
display: flex;
flex-direction: row;
align-items: center;
}
.sm-imageicons-fullwidth .action-button button .icon img {
width: 100%;
}
.sm-transparent-header header {
background-color: transparent;
box-shadow: none;
border-color: transparent;
}
.sm-transparent-header #sidebar-button {
border-color: transparent;
}
.sm-transparent-footer footer span {
background-color: transparent;
}