@@ -7,6 +7,7 @@ import Tags from "@components/Tags.astro";
77
88export async function getStaticPaths() {
99 const ideas = await getCollection (" ideas" );
10+
1011 return ideas .map (idea => {
1112 let slug = idea .filePath
1213 slug = slug ?.replace (/ ^ idea\/ / , " " );
@@ -24,20 +25,32 @@ const { Content } = await render(idea);
2425
2526<Layout >
2627 <Drawer >
27- <div class =" flex flex-col w-full items-center" >
28- <div class =" flex flex-col w-[960px] min-h-dvh items-center" >
29- <div class =" flex flex-col w-full items-center p-4" >
30- <span class =" text-4xl font-bold text-center" >{ idea .data .title } </span >
31- <div class =" flex flex-row w-full justify-center gap-2 text-xl" >
32- <span >{ idea .data .author } </span >
33- { (idea .data .author && idea .data .pubDate ) ? " |" : " " }
34- <span >{ idea .data .pubDate ?.toDateString ()} </span >
35- </div >
36- <Tags tags ={ idea .data .tags } />
37- </div >
38- <div class =" flex flex-col w-full p-8 prose shadow-lg flex-1" >
39- <Content />
28+ <!-- Container -->
29+ <div class =" flex flex-col w-full min-h-dvh items-center" >
30+ <!-- Spacing -->
31+ <div class =" h-4" ></div >
32+
33+ <!-- Header -->
34+ <div class =" flex flex-col w-3xs items-center sm:w-lg" >
35+ <!-- Author | Date -->
36+ <div class =" hidden sm:flex flex-row w-full justify-center gap-2 text-lg" >
37+ <span >{ idea .data .author } </span >
38+ { (idea .data .author && idea .data .pubDate ) ? " |" : " " }
39+ <span >{ idea .data .pubDate ?.toDateString ()} </span >
4040 </div >
41+
42+ <!-- Title -->
43+ <span class =" text-2xl text-center font-bold sm:text-4xl" >
44+ { idea .data .title }
45+ </span >
46+
47+ <!-- Tags -->
48+ <Tags tags ={ idea .data .tags } class =" text-sm sm:text-lg" />
49+ </div >
50+
51+ <!-- Article -->
52+ <div class =" flex flex-col w-full flex-1 sm:max-w-2xl sm:shadow-lg prose prose-sm sm:prose-lg break-words sm:break-normal p-8" >
53+ <Content />
4154 </div >
4255 </div >
4356 </Drawer >
0 commit comments