From a906f8dd5de38649c437d7d7df4459f3beba5f73 Mon Sep 17 00:00:00 2001 From: qhan Date: Tue, 8 Oct 2024 21:30:19 +0800 Subject: [PATCH] feat(site/blog): dark mode btn --- site/blog/app/(web)/code-snippets/[slug]/styles.scss | 11 +++++++++-- site/blog/app/(web)/components/Theme.tsx | 4 +--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/site/blog/app/(web)/code-snippets/[slug]/styles.scss b/site/blog/app/(web)/code-snippets/[slug]/styles.scss index 31d51c4..879bc6e 100644 --- a/site/blog/app/(web)/code-snippets/[slug]/styles.scss +++ b/site/blog/app/(web)/code-snippets/[slug]/styles.scss @@ -1,5 +1,9 @@ -.prose pre.shiki.vitesse-light { - font-family: DM Mono, Input Mono, Fira Code, monospace; +.prose pre.shiki { + font-family: + DM Mono, + Input Mono, + Fira Code, + monospace; font-size: 0.92em; line-height: 1.4; // margin: 0.5em 0; @@ -7,3 +11,6 @@ background-color: #f9f9f9 !important; } +.dark .prose pre.shiki { + background-color: rgb(15 23 42) !important; +} diff --git a/site/blog/app/(web)/components/Theme.tsx b/site/blog/app/(web)/components/Theme.tsx index 188b318..bf018c7 100644 --- a/site/blog/app/(web)/components/Theme.tsx +++ b/site/blog/app/(web)/components/Theme.tsx @@ -12,9 +12,7 @@ export default function Theme() { onClick={() => setTheme(isDark ? "light" : "dark")} className="text-slate-800 dark:text-white cursor-pointer" > - + ); }