Skip to content

Commit 862eb7e

Browse files
committed
feat(ui): apply shadcn preset theme and wire demo in app shell
Made-with: Cursor
1 parent 0bc545c commit 862eb7e

4 files changed

Lines changed: 137 additions & 6 deletions

File tree

components.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,7 @@
2121
},
2222
"menuColor": "inverted-translucent",
2323
"menuAccent": "subtle",
24-
"registries": {}
24+
"registries": {
25+
"@efferd": "https://efferd.com/r/{style}/{name}.json"
26+
}
2527
}

src/app/globals.css

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,129 @@
11
@import "tailwindcss";
2+
@import "tw-animate-css";
3+
@import "shadcn/tailwind.css";
4+
5+
@custom-variant dark (&:is(.dark *));
6+
7+
@theme inline {
8+
--font-heading: var(--font-sans);
9+
--font-sans: var(--font-sans);
10+
--color-sidebar-ring: var(--sidebar-ring);
11+
--color-sidebar-border: var(--sidebar-border);
12+
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
13+
--color-sidebar-accent: var(--sidebar-accent);
14+
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
15+
--color-sidebar-primary: var(--sidebar-primary);
16+
--color-sidebar-foreground: var(--sidebar-foreground);
17+
--color-sidebar: var(--sidebar);
18+
--color-chart-5: var(--chart-5);
19+
--color-chart-4: var(--chart-4);
20+
--color-chart-3: var(--chart-3);
21+
--color-chart-2: var(--chart-2);
22+
--color-chart-1: var(--chart-1);
23+
--color-ring: var(--ring);
24+
--color-input: var(--input);
25+
--color-border: var(--border);
26+
--color-destructive: var(--destructive);
27+
--color-accent-foreground: var(--accent-foreground);
28+
--color-accent: var(--accent);
29+
--color-muted-foreground: var(--muted-foreground);
30+
--color-muted: var(--muted);
31+
--color-secondary-foreground: var(--secondary-foreground);
32+
--color-secondary: var(--secondary);
33+
--color-primary-foreground: var(--primary-foreground);
34+
--color-primary: var(--primary);
35+
--color-popover-foreground: var(--popover-foreground);
36+
--color-popover: var(--popover);
37+
--color-card-foreground: var(--card-foreground);
38+
--color-card: var(--card);
39+
--color-foreground: var(--foreground);
40+
--color-background: var(--background);
41+
--radius-sm: calc(var(--radius) * 0.6);
42+
--radius-md: calc(var(--radius) * 0.8);
43+
--radius-lg: var(--radius);
44+
--radius-xl: calc(var(--radius) * 1.4);
45+
--radius-2xl: calc(var(--radius) * 1.8);
46+
--radius-3xl: calc(var(--radius) * 2.2);
47+
--radius-4xl: calc(var(--radius) * 2.6);
48+
}
49+
50+
:root {
51+
--background: oklch(1 0 0);
52+
--foreground: oklch(0.145 0 0);
53+
--card: oklch(1 0 0);
54+
--card-foreground: oklch(0.145 0 0);
55+
--popover: oklch(1 0 0);
56+
--popover-foreground: oklch(0.145 0 0);
57+
--primary: oklch(0.205 0 0);
58+
--primary-foreground: oklch(0.985 0 0);
59+
--secondary: oklch(0.97 0 0);
60+
--secondary-foreground: oklch(0.205 0 0);
61+
--muted: oklch(0.97 0 0);
62+
--muted-foreground: oklch(0.556 0 0);
63+
--accent: oklch(0.97 0 0);
64+
--accent-foreground: oklch(0.205 0 0);
65+
--destructive: oklch(0.577 0.245 27.325);
66+
--border: oklch(0.922 0 0);
67+
--input: oklch(0.922 0 0);
68+
--ring: oklch(0.708 0 0);
69+
--chart-1: oklch(0.87 0 0);
70+
--chart-2: oklch(0.556 0 0);
71+
--chart-3: oklch(0.439 0 0);
72+
--chart-4: oklch(0.371 0 0);
73+
--chart-5: oklch(0.269 0 0);
74+
--radius: 0.625rem;
75+
--sidebar: oklch(0.985 0 0);
76+
--sidebar-foreground: oklch(0.145 0 0);
77+
--sidebar-primary: oklch(0.205 0 0);
78+
--sidebar-primary-foreground: oklch(0.985 0 0);
79+
--sidebar-accent: oklch(0.97 0 0);
80+
--sidebar-accent-foreground: oklch(0.205 0 0);
81+
--sidebar-border: oklch(0.922 0 0);
82+
--sidebar-ring: oklch(0.708 0 0);
83+
}
84+
85+
.dark {
86+
--background: oklch(0.145 0 0);
87+
--foreground: oklch(0.985 0 0);
88+
--card: oklch(0.205 0 0);
89+
--card-foreground: oklch(0.985 0 0);
90+
--popover: oklch(0.205 0 0);
91+
--popover-foreground: oklch(0.985 0 0);
92+
--primary: oklch(0.922 0 0);
93+
--primary-foreground: oklch(0.205 0 0);
94+
--secondary: oklch(0.269 0 0);
95+
--secondary-foreground: oklch(0.985 0 0);
96+
--muted: oklch(0.269 0 0);
97+
--muted-foreground: oklch(0.708 0 0);
98+
--accent: oklch(0.269 0 0);
99+
--accent-foreground: oklch(0.985 0 0);
100+
--destructive: oklch(0.704 0.191 22.216);
101+
--border: oklch(1 0 0 / 10%);
102+
--input: oklch(1 0 0 / 15%);
103+
--ring: oklch(0.556 0 0);
104+
--chart-1: oklch(0.87 0 0);
105+
--chart-2: oklch(0.556 0 0);
106+
--chart-3: oklch(0.439 0 0);
107+
--chart-4: oklch(0.371 0 0);
108+
--chart-5: oklch(0.269 0 0);
109+
--sidebar: oklch(0.205 0 0);
110+
--sidebar-foreground: oklch(0.985 0 0);
111+
--sidebar-primary: oklch(0.488 0.243 264.376);
112+
--sidebar-primary-foreground: oklch(0.985 0 0);
113+
--sidebar-accent: oklch(0.269 0 0);
114+
--sidebar-accent-foreground: oklch(0.985 0 0);
115+
--sidebar-border: oklch(1 0 0 / 10%);
116+
--sidebar-ring: oklch(0.556 0 0);
117+
}
118+
119+
@layer base {
120+
* {
121+
@apply border-border outline-ring/50;
122+
}
123+
body {
124+
@apply bg-background text-foreground;
125+
}
126+
html {
127+
@apply font-sans;
128+
}
129+
}

src/app/layout.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,9 @@ import { Geist, Geist_Mono } from "next/font/google"
22

33
import "./globals.css"
44
import { ThemeProvider } from "@/components/theme-provider"
5+
import { cn } from "@/lib/utils";
56

6-
const fontSans = Geist({
7-
subsets: ["latin"],
8-
variable: "--font-sans",
9-
})
7+
const geist = Geist({subsets:['latin'],variable:'--font-sans'})
108

119
const fontMono = Geist_Mono({
1210
subsets: ["latin"],
@@ -22,7 +20,7 @@ export default function RootLayout({
2220
<html
2321
lang="en"
2422
suppressHydrationWarning
25-
className={`${fontSans.variable} ${fontMono.variable} font-sans antialiased`}
23+
className={cn("antialiased", fontMono.variable, "font-sans", geist.variable)}
2624
>
2725
<body>
2826
<ThemeProvider>{children}</ThemeProvider>

src/app/page.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1+
import { Demo } from "@/components/demo";
2+
13
export default function Page() {
24
return (
35
<div className="flex min-h-svh items-center justify-center p-6">
46
<div className="text-center">
57
<h1 className="text-2xl font-semibold">Next.js + Supabase + Creem</h1>
68
<p className="mt-2 text-sm text-muted-foreground">Starter template — coming soon</p>
79
</div>
10+
<Demo />
811
</div>
912
)
1013
}

0 commit comments

Comments
 (0)