소스 검색

fix: Implement stylemods again in 3k

jamesread 5 달 전
부모
커밋
9b032196be
2개의 변경된 파일38개의 추가작업 그리고 0개의 파일을 삭제
  1. 14 0
      frontend/resources/vue/App.vue
  2. 24 0
      frontend/style.css

+ 14 - 0
frontend/resources/vue/App.vue

@@ -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 - 0
frontend/style.css

@@ -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;
 }