52 lines
No EOL
1.4 KiB
Text
52 lines
No EOL
1.4 KiB
Text
---
|
|
|
|
import "../styles/global.css";
|
|
|
|
import Header from "../components/Header.astro";
|
|
import Footer from "../components/Footer.astro";
|
|
import Metadata from "../components/Metadata.astro";
|
|
|
|
import FormattedDate from '../components/FormattedDate.astro';
|
|
import type { CollectionEntry } from 'astro:content';
|
|
|
|
type Props = CollectionEntry<'blog'>['data'];
|
|
|
|
const { title, description, pubDate, updatedDate, heroImage } = Astro.props;
|
|
---
|
|
|
|
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<Metadata />
|
|
<title>Blog Post</title>
|
|
<body>
|
|
<Header />
|
|
<main>
|
|
<h1>Blog Post</h1>
|
|
<article>
|
|
<div class="hero-image">
|
|
{heroImage && <img 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>
|
|
</main>
|
|
<Footer />
|
|
</body>
|
|
</html> |