diff --git a/prediqo_web/src/features/home/components/PromoCarousel.tsx b/prediqo_web/src/features/home/components/PromoCarousel.tsx index 261d93ad..fb44b122 100644 --- a/prediqo_web/src/features/home/components/PromoCarousel.tsx +++ b/prediqo_web/src/features/home/components/PromoCarousel.tsx @@ -27,6 +27,7 @@ const defaultGradient = export function PromoCarousel({ ads, loading }: Props) { const [index, setIndex] = useState(0); const count = ads.length; + const showNav = count > 1; useEffect(() => { setIndex(0); @@ -44,7 +45,7 @@ export function PromoCarousel({ ads, loading }: Props) { return ( ); } @@ -65,7 +66,6 @@ export function PromoCarousel({ ads, loading }: Props) { position: 'relative', overflow: 'hidden', borderRadius: 2, - minHeight: { xs: 220, sm: 280, md: 320 }, border: `1px solid ${alpha(accent, 0.35)}`, background: bg, backgroundSize: 'cover', @@ -93,22 +93,28 @@ export function PromoCarousel({ ads, loading }: Props) { sx={{ position: 'relative', zIndex: 1, - p: { xs: 2.5, sm: 3.5, md: 4 }, + // Top-align like the public landing; pad past absolute arrows on sm+. + px: { + xs: 2.5, + sm: showNav ? 7 : 3.5, + md: showNav ? 7.5 : 4, + }, + pt: { xs: 2.5, sm: 3, md: 3.25 }, + pb: showNav ? { xs: 4.5, sm: 5 } : { xs: 2.5, sm: 3 }, display: 'flex', flexDirection: 'column', - justifyContent: 'flex-end', - minHeight: { xs: 220, sm: 280, md: 320 }, + justifyContent: 'flex-start', background: - 'linear-gradient(to top, rgba(11,14,20,0.92) 0%, rgba(11,14,20,0.35) 55%, transparent 100%)', + 'linear-gradient(to top, rgba(11,14,20,0.88) 0%, rgba(11,14,20,0.45) 55%, rgba(11,14,20,0.2) 100%)', }} > - + @@ -120,7 +126,7 @@ export function PromoCarousel({ ads, loading }: Props) { )} {ad.ctaLabel && link && ( - + {isExternal ? (