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]}; --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 // Initialize theme color

View file

@ -104,6 +104,17 @@
--vp-custom-block-halloween-text-deep: var(--halloween-200); --vp-custom-block-halloween-text-deep: var(--halloween-200);
} }
/* Halloween theme background override */
:root:has([data-halloween-theme]) {
--vp-c-bg: rgb(20, 20, 20);
--vp-c-bg-alt: rgb(18, 18, 18);
}
.dark:has([data-halloween-theme]) {
--vp-c-bg: rgb(18, 18, 18);
--vp-c-bg-alt: rgb(15, 15, 15);
}
.vp-doc a { .vp-doc a {
color: var(--vp-c-brand-1); color: var(--vp-c-brand-1);
text-decoration: underline; text-decoration: underline;