@@ -87,7 +87,7 @@ export const CardTitle = ({
return (
@@ -105,7 +105,7 @@ export const CardDescription = ({
return (
diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro
index 053f844..8d8c976 100644
--- a/src/layouts/Layout.astro
+++ b/src/layouts/Layout.astro
@@ -11,7 +11,7 @@ const { title, description } = Astro.props;
---
-
+
@@ -48,6 +48,34 @@ const { title, description } = Astro.props;
+
@@ -74,8 +102,8 @@ const { title, description } = Astro.props;
html {
font-family: system-ui, sans-serif;
- background-color: #171717;
- color: rgb(255 255 255);
+ background-color: var(--background-color);
+ color: var(--text-color);
}
html,
diff --git a/src/styles/global.css b/src/styles/global.css
index 27624d8..7d6a21a 100644
--- a/src/styles/global.css
+++ b/src/styles/global.css
@@ -1,5 +1,55 @@
@import "tailwindcss";
+:root,
+html[data-theme="dark"] {
+ --background-color: #171717;
+ --surface-color: #202020;
+ --nav-background: rgb(23 23 23 / 0.82);
+ --sidebar-background: #151515;
+ --control-background: #101010;
+ --control-hover: #2f2f2f;
+ --text-color: #ffffff;
+ --muted-text: #9ca3af;
+ --border-color: #505050;
+ --card-background: #232323;
+ --card-border: rgb(255 255 255 / 0.2);
+ --card-border-hover: #334155;
+}
+
+html[data-theme="light"] {
+ --background-color: #f8fafc;
+ --surface-color: #ffffff;
+ --nav-background: rgb(255 255 255 / 0.86);
+ --sidebar-background: #f8fafc;
+ --control-background: #ffffff;
+ --control-hover: #e2e8f0;
+ --text-color: #171717;
+ --muted-text: #4b5563;
+ --border-color: #cbd5e1;
+ --card-background: #ffffff;
+ --card-border: #cbd5e1;
+ --card-border-hover: #94a3b8;
+}
+
+html,
+body {
+ transition:
+ background-color 180ms ease,
+ color 180ms ease;
+}
+
+html[data-theme="light"] .text-white {
+ color: var(--text-color);
+}
+
+html[data-theme="light"] .text-gray-400 {
+ color: var(--muted-text);
+}
+
+html[data-theme="light"] .guide-content code {
+ background-color: #e2e8f0;
+}
+
@theme {
--color-primary: #fafafa;
--color-secondary: #171717;