mirror of
https://github.com/reonokiy/blog.nokiy.net.git
synced 2025-06-16 11:41:17 +02:00
27 lines
741 B
Text
27 lines
741 B
Text
---
|
|
import PostTitleList from '@/components/PostTitleList.astro'
|
|
import Layout from '@/layouts/Layout.astro'
|
|
import { getPinnedPosts, getPostsByYear } from '@/utils/content'
|
|
|
|
const pinnedPosts = await getPinnedPosts()
|
|
const postsByYear = await getPostsByYear()
|
|
---
|
|
|
|
<Layout>
|
|
<main>
|
|
<!-- Pinned Posts -->
|
|
{pinnedPosts.length > 0 && (
|
|
<section class="mb-7.5">
|
|
<div class="uno-decorative-line"></div>
|
|
<PostTitleList posts={pinnedPosts} />
|
|
</section>
|
|
)}
|
|
<!-- Regular Posts -->
|
|
{[...postsByYear.entries()].map(([_year, posts]) => (
|
|
<section class="mb-7.5">
|
|
<div class="uno-decorative-line"></div>
|
|
<PostTitleList posts={posts} />
|
|
</section>
|
|
))}
|
|
</main>
|
|
</Layout>
|