同步代码

This commit is contained in:
Vixcity
2023-01-03 20:56:55 +08:00
parent d84f9b9297
commit 7da44bd0de
117 changed files with 2072 additions and 2506 deletions

View File

@@ -19,14 +19,13 @@ const BlogPostCard = ({ post, showSummary }) => {
className="flex flex-col-reverse justify-between duration-300"
>
<div className="lg:p-8 p-4 flex flex-col w-full">
<Link
href={`${BLOG.SUB_PATH}/${post.slug}`}
passHref
className={`cursor-pointer hover:underline text-3xl ${showPreview ? 'text-center' : ''
} leading-tight text-gray-700 dark:text-gray-100 hover:text-blue-500 dark:hover:text-blue-400`}>
<NotionIcon icon={post.pageIcon} /> {post.title}
<Link href={`${BLOG.SUB_PATH}/${post.slug}`} passHref>
<a
className={`cursor-pointer hover:underline text-3xl ${showPreview ? 'text-center' : ''
} leading-tight text-gray-700 dark:text-gray-100 hover:text-blue-500 dark:hover:text-blue-400`}
>
<NotionIcon icon={post.pageIcon} /> {post.title}
</a>
</Link>
<div
@@ -36,14 +35,11 @@ const BlogPostCard = ({ post, showSummary }) => {
<div>
{post.category && (
<>
<Link
href={`/category/${post.category}`}
passHref
className="cursor-pointer font-light text-sm hover:underline transform">
<i className="mr-1 fas fa-folder" />
{post.category}
<Link href={`/category/${post.category}`} passHref>
<a className="cursor-pointer font-light text-sm hover:underline transform">
<i className="mr-1 fas fa-folder" />
{post.category}
</a>
</Link>
<span className="mx-2">|</span>
</>
@@ -51,10 +47,10 @@ const BlogPostCard = ({ post, showSummary }) => {
<Link
href={`/archive#${post?.date?.start_date?.substr(0, 7)}`}
passHref
className="font-light hover:underline cursor-pointer text-sm leading-4 mr-3">
{post.date?.start_date}
>
<a className="font-light hover:underline cursor-pointer text-sm leading-4 mr-3">
{post.date?.start_date}
</a>
</Link>
</div>
<div className="md:flex-nowrap flex-wrap md:justify-start inline-block">
@@ -89,19 +85,17 @@ const BlogPostCard = ({ post, showSummary }) => {
)}
<div className="text-right border-t pt-8 border-dashed">
<Link
href={`${BLOG.SUB_PATH}/${post.slug}`}
className="hover:bg-opacity-100 hover:underline transform duration-300 p-3 text-white bg-gray-800 cursor-pointer">
{locale.COMMON.ARTICLE_DETAIL}
<i className="ml-1 fas fa-angle-right" />
<Link href={`${BLOG.SUB_PATH}/${post.slug}`}>
<a className="hover:bg-opacity-100 hover:underline transform duration-300 p-3 text-white bg-gray-800 cursor-pointer">
{locale.COMMON.ARTICLE_DETAIL}
<i className="ml-1 fas fa-angle-right" />
</a>
</Link>
</div>
</div>
{CONFIG_NEXT.POST_LIST_COVER && post?.page_cover && (
<Link href={`${BLOG.SUB_PATH}/${post.slug}`} passHref legacyBehavior>
<Link href={`${BLOG.SUB_PATH}/${post.slug}`} passHref>
<div className="h-72 w-full relative duration-200 cursor-pointer transform overflow-hidden">
<Image
className="hover:scale-105 transform duration-500"
@@ -116,7 +110,7 @@ const BlogPostCard = ({ post, showSummary }) => {
)}
</div>
</Card>
);
)
}
export default BlogPostCard