BLOG-45 Post content page #67

Merged
squid merged 9 commits from BLOG-45_post_content_page into main 2025-07-24 22:20:58 +08:00
4 changed files with 8 additions and 4 deletions
Showing only changes of commit 901d367d9d - Show all commits

View File

@ -1,6 +1,6 @@
<div class="border-t border-gray-300">
<div
class="mx-auto flex max-w-screen-xl flex-col items-center justify-center gap-4 px-4 py-12 md:flex-row md:px-6"
class="mx-auto flex max-w-screen-xl flex-col items-center justify-center gap-4 px-4 py-12 text-gray-600 md:flex-row md:px-6"
>
<div class="flex flex-row items-center justify-center gap-x-4">
<a href="https://www.youtube.com/@squidspirit16" target="_blank" aria-label="YouTube Channel">

View File

@ -35,4 +35,8 @@ export class PostInfoViewModel {
publishedTime: postInfo.publishedTime
});
}
get formattedPublishedTime(): string {
return this.publishedTime.toISOString().slice(0, 10);
}
}

View File

@ -10,7 +10,7 @@
onMount(() => postListBloc.dispatch({ event: PostListEventType.PostListLoadedEvent }));
</script>
<div class="container">
<div class="container pb-10">
<div class="py-9 text-center text-3xl font-bold text-gray-800 md:py-20 md:text-5xl">文章</div>
{#if state.status === StatusType.Success}
<div class="grid grid-cols-1 gap-6 md:grid-cols-2 md:gap-y-8 lg:grid-cols-3">

View File

@ -34,8 +34,8 @@
</div>
<div class="flex flex-col gap-y-1.5">
<PostPreviewLabels labels={postInfo.labels} />
<span class="line-clamp-1 font-bold">{postInfo.title}</span>
<span class="line-clamp-1 font-bold text-lg">{postInfo.title}</span>
<span class="line-clamp-3 text-justify text-sm">{postInfo.description}</span>
<span class="text-sm text-gray-500">查看更多 ⭢</span>
<span class="text-sm text-gray-500">{postInfo.formattedPublishedTime}</span>
</div>
</a>