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>
|
||||
var default_theme = `dark`
|
||||
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>
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ export default {
|
|||
watch: {
|
||||
chosen_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() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue