Add aesthetic timeline to post lists

This commit is contained in:
2025-11-19 00:54:58 +08:00
parent 10e4e7e21e
commit fe191752da
5 changed files with 26 additions and 5 deletions

View File

@@ -1,5 +1,6 @@
import { getAllPostsSorted } from '@/lib/posts';
import { PostListWithControls } from '@/components/post-list-with-controls';
import { TimelineWrapper } from '@/components/timeline-wrapper';
export const metadata = {
title: '所有文章'

View File

@@ -2,6 +2,7 @@ import Link from 'next/link';
import { getAllPostsSorted } from '@/lib/posts';
import { siteConfig } from '@/lib/config';
import { PostListItem } from '@/components/post-list-item';
import { TimelineWrapper } from '@/components/timeline-wrapper';
export default function HomePage() {
const posts = getAllPostsSorted().slice(0, siteConfig.postsPerPage);
@@ -29,11 +30,11 @@ export default function HomePage() {
</Link>
</div>
<ul className="space-y-3">
<TimelineWrapper>
{posts.map((post) => (
<PostListItem key={post._id} post={post} />
))}
</ul>
</TimelineWrapper>
</div>
</section>
);