FUKASAWA主题,分类标签调整

This commit is contained in:
tangly1024
2022-03-01 12:59:47 +08:00
parent 2df25e6bf9
commit 9a4f57d756
4 changed files with 10 additions and 10 deletions

View File

@@ -17,11 +17,11 @@ export const LayoutCategoryIndex = (props) => {
<i className='mr-4 fas fa-th' />{locale.COMMON.CATEGORY}:
</div>
<div id='category-list' className='duration-200 flex flex-wrap'>
{Object.keys(categories).map(category => {
return <Link key={category} href={`/category/${category}`} passHref>
{categories && categories.map(category => {
return <Link key={category.name} href={`/category/${category.name}`} passHref>
<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}({categories[category]})
<i className='mr-4 fas fa-folder' />{category.name}({category.count})
</div>
</Link>
})}

View File

@@ -14,7 +14,7 @@ import PaginationSimple from './PaginationSimple'
*/
const BlogListPage = ({ page = 1, posts = [], postCount }) => {
const totalPage = Math.ceil(postCount / BLOG.POSTS_PER_PAGE)
const showNext = page < totalPage && posts.length < postCount
const showNext = page < totalPage && posts.length <= BLOG.POSTS_PER_PAGE && posts.length < postCount
const [colCount, changeCol] = useState(3)
function updateCol () {

View File

@@ -8,14 +8,14 @@ function GroupCategory ({ currentCategory, categories }) {
return <>
<div id='category-list' className='dark:border-gray-600 flex flex-wrap'>
{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-gray-600 text-white '
: 'dark:text-gray-400 text-gray-500 hover:text-white hover:bg-gray-500 dark:hover:text-white') +
' text-sm w-full items-center duration-300 px-2 cursor-pointer py-1 font-light'}>
<i className={`${selected ? 'text-white fa-folder-open' : 'fa-folder text-gray-400'} fas mr-2`} />{category}({categories[category]})
<i className={`${selected ? 'text-white fa-folder-open' : 'fa-folder text-gray-400'} fas mr-2`} />{category.name}({category.count})
</a>
</Link>
})}

View File

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