| 1 | import { allChangelogs } from 'content-collections' |
| 2 | import { format } |
| 3 | import type { Metadata |
| 4 | import Image from 'next/image |
| 5 | import Link from 'next/link |
| 6 | import { createMetadata } |
| 7 | |
| 8 | export const metadata: |
| 9 | title: 'All Changelogs', |
| 10 | description: 'Every release, improvement, and fix shipped to Saturn.', |
| 11 | openGraph: { |
| 12 | images: `/api/og?page=${encodeURIComponent |
| 13 | }, |
| 14 | twitter: { |
| 15 | images: `/api/og?page=${encodeURIComponent |
| 16 | }, |
| 17 | }) |
| 18 | |
| 19 | export default function ChangelogsGridPage |
| 20 | const entries = |
| 21 | |
| 22 | return ( |
| 23 | <main className='mx-auto w-full max-w-6xl px-6 pt-16 pb-24 sm:pt-20 |
| 24 | <header className='mb-14 |
| 25 | <div className='font-mono text-[11px] text-muted-foreground uppercase tracking-[0.18em] |
| 26 | / changelogs |
| 27 | </div> |
| 28 | <h1 className='mt-3 font-semibold text-4xl text-foreground tracking-[-0.03em] sm:text-5xl |
| 29 | Every release, shipped. |
| 30 | </h1> |
| 31 | <p className='mt-4 max-w-xl text-lg text-muted-foreground |
| 32 | Every improvement, fix, and feature shipped to Saturn. |
| 33 | </p> |
| 34 | </header> |
| 35 | |
| 36 | <ul className='grid grid-cols-1 gap-x-8 gap-y-12 sm:grid-cols-2 lg:grid-cols-3 |
| 37 | {entries.map(( |
| 38 | const ogUrl = |
| 39 | return ( |
| 40 | <li key={entry |
| 41 | <Link className=' |
| 42 | <div className='relative aspect-[1200/630] w-full overflow-hidden rounded-xl border border-border/60 bg-card |
| 43 | <Image |
| 44 | alt={entry.title |
| 45 | className='object-cover' |
| 46 | fill |
| 47 | sizes='(max-width: 768px) 100vw, (max-width: 1024px) 50vw, 33vw' |
| 48 | src={ogUrl} |
| 49 | unoptimized |
| 50 | /> |
| 51 | <div |
| 52 | aria-hidden |
| 53 | className='pointer-events-none absolute inset-x-0 top-0 h-20 bg-gradient-to-b from-black/50 to-transparent' |
| 54 | /> |
| 55 | <div className='absolute bottom-3 left-3 flex items-center gap-2 font-mono text-[10px] text-white/90 uppercase tracking-[0.14em] |
| 56 | <time dateTime={entry |
| 57 | {format(new Date |
| 58 | </time> |
| 59 | {entry.version ? |
| 60 | <> |
| 61 | <span className='h-1 w-1 rounded-full bg-white/50 |
| 62 | <span>v{entry. |
| 63 | </> |
| 64 | ) : null} |
| 65 | </div> |
| 66 | </div> |
| 67 | <div className='mt-4 |
| 68 | <h2 className='font-medium text-foreground text-lg tracking-tight transition-colors group-hover:text-primary |
| 69 | {entry.title} |
| 70 | </h2> |
| 71 | <p className='mt-1.5 line-clamp-2 text-muted-foreground text-sm leading-relaxed |
| 72 | {entry.description} |
| 73 | </p> |
| 74 | </div> |
| 75 | </Link> |
| 76 | </li> |
| 77 | ) |
| 78 | })} |
| 79 | </ul> |
| 80 | </main> |
| 81 | ) |
| 82 | } |