maciejpedzi.ch/src/layouts/BlogPost.astro

37 lines
801 B
Plaintext
Raw Normal View History

2023-04-19 19:18:50 +02:00
---
import type { CollectionEntry } from 'astro:content';
2023-04-26 10:23:17 +02:00
2023-04-19 19:18:50 +02:00
import BaseHead from '../components/BaseHead.astro';
import Header from '../components/Header.astro';
import Footer from '../components/Footer.astro';
import FormattedDate from '../components/FormattedDate.astro';
type Props = CollectionEntry<'blog'>['data'];
2023-04-26 10:23:17 +02:00
const { title, description, pubDate } = Astro.props;
2023-04-19 19:18:50 +02:00
---
<html lang="en">
2023-04-26 10:23:17 +02:00
<head>
<BaseHead title={title} description={description} />
2023-04-26 10:23:17 +02:00
<style>
.title {
font-size: 2em;
margin: 0;
text-align: center;
}
</style>
</head>
<body>
<Header />
<main>
<article>
<h1 class="title">{title}</h1>
<FormattedDate date={pubDate} />
<slot />
</article>
</main>
<Footer />
</body>
2023-04-19 19:18:50 +02:00
</html>