You've already forked zblade.dev
style(blog): move post title and description above meta info
Reorder the header elements in the blog post layout to display the title and description before the publish date and author.
This commit is contained in:
@@ -20,6 +20,8 @@ const { post } = Astro.props;
|
|||||||
|
|
||||||
<div class="post-container">
|
<div class="post-container">
|
||||||
<header class="post-header">
|
<header class="post-header">
|
||||||
|
<h1 class="post-title">{post.data.title}</h1>
|
||||||
|
<p class="post-description">{post.data.description}</p>
|
||||||
<div class="post-meta">
|
<div class="post-meta">
|
||||||
<time datetime={post.data.pubDate.toISOString()}>
|
<time datetime={post.data.pubDate.toISOString()}>
|
||||||
{post.data.pubDate.toLocaleDateString('en-US', {
|
{post.data.pubDate.toLocaleDateString('en-US', {
|
||||||
@@ -34,8 +36,6 @@ const { post } = Astro.props;
|
|||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<h1 class="post-title">{post.data.title}</h1>
|
|
||||||
<p class="post-description">{post.data.description}</p>
|
|
||||||
{post.data.tags.length > 0 && (
|
{post.data.tags.length > 0 && (
|
||||||
<div class="tags">
|
<div class="tags">
|
||||||
{post.data.tags.map((tag) => <span class="tag">#{tag}</span>)}
|
{post.data.tags.map((tag) => <span class="tag">#{tag}</span>)}
|
||||||
|
|||||||
Reference in New Issue
Block a user