-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f99e35b
commit 6ecc66a
Showing
21 changed files
with
3,256 additions
and
159 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import NextImage, { ImageProps } from "next/image"; | ||
|
||
const Image = ({ ...rest }: ImageProps) => <NextImage {...rest} />; | ||
|
||
export default Image; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,11 @@ | ||
/* | ||
* @Author: wanghao1993 [email protected] | ||
* @Date: 2024-09-04 13:57:31 | ||
* @LastEditors: wanghao1993 [email protected] | ||
* @LastEditTime: 2024-09-04 17:24:33 | ||
* @FilePath: \blog-offical\components\blog\Posts.tsx | ||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE | ||
*/ | ||
"use client"; | ||
import { ArticleType } from "@/types/article"; | ||
import ArticleItem from "@/components/Article/ArticleItem"; | ||
|
@@ -7,6 +15,11 @@ import { Post } from "contentlayer/generated"; | |
export interface PostCardProps { | ||
posts: Post[]; | ||
} | ||
/** | ||
* @description: | ||
* @param {PostCardProps} param1 | ||
* @return {*} | ||
*/ | ||
export default function PostsCard({ posts }: PostCardProps) { | ||
const [mounted, setMounted] = useState(false); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,17 @@ | ||
/* | ||
* @Author: wanghao1993 [email protected] | ||
* @Date: 2024-09-04 13:57:31 | ||
* @LastEditors: wanghao1993 [email protected] | ||
* @LastEditTime: 2024-09-04 17:08:15 | ||
* @FilePath: \blog-offical\data\utils\index.ts | ||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE | ||
*/ | ||
import { allPosts } from "contentlayer/generated"; | ||
|
||
export const getAllPostsMeta = () => { | ||
// 文章日期排序,最新的在最前面 | ||
allPosts.sort((a, b) => { | ||
return +new Date(a.date) < +new Date(a.date) ? 1 : -1; | ||
return +new Date(a.date) < +new Date(b.date) ? 1 : -1; | ||
}); | ||
return allPosts; | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.