11import { createMetadata } from "@doc" ;
22import GithubSlugger from "github-slugger" ;
3- import { PlusIcon } from "lucide-react" ;
43import Link from "next/link" ;
54import ReactHtmlParser from "react-html-parser" ;
65import { Heading } from "@/components/Document" ;
7- import { Author } from "./components/Author" ;
8- import { ChangelogIndexTOC } from "./components/ChangeLogIndexTOC" ;
96import { RenderDate } from "./components/RenderData" ;
107import { fetchChangeLogs , fetchPost } from "./ghost" ;
118import { transform } from "./utils/transform" ;
@@ -23,12 +20,15 @@ export const metadata = createMetadata({
2320
2421export default async function Page ( ) {
2522 return (
26- < main className = "container" data-noindex >
27- < div className = "flex justify-between gap-16 " >
28- < div className = "w-full max-w-[850px] grow-0 " >
29- < PageContent / >
23+ < main data-noindex >
24+ < div className = "border-b py-12 border-dashed " >
25+ < div className = "container " >
26+ < h1 className = "font-semibold text-4xl tracking-tight" > Changelog </ h1 >
3027 </ div >
31- < ChangelogIndexTOC />
28+ </ div >
29+
30+ < div className = "container" >
31+ < PageContent />
3232 </ div >
3333 </ main >
3434 ) ;
@@ -39,53 +39,48 @@ async function PageContent() {
3939 const slugger = new GithubSlugger ( ) ;
4040
4141 return (
42- < div className = "changelog-page py-6" >
43- < h1 className = "mb-10 font-semibold text-3xl tracking-tighter" >
44- Changelog
45- </ h1 >
46-
47- < div className = "flex flex-col gap-10 xl:border-l-2 xl:pl-12" >
42+ < div className = "changelog-page overflow-hidden" >
43+ < div className = "flex flex-col gap-10 xl:border-l border-dashed xl:pl-16 max-w-4xl ml-auto pb-20" >
4844 { posts . map ( ( post ) => {
4945 return (
50- < div className = "relative pb -10" key = { post . id } >
51- < div className = "mb-2 flex items-center gap-5" >
46+ < div className = "relative pt -10" key = { post . id } >
47+ < div className = "-left-16 -translate-x-full absolute top-12 hidden xl:flex gap-5 ml-3 items-center " >
5248 { post . published_at && (
53- < RenderDate className = "text-base" iso = { post . published_at } />
49+ < div className = "hidden xl:block text-sm text-muted-foreground" >
50+ < RenderDate iso = { post . published_at } />
51+ </ div >
5452 ) }
55- < div className = "flex gap-5" >
56- { post . authors ?. map ( ( author ) => {
57- return (
58- < Author
59- key = { author . id }
60- name = { author . name || "" }
61- profileImage = { author . profile_image }
62- />
63- ) ;
64- } ) }
53+ < div className = "size-6 rounded-[50%] border bg-background flex items-center justify-center" >
54+ < div className = "size-2 bg-blue-500 rounded-full" />
6555 </ div >
6656 </ div >
6757
68- < div className = "-left-12 -translate-x-1/2 absolute top-12 hidden size-7 items-center justify-center rounded-[50%] bg-foreground md:size-10 xl:flex" >
69- < PlusIcon className = "size-6 text-background" />
70- </ div >
71-
7258 < div >
73- < Heading
74- anchorClassName = "[&>a]:hidden m-0 border-b pb-5 mb-5"
75- anchorId = { slugger . slug ( post . title || "" ) }
76- // eslint-disable-next-line tailwindcss/no-custom-classname
77- className = "changelog-title"
78- level = { 2 }
79- >
80- < Link
81- className = "!text-foreground font-bold text-3xl tracking-tighter hover:underline md:text-4xl xl:text-5xl"
82- href = { `/changelog/${ post . slug } ` }
83- >
84- { post . title }
85- </ Link >
86- </ Heading >
59+ { post . published_at && (
60+ < div className = "xl:hidden inline-flex rounded-full border px-3 py-2 mb-4 text-muted-foreground text-xs bg-card" >
61+ < RenderDate iso = { post . published_at } />
62+ </ div >
63+ ) }
8764
88- < RenderChangelogContent slug = { post . slug } />
65+ < div className = "space-y-3 mb-5" >
66+ < Heading
67+ anchorClassName = "[&>a]:hidden m-0"
68+ anchorId = { slugger . slug ( post . title || "" ) }
69+ // eslint-disable-next-line tailwindcss/no-custom-classname
70+ className = "changelog-title"
71+ level = { 2 }
72+ >
73+ < Link
74+ className = "!text-foreground font-semibold text-3xl md:text-4xl tracking-tight hover:underline !leading-tight"
75+ href = { `/changelog/${ post . slug } ` }
76+ >
77+ { post . title }
78+ </ Link >
79+ </ Heading >
80+ </ div >
81+ < div className = "text-muted-foreground" >
82+ < RenderChangelogContent slug = { post . slug } />
83+ </ div >
8984 </ div >
9085 </ div >
9186 ) ;
0 commit comments