diff --git a/themes/hexo/components/BlogPostCard.js b/themes/hexo/components/BlogPostCard.js
index 74912ee8..acc06a34 100644
--- a/themes/hexo/components/BlogPostCard.js
+++ b/themes/hexo/components/BlogPostCard.js
@@ -4,6 +4,7 @@ import React from 'react'
import TagItemMini from './TagItemMini'
import CONFIG_HEXO from '../config_hexo'
import NotionPage from '@/components/NotionPage'
+import Image from 'next/image'
const BlogPostCard = ({ post, showSummary, siteInfo }) => {
const showPreview = CONFIG_HEXO.POST_LIST_PREVIEW && post.blockMap
@@ -15,6 +16,7 @@ const BlogPostCard = ({ post, showSummary, siteInfo }) => {
{
{showPageCover && !showPreview && post?.page_cover && (
-
+
{/* eslint-disable-next-line @next/next/no-img-element */}
-

- {/*
*/}
+ className="w-full cursor-pointer object-cover duration-200 hover:scale-125 "
+ /> */}
+
+
+
)}
diff --git a/themes/hexo/components/Header.js b/themes/hexo/components/Header.js
index 7f38552e..3644b6c1 100644
--- a/themes/hexo/components/Header.js
+++ b/themes/hexo/components/Header.js
@@ -1,3 +1,4 @@
+import Image from 'next/image'
import { useEffect, useState } from 'react'
import Typed from 'typed.js'
import CONFIG_HEXO from '../config_hexo'
@@ -45,7 +46,7 @@ const Header = props => {
}
})
- function updateHeaderHeight () {
+ function updateHeaderHeight() {
requestAnimationFrame(() => {
const wrapperElement = document.getElementById('wrapper')
wrapperTop = wrapperElement?.offsetTop
@@ -53,32 +54,34 @@ const Header = props => {
}
return (
-
)
}
@@ -104,12 +107,12 @@ const scrollTrigger = () => {
) {
autoScroll = true
window.scrollTo({ top: wrapperTop, behavior: 'smooth' })
- requestAnimationFrame(autoScrollEnd)
+ autoScrollEnd()
}
if ((scrollS < windowTop) && (scrollS < window.innerHeight) && !autoScroll) {
autoScroll = true
window.scrollTo({ top: 0, behavior: 'smooth' })
- requestAnimationFrame(autoScrollEnd)
+ autoScrollEnd()
}
windowTop = scrollS
})
diff --git a/themes/hexo/components/LatestPostsGroup.js b/themes/hexo/components/LatestPostsGroup.js
index 9e799aa9..009e91cb 100644
--- a/themes/hexo/components/LatestPostsGroup.js
+++ b/themes/hexo/components/LatestPostsGroup.js
@@ -1,5 +1,6 @@
import BLOG from '@/blog.config'
import { useGlobal } from '@/lib/global'
+import Image from 'next/image'
import Link from 'next/link'
import { useRouter } from 'next/router'
@@ -19,46 +20,51 @@ const LatestPostsGroup = ({ latestPosts, siteInfo }) => {
}
return <>
-
-
-
- {locale.COMMON.LATEST_POSTS}
-
-
- {latestPosts.map(post => {
- const selected = currentPath === `${BLOG.SUB_PATH}/${post.slug}`
- const headerImage = post?.page_cover
- ? `url("${post.page_cover}")`
- : `url("${siteInfo?.pageCover}")`
-
- return (
- (
-
-
-
+
-
{post.title}
-
{post.lastEditedTime}
+
+ {locale.COMMON.LATEST_POSTS}
-
+
+ {latestPosts.map(post => {
+ const selected = currentPath === `${BLOG.SUB_PATH}/${post.slug}`
- )
- )
- })}
- >
+ const headerImage = post?.page_cover ? post.page_cover : siteInfo?.pageCover
+
+ return (
+ (
+
+
+
+
+
+
+
{post.title}
+
{post.lastEditedTime}
+
+
+
+ )
+ )
+ })}
+ >
}
export default LatestPostsGroup
diff --git a/themes/hexo/components/TopNav.js b/themes/hexo/components/TopNav.js
index 374f59ce..d3fe3f1b 100644
--- a/themes/hexo/components/TopNav.js
+++ b/themes/hexo/components/TopNav.js
@@ -61,7 +61,7 @@ const TopNav = props => {
nav && nav.classList.replace('transparent', 'dark:bg-hexo-black-gray')
}
- const showNav = scrollS <= windowTop || scrollS < 5 || (header && scrollS <= header.clientHeight)// 非首页无大图时影藏顶部 滚动条置顶时隐藏
+ const showNav = scrollS <= windowTop || scrollS < 5 || (header && scrollS <= header.clientHeight * 2)// 非首页无大图时影藏顶部 滚动条置顶时隐藏
if (!showNav) {
nav && nav.classList.replace('top-0', '-top-20')
windowTop = scrollS