mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-14 07:26:52 +00:00
HEXO主题,分类标签调整
This commit is contained in:
@@ -20,16 +20,16 @@ export const LayoutCategoryIndex = props => {
|
||||
{locale.COMMON.CATEGORY}:
|
||||
</div>
|
||||
<div id="category-list" className="duration-200 flex flex-wrap mx-8">
|
||||
{Object.keys(categories).map(category => {
|
||||
{categories.map(category => {
|
||||
return (
|
||||
<Link key={category} href={`/category/${category}`} passHref>
|
||||
<Link key={category.name} href={`/category/${category.name}`} passHref>
|
||||
<div
|
||||
className={
|
||||
' duration-300 dark:hover:text-white rounded-lg px-5 cursor-pointer py-2 hover:bg-blue-400 hover:text-white'
|
||||
}
|
||||
>
|
||||
<i className="mr-4 fas fa-folder" />
|
||||
{category}({categories[category]})
|
||||
{category.name}({category.count})
|
||||
</div>
|
||||
</Link>
|
||||
)
|
||||
|
||||
@@ -7,14 +7,14 @@ const CategoryGroup = ({ currentCategory, categories }) => {
|
||||
}
|
||||
return <>
|
||||
<div id='category-list' className='dark:border-gray-600 flex flex-wrap font-sans mx-4'>
|
||||
{Object.keys(categories).map(category => {
|
||||
const selected = currentCategory === category
|
||||
return <Link key={category} href={`/category/${category}`} passHref>
|
||||
{categories.map(category => {
|
||||
const selected = currentCategory === category.name
|
||||
return <Link key={category.name} href={`/category/${category.name}`} passHref>
|
||||
<a className={(selected
|
||||
? 'hover:text-white dark:hover:text-white bg-blue-600 text-white '
|
||||
: 'dark:text-gray-400 text-gray-500 hover:text-white dark:hover:text-white hover:bg-blue-600') +
|
||||
' text-sm w-full items-center duration-300 px-2 cursor-pointer py-1 font-light'}>
|
||||
<div> <i className={`mr-2 fas ${selected ? 'fa-folder-open' : 'fa-folder'}`} />{category}({categories[category]})</div>
|
||||
<div> <i className={`mr-2 fas ${selected ? 'fa-folder-open' : 'fa-folder'}`} />{category.name}({category.count})</div>
|
||||
</a>
|
||||
</Link>
|
||||
})}
|
||||
|
||||
@@ -4,6 +4,6 @@
|
||||
|
||||
// export * from './Empty' // 空主题
|
||||
// export * from './NEXT'
|
||||
export * from './Fukasawa'
|
||||
// export * from './Hexo'
|
||||
// export * from './Fukasawa'
|
||||
export * from './Hexo'
|
||||
// export * from './Medium'
|
||||
|
||||
Reference in New Issue
Block a user