Updated no posts behaviour

This commit is contained in:
srleom
2024-03-20 10:47:12 +08:00
parent 63ece67478
commit 0a6f8ab699
3 changed files with 86 additions and 74 deletions

View File

@ -93,18 +93,19 @@ const allPostsByDate = sortMDByDate(allPosts).slice(0, MAX_POSTS)
consectetur adipisicing elit. Alias quia, doloribus ut beatae perspiciatis voluptatibus.
</p>
</Section>
<Section title='Posts'>
<ul class='flex flex-col gap-y-2'>
{
allPostsByDate.map((p) => (
<li class='flex flex-col gap-x-2 sm:flex-row'>
<PostPreview post={p} />
</li>
))
}
</ul>
</Section>
{
allPostsByDate.length > 0 && (
<Section title='Posts'>
<ul class='flex flex-col gap-y-2'>
{allPostsByDate.map((p) => (
<li class='flex flex-col gap-x-2 sm:flex-row'>
<PostPreview post={p} />
</li>
))}
</ul>
</Section>
)
}
<Section title='Experience'>
<Card