MEDIUM主题,分类标签调整

This commit is contained in:
tangly1024
2022-03-01 13:05:54 +08:00
parent 1bca863025
commit 26ac377749
4 changed files with 7 additions and 8 deletions

View File

@@ -78,7 +78,7 @@ const Catalog = ({ toc }) => {
)
})}
</nav>
<JumpToTopButton className='text-gray-400 hover:bg-gray-100 py-1 duration-200'/>
<JumpToTopButton className='text-gray-400 hover:text-green-500 hover:bg-gray-100 py-1 duration-200'/>
</div>
}

View File

@@ -8,10 +8,9 @@ const CategoryGroup = ({ currentCategory, categories }) => {
return <div id='category-list' className='pt-4'>
<div className='mb-2'><i className='mr-2 fas fa-th' />分类</div>
<div className='flex flex-wrap'>
{Object.keys(categories).map(category => {
const selected = currentCategory === category
const categoryCount = +categories[category]
return <CategoryItem key={category} selected={selected} category={category} categoryCount={categoryCount}/>
{categories.map(category => {
const selected = currentCategory === category.name
return <CategoryItem key={category.name} selected={selected} category={category.name} categoryCount={category.count}/>
})}
</div>
</div>

View File

@@ -6,7 +6,7 @@ export default function CategoryItem ({ selected, category, categoryCount }) {
? 'hover:text-white dark:hover:text-white bg-green-600 text-white '
: 'dark:text-green-400 text-gray-500 hover:text-white dark:hover:text-white hover:bg-green-600') +
' flex text-sm items-center duration-300 cursor-pointer py-1 font-light px-2 whitespace-nowrap'}>
<div><i className={`mr-2 fas ${selected ? 'fa-folder-open' : 'fa-folder'}`} />{category} {categoryCount && (categoryCount)}
<div><i className={`mr-2 fas ${selected ? 'fa-folder-open' : 'fa-folder'}`} />{category} {categoryCount && `(${categoryCount})`}
</div>
</a>
</Link>

View File

@@ -5,5 +5,5 @@
// export * from './Empty' // 空主题
// export * from './NEXT'
// export * from './Fukasawa'
export * from './Hexo'
// export * from './Medium'
// export * from './Hexo'
export * from './Medium'