fix: properly insert stylesheet with useHead()
This commit is contained in:
parent
41a0f3f14b
commit
126ae5e18d
1 changed files with 9 additions and 1 deletions
10
app.vue
10
app.vue
|
@ -1,6 +1,5 @@
|
|||
<template>
|
||||
<div>
|
||||
<link :href="'/themes/' + current_theme + '.css'" rel="stylesheet" type="text/css"></link>
|
||||
<Banner v-if="banner" />
|
||||
<NuxtPage :keepalive="true" />
|
||||
</div>
|
||||
|
@ -15,6 +14,15 @@ const saved_theme = localStorage.getItem("selectedTheme");
|
|||
if (saved_theme) {
|
||||
current_theme = saved_theme;
|
||||
}
|
||||
|
||||
useHead({
|
||||
link: [
|
||||
{
|
||||
rel: "stylesheet",
|
||||
href: `/themes/${current_theme}.css`
|
||||
}
|
||||
]
|
||||
})
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue