mirror of
https://github.com/fmhy/edit.git
synced 2025-10-13 08:11:07 +11:00
background change for halloween
This commit is contained in:
parent
b521938d38
commit
3c9169f97f
2 changed files with 19 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue