From 1d8188633b99a7efe4693f10fef6fbef8533058d Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Sun, 16 Jul 2023 00:04:03 +0800 Subject: [PATCH] dark-mode --- themes/heo/components/BlogPostCard.js | 9 ++++----- themes/heo/components/Card.js | 2 +- themes/heo/components/CategoryBar.js | 6 +++--- themes/heo/components/CategoryGroup.js | 6 +++--- themes/heo/components/Footer.js | 7 ++++--- themes/heo/components/Hero.js | 14 +++++++------- themes/heo/components/InfoCard.js | 2 +- themes/heo/components/MenuItemDrop.js | 2 +- themes/heo/components/NavBar.js | 2 +- themes/heo/components/NoticeBar.js | 2 +- themes/heo/components/PaginationNumber.js | 16 ++++++++-------- themes/heo/components/TagGroups.js | 2 +- themes/heo/components/TagItemMini.js | 2 +- themes/heo/index.js | 13 ++++++++++--- 14 files changed, 46 insertions(+), 39 deletions(-) diff --git a/themes/heo/components/BlogPostCard.js b/themes/heo/components/BlogPostCard.js index dc4e80d9..d853497a 100644 --- a/themes/heo/components/BlogPostCard.js +++ b/themes/heo/components/BlogPostCard.js @@ -12,7 +12,7 @@ const BlogPostCard = ({ index, post, showSummary, siteInfo }) => { const showPageCover = CONFIG.POST_LIST_COVER && post?.pageCoverThumbnail && !showPreview return (
-
+
{/* 图片封面 */} {showPageCover && ( @@ -24,12 +24,12 @@ const BlogPostCard = ({ index, post, showSummary, siteInfo }) => { )} {/* 文字区块 */} -
+
{/* 分类 */} {post?.category && } @@ -38,8 +38,7 @@ const BlogPostCard = ({ index, post, showSummary, siteInfo }) => { - + className={' group-hover:text-indigo-700 group-hover:dark:text-indigo-400 text-black dark:text-gray-100 dark:group-hover:text-yellow-600 line-clamp-2 replace cursor-pointer text-xl font-extrabold leading-tight'}> {post.title}
diff --git a/themes/heo/components/Card.js b/themes/heo/components/Card.js index 2107391b..326de29e 100644 --- a/themes/heo/components/Card.js +++ b/themes/heo/components/Card.js @@ -1,5 +1,5 @@ const Card = ({ children, headerSlot, className }) => { - return
+ return
<>{headerSlot}
{children} diff --git a/themes/heo/components/CategoryBar.js b/themes/heo/components/CategoryBar.js index 298c9128..73c31d9c 100644 --- a/themes/heo/components/CategoryBar.js +++ b/themes/heo/components/CategoryBar.js @@ -11,7 +11,7 @@ export default function CategoryBar(props) { const { categoryOptions } = props const { locale } = useGlobal() - return
@@ -20,7 +20,7 @@ export default function CategoryBar(props) {
- + {locale.COMMON.MORE}
@@ -35,7 +35,7 @@ export default function CategoryBar(props) { const MenuItem = ({ href, name }) => { const router = useRouter() const selected = router.pathname === href - return
+ return
{name}
} diff --git a/themes/heo/components/CategoryGroup.js b/themes/heo/components/CategoryGroup.js index c88df60a..811ad9ff 100644 --- a/themes/heo/components/CategoryGroup.js +++ b/themes/heo/components/CategoryGroup.js @@ -6,7 +6,7 @@ const CategoryGroup = ({ currentCategory, categories }) => { return <> } return <> -
+
{categories.map(category => { const selected = currentCategory === category.name return ( @@ -22,10 +22,10 @@ const CategoryGroup = ({ currentCategory, categories }) => {
{category.name}({category.count})
- ); + ) })}
- ; + } export default CategoryGroup diff --git a/themes/heo/components/Footer.js b/themes/heo/components/Footer.js index 531c1ce8..a26c8e2f 100644 --- a/themes/heo/components/Footer.js +++ b/themes/heo/components/Footer.js @@ -15,10 +15,11 @@ const Footer = ({ title }) => { return (