Skip to content

Commit 63006ba

Browse files
authored
Added dark mode 🥳 (#228)
1 parent e4f18e5 commit 63006ba

37 files changed

+233
-285
lines changed

‎app/app/(dashboard)/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export default function DashboardLayout({ children }: { children: ReactNode }) {
1010
<Profile />
1111
</Suspense>
1212
</Nav>
13-
<div className="sm:pl-60">{children}</div>
13+
<div className="min-h-screen dark:bg-black sm:pl-60">{children}</div>
1414
</div>
1515
);
1616
}

‎app/app/(dashboard)/loading.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import LoadingDots from "@/components/icons/loading-dots";
33
export default function Loading() {
44
return (
55
<>
6-
<div className="h-10 w-48 animate-pulse rounded-md bg-stone-100" />
6+
<div className="h-10 w-48 animate-pulse rounded-md bg-stone-100 dark:bg-stone-800" />
77
<div className="flex h-full w-full items-center justify-center">
88
<LoadingDots />
99
</div>

‎app/app/(dashboard)/page.tsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,17 @@ export default function Overview() {
1010
return (
1111
<div className="flex max-w-screen-xl flex-col space-y-12 p-8">
1212
<div className="flex flex-col space-y-6">
13-
<h1 className="font-cal text-3xl font-bold">Overview</h1>
13+
<h1 className="font-cal text-3xl font-bold dark:text-white">
14+
Overview
15+
</h1>
1416
<OverviewStats />
1517
</div>
1618

1719
<div className="flex flex-col space-y-6">
1820
<div className="flex items-center justify-between">
19-
<h1 className="font-cal text-3xl font-bold">Top Sites</h1>
21+
<h1 className="font-cal text-3xl font-bold dark:text-white">
22+
Top Sites
23+
</h1>
2024
<Suspense fallback={null}>
2125
<OverviewSitesCTA />
2226
</Suspense>
@@ -35,7 +39,9 @@ export default function Overview() {
3539
</div>
3640

3741
<div className="flex flex-col space-y-6">
38-
<h1 className="font-cal text-3xl font-bold">Recent Posts</h1>
42+
<h1 className="font-cal text-3xl font-bold dark:text-white">
43+
Recent Posts
44+
</h1>
3945
<Suspense
4046
fallback={
4147
<div className="grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4">

‎app/app/(dashboard)/post/[id]/loading.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
export default function Loading() {
44
return (
55
<>
6-
<div className="h-10 w-48 animate-pulse rounded-md bg-stone-100" />
7-
<div className="h-96 w-full max-w-screen-md animate-pulse rounded-md bg-stone-100" />
6+
<div className="h-10 w-48 animate-pulse rounded-md bg-stone-100 dark:bg-stone-800" />
7+
<div className="h-96 w-full max-w-screen-md animate-pulse rounded-md bg-stone-100 dark:bg-stone-800" />
88
</>
99
);
1010
}

‎app/app/(dashboard)/post/[id]/settings/page.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ export default async function PostSettings({
2525
return (
2626
<div className="flex max-w-screen-xl flex-col space-y-12 p-6">
2727
<div className="flex flex-col space-y-6">
28-
<h1 className="font-cal text-3xl font-bold">Post Settings</h1>
28+
<h1 className="font-cal text-3xl font-bold dark:text-white">
29+
Post Settings
30+
</h1>
2931
<Form
3032
title="Post Slug"
3133
description="The slug is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens."

‎app/app/(dashboard)/settings/page.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ export default async function SettingsPage() {
1212
return (
1313
<div className="flex max-w-screen-xl flex-col space-y-12 p-8">
1414
<div className="flex flex-col space-y-6">
15-
<h1 className="font-cal text-3xl font-bold">Settings</h1>
15+
<h1 className="font-cal text-3xl font-bold dark:text-white">
16+
Settings
17+
</h1>
1618
<Form
1719
title="Name"
1820
description="Your name on this app."

‎app/app/(dashboard)/site/[id]/analytics/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ export default async function SiteAnalytics({
2727
<>
2828
<div className="flex items-center justify-center sm:justify-start">
2929
<div className="flex flex-col items-center space-x-0 space-y-2 sm:flex-row sm:space-x-4 sm:space-y-0">
30-
<h1 className="font-cal text-xl font-bold sm:text-3xl">
30+
<h1 className="font-cal text-xl font-bold dark:text-white sm:text-3xl">
3131
Analytics for {data.name}
3232
</h1>
3333
<a
3434
href={`https://${url}`}
3535
target="_blank"
3636
rel="noreferrer"
37-
className="truncate rounded-md bg-stone-100 px-2 py-1 text-sm font-medium text-stone-600 transition-colors hover:bg-stone-200"
37+
className="truncate rounded-md bg-stone-100 px-2 py-1 text-sm font-medium text-stone-600 transition-colors hover:bg-stone-200 dark:bg-stone-800 dark:text-stone-400"
3838
>
3939
{url} ↗
4040
</a>

‎app/app/(dashboard)/site/[id]/loading.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import PlacholderCard from "@/components/placeholder-card";
55
export default function Loading() {
66
return (
77
<>
8-
<div className="h-10 w-48 animate-pulse rounded-md bg-stone-100" />
8+
<div className="h-10 w-48 animate-pulse rounded-md bg-stone-100 dark:bg-stone-800" />
99
<div className="grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4">
1010
{Array.from({ length: 8 }).map((_, i) => (
1111
<PlacholderCard key={i} />

‎app/app/(dashboard)/site/[id]/not-found.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,22 @@ import Image from "next/image";
33
export default function NotFoundSite() {
44
return (
55
<div className="mt-20 flex flex-col items-center space-x-4">
6-
<h1 className="font-cal text-4xl">404</h1>
6+
<h1 className="font-cal text-4xl dark:text-white">404</h1>
77
<Image
88
alt="missing site"
99
src="https://illustrations.popsy.co/gray/falling.svg"
1010
width={400}
1111
height={400}
12+
className="dark:hidden"
1213
/>
13-
<p className="text-lg text-stone-500">
14+
<Image
15+
alt="missing site"
16+
src="https://illustrations.popsy.co/white/falling.svg"
17+
width={400}
18+
height={400}
19+
className="hidden dark:block"
20+
/>
21+
<p className="text-lg text-stone-500 dark:text-stone-400">
1422
Site does not exist, or you do not have permission to view it
1523
</p>
1624
</div>

‎app/app/(dashboard)/site/[id]/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export default async function SitePosts({
2929
<>
3030
<div className="flex flex-col items-center justify-between space-y-4 sm:flex-row sm:space-y-0">
3131
<div className="flex flex-col items-center space-y-2 sm:flex-row sm:space-x-4 sm:space-y-0">
32-
<h1 className="w-60 truncate font-cal text-xl font-bold sm:w-auto sm:text-3xl">
32+
<h1 className="w-60 truncate font-cal text-xl font-bold dark:text-white sm:w-auto sm:text-3xl">
3333
All Posts for {data.name}
3434
</h1>
3535
<a
@@ -40,7 +40,7 @@ export default async function SitePosts({
4040
}
4141
target="_blank"
4242
rel="noreferrer"
43-
className="truncate rounded-md bg-stone-100 px-2 py-1 text-sm font-medium text-stone-600 transition-colors hover:bg-stone-200"
43+
className="truncate rounded-md bg-stone-100 px-2 py-1 text-sm font-medium text-stone-600 transition-colors hover:bg-stone-200 dark:bg-stone-800 dark:text-stone-400"
4444
>
4545
{url} ↗
4646
</a>

0 commit comments

Comments
 (0)