From 69562d1840d0dce9af91ead977c5b097107bcae3 Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Mon, 16 Sep 2024 15:16:41 +0800 Subject: [PATCH] =?UTF-8?q?magzine=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- themes/magzine/components/CategoryGroup.js | 24 ++++++++++++------- themes/magzine/components/Footer.js | 2 +- themes/magzine/components/MenuItemCollapse.js | 4 ++-- 3 files changed, 19 insertions(+), 11 deletions(-) diff --git a/themes/magzine/components/CategoryGroup.js b/themes/magzine/components/CategoryGroup.js index b0592db0..5f2d8b68 100644 --- a/themes/magzine/components/CategoryGroup.js +++ b/themes/magzine/components/CategoryGroup.js @@ -1,5 +1,5 @@ import { useGlobal } from '@/lib/global' -import CategoryItem from './CategoryItem' +import Link from 'next/link' /** * 分类 @@ -15,15 +15,23 @@ const CategoryGroup = ({ currentCategory, categoryOptions }) => {
{locale.COMMON.CATEGORY}
- {categoryOptions?.map(category => { + {categoryOptions?.map((category, index) => { const selected = currentCategory === category.name return ( - + + + {category.name} {category?.count && `(${category?.count})`} + + ) })}
diff --git a/themes/magzine/components/Footer.js b/themes/magzine/components/Footer.js index c4e73f61..9ec35821 100644 --- a/themes/magzine/components/Footer.js +++ b/themes/magzine/components/Footer.js @@ -44,7 +44,7 @@ const Footer = ({ title }) => {
{/* 右侧链接区块 */} -
+
{MAGZINE_FOOTER_LINKS?.map((group, index) => { return (
diff --git a/themes/magzine/components/MenuItemCollapse.js b/themes/magzine/components/MenuItemCollapse.js index d792f1e4..36659c5a 100644 --- a/themes/magzine/components/MenuItemCollapse.js +++ b/themes/magzine/components/MenuItemCollapse.js @@ -38,7 +38,7 @@ export const MenuItemCollapse = props => { (selected ? 'bg-gray-600 text-white hover:text-white' : 'hover:text-gray-600') + - ' px-5 w-full text-left duration-200 dark:bg-hexo-black-gray dark:border-black' + ' px-7 w-full text-left duration-200 dark:bg-hexo-black-gray dark:border-black' } onClick={toggleShow}> {!hasSubMenu && ( @@ -77,7 +77,7 @@ export const MenuItemCollapse = props => {