Files
blazestar.net/src/layouts/BlogPost.astro
2025-06-21 21:51:15 -07:00

41 lines
1.0 KiB
Plaintext

---
import type { CollectionEntry } from 'astro:content';
import RootLayout from '../layouts/RootLayout.astro';
import FormattedDate from '../components/FormattedDate.astro';
import NotchedBox from '../components/NotchedBox.astro';
import { Image } from 'astro:assets';
type Props = CollectionEntry<'blog'>['data'];
const { title, description, pubDate, updatedDate, heroImage } = Astro.props;
---
<RootLayout title={title} description={description}>
<main>
<NotchedBox fillNotches="left">
<article>
<div class="hero-image">
{heroImage && <Image width={1020} height={510} src={heroImage} alt="" />}
</div>
<div class="prose">
<div class="title">
<div class="date">
<FormattedDate date={pubDate} />
{
updatedDate && (
<div class="last-updated-on">
Last updated on <FormattedDate date={updatedDate} />
</div>
)
}
</div>
<h1>{title}</h1>
<hr />
</div>
<slot />
</div>
</article>
</NotchedBox>
</main>
</RootLayout>