From 7a17d4c538adf2169eaa2e29a89a614541b5d722 Mon Sep 17 00:00:00 2001 From: Krishna Ayyalasomayajula Date: Mon, 1 Jun 2026 22:50:10 -0500 Subject: [PATCH] feat: cover image display + date formatting + footer spacing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - PostCard: render coverImage above meta/content with lazy loading - Post detail: render coverImage below title with lazy loading - Format dates via toLocaleDateString (e.g. Jan 15, 2025) - Footer top margin: mt-20 → mt-16 --- app/posts/[slug]/page.tsx | 10 +++++++++- components/blog/PostCard.tsx | 12 +++++++++++- components/layout/Footer.tsx | 2 +- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/app/posts/[slug]/page.tsx b/app/posts/[slug]/page.tsx index 021b3f5..9c5ae53 100644 --- a/app/posts/[slug]/page.tsx +++ b/app/posts/[slug]/page.tsx @@ -44,7 +44,7 @@ export default async function PostPage({ params }: { params: Promise<{ slug: str
- +

{post.title}

@@ -52,6 +52,14 @@ export default async function PostPage({ params }: { params: Promise<{ slug: str {post.author && by {post.author}} {post.readingTime} min read
+ {post.coverImage && ( + {post.title} + )} {post.tags.length > 0 && (
{post.tags.map((tag) => ( diff --git a/components/blog/PostCard.tsx b/components/blog/PostCard.tsx index d199dbc..f9c621d 100644 --- a/components/blog/PostCard.tsx +++ b/components/blog/PostCard.tsx @@ -4,7 +4,7 @@ import Link from 'next/link'; import { m } from 'motion/react'; import type { PostMeta } from '@/lib/posts'; -export function PostCard({ slug, title, date, excerpt, tags = [], author, readingTime, index = 0 }: PostMeta & { index?: number }) { +export function PostCard({ slug, title, date, excerpt, tags = [], author, readingTime, index = 0, coverImage }: PostMeta & { index?: number }) { return ( + {coverImage && ( +
+ {title} +
+ )}
{author && ·} diff --git a/components/layout/Footer.tsx b/components/layout/Footer.tsx index afe4f35..47770f7 100644 --- a/components/layout/Footer.tsx +++ b/components/layout/Footer.tsx @@ -1,6 +1,6 @@ export function Footer() { return ( -