diff --git a/themes/hexo/components/TocDrawer.js b/themes/hexo/components/TocDrawer.js
index 20c1941b..a939814d 100644
--- a/themes/hexo/components/TocDrawer.js
+++ b/themes/hexo/components/TocDrawer.js
@@ -21,7 +21,7 @@ const TocDrawer = ({ post, cRef }) => {
}
return <>
- {/* 侧边菜单 */}
+ {/* 悬浮目录 */}
useContext(ThemeGlobalHexo)
@@ -46,14 +45,19 @@ export const useHexoGlobal = () => useContext(ThemeGlobalHexo)
* @constructor
*/
const LayoutBase = props => {
- const { post , children, slotTop, meta, className } = props
+ const { post, children, slotTop, meta, className } = props
const { onLoading, fullWidth } = useGlobal()
const router = useRouter()
const headerSlot = post
- ?
: (router.route==='/' && siteConfig('HEXO_HOME_BANNER_ENABLE', null, CONFIG)
- ?
: null)
-
+ ?
+ : (router.route === '/' && siteConfig('HEXO_HOME_BANNER_ENABLE', null, CONFIG)
+ ?
+ : null)
+
+ const drawerRight = useRef(null)
+ const tocRef = isBrowser ? document.getElementById('article-wrapper') : null
+
const floatSlot = <>
{post?.toc?.length > 1 &&
{
+
+
+
+
{/* 悬浮菜单 */}
@@ -141,7 +149,7 @@ const LayoutBase = props => {
* @returns
*/
const LayoutIndex = (props) => {
- return
+ return
}
/**
@@ -217,8 +225,6 @@ const LayoutArchive = (props) => {
*/
const LayoutSlug = props => {
const { post, lock, validPassword } = props
- const drawerRight = useRef(null)
- const tocRef = isBrowser ? document.getElementById('article-wrapper') : null
return (
<>
@@ -252,10 +258,6 @@ const LayoutSlug = props => {
}
-
-
-
-
>
)
}
diff --git a/themes/matery/index.js b/themes/matery/index.js
index ce099cd7..a71b3872 100644
--- a/themes/matery/index.js
+++ b/themes/matery/index.js
@@ -43,9 +43,10 @@ const LayoutBase = props => {
const { children, meta, siteInfo, post } = props
const { onLoading, fullWidth } = useGlobal()
const router = useRouter()
- const containerSlot= router.route==='/' ?
:
- const headerSlot= siteConfig('MATERY_HOME_BANNER_ENABLE', null, CONFIG) && router.route==='/'
- ?
: (post && !fullWidth ?
: null)
+ const containerSlot = router.route === '/' ?
:
+ const headerSlot = siteConfig('MATERY_HOME_BANNER_ENABLE', null, CONFIG) && router.route === '/'
+ ?
+ : (post && !fullWidth ?
: null)
const floatRightBottom = post ?
: null
@@ -198,7 +199,7 @@ const LayoutArchive = (props) => {
const LayoutSlug = props => {
const { post, lock, validPassword } = props
const { fullWidth } = useGlobal()
-
+
return (<>
diff --git a/themes/nav/index.js b/themes/nav/index.js
index b09fe080..8b4edde2 100755
--- a/themes/nav/index.js
+++ b/themes/nav/index.js
@@ -25,7 +25,6 @@ import { ArticleLock } from './components/ArticleLock'
import { Transition } from '@headlessui/react'
import { Style } from './style'
import CommonHead from '@/components/CommonHead'
-import BlogArchiveItem from './components/BlogArchiveItem'
import BlogPostListAll from './components/BlogPostListAll'
import BlogPostCard from './components/BlogPostCard'
import Link from 'next/link'
@@ -271,14 +270,7 @@ const LayoutSearch = (props) => {
* @returns
*/
const LayoutArchive = (props) => {
- return
- // const { archivePosts } = props
-
- return <>
-
- {Object.keys(archivePosts)?.map(archiveTitle => )}
-
- >
+ return <>>
}
/**
@@ -325,27 +317,7 @@ const LayoutCategoryIndex = (props) => {
* 标签列表
*/
const LayoutTagIndex = (props) => {
- return
- // const { tagOptions } = props
- // const { locale } = useGlobal()
-
- return <>
-
-
-
- {locale.COMMON.TAGS}:
-
-
-
- >
+ return <>>
}
export {
diff --git a/themes/next/index.js b/themes/next/index.js
index 35a6091a..c2fc59d7 100644
--- a/themes/next/index.js
+++ b/themes/next/index.js
@@ -71,7 +71,7 @@ const LayoutBase = (props) => {
const drawerRight = useRef(null)
const floatSlot =
{
- drawerRight?.current?.handleSwitchVisible()
+ drawerRight?.current?.handleSwitchVisible()
}} />
const tocRef = isBrowser ? document.getElementById('article-wrapper') : null
@@ -114,7 +114,7 @@ const LayoutBase = (props) => {
{/* 右侧栏样式 */}
{siteConfig('NEXT_RIGHT_BAR', null, CONFIG) &&
}
-
+
{/* 悬浮目录按钮 */}
@@ -342,5 +342,5 @@ export {
Layout404,
LayoutCategoryIndex,
LayoutPostList,
- LayoutTagIndex,
+ LayoutTagIndex
}
diff --git a/themes/nobelium/index.js b/themes/nobelium/index.js
index 83650ae8..d9575aaf 100644
--- a/themes/nobelium/index.js
+++ b/themes/nobelium/index.js
@@ -37,13 +37,13 @@ export const useNobeliumGlobal = () => useContext(ThemeGlobalNobelium)
* @constructor
*/
const LayoutBase = props => {
- const { children, post, meta } = props
+ const { children, post, meta } = props
const fullWidth = post?.fullWidth ?? false
const { onLoading } = useGlobal()
const searchModal = useRef(null)
// 在列表中进行实时过滤
const [filterKey, setFilterKey] = useState('')
- const topSlot=
+ const topSlot =
return (
@@ -116,7 +116,7 @@ const LayoutIndex = props => {
* @returns
*/
const LayoutPostList = props => {
- const { posts, topSlot,tag } = props
+ const { posts, topSlot, tag } = props
const { filterKey } = useNobeliumGlobal()
let filteredBlogPosts = []
if (filterKey && posts) {
@@ -160,7 +160,7 @@ const LayoutSearch = props => {
}, [])
// 在列表中进行实时过滤
- const {filterKey} = useNobeliumGlobal()
+ const { filterKey } = useNobeliumGlobal()
let filteredBlogPosts = []
if (filterKey && posts) {
filteredBlogPosts = posts.filter(post => {
diff --git a/themes/simple/index.js b/themes/simple/index.js
index c4a705a7..0ed8a5f2 100644
--- a/themes/simple/index.js
+++ b/themes/simple/index.js
@@ -290,5 +290,5 @@ export {
Layout404,
LayoutCategoryIndex,
LayoutPostList,
- LayoutTagIndex,
+ LayoutTagIndex
}