@@ -2,6 +2,7 @@ import type { Metadata } from 'next';
22import Link from 'next/link' ;
33import { DOCS_SIDEBAR } from '@/lib/constants' ;
44import { DocsSearchTrigger } from '@/components/docs/DocsSearchTrigger' ;
5+ import { FadeIn } from '@/components/ui/FadeIn' ;
56
67export const metadata : Metadata = {
78 title : 'Documentation' ,
@@ -43,30 +44,31 @@ export default function DocsPage() {
4344 < DocsSearchTrigger />
4445
4546 < div className = "grid gap-6 sm:grid-cols-2 lg:grid-cols-3" >
46- { DOCS_SIDEBAR . map ( ( group ) => (
47- < Link
48- key = { group . category }
49- href = { `/docs/${ group . items [ 0 ] . slug } ` }
50- className = "glass glass-hover block rounded-xl p-6 transition-colors"
51- >
52- < div className = "mb-3 flex h-10 w-10 items-center justify-center rounded-lg bg-accent-indigo/10" >
53- < svg className = "h-5 w-5 text-accent-indigo" fill = "none" viewBox = "0 0 24 24" stroke = "currentColor" strokeWidth = { 1.5 } >
54- < path strokeLinecap = "round" strokeLinejoin = "round" d = { CATEGORY_ICONS [ group . category ] || CATEGORY_ICONS [ 'Core' ] } />
55- </ svg >
56- </ div >
57- < h2 className = "text-lg font-semibold text-white" > { group . category } </ h2 >
58- < p className = "mt-1 text-sm text-zinc-500" >
59- { group . items . length } { group . items . length === 1 ? 'article' : 'articles' }
60- </ p >
61- < ul className = "mt-3 space-y-1" >
62- { group . items . slice ( 0 , 3 ) . map ( ( item ) => (
63- < li key = { item . slug } className = "text-sm text-zinc-400" > { item . label } </ li >
64- ) ) }
65- { group . items . length > 3 && (
66- < li className = "text-sm text-zinc-600" > +{ group . items . length - 3 } more</ li >
67- ) }
68- </ ul >
69- </ Link >
47+ { DOCS_SIDEBAR . map ( ( group , i ) => (
48+ < FadeIn viewport key = { group . category } delay = { i * 0.06 } >
49+ < Link
50+ href = { `/docs/${ group . items [ 0 ] . slug } ` }
51+ className = "glass glass-hover block rounded-xl p-6 transition-colors h-full"
52+ >
53+ < div className = "mb-3 flex h-10 w-10 items-center justify-center rounded-lg bg-accent-indigo/10" >
54+ < svg className = "h-5 w-5 text-accent-indigo" fill = "none" viewBox = "0 0 24 24" stroke = "currentColor" strokeWidth = { 1.5 } >
55+ < path strokeLinecap = "round" strokeLinejoin = "round" d = { CATEGORY_ICONS [ group . category ] || CATEGORY_ICONS [ 'Core' ] } />
56+ </ svg >
57+ </ div >
58+ < h2 className = "text-lg font-semibold text-white" > { group . category } </ h2 >
59+ < p className = "mt-1 text-sm text-zinc-500" >
60+ { group . items . length } { group . items . length === 1 ? 'article' : 'articles' }
61+ </ p >
62+ < ul className = "mt-3 space-y-1" >
63+ { group . items . slice ( 0 , 3 ) . map ( ( item ) => (
64+ < li key = { item . slug } className = "text-sm text-zinc-400" > { item . label } </ li >
65+ ) ) }
66+ { group . items . length > 3 && (
67+ < li className = "text-sm text-zinc-600" > +{ group . items . length - 3 } more</ li >
68+ ) }
69+ </ ul >
70+ </ Link >
71+ </ FadeIn >
7072 ) ) }
7173 </ div >
7274 </ main >
0 commit comments