Skip to content

Commit

Permalink
hotfix: blog posts list has no gap between entries
Browse files Browse the repository at this point in the history
  • Loading branch information
hazelthatsme committed May 31, 2024
1 parent 6dcb6b9 commit 062b125
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
1 change: 0 additions & 1 deletion src/components/BlogPost.astro
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ const { url, title, description } = Astro.props;
padding: 1em;
gap: 1em;
flex: 1;
flex-basis: 300px;
}

.blog-post-card .info span {
Expand Down
14 changes: 11 additions & 3 deletions src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ const members = await Astro.glob('../pages/members/*.md');
<p>Welcome to our website! We're a team of hobbyist programmers, working together to craft something fun.</p>

<h2>What are we up to?</h2>
{posts.sort((a, b) => a.frontmatter.pubDate > b.frontmatter.pubDate ? -1 : 1).slice(0, 3).map((post) =>
<BlogPost url={post.url} {...post.frontmatter} />
)}
<div class="posts">
{posts.sort((a, b) => a.frontmatter.pubDate > b.frontmatter.pubDate ? -1 : 1).slice(0, 3).map((post) =>
<BlogPost url={post.url} {...post.frontmatter} />
)}
</div>

<h2>Who are we?</h2>
<div class="members">
Expand Down Expand Up @@ -62,4 +64,10 @@ const members = await Astro.glob('../pages/members/*.md');
gap: 1em;
flex-wrap: wrap;
}

.posts {
display: flex;
flex-direction: column;
gap: 1em;
}
</style>

0 comments on commit 062b125

Please sign in to comment.