From 12a0367ddc6d64183728c54a1ef4a4b83da86b2d Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Sat, 11 Mar 2023 09:55:59 +0800 Subject: [PATCH] =?UTF-8?q?hexo=20=E5=8A=A8=E7=94=BB=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E3=80=81=E6=94=AF=E6=8C=81=E5=9B=BE=E7=89=87=E5=8D=A1=E7=89=8C?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- themes/hexo/LayoutBase.js | 6 +++--- themes/hexo/components/BlogPostCard.js | 9 ++++----- themes/hexo/components/Header.js | 8 ++++---- themes/hexo/components/HeaderArticle.js | 4 ++-- themes/hexo/config_hexo.js | 1 + 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/themes/hexo/LayoutBase.js b/themes/hexo/LayoutBase.js index 2e17addc..4808648f 100644 --- a/themes/hexo/LayoutBase.js +++ b/themes/hexo/LayoutBase.js @@ -77,11 +77,11 @@ const LayoutBase = props => { {/* 右下角悬浮 */} -
+
diff --git a/themes/hexo/components/BlogPostCard.js b/themes/hexo/components/BlogPostCard.js index 1baa3d82..108ac6fa 100644 --- a/themes/hexo/components/BlogPostCard.js +++ b/themes/hexo/components/BlogPostCard.js @@ -15,13 +15,12 @@ const BlogPostCard = ({ post, showSummary, siteInfo }) => {
+ border dark:border-black rounded-xl bg-white dark:bg-hexo-black-gray`}>
{ }) function updateHeaderHeight () { - setTimeout(() => { + requestAnimationFrame(() => { const wrapperElement = document.getElementById('wrapper') wrapperTop = wrapperElement?.offsetTop - }, 500) + }) } return ( @@ -103,12 +103,12 @@ const scrollTrigger = () => { ) { autoScroll = true window.scrollTo({ top: wrapperTop, behavior: 'smooth' }) - setTimeout(autoScrollEnd, 500) + requestAnimationFrame(autoScrollEnd) } if ((scrollS < windowTop) && (scrollS < window.innerHeight) && !autoScroll) { autoScroll = true window.scrollTo({ top: 0, behavior: 'smooth' }) - setTimeout(autoScrollEnd, 500) + requestAnimationFrame(autoScrollEnd) } windowTop = scrollS } diff --git a/themes/hexo/components/HeaderArticle.js b/themes/hexo/components/HeaderArticle.js index fef4ec74..df1593a6 100644 --- a/themes/hexo/components/HeaderArticle.js +++ b/themes/hexo/components/HeaderArticle.js @@ -19,7 +19,7 @@ export default function HeaderArticle({ post, siteInfo }) { return (
- ); + ) } diff --git a/themes/hexo/config_hexo.js b/themes/hexo/config_hexo.js index feb6dbd8..92e5268b 100644 --- a/themes/hexo/config_hexo.js +++ b/themes/hexo/config_hexo.js @@ -14,6 +14,7 @@ const CONFIG_HEXO = { POST_LIST_COVER_DEFAULT: true, // 封面为空时用站点背景做默认封面 POST_LIST_SUMMARY: true, // 文章摘要 POST_LIST_PREVIEW: true, // 读取文章预览 + POST_LIST_IMG_CROSSOVER: true, // 博客列表图片左右交错 ARTICLE_ADJACENT: true, // 显示上一篇下一篇文章推荐 ARTICLE_COPYRIGHT: true, // 显示文章版权声明