Adds h-entry data to blog posts
This commit is contained in:
@@ -10,30 +10,41 @@ type Props = CollectionEntry<'blog'>['data'];
|
|||||||
const { title, description, pubDate, updatedDate, heroImage } = Astro.props;
|
const { title, description, pubDate, updatedDate, heroImage } = Astro.props;
|
||||||
---
|
---
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.byline {
|
||||||
|
color: var(--color-gray);
|
||||||
|
margin-bottom: 1em;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
<RootLayout title={title} description={description}>
|
<RootLayout title={title} description={description}>
|
||||||
<main>
|
<main>
|
||||||
<NotchedBox fillNotches="left">
|
<NotchedBox fillNotches="left">
|
||||||
<article>
|
<article class="h-entry">
|
||||||
<div class="hero-image">
|
<div class="hero-image">
|
||||||
{heroImage && <Image width={1020} height={510} src={heroImage} alt="" />}
|
{heroImage && <Image width={1020} height={510} src={heroImage} alt="" />}
|
||||||
</div>
|
</div>
|
||||||
<div class="prose">
|
<div class="prose">
|
||||||
<div class="title">
|
<div class="byline">
|
||||||
<div class="date">
|
<time class="dt-published">{ pubDate && <FormattedDate date={pubDate} /> }</time>
|
||||||
{ pubDate && <FormattedDate date={pubDate} /> }
|
<div>
|
||||||
|
by <span class="p-author">Periodic</span>
|
||||||
|
</div>
|
||||||
{
|
{
|
||||||
updatedDate && (
|
updatedDate && (
|
||||||
<div class="last-updated-on">
|
<div class="last-updated-on dt-updated">
|
||||||
Last updated on <FormattedDate date={updatedDate} />
|
Last updated on <FormattedDate date={updatedDate} />
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
<h1>{title}</h1>
|
<div class="title">
|
||||||
|
<h1 class="p-name">{title}</h1>
|
||||||
<hr />
|
<hr />
|
||||||
</div>
|
</div>
|
||||||
|
<div class="e-content">
|
||||||
<slot />
|
<slot />
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</article>
|
</article>
|
||||||
</NotchedBox>
|
</NotchedBox>
|
||||||
</main>
|
</main>
|
||||||
|
|||||||
Reference in New Issue
Block a user