@@ -18,54 +18,48 @@ const {
1818 bg = await Astro .slots .render (' bg' ),
1919} = Astro .props ;
2020
21- const background_image_style =
22- image !== null
23- ? // ? "background-color: #020e59; background-repeat: no-repeat; background-position: center ; background-image: url(" + image + "); background-size: cover;"
24- ' background-repeat: no-repeat; background-position: center ; background-image: url(' +
25- image +
26- ' ); background-size: cover;'
21+ const background_image_class =
22+ image !== undefined
23+ ? ' after:absolute after:inset-0 dark:after:bg-gradient-to-b dark:after:from-transparent dark:after:to-black'
24+ : ' ' ;
25+
26+ const background_text_style =
27+ image !== undefined
28+ ? ' z-10 bg-gray-200/40 dark:bg-gray-500/20 rounded-lg backdrop-blur-xs'
2729 : ' ' ;
2830
2931const headerHeight_sm = ' 72px' ;
3032const headerHeight_md = ' 112px' ;
3133const headerHeight_lg = ' 140px' ;
3234---
3335
34- <section class =` relative md:-mt-[76px] not-prose ${backgroundColor }` {... id ? { id } : {}}>
36+ <section class =" relative md:-mt-[76px] not-prose ${backgroundColor}" {... id ? { id } : {}}>
3537 <div class =" absolute inset-0 pointer-events-none" aria-hidden =" true" >
3638 <slot name =" bg" >
3739 { bg ? <Fragment set :html = { bg } /> : null }
3840 </slot >
3941 </div >
40- <div class =" relative mx-auto px-4 sm:px-6" style ={ background_image_style } >
42+ <div
43+ class ={ ` relative mx-auto px-4 sm:px-6 bg-center bg-no-repeat bg-cover ${background_image_class } ` }
44+ style ={ ` background-image: url(${image }); background-size: cover; ` }
45+ >
4146 <div class =" pt-0 md:pt-[76px] pointer-events-none" ></div >
42- <div
43- class =`min-h-[82.5vh] sm:min-h-[calc(100vh-${headerHeight_sm })] md:min-h-[calc(100vh-${headerHeight_md }-76px)] lg:min-h-[calc(100vh-${headerHeight_lg })]`
44- >
45- <div class =" text-center pb-10 md:pb-16 md:pt-16 max-w-5xl md:mt-5 m-auto" >
47+ <div class =" min-h-[82.5vh] sm:min-h-[calc(100vh-${headerHeight_sm})] md:min-h-[calc(100vh-${headerHeight_md}-76px)] lg:min-h-[calc(100vh-${headerHeight_lg})]" >
48+ <div class ={ ` text-center p-10 md:p-12 max-w-5xl md:mt-5 m-auto relative ${background_text_style } ` } >
4649 {
4750 tagline && (
48- <p
49- class = " text-base text-secondary dark:text-blue-200 font-bold tracking-wide uppercase intersect-once intersect-quarter motion-safe:md:opacity-0 motion-safe:md:intersect:animate-fade"
50- set :html = { tagline }
51- />
51+ <p class = " text-base text-secondary dark:text-blue-200 font-bold tracking-wide uppercase intersect-once intersect-quarter motion-safe:md:opacity-0 motion-safe:md:intersect:animate-fade" set :html = { tagline } />
5252 )
5353 }
5454 {
5555 title && (
56- <h1
57- class = " text-5xl md:text-6xl font-bold leading-tighter tracking-tighter mb-4 font-heading dark:text-gray-200 intersect-once intersect-quarter motion-safe:md:opacity-0 motion-safe:md:intersect:animate-fade"
58- set :html = { title }
59- />
56+ <h1 class = " text-5xl md:text-6xl font-bold leading-tighter tracking-tighter mb-4 font-heading dark:text-white text-shadow-sm intersect-once intersect-quarter motion-safe:md:opacity-0 motion-safe:md:intersect:animate-fade" set :html = { title } />
6057 )
6158 }
6259 <div class =" max-w-3xl mx-auto" >
6360 {
6461 subtitle && (
65- <p
66- class = " text-xl text-muted mb-6 dark:text-slate-300 intersect-once intersect-quarter motion-safe:md:opacity-0 motion-safe:md:intersect:animate-fade"
67- set :html = { subtitle }
68- />
62+ <p class = " text-xl mb-6 dark:text-white intersect-once intersect-quarter motion-safe:md:opacity-0 motion-safe:md:intersect:animate-fade" set :html = { subtitle } />
6963 )
7064 }
7165 {
@@ -74,7 +68,7 @@ const headerHeight_lg = '140px';
7468 { Array .isArray (actions ) ? (
7569 actions .map ((action ) => (
7670 <div class = " flex w-full sm:w-auto" >
77- <Button { ... (action || {})} class = " w-full sm:mb-0" />
71+ <Button { ... (action || {})} class = " w-full sm:mb-0 text-white bg-primary dark:bg-primary-light hover:bg-primary-dark dark:hover:bg-primary-dark " />
7872 </div >
7973 ))
8074 ) : (
@@ -89,3 +83,4 @@ const headerHeight_lg = '140px';
8983 </div >
9084 </div >
9185</section >
86+
0 commit comments