Skip to content

Commit c51f6e8

Browse files
authored
docs: add showcase page (#3362)
1 parent 5bfaef3 commit c51f6e8

File tree

14 files changed

+220
-8
lines changed

14 files changed

+220
-8
lines changed

website/app/showcase/page.tsx

Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
import { Navbar } from '@/components/navbar'
2+
import { generateOgImageUrl } from '@/lib/og-image'
3+
import { css } from '@/styled-system/css'
4+
import { Container, Grid, HStack, panda, Stack } from '@/styled-system/jsx'
5+
import { FooterSection } from '@/www/footer.section'
6+
import type { Metadata } from 'next'
7+
import Image from 'next/image'
8+
import Link from 'next/link'
9+
import { showcases } from '@/showcase'
10+
11+
const ogTitle = 'See projects built with Panda CSS'
12+
const ogDescription =
13+
'Explore the projects and applications built using Panda CSS'
14+
15+
export const metadata: Metadata = {
16+
title: 'Showcase',
17+
description:
18+
'Panda CSS is a powerful tool for building modern web applications.',
19+
openGraph: {
20+
title: ogTitle,
21+
description: ogDescription,
22+
type: 'website',
23+
images: [
24+
generateOgImageUrl({
25+
title: ogTitle,
26+
description: ogDescription,
27+
category: 'Showcase'
28+
})
29+
]
30+
},
31+
twitter: {
32+
card: 'summary_large_image',
33+
title: ogTitle,
34+
description: ogDescription,
35+
images: [
36+
generateOgImageUrl({
37+
title: ogTitle,
38+
description: ogDescription,
39+
category: 'Showcase'
40+
})
41+
]
42+
}
43+
}
44+
45+
interface Showcase {
46+
name: string
47+
description: string
48+
url: string
49+
image: string
50+
}
51+
52+
const cardStyles = css({
53+
borderWidth: '1px',
54+
borderRadius: 'md',
55+
display: 'flex',
56+
flexDirection: 'column',
57+
overflow: 'hidden',
58+
transition: 'transform 0.2s',
59+
_hover: {
60+
transform: 'translateY(-4px)',
61+
shadow: 'lg'
62+
}
63+
})
64+
65+
const ShowcaseCard = ({ data }: { data: Showcase }) => {
66+
const { name, description, url, image } = data
67+
68+
return (
69+
<Link
70+
href={url}
71+
target="_blank"
72+
rel="noopener noreferrer"
73+
className={cardStyles}
74+
>
75+
<Image
76+
src={image}
77+
alt={name}
78+
width={400}
79+
height={300}
80+
className={css({
81+
width: '100%',
82+
height: '200px',
83+
objectFit: 'cover',
84+
borderTopRadius: 'md'
85+
})}
86+
/>
87+
<Stack p="4" gap="2" bg="bg">
88+
<panda.h3 fontSize="lg" fontWeight="semibold">
89+
{name}
90+
</panda.h3>
91+
<panda.p fontSize="md" color="fg.muted">
92+
{description}
93+
</panda.p>
94+
</Stack>
95+
</Link>
96+
)
97+
}
98+
99+
export default function ShowcasePage() {
100+
return (
101+
<>
102+
<Navbar />
103+
<panda.div bg="bg.muted" pt="20" minH="80dvh">
104+
<Container py="20">
105+
<Stack gap="6" align="center">
106+
<Stack align="center" textAlign="center">
107+
<panda.h1
108+
fontSize={{ base: '3xl', md: '5xl' }}
109+
fontWeight="bold"
110+
letterSpacing="tight"
111+
>
112+
Showcase
113+
</panda.h1>
114+
</Stack>
115+
<panda.p
116+
fontSize={{ base: 'lg', md: 'xl' }}
117+
color="fg.muted"
118+
maxW="2xl"
119+
lineHeight="relaxed"
120+
textAlign="center"
121+
>
122+
Explore the projects built with Panda CSS by the community and get
123+
inspired for your next project.
124+
</panda.p>
125+
</Stack>
126+
</Container>
127+
128+
<Container pb="20">
129+
<Grid
130+
columns={{ base: 1, md: 2, lg: 3 }}
131+
gap={{ base: '4', md: '8' }}
132+
>
133+
{showcases.map(showcase => (
134+
<ShowcaseCard key={showcase.name} data={showcase} />
135+
))}
136+
</Grid>
137+
</Container>
138+
</panda.div>
139+
<FooterSection />
140+
</>
141+
)
142+
}

website/next.config.mjs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,12 @@ const config = {
3737
images: {
3838
remotePatterns: [
3939
{ hostname: 'images.unsplash.com' },
40-
{ hostname: 'avatars.githubusercontent.com' }
40+
{ hostname: 'avatars.githubusercontent.com' },
41+
{ hostname: 'coolcontrast.vercel.app' },
42+
{ hostname: 's2.coinmarketcap.com' },
43+
{ hostname: 'novu.co' },
44+
{ hostname: 'magic.link' },
45+
{ hostname: 'ark-ui.com' }
4146
]
4247
}
4348
}

website/public/showcase/ark-ui.png

761 KB
Loading
632 KB
Loading
789 KB
Loading
102 KB
Loading
1.46 MB
Loading
91.6 KB
Loading
345 KB
Loading

website/public/showcase/snapp.png

2.32 MB
Loading

0 commit comments

Comments
 (0)