浏览代码

feat: added christmas-mode class to body in christmas mode, set primary color to red in christmas mode

Kristian Vos 3 年之前
父节点
当前提交
00bb4a0411
共有 1 个文件被更改,包括 13 次插入0 次删除
  1. 13 0
      frontend/src/App.vue

+ 13 - 0
frontend/src/App.vue

@@ -227,6 +227,10 @@ export default {
 			this.changeNightmode(true);
 			this.enableNightmode();
 		}
+
+		lofig.get("siteSettings.christmas").then(christmas => {
+			if (christmas) this.enableChristmasMode();
+		});
 	},
 	methods: {
 		toggleNightMode() {
@@ -254,6 +258,11 @@ export default {
 				.getElementsByTagName("body")[0]
 				.classList.remove("night-mode");
 		},
+		enableChristmasMode: () => {
+			document
+				.getElementsByTagName("body")[0]
+				.classList.add("christmas-mode");
+		},
 		...mapActions("modalVisibility", ["closeCurrentModal"]),
 		...mapActions("user/preferences", [
 			"changeNightmode",
@@ -357,6 +366,10 @@ export default {
 	}
 }
 
+.christmas-mode {
+	--primary-color: var(--red);
+}
+
 /* inter-regular - latin */
 @font-face {
 	font-family: "Inter";