diff --git a/themes/heo/components/InfoCard.js b/themes/heo/components/InfoCard.js index a740f3b9..399efb1f 100644 --- a/themes/heo/components/InfoCard.js +++ b/themes/heo/components/InfoCard.js @@ -1,6 +1,6 @@ -import { siteConfig } from '@/lib/config' import { ArrowRightCircle, GlobeAlt } from '@/components/HeroIcons' import LazyImage from '@/components/LazyImage' +import { siteConfig } from '@/lib/config' import Link from 'next/link' import { useRouter } from 'next/router' import { useState } from 'react' @@ -19,41 +19,48 @@ export function InfoCard(props) { // 在文章详情页特殊处理 const isSlugPage = router.pathname.indexOf('/[prefix]') === 0 return ( - - {/* 信息卡牌第一行 */} -
- {/* 问候语 */} - -
- -
-
+ + {/* 信息卡牌第一行 */} +
+ {/* 问候语 */} + +
+ +
+
-

- {siteConfig('AUTHOR')} -

+

{siteConfig('AUTHOR')}

- {/* 公告栏 */} -
- -
+ {/* 公告栏 */} +
+ +
-
-
- {/* 两个社交按钮 */} -
- -
-
- {siteConfig('HEO_INFO_CARD_URL', null, CONFIG) && - - - } -
-
- -
-
+
+
+ {/* 两个社交按钮 */} +
+ + + +
+
+ {siteConfig('HEO_INFO_CARD_URL', null, CONFIG) && ( + + + + )} +
+
+ +
+
) } @@ -69,9 +76,13 @@ function GreetingsWords() { setGreeting(greetings[randomIndex]) } - return
- {greeting} + return ( +
+ {greeting}
+ ) } /** @@ -79,10 +90,19 @@ function GreetingsWords() { * @returns */ function MoreButton() { - return -
- -
了解更多
-
+ return ( + +
+ +
了解更多
+
+ ) } diff --git a/themes/heo/components/PostHeader.js b/themes/heo/components/PostHeader.js index a85d39d0..e4452e92 100644 --- a/themes/heo/components/PostHeader.js +++ b/themes/heo/components/PostHeader.js @@ -22,7 +22,7 @@ export default function PostHeader({ post, siteInfo, isDarkMode }) { return (
+ className='md:mb-0 -mb-5 w-full h-[30rem] relative md:flex-shrink-0 overflow-hidden bg-cover bg-center bg-no-repeat z-10'>
{/* 文章背景图 */}
+ className='coverdiv lg:opacity-50 lg:translate-x-96 lg:rotate-12'>
diff --git a/themes/heo/components/WavesArea.js b/themes/heo/components/WavesArea.js index b8f1198a..70095ebb 100644 --- a/themes/heo/components/WavesArea.js +++ b/themes/heo/components/WavesArea.js @@ -1,4 +1,5 @@ import { useGlobal } from '@/lib/global' +import { useEffect, useState } from 'react' /** * 文章波浪动画 @@ -6,60 +7,96 @@ import { useGlobal } from '@/lib/global' export default function WavesArea() { const { isDarkMode } = useGlobal() const color = isDarkMode ? '#18171d' : '#f7f9fe' + const [showWave, setShowWave] = useState(true) + + useEffect(() => { + const handleResize = () => { + if (window.innerWidth < 800) { + setShowWave(false) + } else { + setShowWave(true) + } + } + + // Initial check + handleResize() + + // Add event listener for window resize + window.addEventListener('resize', handleResize) + + // Cleanup event listener on component unmount + return () => { + window.removeEventListener('resize', handleResize) + } + }, []) + + if (!showWave) { + return null + } return ( -
- - - - - - - - - - - - -
+ .parallax > use { + animation: move-forever 30s cubic-bezier(0.55, 0.5, 0.45, 0.5) + infinite; + } + .parallax > use:nth-child(1) { + animation-delay: -2s; + animation-duration: 7s; + fill: ${color}; + opacity: 0.5; + } + .parallax > use:nth-child(2) { + animation-delay: -3s; + animation-duration: 10s; + fill: ${color}; + opacity: 0.6; + } + .parallax > use:nth-child(3) { + animation-delay: -4s; + animation-duration: 13s; + fill: ${color}; + opacity: 0.7; + } + .parallax > use:nth-child(4) { + animation-delay: -5s; + animation-duration: 20s; + fill: ${color}; + } + + @keyframes move-forever { + 0% { + transform: translate3d(-90px, 0, 0); + } + 100% { + transform: translate3d(85px, 0, 0); + } + } + `} + + ) } diff --git a/themes/heo/index.js b/themes/heo/index.js index 8e19a166..26c1aeda 100644 --- a/themes/heo/index.js +++ b/themes/heo/index.js @@ -297,7 +297,7 @@ const LayoutSlug = props => { data-wow-delay='.2s' className='wow fadeInUp'> {/* Notion文章主体 */} -
+
{post && }