@@ -50,54 +50,89 @@ export function BlogSidebar({ posts }: BlogSidebarProps) {
5050 : posts . filter ( ( post ) => post . data . category === selectedCategory )
5151
5252 return (
53- < main className = "container mx-auto my-12 space-y-10" >
54- < div className = "mx-auto flex w-full gap-16 px-8" >
55- < aside className = "w-48 flex-shrink-0" >
56- < h1 className = "text-5xl font-semibold tracking-tight" > Blog</ h1 >
57- < nav className = "mt-12 flex flex-col space-y-4 text-sm uppercase text-neutral-500" >
58- { categories . map ( ( category ) => (
59- < button
60- key = { category }
61- onClick = { ( ) => setSelectedCategory ( category ) }
62- className = { `flex items-center gap-2 text-left transition-colors hover:text-white uppercase text-md ${
63- selectedCategory === category ? "text-white" : ""
64- } `}
65- >
66- { getCategoryIcon ( category ) }
67- { category }
68- </ button >
69- ) ) }
70- </ nav >
71- </ aside >
72- < div className = "flex flex-1 flex-col space-y-6 mt-22" >
73- { filteredPosts . map ( ( post ) => (
74- < Link href = { post . data . url } key = { post . path } className = "border border-white/20 p-4" >
75- < article className = "group" >
76- < div className = "flex flex-col space-y-3 p-6 transition-colors group-hover:border-white/20" >
77- < h2 className = "text-2xl font-semibold text-white group-hover:text-white/90" >
78- { post . data . title }
79- </ h2 >
80- < p className = "text-sm text-neutral-400" > { post . data . description } </ p >
81- < p className = "text-xs uppercase tracking-wide text-neutral-500 flex items-center gap-2" >
82- { getCategoryIcon ( post . data . category ?? "All Posts" ) } { post . data . category } ·{ " " }
83- { new Date (
84- ( typeof post . data . date === "string"
85- ? post . data . date
86- : post . data . date ?. toISOString ( ) ) ??
87- post . path . split ( "/" ) . pop ( ) ?. replace ( ".mdx" , "" ) ??
88- "" ,
89- ) . toLocaleDateString ( "en-US" , {
90- month : "short" ,
91- day : "numeric" ,
92- year : "numeric" ,
93- } ) }
94- </ p >
95- </ div >
96- </ article >
97- </ Link >
98- ) ) }
53+ < >
54+ < header className = "border-b border-fd-border" >
55+ < div className = "container mx-auto px-4 py-12 md:py-16" >
56+ < div className = "mx-auto max-w-7xl" >
57+ < h1 className = "text-4xl font-bold tracking-tight text-fd-foreground md:text-5xl" >
58+ Blog
59+ </ h1 >
60+ < p className = "mt-4 text-lg leading-relaxed text-fd-muted-foreground" >
61+ Updates, devlogs, and notes from the team.
62+ </ p >
63+ </ div >
9964 </ div >
100- </ div >
101- </ main >
65+ </ header >
66+
67+ < main className = "container mx-auto px-4 py-10" >
68+ < div className = "mx-auto max-w-7xl" >
69+ < div className = "grid gap-10 lg:grid-cols-[minmax(0,1fr)_280px]" >
70+ < section className = "space-y-4" >
71+ { filteredPosts . map ( ( post ) => (
72+ < Link
73+ href = { post . data . url }
74+ key = { post . path }
75+ className = "group block rounded-lg border border-fd-border transition-colors hover:bg-fd-accent/10"
76+ >
77+ < article className = "p-6" >
78+ < h2 className = "text-2xl font-semibold text-fd-foreground group-hover:text-fd-foreground/90" >
79+ { post . data . title }
80+ </ h2 >
81+ { post . data . description && (
82+ < p className = "mt-2 text-sm text-fd-muted-foreground" >
83+ { post . data . description }
84+ </ p >
85+ ) }
86+ < div className = "mt-4 flex flex-wrap items-center gap-3 text-xs uppercase tracking-wider text-fd-muted-foreground" >
87+ < span className = "inline-flex items-center gap-2" >
88+ { getCategoryIcon ( post . data . category ?? "All Posts" ) } { " " }
89+ { post . data . category ?? "other" }
90+ </ span >
91+ < div className = "h-3 w-px bg-fd-border" />
92+ < time >
93+ { new Date (
94+ ( typeof post . data . date === "string"
95+ ? post . data . date
96+ : post . data . date ?. toISOString ( ) ) ??
97+ post . path . split ( "/" ) . pop ( ) ?. replace ( ".mdx" , "" ) ??
98+ "" ,
99+ ) . toLocaleDateString ( "en-US" , {
100+ month : "long" ,
101+ day : "numeric" ,
102+ year : "numeric" ,
103+ } ) }
104+ </ time >
105+ </ div >
106+ </ article >
107+ </ Link >
108+ ) ) }
109+ </ section >
110+
111+ < aside className = "hidden lg:block" >
112+ < div className = "sticky top-24 rounded-lg border border-fd-border p-4" >
113+ < h3 className = "mb-3 text-xs font-semibold uppercase tracking-wider text-fd-secondary-foreground" >
114+ Filter
115+ </ h3 >
116+ < nav className = "space-y-4 text-sm uppercase text-fd-muted-foreground" >
117+ { categories . map ( ( category ) => (
118+ < button
119+ key = { category }
120+ type = "button"
121+ onClick = { ( ) => setSelectedCategory ( category ) }
122+ className = { `flex items-center gap-2 text-left transition-colors hover:text-fd-foreground uppercase text-md ${
123+ selectedCategory === category ? "text-fd-foreground" : ""
124+ } `}
125+ >
126+ { getCategoryIcon ( category ) }
127+ { category }
128+ </ button >
129+ ) ) }
130+ </ nav >
131+ </ div >
132+ </ aside >
133+ </ div >
134+ </ div >
135+ </ main >
136+ </ >
102137 )
103138}
0 commit comments