@@ -13,7 +13,7 @@ export async function generateMetadata({
1313 const { domain, slug } = params ;
1414 const data = await getPostData ( domain , slug ) ;
1515 if ( ! data ) {
16- notFound ( ) ;
16+ return null ;
1717 }
1818 const { title, description } = data ;
1919
@@ -47,15 +47,15 @@ export default async function SitePostPage({
4747
4848 return (
4949 < >
50- < div className = "flex flex-col justify -center items -center" >
51- < div className = "text-center w-full md:w-7/12 m-auto " >
52- < p className = "text-sm md: text-base font-light text-gray-500 w-10/12 m-auto my-5 " >
50+ < div className = "flex flex-col items -center justify -center" >
51+ < div className = "m-auto w-full text-center md:w-7/12" >
52+ < p className = "m-auto my-5 w-10/12 text-sm font-light text-gray-500 md:text-base " >
5353 { toDateString ( data . createdAt ) }
5454 </ p >
55- < h1 className = "font-bold text-3xl font-title md: text-6xl mb-10 text-gray-800" >
55+ < h1 className = "mb-10 font-title text-3xl font-bold text-gray-800 md:text-6xl " >
5656 { data . title }
5757 </ h1 >
58- < p className = "text-md md:text-lg text-gray-600 w-10/12 m-auto " >
58+ < p className = "text-md m-auto w-10/12 text-gray-600 md:text-lg " >
5959 { data . description }
6060 </ p >
6161 </ div >
@@ -70,7 +70,7 @@ export default async function SitePostPage({
7070 target = "_blank"
7171 >
7272 < div className = "my-8" >
73- < div className = "relative w-8 h-8 md:w-12 md:h-12 rounded-full overflow-hidden inline-block align-middle " >
73+ < div className = "relative inline-block h-8 w-8 overflow-hidden rounded-full align-middle md:h-12 md:w-12 " >
7474 { data . site ?. user ?. image ? (
7575 < BlurImage
7676 alt = { data . site ?. user ?. name ?? "User Avatar" }
@@ -79,23 +79,23 @@ export default async function SitePostPage({
7979 width = { 80 }
8080 />
8181 ) : (
82- < div className = "absolute flex items-center justify-center w-full h-full bg-gray-100 text -gray-500 text-4xl select-none " >
82+ < div className = "absolute flex h-full w-full select-none items-center justify-center bg -gray-100 text-4xl text-gray-500 " >
8383 ?
8484 </ div >
8585 ) }
8686 </ div >
87- < div className = "inline-block text-md md:text-lg align-middle ml-3 " >
87+ < div className = "text-md ml-3 inline-block align-middle md:text-lg " >
8888 by < span className = "font-semibold" > { data . site ?. user ?. name } </ span >
8989 </ div >
9090 </ div >
9191 </ a >
9292 </ div >
93- < div className = "relative h-80 md:h-150 w-full max-w-screen-lg lg:w-2/3 md:w-5/6 m-auto mb-10 md:mb-20 md:rounded-2xl overflow-hidden " >
93+ < div className = "relative m-auto mb-10 h-80 w-full max-w-screen-lg overflow-hidden md:mb-20 md:h-150 md:w-5/6 md:rounded-2xl lg:w-2/3 " >
9494 < BlurImage
9595 alt = { data . title ?? "Post image" }
9696 width = { 1200 }
9797 height = { 630 }
98- className = "w -full h -full object-cover"
98+ className = "h -full w -full object-cover"
9999 placeholder = "blur"
100100 blurDataURL = { data . imageBlurhash ?? placeholderBlurhash }
101101 src = { data . image ?? "/placeholder.png" }
@@ -105,22 +105,22 @@ export default async function SitePostPage({
105105 < MDX source = { data . mdxSource } />
106106
107107 { data . adjacentPosts . length > 0 && (
108- < div className = "relative mt-10 sm:mt-20 mb -20" >
108+ < div className = "relative mb-20 mt-10 sm:mt-20" >
109109 < div
110110 className = "absolute inset-0 flex items-center"
111111 aria-hidden = "true"
112112 >
113113 < div className = "w-full border-t border-gray-300" />
114114 </ div >
115115 < div className = "relative flex justify-center" >
116- < span className = "px-2 bg-white text-sm text-gray-500" >
116+ < span className = "bg-white px-2 text-sm text-gray-500" >
117117 Continue Reading
118118 </ span >
119119 </ div >
120120 </ div >
121121 ) }
122122 { data . adjacentPosts && (
123- < div className = "grid grid-cols-1 md: grid-cols-2 xl: grid-cols-3 gap-x-4 gap-y-8 mx-5 lg:mx-12 2xl:mx-auto mb-20 max-w-screen-xl " >
123+ < div className = "mx-5 mb-20 grid max-w-screen-xl grid-cols-1 gap-x-4 gap-y-8 md:grid-cols-2 lg:mx-12 xl:grid-cols-3 2xl:mx-auto " >
124124 { data . adjacentPosts . map ( ( data , index ) => (
125125 < BlogCard key = { index } data = { data } />
126126 ) ) }
0 commit comments