Skip to content

Commit 16f1d20

Browse files
committed
Add dark mode support
1 parent 2a60085 commit 16f1d20

File tree

3 files changed

+37
-8
lines changed

3 files changed

+37
-8
lines changed

app/(home)/page.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,20 +45,20 @@ export default function HomePage() {
4545
</div>
4646

4747
{/* Quick Install */}
48-
<div className="mt-12 mx-auto max-w-3xl rounded-lg bg-muted">
49-
<h3 className="font-semibold mb-4">Quick Install</h3>
48+
<div className="mt-8 mx-auto max-w-3xl rounded-lg bg-muted p-6">
49+
<h3 className="font-semibold mb-4 text-slate-900 dark:text-slate-100">Quick Install</h3>
5050
<CopyBlock>pip install llms-py</CopyBlock>
5151
</div>
5252

5353
{/* Console Carousel Section */}
54-
<div className="mt-12 w-full px-4">
54+
<div className="mt-8 w-full px-4">
5555
<div className="w-full max-w-4xl mx-auto">
5656
<ConsoleCarousel screens={consoleScreens} />
5757
</div>
5858
</div>
5959

60-
<div className="mt-12 mx-auto max-w-3xl rounded-lg bg-muted">
61-
<h3 className="font-semibold my-4">Run Server</h3>
60+
<div className="mt-8 mx-auto max-w-3xl rounded-lg bg-muted p-6">
61+
<h3 className="font-semibold mb-4 text-slate-900 dark:text-slate-100">Run Server</h3>
6262
<CopyBlock>llms --serve 8000</CopyBlock>
6363
</div>
6464
</div>
@@ -71,7 +71,7 @@ export default function HomePage() {
7171
{/* Getting Started Call-out */}
7272
<div className="w-full my-12 px-4">
7373
<div className="max-w-3xl mx-auto">
74-
<div className="bg-gradient-to-r from-blue-50 to-indigo-50 dark:from-blue-950/30 dark:to-indigo-950/30 border-2 border-blue-200 dark:border-blue-800 rounded-xl p-8 text-center shadow-lg">
74+
<div className="bg-gradient-to-r from-blue-50 to-indigo-50 dark:from-blue-950/30 dark:to-indigo-950/30 border-2 border-blue-200 dark:border-blue-800 rounded-xl p-8 text-center shadow-lg dark:shadow-blue-900/20">
7575
<h3 className="text-2xl font-bold text-slate-900 dark:text-slate-100 mb-3">
7676
Ready to Get Started?
7777
</h3>
@@ -81,7 +81,7 @@ export default function HomePage() {
8181
<div className="flex flex-col sm:flex-row gap-4 justify-center items-center">
8282
<Link
8383
href="/docs"
84-
className="px-8 py-3 rounded-lg bg-blue-600 text-white font-semibold hover:bg-blue-700 transition-colors shadow-md hover:shadow-lg"
84+
className="px-8 py-3 rounded-lg bg-blue-600 dark:bg-blue-600 text-white font-semibold hover:bg-blue-700 dark:hover:bg-blue-700 transition-colors shadow-md hover:shadow-lg"
8585
>
8686
📚 View Documentation
8787
</Link>

app/global.css

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@
1010
--color-fd-muted-foreground: rgb(100 116 139); /* slate-500 - one more tad lighter */
1111
}
1212

13+
:root.dark {
14+
--color-fd-background: rgb(15 23 42); /* slate-900 */
15+
--color-fd-card: rgb(30 41 59); /* slate-800 for sidebar */
16+
--color-fd-primary: rgb(248 250 252); /* slate-50 for better contrast */
17+
--color-fd-muted: rgb(51 65 85); /* slate-700 */
18+
--color-fd-muted-foreground: rgb(148 163 184); /* slate-400 */
19+
}
20+
1321
/* Code block background color - target all elements */
1422
pre,
1523
pre *,
@@ -53,4 +61,25 @@ figure:has(> pre) {
5361

5462
:is(.dark .hover\:bg-fd-accent\/50:hover) {
5563
background-color: rgba(148 163 184 / 0.1) !important; /* slate-400 at 10% for dark mode hover */
64+
}
65+
66+
/* Improve shadow visibility in dark mode */
67+
:is(.dark .shadow-sm) {
68+
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
69+
}
70+
71+
:is(.dark .shadow-md) {
72+
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
73+
}
74+
75+
:is(.dark .shadow-lg) {
76+
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
77+
}
78+
79+
:is(.dark .shadow-xl) {
80+
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
81+
}
82+
83+
:is(.dark .shadow-2xl) {
84+
box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
5685
}

app/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const inter = Inter({
99
export default function Layout({ children }: LayoutProps<'/'>) {
1010
return (
1111
<html lang="en" className={inter.className} suppressHydrationWarning>
12-
<body className="flex flex-col min-h-screen">
12+
<body className="flex flex-col min-h-screen bg-white dark:bg-slate-950 text-slate-900 dark:text-slate-100">
1313
<RootProvider>{children}</RootProvider>
1414
</body>
1515
</html>

0 commit comments

Comments
 (0)