| 1 | import type { Metadata } from "next"; |
| 2 | import Link from "next/link |
| 3 | import { Ghost } |
| 4 | |
| 5 | import { Markdown } |
| 6 | import { ThemePicker } |
| 7 | |
| 8 | import { CHANGELOG, DESCRIPTION |
| 9 | |
| 10 | export const metadata: |
| 11 | title: "Changelog", |
| 12 | description: DESCRIPTION, |
| 13 | alternates: { canonical: " |
| 14 | openGraph: { |
| 15 | title: "Changelog", |
| 16 | description: DESCRIPTION, |
| 17 | url: "/changelog", |
| 18 | }, |
| 19 | }; |
| 20 | |
| 21 | export default function ChangelogPage |
| 22 | return ( |
| 23 | <div className="flex min-h-full flex-col |
| 24 | <nav |
| 25 | aria-label="Primary" |
| 26 | className="mx-auto flex w-full max-w-3xl items-center px-5 py-4 md:px-10 md:py-6" |
| 27 | > |
| 28 | <Link |
| 29 | href="/" |
| 30 | className="mr-auto flex items-center gap-2.5 text-lg font-semibold tracking-tight" |
| 31 | > |
| 32 | <Ghost className=" |
| 33 | Ghost |
| 34 | </Link> |
| 35 | <ThemePicker /> |
| 36 | </nav> |
| 37 | |
| 38 | <main className="mx-auto flex w-full max-w-3xl flex-col gap-12 px-5 pt-8 pb-24 md:px-10 md:pt-16 |
| 39 | <header className="flex flex-col gap-3 |
| 40 | <h1 className="text-4xl font-semibold tracking-[-0.04em] md:text-5xl |
| 41 | Changelog |
| 42 | </h1> |
| 43 | <p className="text-muted-foreground md:text-lg |
| 44 | </header> |
| 45 | |
| 46 | {[...Map.groupBy |
| 47 | ([date, entries |
| 48 | <section |
| 49 | key={date} |
| 50 | id={date} |
| 51 | className="flex flex-col gap-6 border-t pt-8 md:flex-row md:gap-10" |
| 52 | > |
| 53 | <h2 className="shrink-0 text-sm font-medium text-muted-foreground md:w-40 |
| 54 | <a href={` |
| 55 | <time dateTime={date |
| 56 | </a> |
| 57 | </h2> |
| 58 | <div className="flex min-w-0 flex-col gap-8 |
| 59 | {entries.map(( |
| 60 | <article key={title |
| 61 | <h3 className="text-xl font-semibold tracking-[-0.02em] |
| 62 | {title} |
| 63 | </h3> |
| 64 | <Markdown className=" |
| 65 | {body} |
| 66 | </Markdown> |
| 67 | </article> |
| 68 | ))} |
| 69 | </div> |
| 70 | </section> |
| 71 | ), |
| 72 | )} |
| 73 | </main> |
| 74 | </div> |
| 75 | ); |
| 76 | } |