diff --git a/themes/next/components/Card.js b/themes/next/components/Card.js
index de70f580..63163dd0 100644
--- a/themes/next/components/Card.js
+++ b/themes/next/components/Card.js
@@ -1,11 +1,11 @@
/**
* 卡片组件
- * @param {*} param0
- * @returns
+ * @param {*} param0
+ * @returns
*/
const Card = (props) => {
- const { children, headerSlot, className } = props
- return
+ const { children, headerSlot, className } = props
+ return
<>{headerSlot}>
{children}
diff --git a/themes/next/components/CategoryGroup.js b/themes/next/components/CategoryGroup.js
index c00b5d1c..10a55cfd 100644
--- a/themes/next/components/CategoryGroup.js
+++ b/themes/next/components/CategoryGroup.js
@@ -19,7 +19,7 @@ const CategoryGroup = ({ currentCategory, categories }) => {
: 'dark:text-gray-400 text-gray-500 hover:text-white hover:bg-gray-500 dark:hover:text-white') +
' text-sm w-full items-center duration-300 px-2 cursor-pointer py-1 font-light'}>
- {category.name}({category.count})
+ {category.name}({category.count})
);
})}
diff --git a/themes/next/components/MenuList.js b/themes/next/components/MenuList.js
index 96d0726e..67250c54 100644
--- a/themes/next/components/MenuList.js
+++ b/themes/next/components/MenuList.js
@@ -33,19 +33,19 @@ export const MenuList = (props) => {
return (
<>
{/* 大屏模式菜单 */}
-
+
{/* 移动端菜单 */}
-
+
>
)
}
diff --git a/themes/next/components/NextRecentComments.js b/themes/next/components/NextRecentComments.js
index 0237b07f..70661948 100644
--- a/themes/next/components/NextRecentComments.js
+++ b/themes/next/components/NextRecentComments.js
@@ -26,7 +26,7 @@ const NextRecentComments = (props) => {
{!onLoading && comments && comments.length === 0 && No Comments
}
{!onLoading && comments && comments.length > 0 && comments.map((comment) =>
-
--{comment.nick}
+
--{comment.nick}
)}
>
diff --git a/themes/next/components/SearchInput.js b/themes/next/components/SearchInput.js
index 1ccf35fc..47902822 100644
--- a/themes/next/components/SearchInput.js
+++ b/themes/next/components/SearchInput.js
@@ -106,7 +106,7 @@ const SearchInput = ({ currentTag, keyword, cRef }) => {
{(showClean &&
-
+
)}
diff --git a/themes/next/components/SideAreaRight.js b/themes/next/components/SideAreaRight.js
index 4a4b30b8..9b72e72d 100644
--- a/themes/next/components/SideAreaRight.js
+++ b/themes/next/components/SideAreaRight.js
@@ -59,7 +59,7 @@ const SideAreaRight = (props) => {
+ className='text-gray-500 hover:text-black dark:text-gray-400 dark:hover:text-white hover:underline cursor-pointer'>
{locale.COMMON.MORE}
@@ -79,7 +79,7 @@ const SideAreaRight = (props) => {
+ className="text-gray-500 hover:text-black dark:hover:text-white hover:underline cursor-pointer">
{locale.COMMON.MORE}{' '}
diff --git a/themes/next/components/SideBar.js b/themes/next/components/SideBar.js
index 27fe65b0..d863c74a 100644
--- a/themes/next/components/SideBar.js
+++ b/themes/next/components/SideBar.js
@@ -35,7 +35,7 @@ const SideBar = (props) => {
+ className='mb-3 text-gray-500 hover:text-black dark:text-gray-400 dark:hover:text-white hover:underline cursor-pointer'>
{locale.COMMON.MORE}
@@ -53,7 +53,7 @@ const SideBar = (props) => {
+ className='text-gray-500 hover:text-black dark:hover:text-white hover:underline cursor-pointer'>
{locale.COMMON.MORE}
diff --git a/themes/next/components/TopNav.js b/themes/next/components/TopNav.js
index 23839a84..9cf2a1aa 100644
--- a/themes/next/components/TopNav.js
+++ b/themes/next/components/TopNav.js
@@ -56,7 +56,7 @@ const TopNav = (props) => {
}
const { searchModal } = useNextGlobal()
- const showSeachModal = () => {
+ const showSearchModal = () => {
if (siteConfig('ALGOLIA_APP_ID')) {
searchModal?.current?.openSearch()
} else {
@@ -73,7 +73,7 @@ const TopNav = (props) => {
+ className='mb-3 text-gray-500 hover:text-black dark:text-gray-400 dark:hover:text-white hover:underline cursor-pointer'>
{locale.COMMON.MORE}
@@ -90,7 +90,7 @@ const TopNav = (props) => {
+ className='text-gray-500 hover:text-black dark:hover:text-white hover:underline cursor-pointer'>
{locale.COMMON.MORE}
@@ -123,8 +123,8 @@ const TopNav = (props) => {
{/* 右侧功能 */}
-
-
{locale.NAV.SEARCH}
+
+
diff --git a/themes/next/index.js b/themes/next/index.js
index e311c516..6b6c69b9 100644
--- a/themes/next/index.js
+++ b/themes/next/index.js
@@ -21,12 +21,13 @@ import { useRouter } from 'next/router'
import ArticleDetail from './components/ArticleDetail'
import Link from 'next/link'
import BlogListBar from './components/BlogListBar'
-import { Transition } from '@headlessui/react'
import { Style } from './style'
import replaceSearchResult from '@/components/Mark'
import CommonHead from '@/components/CommonHead'
import { siteConfig } from '@/lib/config'
import AlgoliaSearchModal from '@/components/AlgoliaSearchModal'
+import Announcement from './components/Announcement'
+import Card from './components/Card'
// 主题全局状态
const ThemeGlobalNext = createContext()
@@ -39,7 +40,6 @@ export const useNextGlobal = () => useContext(ThemeGlobalNext)
*/
const LayoutBase = (props) => {
const { children, headerSlot, rightAreaSlot, meta, post } = props
- const { onLoading } = useGlobal()
const targetRef = useRef(null)
const floatButtonGroup = useRef(null)
const [showRightFloat, switchShow] = useState(false)
@@ -108,19 +108,7 @@ const LayoutBase = (props) => {
{/* 中央内容 */}
-
- {children}
-
+ {children}
{/* 右侧栏样式 */}
@@ -157,7 +145,20 @@ const LayoutBase = (props) => {
* @returns
*/
const LayoutIndex = (props) => {
- return
+ const { notice } = props
+ return <>
+ {/* 首页移动端顶部显示公告 */}
+
+
+
+
+
+
+ {siteConfig('POST_LIST_STYLE') !== 'page'
+ ?
+ :
+ }
+ >
}
/**