diff --git a/pages/_document.js b/pages/_document.js index c053a632..6b7daa70 100644 --- a/pages/_document.js +++ b/pages/_document.js @@ -17,7 +17,7 @@ class MyDocument extends Document { - +
diff --git a/themes/example/style.js b/themes/example/style.js index 7a59e053..0708b7b5 100644 --- a/themes/example/style.js +++ b/themes/example/style.js @@ -6,9 +6,9 @@ */ const Style = () => { return diff --git a/themes/fukasawa/style.js b/themes/fukasawa/style.js index e96d8036..e730d919 100644 --- a/themes/fukasawa/style.js +++ b/themes/fukasawa/style.js @@ -6,11 +6,13 @@ */ const Style = () => { return diff --git a/themes/heo/components/Header.js b/themes/heo/components/Header.js index f654d230..624f8a49 100644 --- a/themes/heo/components/Header.js +++ b/themes/heo/components/Header.js @@ -10,7 +10,7 @@ import throttle from 'lodash.throttle' */ const Header = props => { const [isOpen, changeShow] = useState(false) - const [headerBgShow, setHeaderBgShow] = useState(false) + const [fixedNav, setHeaderBgShow] = useState(false) const [whiteTitle, setWhiteTitle] = useState(false) const toggleMenuOpen = () => { @@ -29,15 +29,15 @@ const Header = props => { const throttleMs = 200 /** - * 根据滚动条,切换导航栏样式 - */ + * 根据滚动条,切换导航栏样式 + */ const scrollTrigger = useCallback(throttle(() => { const scrollS = window.scrollY const header = document.querySelector('#header') const postHeader = document.querySelector('#post-bg') // 导航栏设置 白色背景 - if (header && scrollS > 60) { + if (header && scrollS > 0) { setHeaderBgShow(true) setWhiteTitle(false) } else { @@ -50,21 +50,23 @@ const Header = props => { return (<> {/* 头条 */} - + ) } diff --git a/themes/heo/components/PaginationNumber.js b/themes/heo/components/PaginationNumber.js index 7be7901a..3cb5105f 100644 --- a/themes/heo/components/PaginationNumber.js +++ b/themes/heo/components/PaginationNumber.js @@ -27,10 +27,12 @@ const PaginationNumber = ({ page, totalPage }) => { } /** - * 调到指定页 - */ + * 调到指定页 + */ const jumpToPage = () => { - router.push(value === 1 ? `${pagePrefix}/` : `${pagePrefix}/page/${value}`) + if (value) { + router.push(value === 1 ? `${pagePrefix}/` : `${pagePrefix}/page/${value}`) + } } return ( diff --git a/themes/heo/index.js b/themes/heo/index.js index af648427..8ed171dd 100644 --- a/themes/heo/index.js +++ b/themes/heo/index.js @@ -124,7 +124,14 @@ const LayoutBase = props => { * @returns */ const LayoutIndex = (props) => { - return + // 博客列表上方嵌入一个 通知横幅和英雄块 + const headerSlot = <> + {/* 通知横幅 */} + + + + + return } /** @@ -133,18 +140,10 @@ const LayoutIndex = (props) => { * @returns */ const LayoutPostList = (props) => { - // 博客列表上方嵌入一个 通知横幅和英雄块 - const headerSlot =
- {/* 通知横幅 */} - - -
- // 右侧栏 const slotRight = - return - + return {/* 文章分类条 */} diff --git a/themes/heo/style.js b/themes/heo/style.js index 5b462e3b..b1d0c4e3 100644 --- a/themes/heo/style.js +++ b/themes/heo/style.js @@ -6,8 +6,8 @@ */ const Style = () => { return diff --git a/themes/next/style.js b/themes/next/style.js index 7a59e053..d01b13b3 100644 --- a/themes/next/style.js +++ b/themes/next/style.js @@ -6,9 +6,13 @@ */ const Style = () => { return diff --git a/themes/nobelium/style.js b/themes/nobelium/style.js index 7a59e053..5e8eaa5a 100644 --- a/themes/nobelium/style.js +++ b/themes/nobelium/style.js @@ -7,8 +7,9 @@ const Style = () => { return diff --git a/themes/plog/style.js b/themes/plog/style.js index 7a59e053..23643fa9 100644 --- a/themes/plog/style.js +++ b/themes/plog/style.js @@ -6,11 +6,10 @@ */ const Style = () => { return } diff --git a/themes/simple/style.js b/themes/simple/style.js index 1d8141b9..647a404e 100644 --- a/themes/simple/style.js +++ b/themes/simple/style.js @@ -7,6 +7,11 @@ const Style = () => { return