diff --git a/public/images/starter/hero/banner.webp b/public/images/starter/hero/banner.webp new file mode 100644 index 00000000..dbb0198e Binary files /dev/null and b/public/images/starter/hero/banner.webp differ diff --git a/themes/starter/components/Hero.js b/themes/starter/components/Hero.js index 28343ea9..411a6cb5 100644 --- a/themes/starter/components/Hero.js +++ b/themes/starter/components/Hero.js @@ -1,4 +1,5 @@ /* eslint-disable @next/next/no-img-element */ +import LazyImage from '@/components/LazyImage' import { siteConfig } from '@/lib/config' /** * 英雄大图区块 @@ -66,7 +67,8 @@ export const Hero = () => { {/* eslint-disable-next-line @next/next/no-img-element */} hero @@ -83,6 +85,14 @@ export const Hero = () => { )} + + {/* 横幅图片 */} + {siteConfig('STARTER_HERO_BANNER_IMAGE') && ( +
+ +
+ )} {/* */} diff --git a/themes/starter/config.js b/themes/starter/config.js index 4977e200..8aeddb30 100644 --- a/themes/starter/config.js +++ b/themes/starter/config.js @@ -20,7 +20,9 @@ const CONFIG = { STARTER_HERO_BUTTON_2_URL: 'https://github.com/tangly1024/NotionNext', // 英雄区按钮 STARTER_HERO_BUTTON_2_ICON: '/images/starter/github.svg', // 英雄区按钮2的图标,不需要则留空 + // 英雄区配图,如需隐藏,改为空值即可 '' STARTER_HERO_PREVIEW_IMAGE: '/images/starter/hero/hero-image.webp', // 产品预览图 ,默认读取public目录下图片 + STARTER_HERO_BANNER_IMAGE: '/images/starter/hero/banner.webp', // hero区下方的全宽图 // 顶部右侧导航暗流 STARTER_NAV_BUTTON_1_TEXT: 'Sign In',