style: refine mdx prose math and images

This commit is contained in:
opencode
2026-06-03 11:30:13 -05:00
parent d223c5f512
commit f2b88f1130
3 changed files with 175 additions and 23 deletions

View File

@@ -37,7 +37,7 @@ export default async function PostPage({ params }: { params: Promise<{ slug: str
<ReadingProgress />
<div className="max-w-4xl mx-auto px-6 py-16">
<div className="grid grid-cols-1 lg:grid-cols-[1fr_200px] gap-8">
<article>
<article className="min-w-0">
<header className="mb-12">
<time className="font-mono text-sm text-ink-soft" dateTime={post.date}>{new Date(post.date).toLocaleDateString('en-US', { year: 'numeric', month: 'short', day: 'numeric' })}</time>
<h1 className="heading-xl text-ink mt-3 mb-2">
@@ -50,9 +50,11 @@ export default async function PostPage({ params }: { params: Promise<{ slug: str
{post.coverImage && (
<img
src={post.coverImage}
alt={`Cover image for ${post.title}`}
className="w-full h-64 object-cover rounded-xl my-6"
loading="lazy"
alt={`Featured image for article: ${post.title}`}
className="my-8 aspect-[16/9] w-full rounded-2xl border border-border bg-surface object-cover shadow-card"
loading="eager"
decoding="async"
fetchPriority="high"
/>
)}
{post.tags.length > 0 && (
@@ -65,7 +67,7 @@ export default async function PostPage({ params }: { params: Promise<{ slug: str
</div>
)}
</header>
<div className="prose prose-lg max-w-none">
<div className="prose prose-lg max-w-none min-w-0">
<PostContent />
</div>
</article>