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:
parent
8b741676f3
commit
5ebc771272
1 changed files with 22 additions and 20 deletions
|
|
@ -563,9 +563,9 @@ function VideoFrame({
|
|||
/* 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
|
||||
first action link is the filled button, since it's usually
|
||||
Register. Stacked on a phone; from lg up the photo sits beside the
|
||||
words, so the card stays about as tall as the hero's own text
|
||||
instead of towering over it. The photo stays whole (16:9). */
|
||||
Register. The photo is always on top, whole (16:9); under it, from
|
||||
sm up, the words take the left and the buttons stack on the right.
|
||||
Stacked on a phone. */
|
||||
function EventPanel({ event }: { event: HeroEvent }) {
|
||||
const color = event.color || 'var(--color-action)'
|
||||
const photo = mediaUrl(event.photo)
|
||||
|
|
@ -574,7 +574,7 @@ function EventPanel({ event }: { event: HeroEvent }) {
|
|||
|
||||
return (
|
||||
<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)' }}
|
||||
>
|
||||
{photo ? (
|
||||
|
|
@ -587,7 +587,8 @@ 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 className="min-w-0 flex-1 space-y-4 lg:space-y-3">
|
||||
<div>
|
||||
<h2 className="font-display text-3xl font-bold leading-tight md:text-4xl lg:text-2xl xl:text-3xl">
|
||||
<Link to={eventHref(event.id)} className="hover:underline">
|
||||
|
|
@ -601,13 +602,14 @@ function EventPanel({ event }: { event: HeroEvent }) {
|
|||
<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 className="flex flex-wrap gap-3 pt-2 lg:gap-2 lg:pt-1">
|
||||
<div className="flex flex-wrap gap-3 sm:shrink-0 sm:flex-col sm:items-stretch lg:gap-2">
|
||||
{event.links.map((link, index) => (
|
||||
<HomeLink
|
||||
key={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'
|
||||
}`}
|
||||
style={index === 0 ? { background: 'var(--pal-amber-2)' } : undefined}
|
||||
|
|
@ -618,7 +620,7 @@ function EventPanel({ event }: { event: HeroEvent }) {
|
|||
))}
|
||||
<Link
|
||||
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" />
|
||||
</Link>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue