fix: Implement stylemods again in 3k
This commit is contained in:
parent
87913a6ff3
commit
9b032196be
|
|
@ -230,6 +230,8 @@ function updateHeaderFromInit() {
|
||||||
showLoginLink.value = false
|
showLoginLink.value = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
applyStyleMods()
|
||||||
|
|
||||||
renderNavigation()
|
renderNavigation()
|
||||||
applyTheme()
|
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) {
|
function handleThemeDialogClick(event) {
|
||||||
if (event.target === themeDialog.value) {
|
if (event.target === themeDialog.value) {
|
||||||
closeThemeDialog()
|
closeThemeDialog()
|
||||||
|
|
|
||||||
|
|
@ -38,4 +38,28 @@ div.buttons button svg {
|
||||||
|
|
||||||
section.small {
|
section.small {
|
||||||
border-radius: .4em;
|
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;
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue