Skip to content

Commit 7931033

Browse files
committed
feat: add description categories homepage
1 parent 50d13dd commit 7931033

File tree

4 files changed

+19
-7
lines changed

4 files changed

+19
-7
lines changed

app/_components/sections/overview-grid.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,14 @@ export const OverviewGrid = async ({ lang }: { lang: string }) => {
1717
<div className="space-y-10 my-10">
1818
{categories.map((category) => (
1919
<div key={category.name}>
20-
<h2 className="text-2xl font-bold mb-5 text-foreground">
21-
{category.name}
22-
</h2>
20+
<div className="mb-5">
21+
<h2 className="text-2xl font-bold text-foreground">
22+
{category.name}
23+
</h2>
24+
<p className="mt-2 text-muted-foreground text-sm">
25+
{category.description}
26+
</p>
27+
</div>
2328
<div className="grid grid-cols-1 gap-5 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5">
2429
{category.patterns.map((pattern) => (
2530
<PatternWrapper key={pattern.title} pattern={pattern} />

app/_constants/patterns.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,23 @@ import { Pattern } from "../_utils/get-pattern-categories"
33
export const PATTERNS_MAP = {
44
'content-management': {
55
name: 'Content Management',
6-
path: 'content-management'
6+
path: 'content-management',
7+
description: 'Organize and present content effectively with patterns for layout, structure, and information hierarchy.'
78
},
89
navigation: {
910
name: 'Layout & Navigation',
10-
path: 'navigation'
11+
path: 'navigation',
12+
description: 'Guide users through your application with intuitive navigation patterns and clear layout structures.'
1113
},
1214
'user-feedback': {
1315
name: 'User Feedback',
14-
path: 'user-feedback'
16+
path: 'user-feedback',
17+
description: 'Keep users informed and engaged with responsive feedback mechanisms and clear status indicators.'
1518
},
1619
forms: {
1720
name: 'Input & Forms',
18-
path: 'forms'
21+
path: 'forms',
22+
description: 'Create user-friendly forms and input interfaces that streamline data collection and user interaction.'
1923
},
2024
} as const
2125

app/_utils/get-pattern-categories.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export type PatternStatus = 'complete' | 'draft' | 'coming-soon'
1313
export type PatternCategory = {
1414
name: string
1515
path: string
16+
description: string
1617
patterns: Pattern[]
1718
}
1819

@@ -48,6 +49,7 @@ export async function getPatternCategories(locale: string): Promise<PatternCateg
4849
return {
4950
name: category.name,
5051
path: category.path,
52+
description: category.description,
5153
patterns: pages.map(page => {
5254
const iconName = page.frontMatter?.icon
5355
const status = (page.frontMatter?.status as PatternStatus) || 'coming-soon'

app/_utils/get-patterns.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ export async function getPatterns(lang: string): Promise<PatternCategory[]> {
66
return categories.map(category => ({
77
name: category.name,
88
path: category.path,
9+
description: category.description,
910
patterns: category.patterns.sort((a, b) => a.title.localeCompare(b.title))
1011
}))
1112
}

0 commit comments

Comments
 (0)