Skip to content

Commit

Permalink
Hero show more 按钮调整
Browse files Browse the repository at this point in the history
  • Loading branch information
tangly1024 committed May 31, 2024
1 parent e173961 commit 0541bb0
Showing 1 changed file with 18 additions and 14 deletions.
32 changes: 18 additions & 14 deletions themes/heo/components/Hero.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ function TopGroup(props) {
)
})}
</div>
{/* 一个大的跳转文章卡片 */}
<TodayCard cRef={todayCardRef} siteInfo={siteInfo} />
</div>
)
Expand Down Expand Up @@ -322,10 +323,10 @@ function TodayCard({ cRef, siteInfo }) {
})

/**
* 点击更多
* 查看更多
* @param {*} e
*/
function handleClickMore(e) {
function handleClickShowMore(e) {
e.stopPropagation()
setIsCoverUp(false)
}
Expand All @@ -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`}>
{/* 卡片文字信息 */}
<div
id='today-card-info'
className='z-10 flex justify-between w-full relative text-white p-10 items-end'>
className='flex justify-between w-full relative text-white p-10 items-end'>
<div className='flex flex-col'>
<div className='text-xs font-light'>
{siteConfig('HEO_HERO_TITLE_4', null, CONFIG)}
Expand All @@ -363,29 +365,31 @@ function TodayCard({ cRef, siteInfo }) {
{siteConfig('HEO_HERO_TITLE_5', null, CONFIG)}
</div>
</div>
{/* 查看更多的按钮 */}
<div
onClick={handleClickMore}
className={`'${
isCoverUp ? '' : 'hidden pointer-events-none '
} flex items-center px-3 h-10 justify-center bg-[#425aef] hover:bg-[#4259efcb] dark:bg-yellow-500 dark:hover:bg-yellow-600 transition-colors duration-100 rounded-3xl`}>
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 `}>
<PlusSmall
className={
'w-6 h-6 mr-2 bg-white rounded-full stroke-indigo-400 dark:stroke-yellow-400'
'group-hover:rotate-180 duration-500 transition-all w-6 h-6 mr-2 bg-white rounded-full stroke-black'
}
/>
<div id='more' className='select-none'>
{locale.COMMON.MORE}
</div>
</div>
</div>
<div

{/* 封面图 */}
{/* eslint-disable-next-line @next/next/no-img-element */}
<img
src={siteInfo?.pageCover}
id='today-card-cover'
className={`${
isCoverUp ? '' : ' pointer-events-none'
} cursor-pointer today-card-cover absolute w-full h-full top-0`}
style={{
background: `url('${siteInfo?.pageCover}') no-repeat center /cover`
}}></div>
} hover:scale-110 duration-1000 object-cover cursor-pointer today-card-cover absolute w-full h-full top-0`}
/>
</div>
</div>
)
Expand Down

0 comments on commit 0541bb0

Please sign in to comment.