diff --git a/themes/heo/components/Hero.js b/themes/heo/components/Hero.js
index 0b9d405a..85ca9fb9 100644
--- a/themes/heo/components/Hero.js
+++ b/themes/heo/components/Hero.js
@@ -2,12 +2,11 @@
import BLOG from '@/blog.config'
import { ArrowSmallRight, PlusSmall } from '@/components/HeroIcons'
+
import Link from 'next/link'
import { useRouter } from 'next/router'
import { useImperativeHandle, useRef, useState } from 'react'
import CONFIG from '../config'
-import { useGlobal } from '@/lib/global'
-import { Transition } from '@headlessui/react'
/**
* 顶部英雄区
@@ -17,28 +16,18 @@ import { Transition } from '@headlessui/react'
* @returns
*/
const Hero = props => {
- const { onLoading } = useGlobal()
return (
-
{CONFIG.HERO_TITLE_1}
{CONFIG.HERO_TITLE_2}
+
{CONFIG.HERO_TITLE_1}
{CONFIG.HERO_TITLE_2}
{CONFIG.HERO_TITLE_3}
@@ -103,19 +92,17 @@ function TagsGroupBar() {
return (
- {groupIcons?.map(g => {
- return (<>
-
-
- {/* eslint-disable-next-line @next/next/no-img-element */}
-

-
-
- {/* eslint-disable-next-line @next/next/no-img-element */}
-

-
+ {groupIcons?.map((g, index) => {
+ return (
+
+ {/* eslint-disable-next-line @next/next/no-img-element */}
+
- >)
+
+ {/* eslint-disable-next-line @next/next/no-img-element */}
+

+
+
)
})}
@@ -135,26 +122,26 @@ function GroupMenu() {
-
+
- {CONFIG.HERO_CATEGORY_2?.title}
+ {CONFIG.HERO_CATEGORY_2?.title}
-
+
{/* 第三个标签在小屏上不显示 */}
- {CONFIG.HERO_CATEGORY_3?.title}
+ {CONFIG.HERO_CATEGORY_3?.title}
-
+
@@ -204,8 +191,8 @@ function TodayCard({ cRef }) {
const [isCoverUp, setIsCoverUp] = useState(true)
/**
- * 外部可以调用此方法
- */
+ * 外部可以调用此方法
+ */
useImperativeHandle(cRef, () => {
return {
coverUp: () => {
@@ -215,18 +202,18 @@ function TodayCard({ cRef }) {
})
/**
- * 点击更多
- * @param {*} e
- */
+ * 点击更多
+ * @param {*} e
+ */
function handleClickMore(e) {
e.stopPropagation()
setIsCoverUp(false)
}
/**
- * 点击卡片跳转的链接
- * @param {*} e
- */
+ * 点击卡片跳转的链接
+ * @param {*} e
+ */
function handleCardClick(e) {
router.push('https://tangly1024.com')
}
diff --git a/themes/heo/components/MenuItemCollapse.js b/themes/heo/components/MenuItemCollapse.js
index d12e9ffe..c69ca231 100644
--- a/themes/heo/components/MenuItemCollapse.js
+++ b/themes/heo/components/MenuItemCollapse.js
@@ -26,7 +26,7 @@ export const MenuItemCollapse = ({ link }) => {
}
return <>
-
+
{!hasSubMenu &&
@@ -36,7 +36,7 @@ export const MenuItemCollapse = ({ link }) => {
onClick={hasSubMenu ? toggleOpenSubMenu : null}
className="font-extralight flex items-center justify-between pl-2 pr-4 cursor-pointer dark:text-gray-200 no-underline tracking-widest pb-1">
{link?.icon && }{link?.name}
-
+
}
diff --git a/themes/heo/components/NoticeBar.js b/themes/heo/components/NoticeBar.js
index 302c28b1..c7453036 100644
--- a/themes/heo/components/NoticeBar.js
+++ b/themes/heo/components/NoticeBar.js
@@ -15,7 +15,7 @@ export function NoticeBar() {
return (
-
+
此刻
diff --git a/themes/heo/components/TagGroups.js b/themes/heo/components/TagGroups.js
index 820c802f..7c8ae0e6 100644
--- a/themes/heo/components/TagGroups.js
+++ b/themes/heo/components/TagGroups.js
@@ -12,17 +12,16 @@ const TagGroups = ({ tags, className }) => {
return (
diff --git a/themes/heo/index.js b/themes/heo/index.js
index 49237526..27cf51aa 100644
--- a/themes/heo/index.js
+++ b/themes/heo/index.js
@@ -31,7 +31,6 @@ import { NoticeBar } from './components/NoticeBar'
import { HashTag } from '@/components/HeroIcons'
import LatestPostsGroup from './components/LatestPostsGroup'
import FloatTocButton from './components/FloatTocButton'
-import CustomContextMenu from './components/CustomContextMenu'
/**
* 基础布局 采用上中下布局,移动端使用顶部侧边导航栏
@@ -71,7 +70,7 @@ const LayoutBase = props => {
leave="transition ease-in-out duration-300 transform"
leaveFrom="opacity-100"
leaveTo="opacity-0 -translate-y-16"
- className={`w-full h-auto px-5 lg:px-0 ${className || ''}`}
+ className={`w-full h-auto ${className || ''}`}
unmount={false}
>
{/* 主区上部嵌入 */}
@@ -98,9 +97,6 @@ const LayoutBase = props => {
- {/* 自定义右键菜单 */}
-
-
{/* 页脚 */}
@@ -126,9 +122,11 @@ const LayoutIndex = (props) => {
const slotRight =
return
- {/* 文章分类条 */}
-
- {BLOG.POST_LIST_STYLE === 'page' ? : }
+
+ {/* 文章分类条 */}
+
+ {BLOG.POST_LIST_STYLE === 'page' ? : }
+
}
@@ -146,9 +144,11 @@ const LayoutPostList = (props) => {
return
- {/* 文章分类条 */}
-
- {BLOG.POST_LIST_STYLE === 'page' ? : }
+
+ {/* 文章分类条 */}
+
+ {BLOG.POST_LIST_STYLE === 'page' ? : }
+
}
@@ -187,9 +187,11 @@ const LayoutSearch = props => {
return (
- {!currentSearch
- ?
- : {BLOG.POST_LIST_STYLE === 'page' ? : }
}
+
+ {!currentSearch
+ ?
+ :
{BLOG.POST_LIST_STYLE === 'page' ? : }
}
+
)
}
@@ -261,7 +263,7 @@ const LayoutSlug = props => {
{/* 分享 */}
- {post?.type === 'Post' && <>
+ {post?.type === 'Post' &&
{/* 版权 */}
@@ -269,20 +271,20 @@ const LayoutSlug = props => {
{/* 上一篇\下一篇文章 */}
- >}
+
}
-
+
{/* 评论互动 */}
-
}
-
+
)
@@ -326,7 +328,7 @@ const Layout404 = props => {
>
{/* 404卡牌 */}
-
+
{/* 左侧动图 */}
{/* eslint-disable-next-line @next/next/no-img-element */}

@@ -350,8 +352,6 @@ const Layout404 = props => {
- {/* 自定义右键菜单 */}
-
)
}
@@ -371,23 +371,25 @@ const LayoutCategoryIndex = props => {
return (
-
- {locale.COMMON.CATEGORY}
-
-
- {categoryOptions.map(category => {
- return (
-
-
-
- {category.name}
-
- {category.count}
+
+
+ {locale.COMMON.CATEGORY}
+
+
+ {categoryOptions.map(category => {
+ return (
+
+
+
+ {category.name}
+
+ {category.count}
+
-
-
- )
- })}
+
+ )
+ })}
+
)
@@ -403,23 +405,25 @@ const LayoutTagIndex = props => {
const { locale } = useGlobal()
return (
-
- {locale.COMMON.TAGS}
-
-
- {tagOptions.map(tag => {
- return (
-
-
-
- {tag.name}
-
- {tag.count}
+
+
+ {locale.COMMON.TAGS}
+
+
+ {tagOptions.map(tag => {
+ return (
+
+
+
+ {tag.name}
+
+ {tag.count}
+
-
-
- )
- })}
+
+ )
+ })}
+
)
diff --git a/themes/hexo/index.js b/themes/hexo/index.js
index d42831eb..26bb631b 100644
--- a/themes/hexo/index.js
+++ b/themes/hexo/index.js
@@ -69,7 +69,7 @@ const LayoutBase = props => {
{/* 主区块 */}
-
+