Add light theme. (#219)

* Add light theme.

* Reload on theme change.
This commit is contained in:
FireMasterK
2021-06-29 01:15:03 +05:30
committed by GitHub
parent 7c66035f41
commit 18752c7de7
9 changed files with 54 additions and 22 deletions

View File

@@ -69,6 +69,23 @@ const mixin = {
return DOMPurify.sanitize(original);
}
},
computed: {
backgroundColor() {
return localStorage.getItem("theme") === "light" ? "#fff" : "#0b0e0f"
},
secondaryBackgroundColor() {
return localStorage.getItem("theme") === "light" ? "#e5e5e5" : "#242727"
},
foregroundColor() {
return localStorage.getItem("theme") === "light" ? "#15191a" : "#0b0e0f"
},
secondaryForegroundColor() {
return localStorage.getItem("theme") === "light" ? "#666" : "#393d3d"
},
darkMode() {
return localStorage.getItem('theme') !== 'light'
}
}
};
const app = createApp(App);