diff --git a/themes/fukasawa/components/TopNav.js b/themes/fukasawa/components/TopNav.js index 4a9f9e21..8f9bf89e 100644 --- a/themes/fukasawa/components/TopNav.js +++ b/themes/fukasawa/components/TopNav.js @@ -2,6 +2,7 @@ import { useState } from 'react' import Collapse from './Collapse' import GroupMenu from './GroupMenu' import Logo from './Logo' +import SearchInput from './SearchInput' /** * 顶部导航 @@ -21,13 +22,14 @@ const TopNav = props => {
{/* 左侧LOGO 标题 */}
- +
@@ -35,8 +37,8 @@ const TopNav = props => { {/* 右侧功能 */}
- 菜单 { isOpen ? : } -
+ 菜单 {isOpen ? : } +
diff --git a/themes/fukasawa/config_fuka.js b/themes/fukasawa/config_fuka.js index 0d7250ca..777ecf18 100644 --- a/themes/fukasawa/config_fuka.js +++ b/themes/fukasawa/config_fuka.js @@ -8,7 +8,7 @@ const FUKA_CONFIG = { MENU_CATEGORY: true, // 显示分类 MENU_TAG: true, // 显示标签 MENU_ARCHIVE: true, // 显示归档 - MENU_SEARCH: true // 显示搜索 + MENU_SEARCH: false // 显示搜索 } export default FUKA_CONFIG diff --git a/themes/hexo/components/HeaderArticle.js b/themes/hexo/components/HeaderArticle.js index ce9b3484..3e91179d 100644 --- a/themes/hexo/components/HeaderArticle.js +++ b/themes/hexo/components/HeaderArticle.js @@ -63,7 +63,7 @@ export default function HeaderArticle({ post, siteInfo }) {
{post.category && <> -
+
{post.category}
@@ -77,7 +77,7 @@ export default function HeaderArticle({ post, siteInfo }) { href={`/archive#${post?.date?.start_date?.substr(0, 7)}`} passHref > - + {locale.COMMON.POST_TIME}: {date} diff --git a/themes/next/LayoutIndex.js b/themes/next/LayoutIndex.js index 970cb18a..b9ff52b6 100644 --- a/themes/next/LayoutIndex.js +++ b/themes/next/LayoutIndex.js @@ -10,7 +10,7 @@ export const LayoutIndex = (props) => { const { latestPosts } = props const rightAreaSlot = CONFIG_NEXT.RIGHT_LATEST_POSTS && return } + headerSlot={CONFIG_NEXT.HOME_BANNER &&
} sideBarSlot={} rightAreaSlot={rightAreaSlot} {...props} diff --git a/themes/next/components/Header.js b/themes/next/components/Header.js index 363dc6c1..2b63ee72 100644 --- a/themes/next/components/Header.js +++ b/themes/next/components/Header.js @@ -11,7 +11,8 @@ let autoScroll = false * * @returns 头图 */ -export default function Header () { +export default function Header(props) { + const { siteInfo } = props const [typed, changeType] = useState() useEffect(() => { if (!typed && window && document.getElementById('typed')) { @@ -71,7 +72,7 @@ export default function Header () { } } - function updateHeaderHeight () { + function updateHeaderHeight() { setTimeout(() => { if (window) { const wrapperElement = document.getElementById('wrapper') @@ -97,11 +98,11 @@ export default function Header () { className="duration-500 md:bg-fixed w-full bg-cover bg-center h-screen bg-black" style={{ backgroundImage: - `linear-gradient(rgba(0, 0, 0, 0.8), rgba(0,0,0,0.2), rgba(0, 0, 0, 0.8) ),url("${CONFIG_NEXT.HOME_BANNER_IMAGE}")` + `linear-gradient(rgba(0, 0, 0, 0.8), rgba(0,0,0,0.2), rgba(0, 0, 0, 0.8) ),url("${siteInfo.pageCover}")` }} >
-
+
{ @@ -109,7 +110,7 @@ export default function Header () { }} className="cursor-pointer w-full text-center py-4 text-5xl absolute bottom-10 text-white" > - +
) diff --git a/themes/next/components/Logo.js b/themes/next/components/Logo.js index 692bd11e..8169b624 100644 --- a/themes/next/components/Logo.js +++ b/themes/next/components/Logo.js @@ -2,12 +2,12 @@ import Link from 'next/link' import React from 'react' const Logo = props => { - const { siteInfo } = props + const { siteInfo, className } = props return -
-
{siteInfo?.title}
-
{siteInfo?.description}
-
+
+
{siteInfo?.title}
+
{siteInfo?.description}
+
} export default Logo diff --git a/themes/next/components/SideAreaLeft.js b/themes/next/components/SideAreaLeft.js index 42cea5bd..2d3a4db5 100644 --- a/themes/next/components/SideAreaLeft.js +++ b/themes/next/components/SideAreaLeft.js @@ -27,22 +27,22 @@ const SideAreaLeft = props => {
{/* 菜单 */}
- +
- +
{CONFIG_NEXT.MENU_SEARCH &&
- +
}
- - + + {showToc && (
- +
)} @@ -52,21 +52,21 @@ const SideAreaLeft = props => {
{postCount}{locale.COMMON.POSTS} - - | {locale.COMMON.VISITORS} - {/* + + | {locale.COMMON.VISITORS} + {/* | {locale.COMMON.VIEWS} */}
- - + + - {slot &&
- {slot} -
} -
+ {slot &&
+ {slot} +
} +
- + } export default SideAreaLeft