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