Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

heo 英雄区 #2836

Merged
merged 1 commit into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions themes/heo/components/Hero.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ function Banner(props) {
router.push(`${siteConfig('SUB_PATH', '')}/${randomPost?.slug}`)
}

// 遮罩文字
const coverTitle = siteConfig('HEO_HERO_COVER_TITLE')

return (
<div
id='banners'
Expand All @@ -99,10 +102,10 @@ function Banner(props) {
id='banner-cover'
style={{ backdropFilter: 'blur(15px)' }}
className={
'rounded-xl overflow-hidden opacity-0 group-hover:opacity-100 duration-300 transition-all bg-[#4259efdd] dark:bg-[#dca846] dark:text-white cursor-pointer absolute w-full h-full top-0 flex justify-start items-center'
'z-20 rounded-xl overflow-hidden opacity-0 group-hover:opacity-100 duration-300 transition-all bg-[#4259efdd] dark:bg-[#dca846] dark:text-white cursor-pointer absolute w-full h-full top-0 flex justify-start items-center'
}>
<div className='ml-12 -translate-x-32 group-hover:translate-x-0 duration-300 transition-all ease-in'>
<div className='text-7xl text-white font-extrabold'>随便逛逛</div>
<div className='text-7xl text-white font-extrabold'>{coverTitle}</div>
<div className='-ml-3 text-gray-300'>
<ArrowSmallRight className={'w-24 h-24 stroke-2'} />
</div>
Expand Down
2 changes: 2 additions & 0 deletions themes/heo/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ const CONFIG = {
HEO_HERO_TITLE_4: '新版上线',
HEO_HERO_TITLE_5: 'NotionNext4.0 轻松定制主题',
HEO_HERO_TITLE_LINK: 'https://tangly1024.com',
// 英雄区遮罩文字
HEO_HERO_COVER_TITLE: '随便逛逛',

// 英雄区显示三个置顶分类
HEO_HERO_CATEGORY_1: { title: '必看精选', url: '/tag/必看精选' },
Expand Down