Skip to content

Commit

Permalink
Next主题文章页 分类支持跳转
Browse files Browse the repository at this point in the history
  • Loading branch information
tangly1024 committed Feb 2, 2024
1 parent 134e10d commit ef970df
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions themes/next/components/ArticleDetail.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,10 @@ export default function ArticleDetail(props) {
{/* 分类 */}
{post.category && <>
<div className="cursor-pointer my-auto text-md mr-2 hover:text-black dark:hover:text-white border-b dark:text-gray-500 border-dashed">
<Link href={`/category/${post.category}`} passHref legacyBehavior>
<><i className="mr-1 far fa-folder-open" /> {post.category}</>
<Link href={`/category/${post.category}`} legacyBehavior>
<a><i className="mr-1 far fa-folder-open" /> {post.category}</a>
</Link>
</div>

</>}

{/* 标签列表 */}
Expand All @@ -116,7 +115,7 @@ export default function ArticleDetail(props) {
{post.tagItems && (
<div className="flex flex-nowrap leading-8 p-1 py-4 overflow-x-auto">
<div className="hidden md:block dark:text-gray-300 whitespace-nowrap">
{locale.COMMON.TAGS}
{locale.COMMON.TAGS}:
</div>
{post.tagItems.map(tag => (
<TagItem key={tag.name} tag={tag} />
Expand Down

0 comments on commit ef970df

Please sign in to comment.