Hero event card: photo always on top, words left and buttons stacked right from sm up

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Zaldimmar 2026-10-18 13:59:35 -05:00
parent 8b741676f3
commit 5ebc771272

View file

@ -563,9 +563,9 @@ function VideoFrame({
/* The event's own card for the hero: its photo (or its color), then /* The event's own card for the hero: its photo (or its color), then
what, when and where, then its buttons and a way to its page. The what, when and where, then its buttons and a way to its page. The
first action link is the filled button, since it's usually first action link is the filled button, since it's usually
Register. Stacked on a phone; from lg up the photo sits beside the Register. The photo is always on top, whole (16:9); under it, from
words, so the card stays about as tall as the hero's own text sm up, the words take the left and the buttons stack on the right.
instead of towering over it. The photo stays whole (16:9). */ Stacked on a phone. */
function EventPanel({ event }: { event: HeroEvent }) { function EventPanel({ event }: { event: HeroEvent }) {
const color = event.color || 'var(--color-action)' const color = event.color || 'var(--color-action)'
const photo = mediaUrl(event.photo) const photo = mediaUrl(event.photo)
@ -574,7 +574,7 @@ function EventPanel({ event }: { event: HeroEvent }) {
return ( return (
<div <div
className="overflow-hidden border border-white/15 bg-white/10 text-white shadow-2xl backdrop-blur lg:grid lg:grid-cols-[minmax(0,1.1fr)_minmax(0,1fr)] lg:items-center" className="overflow-hidden border border-white/15 bg-white/10 text-white shadow-2xl backdrop-blur"
style={{ boxShadow: '0 24px 48px -24px rgba(0, 16, 17, 0.6)' }} style={{ boxShadow: '0 24px 48px -24px rgba(0, 16, 17, 0.6)' }}
> >
{photo ? ( {photo ? (
@ -587,27 +587,29 @@ function EventPanel({ event }: { event: HeroEvent }) {
/> />
)} )}
<div className="space-y-4 p-8 lg:space-y-3 lg:p-6"> <div className="flex flex-col gap-6 p-8 sm:flex-row sm:items-center lg:p-6">
<div> <div className="min-w-0 flex-1 space-y-4 lg:space-y-3">
<h2 className="font-display text-3xl font-bold leading-tight md:text-4xl lg:text-2xl xl:text-3xl"> <div>
<Link to={eventHref(event.id)} className="hover:underline"> <h2 className="font-display text-3xl font-bold leading-tight md:text-4xl lg:text-2xl xl:text-3xl">
{event.title} <Link to={eventHref(event.id)} className="hover:underline">
</Link> {event.title}
</h2> </Link>
{event.theme && <p className="mt-1 text-lg font-semibold text-[var(--pal-amber-2)]">"{event.theme}"</p>} </h2>
{event.theme && <p className="mt-1 text-lg font-semibold text-[var(--pal-amber-2)]">"{event.theme}"</p>}
</div>
{(when || where) && (
<p className="text-lg text-white/85 lg:text-base">{[when, where].filter(Boolean).join(' · ')}</p>
)}
{event.tagline && <p className="text-white/70 lg:line-clamp-3 lg:text-sm">{event.tagline}</p>}
</div> </div>
{(when || where) && ( <div className="flex flex-wrap gap-3 sm:shrink-0 sm:flex-col sm:items-stretch lg:gap-2">
<p className="text-lg text-white/85 lg:text-base">{[when, where].filter(Boolean).join(' · ')}</p>
)}
{event.tagline && <p className="text-white/70 lg:line-clamp-3 lg:text-sm">{event.tagline}</p>}
<div className="flex flex-wrap gap-3 pt-2 lg:gap-2 lg:pt-1">
{event.links.map((link, index) => ( {event.links.map((link, index) => (
<HomeLink <HomeLink
key={link.url} key={link.url}
url={link.url} url={link.url}
className={`inline-flex items-center gap-2 btn px-6 py-3 transition-transform hover:scale-105 lg:px-4 lg:py-2 lg:text-sm ${ className={`inline-flex items-center justify-center gap-2 btn px-6 py-3 transition-transform hover:scale-105 lg:px-4 lg:py-2 lg:text-sm ${
index === 0 ? 'text-[#001011]' : 'border border-white/35 text-white hover:bg-white/10' index === 0 ? 'text-[#001011]' : 'border border-white/35 text-white hover:bg-white/10'
}`} }`}
style={index === 0 ? { background: 'var(--pal-amber-2)' } : undefined} style={index === 0 ? { background: 'var(--pal-amber-2)' } : undefined}
@ -618,7 +620,7 @@ function EventPanel({ event }: { event: HeroEvent }) {
))} ))}
<Link <Link
to={eventHref(event.id)} to={eventHref(event.id)}
className="btn border border-white/35 px-6 py-3 text-white transition-colors hover:bg-white/10 lg:px-4 lg:py-2 lg:text-sm" className="btn border border-white/35 px-6 py-3 text-center text-white transition-colors hover:bg-white/10 lg:px-4 lg:py-2 lg:text-sm"
> >
Event details <ArrowRight size="1em" weight="bold" className="inline align-[-0.125em]" aria-hidden="true" /> Event details <ArrowRight size="1em" weight="bold" className="inline align-[-0.125em]" aria-hidden="true" />
</Link> </Link>