group theme files - example

This commit is contained in:
tangly1024.com
2023-07-04 15:07:54 +08:00
parent b126072a14
commit 9853929eb6
25 changed files with 330 additions and 797 deletions

View File

@@ -0,0 +1,20 @@
import Link from 'next/link'
/**
* 文章分类
* @param {*} param0
* @returns
*/
export default function CategoryItem({ category }) {
return (
<Link
key={category.name}
href={`/category/${category.name}`}
passHref
legacyBehavior>
<div className={'hover:text-black dark:hover:text-white dark:text-gray-300 dark:hover:bg-gray-600 px-5 cursor-pointer py-2 hover:bg-gray-100'}>
<i className='mr-4 fas fa-folder' />{category.name}({category.count})
</div>
</Link>
)
}