diff --git a/package.json b/package.json index 23b1929..adc19da 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,8 @@ "analyze": "pnpm clean && ANALYZE=true next build", "start": "next start", "lint": "next lint", - "clean": "rm -rf .next" + "clean": "rm -rf .next", + "serve": "serve -s out -p 3010" }, "dependencies": { "@mdx-js/loader": "^3.0.1", @@ -28,6 +29,7 @@ "next": "14.2.6", "next-mdx-remote": "^5.0.0", "next-themes": "^0.3.0", + "next-view-transitions": "^0.3.0", "react": "^18", "react-dom": "^18", "react-icons": "^5.3.0", @@ -52,4 +54,4 @@ "tailwindcss": "^3.4.1", "typescript": "^5" } -} +} \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 34c75e6..883b755 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -59,6 +59,9 @@ importers: next-themes: specifier: ^0.3.0 version: 0.3.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + next-view-transitions: + specifier: ^0.3.0 + version: 0.3.0(next@14.2.6(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: specifier: ^18 version: 18.3.1 @@ -2063,6 +2066,13 @@ packages: react: ^16.8 || ^17 || ^18 react-dom: ^16.8 || ^17 || ^18 + next-view-transitions@0.3.0: + resolution: {integrity: sha512-EfMG4sQR48Q40apCl0rWqTvpDNk4TcdlFjcsGd2ZOBJMNlwfuB8lnwhOL5A0kKWnZwXlMgDPFXY7qwoOY+NhtQ==} + peerDependencies: + next: ^14.0.0 + react: ^18.2.0 + react-dom: ^18.2.0 + next@14.2.6: resolution: {integrity: sha512-57Su7RqXs5CBKKKOagt8gPhMM3CpjgbeQhrtei2KLAA1vTNm7jfKS+uDARkSW8ZETUflDCBIsUKGSyQdRs4U4g==} engines: {node: '>=18.17.0'} @@ -5284,6 +5294,12 @@ snapshots: react: 18.3.1 react-dom: 18.3.1(react@18.3.1) + next-view-transitions@0.3.0(next@14.2.6(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + dependencies: + next: 14.2.6(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + next@14.2.6(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: '@next/env': 14.2.6 diff --git a/src/app/blog/BlogClientComponent.tsx b/src/app/blog/BlogClientComponent.tsx index 65fe5b2..227269d 100644 --- a/src/app/blog/BlogClientComponent.tsx +++ b/src/app/blog/BlogClientComponent.tsx @@ -124,14 +124,14 @@ export default function BlogList() { return (

博客文章

- + setSortOption(value)} /> - + setIsTagsExpanded(!isTagsExpanded)} initialTagCount={INITIAL_TAG_COUNT} /> - +
{isLoading ? ( Array.from({ length: POSTS_PER_PAGE }).map((_, index) => ( @@ -187,7 +187,7 @@ export default function BlogList() {
)}
- + {filteredPostsMemo.length > 0 && ( ) { return ( - - - - -
- -
- {children} -
-
-