Skip to content

Commit 062b125

Browse files
committed
hotfix: blog posts list has no gap between entries
1 parent 6dcb6b9 commit 062b125

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

src/components/BlogPost.astro

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ const { url, title, description } = Astro.props;
2626
padding: 1em;
2727
gap: 1em;
2828
flex: 1;
29-
flex-basis: 300px;
3029
}
3130

3231
.blog-post-card .info span {

src/pages/index.astro

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,11 @@ const members = await Astro.glob('../pages/members/*.md');
1616
<p>Welcome to our website! We're a team of hobbyist programmers, working together to craft something fun.</p>
1717

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

2325
<h2>Who are we?</h2>
2426
<div class="members">
@@ -62,4 +64,10 @@ const members = await Astro.glob('../pages/members/*.md');
6264
gap: 1em;
6365
flex-wrap: wrap;
6466
}
67+
68+
.posts {
69+
display: flex;
70+
flex-direction: column;
71+
gap: 1em;
72+
}
6573
</style>

0 commit comments

Comments
 (0)