Skip to content

Commit c43b4e1

Browse files
committed
functioning
1 parent b49d850 commit c43b4e1

70 files changed

Lines changed: 4964 additions & 3641 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎app/(main)/(course)/course/[courseSlug]/lessons.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export default async function Lessons(params: { courseSlug: string }) {
6060
<CoverImage image={coverImage} priority={false} />
6161
</Link>
6262
</CardHeader>
63-
<CardContent className="flex-grow">
63+
<CardContent className="grow">
6464
<h3 className="mb-3 text-3xl leading-snug text-balance">
6565
<Link
6666
href={`/course/${courseSlug}/${_type}/${slug}`}

‎app/(main)/(user)/dashboard/bookmarks/bookmarks.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export default function Bookmarks() {
3030
</Link>
3131
</CardHeader>
3232
)}
33-
<CardContent className="flex-grow">
33+
<CardContent className="grow">
3434
<h3 className="mb-3 text-3xl leading-snug text-balance">
3535
<Link href={bookmark._cc_pathname} className="hover:underline">
3636
{bookmark.title}

‎app/(main)/(user)/user-nav-menu.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export default function SettingsNav({ paths }: { paths: string[] }) {
2222
<li key={path}>
2323
<Link href={path} prefetch={false} legacyBehavior passHref>
2424
<NavigationMenuLink
25-
className="group inline-flex h-10 w-full items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50"
25+
className="group inline-flex h-10 w-full items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-active:bg-accent/50 data-[state=open]:bg-accent/50"
2626
active={checkActivePath(path)}
2727
>
2828
{iconBuilder(path)}

‎app/(main)/avatar-dropdown.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export default function AvatarDropdown() {
4747
}, [cookies]);
4848

4949
// Only show after window is loaded
50-
if (!isClient) return null;
50+
if (!isClient) { return null; }
5151

5252
const logout = async () => {
5353
await ccdSignOut();

‎app/(main)/layout.tsx‎

Lines changed: 56 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import type { Metadata } from "next";
55
import { SanityLive } from "@/sanity/lib/live";
66
import { Nunito } from "next/font/google";
77
import { Inter } from "next/font/google";
8+
import CookiesProviderClient from "@/components/cookies-provider-client";
89
import { Suspense } from 'react'
910

1011
import NextTopLoader from "nextjs-toploader";
@@ -19,7 +20,7 @@ import { Button } from "@/components/ui/button";
1920
import { Sheet, SheetContent, SheetTrigger } from "@/components/ui/sheet";
2021
import NavHeader from "@/components/nav-header";
2122
import Footer from "@/components/footer";
22-
import { Toaster } from "@/components/ui/toaster";
23+
import { Toaster } from "@/components/ui/sonner";
2324
import AvatarDropdown from "./avatar-dropdown";
2425
import AlgoliaDialog from "@/components/algolia-dialog";
2526
import { FaBars } from "react-icons/fa6";
@@ -96,59 +97,61 @@ export default async function RootLayout({
9697
inter.variable,
9798
)}
9899
>
99-
<Suspense>
100-
<SpeedInsights />
101-
<MetaPixel />
102-
<DisableDraftMode />
103-
<VisualEditing />
104-
</Suspense>
105-
<PlayerProvider>
106-
<ThemeProvider
107-
attribute="class"
108-
defaultTheme="system"
109-
enableSystem
110-
disableTransitionOnChange
111-
>
112-
<NextTopLoader color="hsl(var(--primary))" />
113-
<section className="flex flex-col min-h-[100dvh]">
114-
<header className="fixed left-0 right-0 z-40 flex items-center justify-between px-6 py-4 shadow-md bg-background">
115-
<div className="flex items-center gap-4">
116-
<Link className="text-lg font-bold md:text-2xl" href="/">
117-
CodingCat.dev
118-
</Link>
119-
<nav className="items-center hidden md:flex gap-6">
120-
<NavHeader navLinks={settings?.navLinks} />
121-
</nav>
122-
</div>
123-
<div className="flex items-center gap-2">
124-
<AlgoliaDialog />
125-
<AvatarDropdown />
126-
<Sheet>
127-
<SheetTrigger asChild>
128-
<Button className="md:hidden" size="icon" variant="ghost">
129-
<FaBars className="w-6 h-6" />
130-
<span className="sr-only">Toggle navigation menu</span>
131-
</Button>
132-
</SheetTrigger>
133-
<SheetContent side="right">
134-
<nav className="py-6 grid gap-2">
135-
<SheetTrigger asChild>
136-
<NavHeader navLinks={settings?.navLinks} sideOnly />
137-
</SheetTrigger>
138-
</nav>
139-
</SheetContent>
140-
</Sheet>
141-
</div>
142-
</header>
143-
<main className="mt-20">{children}</main>
144-
<Toaster />
145-
<Footer />
146-
</section>
147-
<PlayerFloating />
148-
<SanityLive />
100+
<CookiesProviderClient>
101+
<Suspense>
149102
<SpeedInsights />
150-
</ThemeProvider>
151-
</PlayerProvider>
103+
<MetaPixel />
104+
<DisableDraftMode />
105+
<VisualEditing />
106+
</Suspense>
107+
<PlayerProvider>
108+
<ThemeProvider
109+
attribute="class"
110+
defaultTheme="system"
111+
enableSystem
112+
disableTransitionOnChange
113+
>
114+
<NextTopLoader color="hsl(var(--primary))" />
115+
<section className="flex flex-col min-h-dvh">
116+
<header className="fixed left-0 right-0 z-40 flex items-center justify-between px-6 py-4 shadow-md bg-background">
117+
<div className="flex items-center gap-4">
118+
<Link className="text-lg font-bold md:text-2xl" href="/">
119+
CodingCat.dev
120+
</Link>
121+
<nav className="items-center hidden md:flex gap-6">
122+
<NavHeader navLinks={settings?.navLinks} />
123+
</nav>
124+
</div>
125+
<div className="flex items-center gap-2">
126+
<AlgoliaDialog />
127+
<AvatarDropdown />
128+
<Sheet>
129+
<SheetTrigger asChild>
130+
<Button className="md:hidden" size="icon" variant="ghost">
131+
<FaBars className="w-6 h-6" />
132+
<span className="sr-only">Toggle navigation menu</span>
133+
</Button>
134+
</SheetTrigger>
135+
<SheetContent side="right">
136+
<nav className="py-6 grid gap-2">
137+
<SheetTrigger asChild>
138+
<NavHeader navLinks={settings?.navLinks} sideOnly />
139+
</SheetTrigger>
140+
</nav>
141+
</SheetContent>
142+
</Sheet>
143+
</div>
144+
</header>
145+
<main className="mt-20">{children}</main>
146+
<Toaster />
147+
<Footer />
148+
</section>
149+
<PlayerFloating />
150+
<SanityLive />
151+
<SpeedInsights />
152+
</ThemeProvider>
153+
</PlayerProvider>
154+
</CookiesProviderClient>
152155
</body>
153156
</html>
154157
);

