feat: add post description on desktop home page

This commit is contained in:
radishzzz 2025-03-16 02:15:36 +00:00
parent 5f3d9bc3c2
commit f9c48b2c6f
9 changed files with 27 additions and 22 deletions

View file

@ -40,7 +40,7 @@ const { Content } = aboutEntry ? await aboutEntry.render() : { Content: null }
<Layout>
<div class="uno-decorative-line"></div>
<div class="heti mt-4.375">
<div class="heti">
{Content && <Content />}
</div>
</Layout>

View file

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

View file

@ -115,6 +115,8 @@ function getTagUrl(tagName: string): string {
postSlug={post.slug}
supportedLangs={supportedLangs}
>
<!-- Title -->
<article class="heti mb-12.6">
<h1 class="post-title">
<span
@ -125,12 +127,12 @@ function getTagUrl(tagName: string): string {
</span>
</h1>
<!-- Date -->
<div
class="mb-17 block c-primary font-time"
transition:name={`time-${post.data.abbrlink || post.slug}-${lang}`}
data-disable-transition-on-theme
>
<!-- published and updated time -->
<PostDate
date={post.data.published}
updatedDate={post.data.updated}

View file

@ -77,7 +77,7 @@ function getTagUrl(tagName: string): string {
))}
</div>
<div class="mt-10.625">
<div class="mt-10.5">
<PostList posts={posts} lang={lang} />
</div>
</Layout>