From 0541bb03f9883a54b58131da323ffab89d2c1038 Mon Sep 17 00:00:00 2001 From: "tangly1024.com" Date: Fri, 31 May 2024 16:21:09 +0800 Subject: [PATCH] =?UTF-8?q?Hero=20show=20more=20=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- themes/heo/components/Hero.js | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/themes/heo/components/Hero.js b/themes/heo/components/Hero.js index b43987e6..7e999ebe 100644 --- a/themes/heo/components/Hero.js +++ b/themes/heo/components/Hero.js @@ -247,6 +247,7 @@ function TopGroup(props) { ) })} + {/* 一个大的跳转文章卡片 */} ) @@ -322,10 +323,10 @@ function TodayCard({ cRef, siteInfo }) { }) /** - * 点击更多 + * 查看更多 * @param {*} e */ - function handleClickMore(e) { + function handleClickShowMore(e) { e.stopPropagation() setIsCoverUp(false) } @@ -351,10 +352,11 @@ function TodayCard({ cRef, siteInfo }) { isCoverUp ? 'opacity-100 cursor-pointer' : 'opacity-0 transform scale-110 pointer-events-none' - } shadow transition-all duration-200 today-card h-full bg-[#0E57D5] dark:bg-yellow-500 rounded-xl relative overflow-hidden flex items-end`}> + } shadow transition-all duration-200 today-card h-full bg-black rounded-xl relative overflow-hidden flex items-end`}> + {/* 卡片文字信息 */}
+ className='flex justify-between w-full relative text-white p-10 items-end'>
{siteConfig('HEO_HERO_TITLE_4', null, CONFIG)} @@ -363,14 +365,14 @@ function TodayCard({ cRef, siteInfo }) { {siteConfig('HEO_HERO_TITLE_5', null, CONFIG)}
+ {/* 查看更多的按钮 */}
+ onClick={handleClickShowMore} + className={`'${isCoverUp ? '' : 'hidden pointer-events-none'} z-10 group flex items-center px-3 h-10 justify-center rounded-3xl + glassmorphism transition-colors duration-100 `}>
@@ -378,14 +380,16 @@ function TodayCard({ cRef, siteInfo }) {
-
+ } hover:scale-110 duration-1000 object-cover cursor-pointer today-card-cover absolute w-full h-full top-0`} + /> )