mirror of
https://github.com/fmhy/edit.git
synced 2025-10-12 15:51:07 +11:00
semi-final update (hopefully)
This commit is contained in:
parent
fce29fee51
commit
59bed6bbe8
1 changed files with 8 additions and 4 deletions
|
@ -1,7 +1,7 @@
|
|||
<script setup lang="ts">
|
||||
import { colors } from '@fmhy/colors'
|
||||
import { useStorage, useStyleTag } from '@vueuse/core'
|
||||
import { watch } from 'vue'
|
||||
import { watch, onMounted } from 'vue'
|
||||
|
||||
// Add Halloween colors locally
|
||||
const halloweenColors = {
|
||||
|
@ -85,9 +85,13 @@ const updateThemeColor = (colorName: ColorNames) => {
|
|||
updateThemeColor(selectedColor.value)
|
||||
|
||||
// halloween stuff
|
||||
if (selectedColor.value === 'halloween') {
|
||||
document.documentElement.setAttribute('data-halloween-theme', 'true')
|
||||
}
|
||||
onMounted(() => {
|
||||
if (selectedColor.value === 'halloween') {
|
||||
document.documentElement.setAttribute('data-halloween-theme', 'true')
|
||||
}
|
||||
// Re-apply the theme to ensure everything is initialized
|
||||
updateThemeColor(selectedColor.value)
|
||||
})
|
||||
|
||||
watch(selectedColor, updateThemeColor)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue