--- import type { CollectionEntry } from 'astro:content'; import { blogAuthors } from '../../data/team'; import { urlForEntry } from '../../lib/cross-links'; import { formatDisplay } from '../../schema/event-date'; import EventAttribution from './EventAttribution.astro'; import EventLinks from './EventLinks.astro'; import EventLogo from './EventLogo.astro'; import { PARTICIPATION_MODE_LABELS, PARTICIPATION_TYPE_LABELS, resolveEventBrand, resolveEventLinks, } from './eventMeta'; interface Props { event: CollectionEntry<'events'>; timeframe: 'upcoming' | 'past'; /** * This event's produced Resources — derived (never hand-authored) and * pre-sorted by `EventList` via `indexResourcesByOriginEvent`, so each card * renders its slice without re-scanning the full resource set. Sparse — an * empty list renders no block. */ producedResources: CollectionEntry<'resources'>[]; } const { event, timeframe, producedResources } = Astro.props; const { title, participation, mode, speakers, location, online, date, attribution, registerUrl, resourceUrl, logo, } = event.data; const speakerNames = speakers.map((key) => blogAuthors[key]?.name ?? key); const links = resolveEventLinks({ timeframe, registerUrl, resourceUrl }); const brand = resolveEventBrand({ title, attribution }); const place = online ? 'Online' : location; ---

{place}{formatDisplay(date)}

{title}

{ speakerNames.length > 0 && (

Speakers {speakerNames.join(', ')}

) }
{PARTICIPATION_TYPE_LABELS[participation]} {PARTICIPATION_MODE_LABELS[mode]}
{ /* 9.4 Event→Resources: a DISTINCT, separately-labelled block from the external `resourceUrl` CTA above (complement, not a duplicate "watch" link). Each item is a same-tab INTERNAL cross-link to the Resources library (coarse `/resources/` target, meaningful resource-title label, no external glyph, no target=_blank). Renders only when non-empty. */ producedResources.length > 0 && (

Resources from this event

) }