blob: 188aae1610a7edcf57399da60a1908b0b6687f49 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
---
import FormattedDate from '@components/base/FormattedDate.astro';
import '@styles/blog.css';
import type { CollectionEntry } from 'astro:content';
import Layout from './Layout.astro';
type Props = CollectionEntry<'blog'>['data'];
const { title, description, pubDate, updatedDate, heroImage } = Astro.props;
---
<Layout title={title} description={description}>
<article>
<div class="hero-image">
{heroImage && <img width={1020} height={510} src={heroImage} alt="Hero Image"/>}
</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>
</Layout>
|