Use the light theme when no theme is supplied
This commit is contained in:
parent
82e3e72037
commit
c1a55ade7c
|
@ -89,14 +89,13 @@
|
||||||
<body class="app-body">
|
<body class="app-body">
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
const urlParams = new URLSearchParams(window.location.search);
|
const urlParams = new URLSearchParams(window.location.search);
|
||||||
const theme = urlParams.get("theme") || "light";
|
let theme = urlParams.get("theme");
|
||||||
const allowedThemes = ["dark", "light"];
|
const allowedThemes = ["dark", "light"];
|
||||||
if (theme && allowedThemes.indexOf(theme) !== -1) {
|
if (allowedThemes.indexOf(theme) === -1) theme = "light";
|
||||||
const body = document.getElementsByTagName("body");
|
const body = document.getElementsByTagName("body");
|
||||||
for (const element of body) {
|
for (const element of body) {
|
||||||
element.className += " theme-" + theme;
|
element.className += " theme-" + theme;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
<my-app class="main-app">
|
<my-app class="main-app">
|
||||||
<div class="app-loading">
|
<div class="app-loading">
|
||||||
|
|
Loading…
Reference in a new issue