Skip to content

Commit

Permalink
Merge pull request #2853 from tangly1024/release/4.7.5
Browse files Browse the repository at this point in the history
Starter 英雄区配图新增横幅图片
  • Loading branch information
tangly1024 authored Oct 11, 2024
2 parents 42c294c + d9b71bc commit aa85f6c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
Binary file added public/images/starter/hero/banner.webp
Binary file not shown.
12 changes: 11 additions & 1 deletion themes/starter/components/Hero.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* eslint-disable @next/next/no-img-element */
import LazyImage from '@/components/LazyImage'
import { siteConfig } from '@/lib/config'
/**
* 英雄大图区块
Expand Down Expand Up @@ -66,7 +67,8 @@ export const Hero = () => {
{/* eslint-disable-next-line @next/next/no-img-element */}
<img
src={siteConfig('STARTER_HERO_PREVIEW_IMAGE')}
alt='hero'
alt={siteConfig('TITLE')}
title={siteConfig('TITLE')}
className='mx-auto max-w-full rounded-t-xl rounded-tr-xl'
/>
</div>
Expand All @@ -83,6 +85,14 @@ export const Hero = () => {
)}
</div>
</div>

{/* 横幅图片 */}
{siteConfig('STARTER_HERO_BANNER_IMAGE') && (
<div className='w-full'>
<LazyImage
src={siteConfig('STARTER_HERO_BANNER_IMAGE')}></LazyImage>
</div>
)}
</div>
{/* <!-- ====== Hero Section End --> */}
</>
Expand Down
2 changes: 2 additions & 0 deletions themes/starter/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit aa85f6c

Please sign in to comment.