From a8e3bd15e34a9a37057c3f3f77a640ec675e65d4 Mon Sep 17 00:00:00 2001 From: Samidy Date: Thu, 2 Oct 2025 12:34:46 +0300 Subject: [PATCH] let this work unc --- .../theme/components/ColorPicker.vue | 60 ------------------- docs/.vitepress/theme/style.scss | 54 +++++++++++++++++ 2 files changed, 54 insertions(+), 60 deletions(-) diff --git a/docs/.vitepress/theme/components/ColorPicker.vue b/docs/.vitepress/theme/components/ColorPicker.vue index c05a88263..b4965a026 100644 --- a/docs/.vitepress/theme/components/ColorPicker.vue +++ b/docs/.vitepress/theme/components/ColorPicker.vue @@ -54,62 +54,6 @@ const updateThemeColor = (colorName: ColorNames) => { .map((scale) => `--vp-c-brand-${scale}: ${colorSet[scale]};`) .join('\n ') - // Add darker background for Halloween theme - const halloweenBgOverride = colorName === 'halloween' ? ` - --vp-c-bg: rgb(20, 20, 20) !important; - --vp-c-bg-alt: rgb(18, 18, 18) !important; - --vp-c-bg-elv: rgba(18, 18, 18, 0.8) !important; - --vp-c-bg-soft: rgb(18, 18, 18) !important; - --vp-button-alt-bg: #a855f7 !important; - --vp-button-alt-text: #fff !important; - --vp-button-alt-hover-bg: #9333ea !important; - --vp-button-alt-hover-text: #fff !important; - ` : '' - - const halloweenDarkBgOverride = colorName === 'halloween' ? ` - --vp-c-bg: rgb(15, 15, 15) !important; - --vp-c-bg-alt: rgb(12, 12, 12) !important; - --vp-c-bg-elv: rgba(12, 12, 12, 0.8) !important; - --vp-c-bg-soft: rgb(12, 12, 12) !important; - --vp-button-alt-bg: #8b5cf6 !important; - --vp-button-alt-text: #e9d5ff !important; - --vp-button-alt-hover-bg: #a855f7 !important; - --vp-button-alt-hover-text: #fff !important; - ` : '' - - const halloweenBodyOverride = colorName === 'halloween' ? ` - body { - background-color: rgb(20, 20, 20) !important; - } - .dark body { - background-color: rgb(15, 15, 15) !important; - } - .Layout, .VPApp, .VPContent { - background-color: rgb(20, 20, 20) !important; - } - .dark .Layout, .dark .VPApp, .dark .VPContent { - background-color: rgb(15, 15, 15) !important; - } - .VPHome, .VPHero { - background-color: rgb(20, 20, 20) !important; - } - .dark .VPHome, .dark .VPHero { - background-color: rgb(15, 15, 15) !important; - } - html { - background-color: rgb(20, 20, 20) !important; - } - .dark html { - background-color: rgb(15, 15, 15) !important; - } - #app { - background-color: rgb(20, 20, 20) !important; - } - .dark #app { - background-color: rgb(15, 15, 15) !important; - } - ` : '' - css.value = ` :root { ${cssVars} @@ -117,7 +61,6 @@ const updateThemeColor = (colorName: ColorNames) => { --vp-c-brand-2: ${colorSet[600]}; --vp-c-brand-3: ${colorSet[800]}; --vp-c-brand-soft: ${colorSet[400]}; - ${halloweenBgOverride} } .dark { @@ -126,10 +69,7 @@ const updateThemeColor = (colorName: ColorNames) => { --vp-c-brand-2: ${colorSet[500]}; --vp-c-brand-3: ${colorSet[700]}; --vp-c-brand-soft: ${colorSet[300]}; - ${halloweenDarkBgOverride} } - - ${halloweenBodyOverride} ` // Add/remove Halloween theme indicator diff --git a/docs/.vitepress/theme/style.scss b/docs/.vitepress/theme/style.scss index 94b57448d..f6059a231 100644 --- a/docs/.vitepress/theme/style.scss +++ b/docs/.vitepress/theme/style.scss @@ -104,6 +104,60 @@ --vp-custom-block-halloween-text-deep: var(--halloween-200); } +/* Halloween theme overrides */ +html[data-halloween-theme] { + --vp-c-bg: rgb(20, 20, 20) !important; + --vp-c-bg-alt: rgb(18, 18, 18) !important; + --vp-c-bg-elv: rgba(18, 18, 18, 0.8) !important; + --vp-c-bg-soft: rgb(18, 18, 18) !important; + --vp-button-alt-bg: #a855f7 !important; + --vp-button-alt-text: #fff !important; + --vp-button-alt-hover-bg: #9333ea !important; + --vp-button-alt-hover-text: #fff !important; + + background-color: rgb(20, 20, 20) !important; +} + +html[data-halloween-theme] body { + background-color: rgb(20, 20, 20) !important; +} + +html[data-halloween-theme] .VPApp, +html[data-halloween-theme] .Layout, +html[data-halloween-theme] .VPContent, +html[data-halloween-theme] .VPHome, +html[data-halloween-theme] .VPHero, +html[data-halloween-theme] #app { + background-color: rgb(20, 20, 20) !important; +} + +/* Halloween theme dark mode overrides */ +html[data-halloween-theme].dark { + --vp-c-bg: rgb(15, 15, 15) !important; + --vp-c-bg-alt: rgb(12, 12, 12) !important; + --vp-c-bg-elv: rgba(12, 12, 12, 0.8) !important; + --vp-c-bg-soft: rgb(12, 12, 12) !important; + --vp-button-alt-bg: #8b5cf6 !important; + --vp-button-alt-text: #e9d5ff !important; + --vp-button-alt-hover-bg: #a855f7 !important; + --vp-button-alt-hover-text: #fff !important; + + background-color: rgb(15, 15, 15) !important; +} + +html[data-halloween-theme].dark body { + background-color: rgb(15, 15, 15) !important; +} + +html[data-halloween-theme].dark .VPApp, +html[data-halloween-theme].dark .Layout, +html[data-halloween-theme].dark .VPContent, +html[data-halloween-theme].dark .VPHome, +html[data-halloween-theme].dark .VPHero, +html[data-halloween-theme].dark #app { + background-color: rgb(15, 15, 15) !important; +} + .vp-doc a { color: var(--vp-c-brand-1); text-decoration: underline;