‎app/(main)/page.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export default async function HomePage() {
1717
const homePage = homePageFetch.data as HomePageQueryResult;
1818

1919
return (
20-
<div className="flex flex-col min-h-[100dvh]">
20+
<div className="flex flex-col min-h-dvh">
2121
<main className="flex-1">
2222
<section className="w-full pb-12 md:py-24 lg:py-32">
2323
<div className="container px-4 md:px-6 grid gap-8 md:grid-cols-2 lg:gap-16">

‎app/globals.css‎

Lines changed: 141 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
@tailwind base;
2-
@tailwind components;
3-
@tailwind utilities;
1+
@import "tailwindcss";
2+
3+
@plugin "tailwindcss-animate";
4+
5+
@custom-variant dark (&:is(.dark *));
46

57
@layer base {
68
:root {
@@ -50,9 +52,6 @@
5052
}
5153

5254
@layer base {
53-
* {
54-
@apply border-border;
55-
}
5655
body {
5756
@apply bg-background text-foreground;
5857
font-family: var(--font-inter), sans-serif;
@@ -70,3 +69,139 @@
7069
.ais-SearchBox-input[type="search"]::-webkit-search-cancel-button {
7170
display: none;
7271
}
72+
73+
@theme inline {
74+
--radius-sm: calc(var(--radius) - 4px);
75+
--radius-md: calc(var(--radius) - 2px);
76+
--radius-lg: var(--radius);
77+
--radius-xl: calc(var(--radius) + 4px);
78+
--color-background: var(--background);
79+
--color-foreground: var(--foreground);
80+
--color-card: var(--card);
81+
--color-card-foreground: var(--card-foreground);
82+
--color-popover: var(--popover);
83+
--color-popover-foreground: var(--popover-foreground);
84+
--color-primary: var(--primary);
85+
--color-primary-foreground: var(--primary-foreground);
86+
--color-secondary: var(--secondary);
87+
--color-secondary-foreground: var(--secondary-foreground);
88+
--color-muted: var(--muted);
89+
--color-muted-foreground: var(--muted-foreground);
90+
--color-accent: var(--accent);
91+
--color-accent-foreground: var(--accent-foreground);
92+
--color-destructive: var(--destructive);
93+
--color-border: var(--border);
94+
--color-input: var(--input);
95+
--color-ring: var(--ring);
96+
--color-chart-1: var(--chart-1);
97+
--color-chart-2: var(--chart-2);
98+
--color-chart-3: var(--chart-3);
99+
--color-chart-4: var(--chart-4);
100+
--color-chart-5: var(--chart-5);
101+
--color-sidebar: var(--sidebar);
102+
--color-sidebar-foreground: var(--sidebar-foreground);
103+
--color-sidebar-primary: var(--sidebar-primary);
104+
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
105+
--color-sidebar-accent: var(--sidebar-accent);
106+
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
107+
--color-sidebar-border: var(--sidebar-border);
108+
--color-sidebar-ring: var(--sidebar-ring);
109+
--animate-accordion-down: accordion-down 0.2s ease-out;
110+
--animate-accordion-up: accordion-up 0.2s ease-out;
111+
112+
@keyframes accordion-down {
113+
from {
114+
height: 0;
115+
}
116+
to {
117+
height: var(--radix-accordion-content-height);
118+
}
119+
}
120+
121+
@keyframes accordion-up {
122+
from {
123+
height: var(--radix-accordion-content-height);
124+
}
125+
to {
126+
height: 0;
127+
}
128+
}
129+
}
130+
131+
:root {
132+
--radius: 0.625rem;
133+
--background: oklch(1 0 0);
134+
--foreground: oklch(0.145 0 0);
135+
--card: oklch(1 0 0);
136+
--card-foreground: oklch(0.145 0 0);
137+
--popover: oklch(1 0 0);
138+
--popover-foreground: oklch(0.145 0 0);
139+
--primary: oklch(0.205 0 0);
140+
--primary-foreground: oklch(0.985 0 0);
141+
--secondary: oklch(0.97 0 0);
142+
--secondary-foreground: oklch(0.205 0 0);
143+
--muted: oklch(0.97 0 0);
144+
--muted-foreground: oklch(0.556 0 0);
145+
--accent: oklch(0.97 0 0);
146+
--accent-foreground: oklch(0.205 0 0);
147+
--destructive: oklch(0.577 0.245 27.325);
148+
--border: oklch(0.922 0 0);
149+
--input: oklch(0.922 0 0);
150+
--ring: oklch(0.708 0 0);
151+
--chart-1: oklch(0.646 0.222 41.116);
152+
--chart-2: oklch(0.6 0.118 184.704);
153+
--chart-3: oklch(0.398 0.07 227.392);
154+
--chart-4: oklch(0.828 0.189 84.429);
155+
--chart-5: oklch(0.769 0.188 70.08);
156+
--sidebar: oklch(0.985 0 0);
157+
--sidebar-foreground: oklch(0.145 0 0);
158+
--sidebar-primary: oklch(0.205 0 0);
159+
--sidebar-primary-foreground: oklch(0.985 0 0);
160+
--sidebar-accent: oklch(0.97 0 0);
161+
--sidebar-accent-foreground: oklch(0.205 0 0);
162+
--sidebar-border: oklch(0.922 0 0);
163+
--sidebar-ring: oklch(0.708 0 0);
164+
}
165+
166+
.dark {
167+
--background: oklch(0.145 0 0);
168+
--foreground: oklch(0.985 0 0);
169+
--card: oklch(0.205 0 0);
170+
--card-foreground: oklch(0.985 0 0);
171+
--popover: oklch(0.205 0 0);
172+
--popover-foreground: oklch(0.985 0 0);
173+
--primary: oklch(0.922 0 0);
174+
--primary-foreground: oklch(0.205 0 0);
175+
--secondary: oklch(0.269 0 0);
176+
--secondary-foreground: oklch(0.985 0 0);
177+
--muted: oklch(0.269 0 0);
178+
--muted-foreground: oklch(0.708 0 0);
179+
--accent: oklch(0.269 0 0);
180+
--accent-foreground: oklch(0.985 0 0);
181+
--destructive: oklch(0.704 0.191 22.216);
182+
--border: oklch(1 0 0 / 10%);
183+
--input: oklch(1 0 0 / 15%);
184+
--ring: oklch(0.556 0 0);
185+
--chart-1: oklch(0.488 0.243 264.376);
186+
--chart-2: oklch(0.696 0.17 162.48);
187+
--chart-3: oklch(0.769 0.188 70.08);
188+
--chart-4: oklch(0.627 0.265 303.9);
189+
--chart-5: oklch(0.645 0.246 16.439);
190+
--sidebar: oklch(0.205 0 0);
191+
--sidebar-foreground: oklch(0.985 0 0);
192+
--sidebar-primary: oklch(0.488 0.243 264.376);
193+
--sidebar-primary-foreground: oklch(0.985 0 0);
194+
--sidebar-accent: oklch(0.269 0 0);
195+
--sidebar-accent-foreground: oklch(0.985 0 0);
196+
--sidebar-border: oklch(1 0 0 / 10%);
197+
--sidebar-ring: oklch(0.556 0 0);
198+
}
199+
200+
@layer base {
201+
* {
202+
@apply border-border outline-ring/50;
203+
}
204+
body {
205+
@apply bg-background text-foreground;
206+
}
207+
}

‎biome.json‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
},
2727
"noNonNullAssertion": "warn",
2828
"useBlockStatements": "error"
29+
},
30+
"a11y": {
31+
"noSvgWithoutTitle": "off"
2932
}
3033
}
3134
},

‎components.json‎

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
11
{
2-
"$schema": "https://ui.shadcn.com/schema.json",
3-
"style": "default",
4-
"rsc": true,
5-
"tsx": true,
6-
"tailwind": {
7-
"config": "tailwind.config.ts",
8-
"css": "app/globals.css",
9-
"baseColor": "zinc",
10-
"cssVariables": true,
11-
"prefix": ""
12-
},
13-
"aliases": {
14-
"components": "@/components",
15-
"utils": "@/lib/utils"
16-
}
2+
"$schema": "https://ui.shadcn.com/schema.json",
3+
"style": "new-york",
4+
"rsc": true,
5+
"tsx": true,
6+
"tailwind": {
7+
"config": "tailwind.config.ts",
8+
"css": "app/globals.css",
9+
"baseColor": "neutral",
10+
"cssVariables": true,
11+
"prefix": ""
12+
},
13+
"iconLibrary": "lucide",
14+
"aliases": {
15+
"components": "@/components",
16+
"utils": "@/lib/utils",
17+
"ui": "@/components/ui",
18+
"lib": "@/lib",
19+
"hooks": "@/hooks"
20+
},
21+
"registries": {}
1722
}

‎components/algolia-dialog.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export default function AlgoliaDialog() {
3333
</span>
3434
</Button>
3535
</DialogTrigger>
36-
<DialogContent className="sm:max-w-screen-lg p-0 sm:px-6 ">
36+
<DialogContent className="sm:max-w-(--breakpoint-lg) p-0 sm:px-6 ">
3737
<div className="hidden">
3838
<DialogTitle>Search</DialogTitle>
3939
</div>

0 commit comments

Comments
 (0)