🚀 refactor: redesign the layout, reduce page size, and significantly improve build speed

This commit is contained in:
radishzzz 2025-03-22 03:45:15 +00:00
parent 89e1359bb5
commit 51ae238192
18 changed files with 390 additions and 486 deletions

View file

@ -35,23 +35,18 @@ const pinnedPosts = await getPinnedPosts(lang)
const postsByYear = await getPostsByYear(lang)
---
<Layout>
<main>
<!-- Pinned Posts -->
{pinnedPosts.length > 0 && (
<section class="mb-7.5 lg:mb-10">
<div class="uno-decorative-line"></div>
<PostList posts={pinnedPosts} lang={lang} />
</section>
)}
<!-- Regular Posts -->
{[...postsByYear.entries()].map(([_year, posts]) => (
<section class="mb-7.5 lg:mb-10">
<div class="uno-decorative-line"></div>
<PostList posts={posts} lang={lang} />
</section>
))}
</main>
<!-- Pinned Posts -->
{pinnedPosts.length > 0 && (
<section class="mb-7.5 lg:mb-10">
<div class="uno-decorative-line"></div>
<PostList posts={pinnedPosts} lang={lang} />
</section>
)}
<!-- Regular Posts -->
{[...postsByYear.entries()].map(([_year, posts]) => (
<section class="mb-7.5 lg:mb-10">
<div class="uno-decorative-line"></div>
<PostList posts={posts} lang={lang} />
</section>
))}
</Layout>