Skip to content

Commit 0541bb0

Browse files
committed
Hero show more 按钮调整
1 parent e173961 commit 0541bb0

File tree

1 file changed

+18
-14
lines changed

1 file changed

+18
-14
lines changed

themes/heo/components/Hero.js

+18-14
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,7 @@ function TopGroup(props) {
247247
)
248248
})}
249249
</div>
250+
{/* 一个大的跳转文章卡片 */}
250251
<TodayCard cRef={todayCardRef} siteInfo={siteInfo} />
251252
</div>
252253
)
@@ -322,10 +323,10 @@ function TodayCard({ cRef, siteInfo }) {
322323
})
323324

324325
/**
325-
* 点击更多
326+
* 查看更多
326327
* @param {*} e
327328
*/
328-
function handleClickMore(e) {
329+
function handleClickShowMore(e) {
329330
e.stopPropagation()
330331
setIsCoverUp(false)
331332
}
@@ -351,10 +352,11 @@ function TodayCard({ cRef, siteInfo }) {
351352
isCoverUp
352353
? 'opacity-100 cursor-pointer'
353354
: 'opacity-0 transform scale-110 pointer-events-none'
354-
} shadow transition-all duration-200 today-card h-full bg-[#0E57D5] dark:bg-yellow-500 rounded-xl relative overflow-hidden flex items-end`}>
355+
} shadow transition-all duration-200 today-card h-full bg-black rounded-xl relative overflow-hidden flex items-end`}>
356+
{/* 卡片文字信息 */}
355357
<div
356358
id='today-card-info'
357-
className='z-10 flex justify-between w-full relative text-white p-10 items-end'>
359+
className='flex justify-between w-full relative text-white p-10 items-end'>
358360
<div className='flex flex-col'>
359361
<div className='text-xs font-light'>
360362
{siteConfig('HEO_HERO_TITLE_4', null, CONFIG)}
@@ -363,29 +365,31 @@ function TodayCard({ cRef, siteInfo }) {
363365
{siteConfig('HEO_HERO_TITLE_5', null, CONFIG)}
364366
</div>
365367
</div>
368+
{/* 查看更多的按钮 */}
366369
<div
367-
onClick={handleClickMore}
368-
className={`'${
369-
isCoverUp ? '' : 'hidden pointer-events-none '
370-
} 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`}>
370+
onClick={handleClickShowMore}
371+
className={`'${isCoverUp ? '' : 'hidden pointer-events-none'} z-10 group flex items-center px-3 h-10 justify-center rounded-3xl
372+
glassmorphism transition-colors duration-100 `}>
371373
<PlusSmall
372374
className={
373-
'w-6 h-6 mr-2 bg-white rounded-full stroke-indigo-400 dark:stroke-yellow-400'
375+
'group-hover:rotate-180 duration-500 transition-all w-6 h-6 mr-2 bg-white rounded-full stroke-black'
374376
}
375377
/>
376378
<div id='more' className='select-none'>
377379
{locale.COMMON.MORE}
378380
</div>
379381
</div>
380382
</div>
381-
<div
383+
384+
{/* 封面图 */}
385+
{/* eslint-disable-next-line @next/next/no-img-element */}
386+
<img
387+
src={siteInfo?.pageCover}
382388
id='today-card-cover'
383389
className={`${
384390
isCoverUp ? '' : ' pointer-events-none'
385-
} cursor-pointer today-card-cover absolute w-full h-full top-0`}
386-
style={{
387-
background: `url('${siteInfo?.pageCover}') no-repeat center /cover`
388-
}}></div>
391+
} hover:scale-110 duration-1000 object-cover cursor-pointer today-card-cover absolute w-full h-full top-0`}
392+
/>
389393
</div>
390394
</div>
391395
)

0 commit comments

Comments
 (0)