semi-final update (hopefully)

This commit is contained in:
Samidy 2025-10-02 12:56:08 +03:00
parent fce29fee51
commit 59bed6bbe8

View file

@ -1,7 +1,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { colors } from '@fmhy/colors' import { colors } from '@fmhy/colors'
import { useStorage, useStyleTag } from '@vueuse/core' import { useStorage, useStyleTag } from '@vueuse/core'
import { watch } from 'vue' import { watch, onMounted } from 'vue'
// Add Halloween colors locally // Add Halloween colors locally
const halloweenColors = { const halloweenColors = {
@ -85,9 +85,13 @@ const updateThemeColor = (colorName: ColorNames) => {
updateThemeColor(selectedColor.value) updateThemeColor(selectedColor.value)
// halloween stuff // halloween stuff
if (selectedColor.value === 'halloween') { onMounted(() => {
document.documentElement.setAttribute('data-halloween-theme', 'true') 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) watch(selectedColor, updateThemeColor)