@@ -103,10 +103,11 @@ export function ScrollCardSection({ content }: ScrollCardSectionProps) {
103103 const image = getImage ( item . image )
104104 const imageUrl = getMediaUrl ( image ?. url )
105105 const itemSettings = item as {
106- sectionLayout ?: "imageRight" | "imageLeft" | null
106+ sectionLayout ?: "imageRight" | "imageLeft" | "imageFullscreen" | null
107107 showImageBorder ?: boolean | null
108108 }
109109 const isImageLeft = itemSettings . sectionLayout === "imageLeft"
110+ const isFullscreen = itemSettings . sectionLayout === "imageFullscreen"
110111 const showImageBorder = itemSettings . showImageBorder ?? true
111112 const segmentProgress = index === 0 ? 1 : clamp ( ( scrollProgress - ( index - 1 ) * viewportHeight ) / viewportHeight , 0 , 1 )
112113 const translateY = ( 1 - segmentProgress ) * 100
@@ -125,37 +126,49 @@ export function ScrollCardSection({ content }: ScrollCardSectionProps) {
125126 size = "lg"
126127 gradientDirection = { item . gradientDirection }
127128 radialGradient = { item . gradient }
128- className = "relative grid h-[80%] overflow-hidden bg-primary! p-4 md:grid-cols-[0.95fr_1.05fr]"
129+ className = { cn (
130+ isFullscreen ? "relative h-[80%] overflow-hidden bg-primary p-0" : "relative grid h-[80%] overflow-hidden bg-primary p-12 md:grid-cols-[0.95fr_1.05fr]"
131+ ) }
129132 >
130- < div className = { cn ( "relative z-10 flex h-full flex-col justify-between gap-10 rounded-3xl p-4 md:p-8" , isImageLeft && "md:order-2" ) } >
131- < div className = "flex flex-col gap-4" >
132- < h2 className = "max-w-xl text-3xl font-semibold text-white md:text-5xl" > { item . title } </ h2 >
133- < p className = "max-w-xl text-base leading-7 text-white/75 md:text-lg" > { item . description } </ p >
133+ { isFullscreen ? (
134+ < div className = { cn ( "relative z-10 h-full w-full overflow-hidden rounded-3xl" , showImageBorder && "border border-white/10" ) } >
135+ { imageUrl && < Image src = { imageUrl } alt = { image ?. alt ?? item . title } fill sizes = "100vw" className = "object-cover object-center" /> }
134136 </ div >
135-
136- < div className = "space-y-6" >
137- < ul className = "grid gap-2 text-sm text-white/75 md:text-base" >
138- { item . bulletPoints ?. map ( ( point , pointIndex ) => (
139- < li key = { `${ item . id ?? item . title } -point-${ pointIndex } ` } className = "flex items-start gap-3" >
140- < span className = "mt-2 h-1.5 w-1.5 shrink-0 rounded-full bg-brand" />
141- < span > { point } </ span >
142- </ li >
143- ) ) }
144- </ ul >
145-
146- { item . link ?. label && item . link ?. url && < LinkButton href = { item . link . url } > { item . link . label } </ LinkButton > }
147- </ div >
148- </ div >
149-
150- < div
151- className = { cn (
152- "relative z-10 aspect-video w-full self-center overflow-hidden rounded-2xl" ,
153- showImageBorder && "border border-white/10" ,
154- isImageLeft && "md:order-1"
155- ) }
156- >
157- { imageUrl && < Image src = { imageUrl } alt = { image ?. alt ?? item . title } fill sizes = "(min-width: 768px) 50vw, 100vw" className = "object-contain object-center" /> }
158- </ div >
137+ ) : (
138+ < >
139+ < div className = { cn ( "relative z-10 flex h-full flex-col justify-center gap-8 rounded-3xl" , isImageLeft && "md:order-2" ) } >
140+ < div className = "flex flex-col gap-4" >
141+ < h2 className = "max-w-xl text-3xl font-semibold text-white md:text-5xl" > { item . title } </ h2 >
142+ < p className = "max-w-xl text-base leading-7 text-white/75 md:text-lg" > { item . description } </ p >
143+ </ div >
144+
145+ < div className = "space-y-6" >
146+ < ul className = "grid gap-2 text-sm text-white/75 md:text-base" >
147+ { item . bulletPoints ?. map ( ( point , pointIndex ) => (
148+ < li key = { `${ item . id ?? item . title } -point-${ pointIndex } ` } className = "flex items-start gap-3" >
149+ < span className = "mt-2 h-1.5 w-1.5 shrink-0 rounded-full bg-brand" />
150+ < span > { point } </ span >
151+ </ li >
152+ ) ) }
153+ </ ul >
154+
155+ { item . link ?. label && item . link ?. url && < LinkButton href = { item . link . url } > { item . link . label } </ LinkButton > }
156+ </ div >
157+ </ div >
158+
159+ < div
160+ className = { cn (
161+ "relative z-10 aspect-video w-full self-center overflow-hidden rounded-2xl" ,
162+ showImageBorder && "border border-white/10" ,
163+ isImageLeft && "md:order-1"
164+ ) }
165+ >
166+ { imageUrl && (
167+ < Image src = { imageUrl } alt = { image ?. alt ?? item . title } fill sizes = "(min-width: 768px) 50vw, 100vw" className = "object-contain object-center" />
168+ ) }
169+ </ div >
170+ </ >
171+ ) }
159172 </ Card >
160173 </ motion . article >
161174 )
0 commit comments