Make theme switching work properly when built for production
This commit is contained in:
parent
d3e562b267
commit
0bcfa05b6c
2 changed files with 2 additions and 2 deletions
|
|
@ -28,7 +28,7 @@
|
||||||
<script>
|
<script>
|
||||||
var default_theme = `dark`
|
var default_theme = `dark`
|
||||||
var theme = localStorage.getItem(`tl-theme`) || default_theme;
|
var theme = localStorage.getItem(`tl-theme`) || default_theme;
|
||||||
document.getElementById(`theme`).href = '/static/css/theme/' + theme + '.css';
|
document.getElementById(`theme`).href = `static/css/theme/` + theme + `.css`;
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
||||||
|
|
@ -105,7 +105,7 @@ export default {
|
||||||
watch: {
|
watch: {
|
||||||
chosen_theme(val) {
|
chosen_theme(val) {
|
||||||
localStorage.setItem(`tl-theme`, val);
|
localStorage.setItem(`tl-theme`, val);
|
||||||
document.getElementById(`theme`).href = `/static/css/theme/${val}.css`;
|
document.getElementById(`theme`).href = `static/css/theme/${val}.css`;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue