Events: a 16:9 event photo apart from the card background
- New Event photo and Photo description (migration 061), shown whole at the top of the event's page, as the front page's featured event, on featured cards, in newsletter picks and as the share preview. - The front page's featured event box is 16:9 (was 16:7). - Card background is only the faded background of the event's card. - Each event's photo starts as its card background, so nothing changes on screen until it's replaced. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
b816203c0c
commit
e324422f32
14 changed files with 69 additions and 15 deletions
|
|
@ -98,6 +98,15 @@ export default function EventDetail() {
|
|||
<div className="max-w-6xl mx-auto px-6 space-y-8">
|
||||
<Facts event={event} accent={accent} />
|
||||
|
||||
{/* The event's own 16:9 photo (not the card's background). */}
|
||||
{event.photo && (
|
||||
<img
|
||||
src={mediaUrl(event.photo) ?? ''}
|
||||
alt={event.photo_alt ?? ''}
|
||||
className="aspect-video w-full max-w-3xl object-cover"
|
||||
/>
|
||||
)}
|
||||
|
||||
{event.description.map((paragraph, index) => (
|
||||
<p key={index} className="leading-relaxed max-w-3xl" style={{ color: BODY }}>
|
||||
{paragraph}
|
||||
|
|
|
|||
|
|
@ -361,7 +361,7 @@ export default function AdminNewsletter() {
|
|||
.filter(Boolean)
|
||||
.join(', '),
|
||||
text: event.tagline ?? event.description?.[0] ?? null,
|
||||
image: imageFor(event.card_image),
|
||||
image: imageFor(event.photo),
|
||||
href: siteUrl(eventHref(event.id)),
|
||||
cta: PICK_DEFAULTS.events.cta,
|
||||
})
|
||||
|
|
|
|||
|
|
@ -463,7 +463,7 @@ function VideoFrame({
|
|||
it's usually Register. */
|
||||
function EventPanel({ event }: { event: HeroEvent }) {
|
||||
const color = event.color || 'var(--color-action)'
|
||||
const photo = mediaUrl(event.card_image)
|
||||
const photo = mediaUrl(event.photo)
|
||||
const when = seriesLabel(event.series, event.starts_on) ?? event.date_label
|
||||
const where = event.is_online && !event.location_label ? 'Online' : event.location_label
|
||||
|
||||
|
|
@ -473,11 +473,11 @@ function EventPanel({ event }: { event: HeroEvent }) {
|
|||
style={{ boxShadow: '0 24px 48px -24px rgba(0, 16, 17, 0.6)' }}
|
||||
>
|
||||
{photo ? (
|
||||
<img src={photo} alt="" className="aspect-[16/7] w-full object-cover" />
|
||||
<img src={photo} alt={event.photo_alt ?? ''} className="aspect-video w-full object-cover" />
|
||||
) : (
|
||||
<div
|
||||
aria-hidden="true"
|
||||
className="aspect-[16/7] w-full"
|
||||
className="aspect-video w-full"
|
||||
style={{ background: `color-mix(in srgb, ${color} 35%, #001011)` }}
|
||||
/>
|
||||
)}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue