11import type { Metadata } from 'next'
22import Link from 'next/link'
3+ import { Badge } from '@/components/emcn'
34import { getAllPostMeta } from '@/lib/blog/registry'
4- import { PostGrid } from '@/app/(landing)/blog/post-grid'
55
66export const metadata : Metadata = {
77 title : 'Blog' ,
@@ -34,8 +34,9 @@ export default async function BlogIndex({
3434 const totalPages = Math . max ( 1 , Math . ceil ( sorted . length / perPage ) )
3535 const start = ( pageNum - 1 ) * perPage
3636 const posts = sorted . slice ( start , start + perPage )
37- // Tag filter chips are intentionally disabled for now.
38- // const tags = await getAllTags()
37+ const featured = pageNum === 1 ? posts . slice ( 0 , 3 ) : [ ]
38+ const remaining = pageNum === 1 ? posts . slice ( 3 ) : posts
39+
3940 const blogJsonLd = {
4041 '@context' : 'https://schema.org' ,
4142 '@type' : 'Blog' ,
@@ -45,54 +46,154 @@ export default async function BlogIndex({
4546 }
4647
4748 return (
48- < main className = 'mx-auto max-w-[1200px] px-6 py-12 sm:px-8 md:px-12 ' >
49+ < section className = 'bg-[var(--landing-bg)] ' >
4950 < script
5051 type = 'application/ld+json'
5152 dangerouslySetInnerHTML = { { __html : JSON . stringify ( blogJsonLd ) } }
5253 />
53- < h1 className = 'mb-3 text-balance font-[500] text-[40px] text-[var(--landing-text)] leading-tight sm:text-[56px]' >
54- Blog
55- </ h1 >
56- < p className = 'mb-10 text-[var(--landing-text-muted)] text-lg' >
57- Announcements, insights, and guides for building AI agent workflows.
58- </ p >
59-
60- { /* Tag filter chips hidden until we have more posts */ }
61- { /* <div className='mb-10 flex flex-wrap gap-3'>
62- <Link href='/blog' className={`rounded-full border px-3 py-1 text-sm ${!tag ? 'border-black bg-black text-white' : 'border-gray-300'}`}>All</Link>
63- {tags.map((t) => (
64- <Link key={t.tag} href={`/blog?tag=${encodeURIComponent(t.tag)}`} className={`rounded-full border px-3 py-1 text-sm ${tag === t.tag ? 'border-black bg-black text-white' : 'border-gray-300'}`}>
65- {t.tag} ({t.count})
66- </Link>
67- ))}
68- </div> */ }
6954
70- { /* Grid layout for consistent rows */ }
71- < PostGrid posts = { posts } />
55+ { /* Section header */ }
56+ < div className = 'px-5 pt-[60px] lg:px-16 lg:pt-[100px]' >
57+ < Badge
58+ variant = 'blue'
59+ size = 'md'
60+ dot
61+ className = 'mb-5 bg-white/10 font-season text-white uppercase tracking-[0.02em]'
62+ >
63+ Blog
64+ </ Badge >
7265
73- { totalPages > 1 && (
74- < div className = 'mt-10 flex items-center justify-center gap-3' >
75- { pageNum > 1 && (
76- < Link
77- href = { `/blog?page=${ pageNum - 1 } ${ tag ? `&tag=${ encodeURIComponent ( tag ) } ` : '' } ` }
78- className = 'rounded-[5px] border border-[var(--landing-border-strong)] px-3 py-1 text-[var(--landing-text)] text-sm transition-colors hover:bg-[var(--landing-bg-elevated)]'
79- >
80- Previous
81- </ Link >
82- ) }
83- < span className = 'text-[var(--landing-text-muted)] text-sm' >
84- Page { pageNum } of { totalPages }
85- </ span >
86- { pageNum < totalPages && (
66+ < div className = 'flex flex-col gap-4 md:flex-row md:items-end md:justify-between' >
67+ < h1 className = 'text-balance font-[430] font-season text-[28px] text-white leading-[100%] tracking-[-0.02em] lg:text-[40px]' >
68+ Latest from Sim
69+ </ h1 >
70+ < p className = 'max-w-[360px] font-[430] font-season text-[#F6F6F0]/50 text-sm leading-[150%] tracking-[0.02em] lg:text-base' >
71+ Announcements, insights, and guides for building AI agent workflows.
72+ </ p >
73+ </ div >
74+ </ div >
75+
76+ { /* Full-width top line */ }
77+ < div className = 'mt-8 h-px w-full bg-[var(--landing-bg-elevated)]' />
78+
79+ { /* Content area with vertical border rails */ }
80+ < div className = 'mx-5 border-[var(--landing-bg-elevated)] border-x lg:mx-16' >
81+ { /* Featured posts */ }
82+ { featured . length > 0 && (
83+ < >
84+ < div className = 'flex' >
85+ { featured . map ( ( p , index ) => (
86+ < Link
87+ key = { p . slug }
88+ href = { `/blog/${ p . slug } ` }
89+ className = 'group flex flex-1 flex-col gap-4 border-[var(--landing-bg-elevated)] p-6 transition-colors hover:bg-[var(--landing-bg-elevated)] md:border-l md:first:border-l-0'
90+ >
91+ < div className = 'relative aspect-video w-full overflow-hidden rounded-[5px]' >
92+ < img
93+ src = { p . ogImage }
94+ alt = { p . title }
95+ className = 'h-full w-full object-cover'
96+ loading = { index < 3 ? 'eager' : 'lazy' }
97+ />
98+ </ div >
99+ < div className = 'flex flex-col gap-2' >
100+ < span className = 'font-martian-mono text-[var(--landing-text-subtle)] text-xs uppercase tracking-[0.1em]' >
101+ { new Date ( p . date ) . toLocaleDateString ( 'en-US' , {
102+ month : 'short' ,
103+ year : '2-digit' ,
104+ } ) }
105+ </ span >
106+ < h3 className = 'font-[430] font-season text-lg text-white leading-tight tracking-[-0.01em]' >
107+ { p . title }
108+ </ h3 >
109+ < p className = 'line-clamp-2 text-[#F6F6F0]/50 text-sm leading-[150%]' >
110+ { p . description }
111+ </ p >
112+ </ div >
113+ </ Link >
114+ ) ) }
115+ </ div >
116+
117+ < div className = 'h-px w-full bg-[var(--landing-bg-elevated)]' />
118+ </ >
119+ ) }
120+
121+ { remaining . map ( ( p ) => (
122+ < div key = { p . slug } >
87123 < Link
88- href = { `/blog?page= ${ pageNum + 1 } ${ tag ? `&tag= ${ encodeURIComponent ( tag ) } ` : '' } ` }
89- className = 'rounded-[5px] border border-[var(--landing-border-strong)] px-3 py-1 text-[var(--landing-text)] text-sm transition-colors hover:bg-[var(--landing-bg-elevated)]'
124+ href = { `/blog/ ${ p . slug } ` }
125+ className = 'group flex items-start gap-6 px-6 py-6 transition-colors hover:bg-[var(--landing-bg-elevated)] md:items-center '
90126 >
91- Next
127+ { /* Date */ }
128+ < span className = 'hidden w-[120px] shrink-0 pt-1 font-martian-mono text-[var(--landing-text-subtle)] text-xs uppercase tracking-[0.1em] md:block' >
129+ { new Date ( p . date ) . toLocaleDateString ( 'en-US' , {
130+ month : 'short' ,
131+ day : 'numeric' ,
132+ year : 'numeric' ,
133+ } ) }
134+ </ span >
135+
136+ { /* Title + description */ }
137+ < div className = 'flex min-w-0 flex-1 flex-col gap-1' >
138+ < span className = 'font-martian-mono text-[var(--landing-text-subtle)] text-xs uppercase tracking-[0.1em] md:hidden' >
139+ { new Date ( p . date ) . toLocaleDateString ( 'en-US' , {
140+ month : 'short' ,
141+ day : 'numeric' ,
142+ year : 'numeric' ,
143+ } ) }
144+ </ span >
145+ < h3 className = 'font-[430] font-season text-base text-white leading-tight tracking-[-0.01em] lg:text-lg' >
146+ { p . title }
147+ </ h3 >
148+ < p className = 'line-clamp-2 text-[#F6F6F0]/40 text-sm leading-[150%]' >
149+ { p . description }
150+ </ p >
151+ </ div >
152+
153+ { /* Image */ }
154+ < div className = 'hidden h-[80px] w-[140px] shrink-0 overflow-hidden rounded-[5px] sm:block' >
155+ < img
156+ src = { p . ogImage }
157+ alt = { p . title }
158+ className = 'h-full w-full object-cover'
159+ loading = 'lazy'
160+ />
161+ </ div >
92162 </ Link >
93- ) }
94- </ div >
95- ) }
96- </ main >
163+ < div className = 'h-px w-full bg-[var(--landing-bg-elevated)]' />
164+ </ div >
165+ ) ) }
166+
167+ { /* Pagination */ }
168+ { totalPages > 1 && (
169+ < div className = 'px-6 py-8' >
170+ < div className = 'flex items-center justify-center gap-3' >
171+ { pageNum > 1 && (
172+ < Link
173+ href = { `/blog?page=${ pageNum - 1 } ${ tag ? `&tag=${ encodeURIComponent ( tag ) } ` : '' } ` }
174+ className = 'rounded-[5px] border border-[var(--landing-border-strong)] px-3 py-1 text-[var(--landing-text)] text-sm transition-colors hover:bg-[var(--landing-bg-elevated)]'
175+ >
176+ Previous
177+ </ Link >
178+ ) }
179+ < span className = 'text-[var(--landing-text-muted)] text-sm' >
180+ Page { pageNum } of { totalPages }
181+ </ span >
182+ { pageNum < totalPages && (
183+ < Link
184+ href = { `/blog?page=${ pageNum + 1 } ${ tag ? `&tag=${ encodeURIComponent ( tag ) } ` : '' } ` }
185+ className = 'rounded-[5px] border border-[var(--landing-border-strong)] px-3 py-1 text-[var(--landing-text)] text-sm transition-colors hover:bg-[var(--landing-bg-elevated)]'
186+ >
187+ Next
188+ </ Link >
189+ ) }
190+ </ div >
191+ </ div >
192+ ) }
193+ </ div >
194+
195+ { /* Full-width bottom line — overlaps last inner divider to avoid double border */ }
196+ < div className = '-mt-px h-px w-full bg-[var(--landing-bg-elevated)]' />
197+ </ section >
97198 )
98199}
0 commit comments