From a74b7619d0bc780aa1692a2b2229996075e7b155 Mon Sep 17 00:00:00 2001 From: grassblock Date: Fri, 23 May 2025 17:09:00 +0800 Subject: [PATCH 1/4] feat: create new css-only ThemeSwitcher --- src/components/ThemeSwitcher@CSSOnly.astro | 63 ++++++++++++++++++++++ src/layouts/Layout.astro | 3 +- 2 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 src/components/ThemeSwitcher@CSSOnly.astro diff --git a/src/components/ThemeSwitcher@CSSOnly.astro b/src/components/ThemeSwitcher@CSSOnly.astro new file mode 100644 index 0000000..690769f --- /dev/null +++ b/src/components/ThemeSwitcher@CSSOnly.astro @@ -0,0 +1,63 @@ +--- + +--- +
+ + +
+ \ No newline at end of file diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index 6f0eb76..6cda7bd 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -2,6 +2,7 @@ import '../styles/global.css'; import Search from '../components/Search.astro'; import ThemeSwitcher from '../components/ThemeSwitcher.astro'; +import ThemeSwitcher_CSSOnly from '../components/ThemeSwitcher@CSSOnly.astro'; import BackToTop from "../components/BackToTop.astro"; import Meta from "../components/helper/head/Meta.astro"; @@ -66,7 +67,7 @@ const { title = pageTitle, description = siteConfig.description, ogImage = "" }