background change for halloween

This commit is contained in:
Samidy 2025-10-02 11:56:14 +03:00
parent b521938d38
commit 3c9169f97f
2 changed files with 19 additions and 0 deletions

View file

@ -71,6 +71,14 @@ const updateThemeColor = (colorName: ColorNames) => {
--vp-c-brand-soft: ${colorSet[300]};
}
`
// Add/remove Halloween theme indicator
const htmlElement = document.documentElement
if (colorName === 'halloween') {
htmlElement.setAttribute('data-halloween-theme', 'true')
} else {
htmlElement.removeAttribute('data-halloween-theme')
}
}
// Initialize theme color