diff --git a/src/components/ui/CopyCode.astro b/src/components/ui/CopyCode.astro index 0c0be7b..5a79640 100644 --- a/src/components/ui/CopyCode.astro +++ b/src/components/ui/CopyCode.astro @@ -17,7 +17,7 @@ import { themeConfig } from '@/config' ` - document.documentElement.setAttribute('data-copy-code', copyCode ? 'enabled' : 'disabled') + document.body.setAttribute('data-copy-code', copyCode ? 'enabled' : 'disabled') if (!copyCode) { return @@ -147,7 +147,7 @@ import { themeConfig } from '@/config' pointer-events: none; } - [data-copy-code='disabled'] .copy-button { + body[data-copy-code='disabled'] .copy-button { display: none !important; } diff --git a/src/components/ui/ThemeManager.astro b/src/components/ui/ThemeManager.astro index 1dccd60..e0a2797 100644 --- a/src/components/ui/ThemeManager.astro +++ b/src/components/ui/ThemeManager.astro @@ -1,3 +1,26 @@ + + + diff --git a/src/layouts/BaseLayout.astro b/src/layouts/BaseLayout.astro index 09ed44a..3a8ffa2 100644 --- a/src/layouts/BaseLayout.astro +++ b/src/layouts/BaseLayout.astro @@ -19,6 +19,7 @@ const finalWidth = shouldUseCustomWidth ? `${widthValue}rem` : '25rem' + {fadeAnimation && } @@ -29,7 +30,6 @@ const finalWidth = shouldUseCustomWidth ? `${widthValue}rem` : '25rem' ${shouldUseCustomWidth ? `--content-width: ${widthValue}rem;` : ''} `} > - {