+
-
+
{/* 移动端菜单按钮 */}
@@ -82,7 +157,7 @@ const NavBar = props => {
{/* 右边侧拉抽屉 */}
-
+
>)
diff --git a/themes/heo/components/NavBarSwipe.js b/themes/heo/components/NavBarSwipe.js
deleted file mode 100644
index 29fdc5503a7..00000000000
--- a/themes/heo/components/NavBarSwipe.js
+++ /dev/null
@@ -1,106 +0,0 @@
-import BLOG from '@/blog.config'
-import { isBrowser } from '@/lib/utils'
-import { useEffect, useState } from 'react'
-import { MenuListTop } from './MenuListTop'
-
-/**
- * 一个swipe组件
- * 垂直方向,g给导航栏用
- * @param {*} param0
- * @returns
- */
-export default function NavSwipe(props) {
- const [activeIndex, setActiveIndex] = useState(0)
-
- const item1 = (
-
- )
-
- const item2 =
{BLOG.AUTHOR || BLOG.TITLE} | {BLOG.BIO}
- const items = [item1, item2]
-
- useEffect(() => {
- let prevScrollY = 0
- let ticking = false
-
- const handleScroll = () => {
- if (!ticking) {
- window.requestAnimationFrame(() => {
- const currentScrollY = window.scrollY
-
- if (currentScrollY > prevScrollY) {
- setActiveIndex(1) // 向下滚动时设置activeIndex为1
- } else {
- setActiveIndex(0) // 向上滚动时设置activeIndex为0
- }
-
- prevScrollY = currentScrollY
- ticking = false
- })
-
- ticking = true
- }
- }
-
- if (isBrowser()) {
- window.addEventListener('scroll', handleScroll)
- }
-
- return () => {
- if (isBrowser()) {
- window.removeEventListener('scroll', handleScroll)
- }
- }
- }, [])
-
- return (
-
- {items.map((item, index) => (
-
- {item}
-
- ))}
-
-
-
- )
-};