diff --git a/app/blog/[slug]/page.tsx b/app/blog/[slug]/page.tsx index 6f1a76f..c7821ee 100644 --- a/app/blog/[slug]/page.tsx +++ b/app/blog/[slug]/page.tsx @@ -6,8 +6,8 @@ import { allPosts } from 'contentlayer/generated'; import { getPostBySlug, getRelatedPosts, getPostNeighbors } from '@/lib/posts'; import { siteConfig } from '@/lib/config'; import { ReadingProgress } from '@/components/reading-progress'; -import { PostToc } from '@/components/post-toc'; import { ScrollReveal } from '@/components/scroll-reveal'; +import { PostLayout } from '@/components/post-layout'; import { PostCard } from '@/components/post-card'; import { PostStorylineNav } from '@/components/post-storyline-nav'; import { SectionDivider } from '@/components/section-divider'; @@ -43,17 +43,16 @@ export default function BlogPostPage({ params }: Props) { const relatedPosts = getRelatedPosts(post, 3); const neighbors = getPostNeighbors(post); + const hasToc = / -
- -
+ +
-
+
{post.published_at && (

{new Date(post.published_at).toLocaleDateString( @@ -65,14 +64,14 @@ export default function BlogPostPage({ params }: Props) { {post.title} {post.tags && ( -

+
{post.tags.map((t) => ( #{t} @@ -85,16 +84,18 @@ export default function BlogPostPage({ params }: Props) { -
- {post.feature_image && ( - {post.title} - )} +
+ {post.feature_image && ( +
+ {post.title} +
+ )}
@@ -115,7 +116,7 @@ export default function BlogPostPage({ params }: Props) { {relatedPosts.length > 0 && ( -
+

相關文章 @@ -124,7 +125,7 @@ export default function BlogPostPage({ params }: Props) { 為你挑選相似主題

-
+
{relatedPosts.map((related) => ( ))} @@ -134,7 +135,7 @@ export default function BlogPostPage({ params }: Props) { )}
-
+ ); } diff --git a/app/blog/page.tsx b/app/blog/page.tsx index 2eca05e..ada4740 100644 --- a/app/blog/page.tsx +++ b/app/blog/page.tsx @@ -1,6 +1,7 @@ import { getAllPostsSorted } from '@/lib/posts'; import { PostListWithControls } from '@/components/post-list-with-controls'; import { TimelineWrapper } from '@/components/timeline-wrapper'; +import { SidebarLayout } from '@/components/sidebar-layout'; export const metadata = { title: '所有文章' @@ -11,15 +12,17 @@ export default function BlogIndexPage() { return (
-
-

- 所有文章 -

-

- 繼續往下滑,慢慢逛逛。 -

-
- + +
+

+ 所有文章 +

+

+ 繼續往下滑,慢慢逛逛。 +

+
+ +
); } diff --git a/app/layout.tsx b/app/layout.tsx index 2f24dc4..2918654 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -3,6 +3,13 @@ import type { Metadata } from 'next'; import { siteConfig } from '@/lib/config'; import { LayoutShell } from '@/components/layout-shell'; import { ThemeProvider } from 'next-themes'; +import { Playfair_Display } from 'next/font/google'; + +const playfair = Playfair_Display({ + subsets: ['latin'], + variable: '--font-serif-eng', + display: 'swap', +}); export const metadata: Metadata = { title: { @@ -38,7 +45,7 @@ export default function RootLayout({ const theme = siteConfig.theme; return ( - +