diff --git a/themes/hexo/LayoutBase.js b/themes/hexo/LayoutBase.js index 925455a4..06399f52 100644 --- a/themes/hexo/LayoutBase.js +++ b/themes/hexo/LayoutBase.js @@ -12,6 +12,9 @@ import LoadingCover from './components/LoadingCover' import { useGlobal } from '@/lib/global' import BLOG from '@/blog.config' import FacebookPage from '@/components/FacebookPage' +import AOS from 'aos' +import 'aos/dist/aos.css' // You can also use for styles +import { isBrowser } from '@/lib/utils' /** * 基础布局 采用左右两侧布局,移动端使用顶部导航栏 @@ -51,6 +54,10 @@ const LayoutBase = props => { return () => document.removeEventListener('scroll', scrollListener) }, [show]) + if (isBrowser()) { + AOS.init() + } + return (
diff --git a/themes/hexo/components/BlogPostCard.js b/themes/hexo/components/BlogPostCard.js index 39e6cbc5..6e617b90 100644 --- a/themes/hexo/components/BlogPostCard.js +++ b/themes/hexo/components/BlogPostCard.js @@ -8,7 +8,13 @@ import NotionPage from '@/components/NotionPage' const BlogPostCard = ({ post, showSummary }) => { const showPreview = CONFIG_HEXO.POST_LIST_PREVIEW && post.blockMap return ( -
+
for styles import FloatDarkModeButton from './components/FloatDarkModeButton' +import { isBrowser } from '@/lib/utils' /** * 基础布局 采用左右两侧布局,移动端使用顶部导航栏 @@ -44,7 +45,9 @@ const LayoutBase = props => { return () => document.removeEventListener('scroll', scrollListener) }, [show]) - AOS.init() + if (isBrowser()) { + AOS.init() + } return (
diff --git a/themes/matery/components/BlogPostCard.js b/themes/matery/components/BlogPostCard.js index 65900d9d..0f58b1f2 100644 --- a/themes/matery/components/BlogPostCard.js +++ b/themes/matery/components/BlogPostCard.js @@ -13,10 +13,10 @@ const BlogPostCard = ({ post, showSummary }) => { data-aos-easing="ease-in-out" data-aos-once="false" data-aos-anchor-placement="top-bottom" - className="w-full mb-4 drop-shadow-md border dark:border-black rounded-xl bg-white dark:bg-hexo-black-gray"> + className="w-full mb-4 h-full overflow-auto drop-shadow-md border dark:border-black rounded-xl bg-white dark:bg-hexo-black-gray"> - {/* 固定高度72 ,没有描述用图片填充 */} -
+ {/* 固定高度 ,空白用图片拉升填充 */} +
{/* 头部图片 填充卡片 */} {CONFIG_MATERY.POST_LIST_COVER && !showPreview && post?.page_cover && ( @@ -33,7 +33,7 @@ const BlogPostCard = ({ post, showSummary }) => { )} -
+
{/* 描述 */}
diff --git a/themes/next/LayoutBase.js b/themes/next/LayoutBase.js index f9d2580d..07b614e4 100644 --- a/themes/next/LayoutBase.js +++ b/themes/next/LayoutBase.js @@ -13,6 +13,9 @@ import React from 'react' import smoothscroll from 'smoothscroll-polyfill' import CONFIG_NEXT from './config_next' import Live2D from '@/components/Live2D' +import AOS from 'aos' +import 'aos/dist/aos.css' // You can also use for styles +import { isBrowser } from '@/lib/utils' /** * 基础布局 采用左右两侧布局,移动端使用顶部导航栏 @@ -58,6 +61,10 @@ const LayoutBase = (props) => { return () => document.removeEventListener('scroll', scrollListener) }, [show]) + if (isBrowser()) { + AOS.init() + } + return (<> diff --git a/themes/next/components/ArticleDetail.js b/themes/next/components/ArticleDetail.js index 478627b3..7a982580 100644 --- a/themes/next/components/ArticleDetail.js +++ b/themes/next/components/ArticleDetail.js @@ -25,7 +25,14 @@ export default function ArticleDetail(props) { const { locale } = useGlobal() const date = formatDate(post?.date?.start_date || post?.createdTime, locale.LOCALE) - return (
+ return (
@@ -50,7 +57,7 @@ export default function ArticleDetail(props) { {post?.type !== 'Page' && (<>
- {date} + {date}
| {post.lastEditedTime} diff --git a/themes/next/components/BlogPostCard.js b/themes/next/components/BlogPostCard.js index e1bcd070..1513118d 100644 --- a/themes/next/components/BlogPostCard.js +++ b/themes/next/components/BlogPostCard.js @@ -13,7 +13,7 @@ const BlogPostCard = ({ post, showSummary }) => { const { locale } = useGlobal() const showPreview = CONFIG_NEXT.POST_LIST_PREVIEW && post.blockMap return ( - +
{ - return
+ return
<>{headerSlot}
{children} diff --git a/themes/next/components/PaginationNumber.js b/themes/next/components/PaginationNumber.js index 55311e56..323a3eb0 100644 --- a/themes/next/components/PaginationNumber.js +++ b/themes/next/components/PaginationNumber.js @@ -16,7 +16,13 @@ const PaginationNumber = ({ page, totalPage }) => { const pages = generatePages(pagePrefix, page, currentPage, totalPage) return ( -
+
{/* 上一页 */} { const router = useRouter() const currentPage = +page return ( -
+
{ const showToc = post && post.toc && post.toc.length > 1 return + } export default SideAreaLeft diff --git a/themes/nobelium/LayoutBase.js b/themes/nobelium/LayoutBase.js index a8fb1b3e..1009b371 100644 --- a/themes/nobelium/LayoutBase.js +++ b/themes/nobelium/LayoutBase.js @@ -3,6 +3,7 @@ import React from 'react' import Nav from './components/Nav' import { Footer } from './components/Footer' import JumpToTopButton from './components/JumpToTopButton' +import Live2D from '@/components/Live2D' /** * 基础布局 采用左右两侧布局,移动端使用顶部导航栏 @@ -34,6 +35,11 @@ const LayoutBase = props => {
+ + {/* 左下角悬浮 */} +
+ +
) }