Skip to content

Commit af9ac3b

Browse files
committed
fix(web): responsive cart hero height — short on mobile, full on desktop
The cover was a fixed 70vh on all viewports, so on phones it filled the screen and pushed products below the fold. Scale it: ~38vh mobile, 52vh sm, up to 68vh desktop; tighten hero text spacing on mobile.
1 parent 0456945 commit af9ac3b

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

web/app/(public)/c/[slug]/page.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ export default async function PublicCartPage({ params }: { params: { slug: strin
3131
if (!cart) notFound();
3232
return (
3333
<div style={{ ["--accent" as string]: cart.accentHex } as React.CSSProperties}>
34-
{/* HERO */}
35-
<section className="relative w-full" style={{ height: "min(70vh, 640px)" }}>
34+
{/* HERO — short on mobile so products are near the fold, taller on desktop */}
35+
<section className="relative w-full h-[38vh] min-h-[260px] sm:h-[52vh] lg:h-[min(68vh,620px)]">
3636
<CartCover
3737
coverImageUrl={cart.coverImageUrl}
3838
accentHex={cart.accentHex}
@@ -41,13 +41,13 @@ export default async function PublicCartPage({ params }: { params: { slug: strin
4141
sizes="100vw"
4242
/>
4343
<div className="absolute inset-0 bg-gradient-to-t from-ink/80 via-ink/30 to-transparent" />
44-
<div className="absolute inset-x-0 bottom-0 px-6 pb-10 max-w-3xl mx-auto text-cream">
45-
<div className="flex items-center gap-2 mb-3">
44+
<div className="absolute inset-x-0 bottom-0 px-5 sm:px-6 pb-6 sm:pb-10 max-w-3xl mx-auto text-cream">
45+
<div className="flex items-center gap-2 mb-2 sm:mb-3">
4646
<Image src={cart.ownerAvatarUrl} alt="" width={32} height={32} className="rounded-full border border-cream/30" unoptimized />
4747
<span className="text-sm opacity-90">@{cart.ownerHandle}</span>
4848
</div>
49-
<h1 className="font-serif text-4xl sm:text-5xl leading-[1.05] mb-3">{cart.title}</h1>
50-
{cart.bio && <p className="text-base opacity-90 max-w-xl leading-relaxed">{cart.bio}</p>}
49+
<h1 className="font-serif text-3xl sm:text-5xl leading-[1.05] mb-2 sm:mb-3">{cart.title}</h1>
50+
{cart.bio && <p className="text-sm sm:text-base opacity-90 max-w-xl leading-relaxed">{cart.bio}</p>}
5151
</div>
5252
</section>
5353

0 commit comments

Comments
 (0)