@@ -46,45 +46,54 @@ export const DefaultHero = ({
4646 imageClassName = '' ,
4747 ratio = '2:1' ,
4848} : DefaultHeroProps ) => {
49+ console . log ( 'DefaultHero background' , background )
50+
4951 const px =
5052 isBigTitle && bigTitle ? 'px-layout-sm' : 'px-layout-sm lg:px-layout-md'
5153 const isPlainTitle =
5254 title && ( title === 'string' || typeof title === 'string' )
55+ const isColorBg = background && background !== 'bg-white-100'
5356
5457 return (
5558 < div className = { twMerge ( className , `relative h-full w-full` ) } >
56- { background && (
59+ < div >
5760 < div
58- className = { `-z-1 absolute inset-0 w-full lg:mb-news-banner-vertical ${ background } ` }
59- />
60- ) }
61- < div className = { twMerge ( `pt-10 lg:pt-20` , px , titleClassName ) } >
62- { title &&
63- ( isPlainTitle ? (
64- < Typography variant = 'h1' id = 'mainTitle' >
65- { title }
66- </ Typography >
67- ) : isBigTitle && bigTitle ? (
68- < >
69- < div className = 'pr-16' >
70- < Blocks id = 'mainTitle' value = { title } as = 'h1' variant = 'xl' />
71- </ div >
61+ className = { twMerge (
62+ `pt-10 lg:pt-16 ${ isColorBg ? `${ isColorBg } pb-news-banner-vertical` : '' } ` ,
63+ px ,
64+ titleClassName ,
65+ ) }
66+ >
67+ { title &&
68+ ( isPlainTitle ? (
69+ < Typography variant = 'h1' id = 'mainTitle' >
70+ { title }
71+ </ Typography >
72+ ) : isBigTitle && bigTitle ? (
73+ < >
74+ < div className = 'pr-16' >
75+ < Blocks id = 'mainTitle' value = { title } as = 'h1' variant = 'xl' />
76+ </ div >
77+ < div >
78+ < Blocks value = { bigTitle } as = 'h2' variant = '3xl' />
79+ </ div >
80+ </ >
81+ ) : (
7282 < div >
73- < Blocks value = { bigTitle } as = 'h2' variant = '3xl ' />
83+ < Blocks id = 'mainTitle' value = { title } variant = 'h1 ' />
7484 </ div >
75- </ >
76- ) : (
77- < div >
78- < Blocks id = 'mainTitle' value = { title } variant = 'h1' />
79- </ div >
80- ) ) }
85+ ) ) }
86+ { subTitle && subTitle }
87+ </ div >
8188 </ div >
82- { subTitle && subTitle }
8389 { figure && (
8490 < Image
8591 grid = 'sm'
8692 loading = 'eager'
87- className = { twMerge ( `lg:px-layout-md` , imageWrapperClassName ) }
93+ className = { twMerge (
94+ `${ isColorBg ? 'lg:-mt-news-banner-vertical' : '' } lg:px-layout-md` ,
95+ imageWrapperClassName ,
96+ ) }
8897 aspectRatio = { ratio }
8998 image = { figure . image }
9099 caption = { figure . caption }
0 commit comments