Make dark theme a user level property, lazy load dark CSS

- Also now respects the colour-scheme media query
- Added meta tag to tell the browser we support dark theme, allowing dark UA stylesheet if the user sends said media query
- Means you only have to set it once per account rather than once per machine
- Dark themed embeds!
This commit is contained in:
2021-02-06 16:40:22 +00:00
parent 0598612c15
commit 4f912932ca
13 changed files with 90 additions and 71 deletions

11
package-lock.json generated
View File

@@ -18,7 +18,6 @@
"bootstrap-select": "^1.13.17",
"clipboard": "^2.0.6",
"cssnano": "^4.1.10",
"dark-mode-switch": "^1.0.0",
"flatpickr": "^4.6.6",
"fullcalendar": "^5.3.2",
"gulp": "^4.0.2",
@@ -1663,11 +1662,6 @@
"type": "^1.0.1"
}
},
"node_modules/dark-mode-switch": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/dark-mode-switch/-/dark-mode-switch-1.0.0.tgz",
"integrity": "sha512-wRoqYGmph7mwRbPcSNRR6DpRQe5wOK0lG6O3Hz7nIWWDyLAHSqje7PUI6c/acOYACiSPHc7sqysn57GSuklb6w=="
},
"node_modules/dashdash": {
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
@@ -10583,11 +10577,6 @@
"type": "^1.0.1"
}
},
"dark-mode-switch": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/dark-mode-switch/-/dark-mode-switch-1.0.0.tgz",
"integrity": "sha512-wRoqYGmph7mwRbPcSNRR6DpRQe5wOK0lG6O3Hz7nIWWDyLAHSqje7PUI6c/acOYACiSPHc7sqysn57GSuklb6w=="
},
"dashdash": {
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",