mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-14 15:09:22 +00:00
heo 配置兼容性
This commit is contained in:
@@ -32,6 +32,8 @@ export const siteConfig = (key, defaultVal = null, extendConfig = {}) => {
|
||||
case 'POST_LIST_STYLE':
|
||||
case 'POST_LIST_PREVIEW':
|
||||
case 'POST_URL_PREFIX_MAPPING_CATEGORY':
|
||||
case 'IS_TAG_COLOR_DISTINGUISHED':
|
||||
case 'TAG_SORT_BY_COUNT':
|
||||
return convertVal(extendConfig[key] || defaultVal || BLOG[key])
|
||||
default:
|
||||
}
|
||||
|
||||
@@ -162,13 +162,20 @@ function TagsGroupBar() {
|
||||
* @returns
|
||||
*/
|
||||
function GroupMenu() {
|
||||
const url_1 = siteConfig('HEO_HERO_CATEGORY_1', {}, CONFIG)?.url || ''
|
||||
const title_1 = siteConfig('HEO_HERO_CATEGORY_1', {}, CONFIG)?.title || ''
|
||||
const url_2 = siteConfig('HEO_HERO_CATEGORY_2', {}, CONFIG)?.url || ''
|
||||
const title_2 = siteConfig('HEO_HERO_CATEGORY_2', {}, CONFIG)?.title || ''
|
||||
const url_3 = siteConfig('HEO_HERO_CATEGORY_3', {}, CONFIG)?.url || ''
|
||||
const title_3 = siteConfig('HEO_HERO_CATEGORY_3', {}, CONFIG)?.title || ''
|
||||
|
||||
return (
|
||||
<div className='h-[165px] select-none xl:h-20 flex flex-col justify-between xl:space-y-0 xl:flex-row w-28 lg:w-48 xl:w-full xl:flex-nowrap xl:space-x-3'>
|
||||
<Link
|
||||
href={siteConfig('HEO_HERO_CATEGORY_1', null, CONFIG)?.url}
|
||||
href={url_1}
|
||||
className='group relative overflow-hidden bg-gradient-to-r from-blue-500 to-blue-400 flex h-20 justify-start items-center text-white rounded-xl xl:hover:w-1/2 xl:w-1/3 transition-all duration-500 ease-in'>
|
||||
<div className='font-bold lg:text-lg pl-5 relative -mt-2'>
|
||||
{siteConfig('HEO_HERO_CATEGORY_1', null, CONFIG)?.title}
|
||||
{title_1}
|
||||
<span className='absolute -bottom-0.5 left-5 w-5 h-0.5 bg-white rounded-full'></span>
|
||||
</div>
|
||||
<div className='hidden lg:block absolute right-6 duration-700 ease-in-out transition-all scale-[2] translate-y-6 rotate-12 opacity-20 group-hover:opacity-80 group-hover:scale-100 group-hover:translate-y-0 group-hover:rotate-0'>
|
||||
@@ -176,10 +183,10 @@ function GroupMenu() {
|
||||
</div>
|
||||
</Link>
|
||||
<Link
|
||||
href={siteConfig('HEO_HERO_CATEGORY_2', null, CONFIG)?.url}
|
||||
href={url_2}
|
||||
className='group relative overflow-hidden bg-gradient-to-r from-red-500 to-yellow-500 flex h-20 justify-start items-center text-white rounded-xl xl:hover:w-1/2 xl:w-1/3 transition-all duration-500 ease-in'>
|
||||
<div className='font-bold lg:text-lg pl-5 relative -mt-2'>
|
||||
{siteConfig('HEO_HERO_CATEGORY_2', null, CONFIG)?.title}
|
||||
{title_2}
|
||||
<span className='absolute -bottom-0.5 left-5 w-5 h-0.5 bg-white rounded-full'></span>
|
||||
</div>
|
||||
<div className='hidden lg:block absolute right-6 duration-700 ease-in-out transition-all scale-[2] translate-y-6 rotate-12 opacity-20 group-hover:opacity-80 group-hover:scale-100 group-hover:translate-y-0 group-hover:rotate-0'>
|
||||
@@ -188,10 +195,10 @@ function GroupMenu() {
|
||||
</Link>
|
||||
{/* 第三个标签在小屏上不显示 */}
|
||||
<Link
|
||||
href={siteConfig('HEO_HERO_CATEGORY_3', null, CONFIG)?.url}
|
||||
href={url_3}
|
||||
className='group relative overflow-hidden bg-gradient-to-r from-teal-300 to-cyan-300 hidden h-20 xl:flex justify-start items-center text-white rounded-xl xl:hover:w-1/2 xl:w-1/3 transition-all duration-500 ease-in'>
|
||||
<div className='font-bold text-lg pl-5 relative -mt-2'>
|
||||
{siteConfig('HEO_HERO_CATEGORY_3', null, CONFIG)?.title}
|
||||
{title_3}
|
||||
<span className='absolute -bottom-0.5 left-5 w-5 h-0.5 bg-white rounded-full'></span>
|
||||
</div>
|
||||
<div className='absolute right-6 duration-700 ease-in-out transition-all scale-[2] translate-y-6 rotate-12 opacity-20 group-hover:opacity-80 group-hover:scale-100 group-hover:translate-y-0 group-hover:rotate-0'>
|
||||
|
||||
Reference in New Issue
Block a user