-
{EVENT_PAGE.dressCode}
-
{event.dressCode}
+ facts.map((fact) => (
+
+
+
{fact.label}
+ {fact.value}
- )
+ ))
}
{
- event.streamUrl && (
-
- {EVENT_PAGE.watchLive}
+ watch && (
+
+
+
+ {watch.title}
+ {watch.note && {watch.note} }
+
+
)
}
diff --git a/apps/site/src/components/event-page/EventDetails.astro b/apps/site/src/components/event-page/EventDetails.astro
index 9aff9e82..b2d0c576 100644
--- a/apps/site/src/components/event-page/EventDetails.astro
+++ b/apps/site/src/components/event-page/EventDetails.astro
@@ -1,100 +1,162 @@
---
/**
- * An event's own page, laid out plainly: the poster (or a card in the event's colour when it has none) and the
- * facts on the left, and the kind, title, partners, description and the event's lists on the right. On a phone
- * they stack: poster, title, facts, then the rest. Each part is in the page once; on a phone the two columns step
- * aside (`contents`) and `order` puts the parts in that sequence. The event's two colours are set once here, as
- * `--event-primary` and `--event-secondary`, for everything inside to use.
+ * An event's own page, "the poster up front": on a computer, the poster, the calendar and share buttons under it,
+ * and the facts stay in view on the left while the right column scrolls through the kind, the title, who it's
+ * with, the description and the event's sections. On a phone it is one column, in the order a student reads it:
+ * poster, title, facts, description, buttons, then the rest. Each part is in the page once: on a phone the two
+ * columns step aside (`contents`) and `order` sets the sequence.
+ *
+ * The event's colours are set here once, as CSS variables, for everything inside: `--event-primary` (the poster
+ * frame and the calendar button, with a darker `--event-primary-edge` under it), `--event-secondary` (the pills)
+ * and `--event-on-dark` (accents on the dark page).
*/
-import { CATEGORY_NAMES, EVENT_PAGE, HIGHLIGHT_NAMES } from '../../content/event-page';
-import { fullDate, type IsoDate } from '../../lib/dates';
+import { CATEGORY_NAMES, EVENT_PAGE, HIGHLIGHT_NAMES, PLATFORM_NAMES } from '../../content/event-page';
+import type { IsoDate } from '../../lib/dates';
import type { EventPage } from '../../lib/event-page';
+import Icon from '../ui/Icon.astro';
+import EventActions from './EventActions.astro';
import EventAtAGlance from './EventAtAGlance.astro';
-import EventSections from './EventSections.astro';
+import EventGettingThere from './EventGettingThere.astro';
+import EventJoin from './EventJoin.astro';
+import { FACT_ICONS, HIGHLIGHT_ICONS } from './event-looks';
+import EventPhotos from './EventPhotos.astro';
+import EventPoster from './EventPoster.astro';
+import EventResources from './EventResources.astro';
+import EventSpeakers from './EventSpeakers.astro';
+import EventTopics from './EventTopics.astro';
type Props = { event: EventPage; today: IsoDate };
const { event, today } = Astro.props;
-const { primary, secondary } = event.palette;
+const { primary, secondary, onDark } = event.palette;
const TEXT = { dark: 'text-ink', light: 'text-white' } as const;
-const pills = [CATEGORY_NAMES[event.category], ...event.highlights.map((highlight) => HIGHLIGHT_NAMES[highlight])];
+// The pills after the kind: how it's run (online, streamed) and what to expect.
+const pills = [
+ ...(event.place.kind === 'online' ? [{ label: `Online · ${PLATFORM_NAMES[event.place.platform ?? 'other']}`, icon: FACT_ICONS.online }] : []),
+ ...(event.streamUrl ? [{ label: EVENT_PAGE.streamed, icon: FACT_ICONS.stream }] : []),
+ ...event.highlights.map((highlight) => ({ label: HIGHLIGHT_NAMES[highlight], icon: HIGHLIGHT_ICONS[highlight] })),
+];
+const chip = 'flex items-center gap-2 rounded-full border-2 border-line-quiet bg-raised py-1 pr-3.5 pl-1.5 font-display text-sm font-bold';
+const label = 'font-display text-xs font-bold tracking-label text-muted uppercase';
---
-
-
- {
- event.posterUrl ? (
-
- ) : (
-
-
{fullDate(event.date)}
-
- {event.place.kind === 'in_person' && event.place.label &&
{event.place.label}
}
-
- )
- }
-
-
-
-
+
+
+ {EVENT_PAGE.back}
+
+
+
+ {/*
+ On a computer the left column stays in view as the page scrolls. When it's taller than the screen it scrolls
+ up with the page until its bottom shows, then stays (`scripts/event-side.ts` sets how far up it sticks). The
+ `order` classes only sequence a phone's single column.
+ */}
+
+
+
+
+
-
-
-
+
+
+
+ {/* Safe to insert: markdown-it escapes any HTML typed in the admin and allows only the description's formats. */}
{
- event.partners.length > 0 && (
-
-
{EVENT_PAGE.partners}
-
- {event.partners.map((partner) => (
-
- {partner.logoUrl ? (
-
- ) : (
-
- )}
- {partner.name}
-
- ))}
-
-
+ event.descriptionHtml && (
+
)
}
-
-
- {/* Safe to insert: markdown-it escapes any HTML typed in the admin and allows only the description's formats. */}
- {
- event.descriptionHtml && (
-
- )
- }
-
-
-
+
+
+
+
diff --git a/apps/site/src/components/event-page/EventGettingThere.astro b/apps/site/src/components/event-page/EventGettingThere.astro
new file mode 100644
index 00000000..77d6269f
--- /dev/null
+++ b/apps/site/src/components/event-page/EventGettingThere.astro
@@ -0,0 +1,56 @@
+---
+/**
+ * "Getting there" for an in-person event in a building: a Google Map of the building with its pin, the building's
+ * name and the room, and a link that opens it in Google Maps. The map loads only when it scrolls into view.
+ * Written directions per building come later, as data. Left out for an online event or one with no building yet.
+ */
+import { EVENT_PAGE } from '../../content/event-page';
+import type { EventPage } from '../../lib/event-page';
+import { linkTarget } from '../../lib/links';
+import { mapsEmbed, mapsSearch } from '../../lib/places';
+import Icon from '../ui/Icon.astro';
+import { FACT_ICONS } from './event-looks';
+
+type Props = { event: EventPage; class?: string };
+
+const { event, class: className } = Astro.props;
+const place = event.place.kind === 'in_person' && event.place.building ? event.place : null;
+---
+
+{
+ place?.building && (
+
+
+
+ {/*
+ The map's grey box shows until it loads, the same size, so nothing below jumps. Google's embed has no dark
+ style, so the map is inverted and its colours turned back round: dark streets, the usual hues.
+ */}
+
+
+
+
+
+ {place.room &&
{EVENT_PAGE.room(place.room)}
}
+
+ {EVENT_PAGE.openInMaps}
+
+
+
+
+
+ )
+}
diff --git a/apps/site/src/components/event-page/EventJoin.astro b/apps/site/src/components/event-page/EventJoin.astro
new file mode 100644
index 00000000..36a3be80
--- /dev/null
+++ b/apps/site/src/components/event-page/EventJoin.astro
@@ -0,0 +1,57 @@
+---
+/**
+ * How to be there: an online event gets "Joining online", a card with the platform's own button (Zoom blue, Meet
+ * green) or a note that the link is coming; an in-person event gets the "Scan in" note, always in LCS blue,
+ * whatever the event's colours, since it's the same at every event.
+ */
+import { EVENT_PAGE, PLATFORM_NAMES } from '../../content/event-page';
+import type { EventPage } from '../../lib/event-page';
+import { linkTarget } from '../../lib/links';
+import Icon from '../ui/Icon.astro';
+import { FACT_ICONS, PLATFORM_BUTTONS } from './event-looks';
+
+type Props = { event: EventPage; class?: string };
+
+const { event, class: className } = Astro.props;
+---
+
+{
+ event.place.kind === 'online' ? (
+
+ ) : (
+
+
+
+
+
{EVENT_PAGE.scanIn.body}
+
+
+ )
+}
diff --git a/apps/site/src/components/event-page/EventPhotos.astro b/apps/site/src/components/event-page/EventPhotos.astro
new file mode 100644
index 00000000..71a8cf93
--- /dev/null
+++ b/apps/site/src/components/event-page/EventPhotos.astro
@@ -0,0 +1,40 @@
+---
+/**
+ * Photos at the bottom of the page (`photoSection`): once the event has happened and has photos chosen for its
+ * page, "Photos from the night" with its own; otherwise "How the last one went", with the earlier event's and a
+ * link to its page; otherwise nothing. The first three preview; "See all N photos" opens the event's photos page.
+ * Clicking a photo opens it bigger.
+ */
+import { EVENT_PAGE } from '../../content/event-page';
+import { fullDate, type IsoDate } from '../../lib/dates';
+import { photoSection, type EventPage } from '../../lib/event-page';
+import PhotoGrid from './PhotoGrid.astro';
+
+type Props = { event: EventPage; today: IsoDate; class?: string };
+
+const { event, today, class: className } = Astro.props;
+const section = photoSection(event, today);
+const link = 'font-display font-bold text-pink underline underline-offset-4 hover:text-white';
+---
+
+{/* One column the section's own width (`grid-cols-1`), so the photos scroll inside it on a phone. */}
+{
+ section && (
+
+ )
+}
diff --git a/apps/site/src/components/event-page/EventPoster.astro b/apps/site/src/components/event-page/EventPoster.astro
new file mode 100644
index 00000000..3bc78221
--- /dev/null
+++ b/apps/site/src/components/event-page/EventPoster.astro
@@ -0,0 +1,36 @@
+---
+/**
+ * The event's poster up front, pinned slightly crooked in a frame of the event's main colour, like a poster on a
+ * noticeboard. With no poster, a card in that colour stands in: the day, the title and the place, the way a poster
+ * would say them. Opening an event from its ticket, the ticket's picture grows into this (a page transition the
+ * browser does; see `global.css`), which is why it carries the same transition name as the ticket.
+ */
+import { fullDate } from '../../lib/dates';
+import type { EventPage } from '../../lib/event-page';
+import { posterTransition } from '../../lib/transitions';
+
+type Props = { event: EventPage; class?: string };
+
+const { event, class: className } = Astro.props;
+const TEXT = { dark: 'text-ink', light: 'text-white' } as const;
+---
+
+
+ {
+ event.posterUrl ? (
+
+ ) : (
+
+
+
+ {event.place.kind === 'in_person' && event.place.label &&
{event.place.label}
}
+
+ )
+ }
+
diff --git a/apps/site/src/components/event-page/EventResources.astro b/apps/site/src/components/event-page/EventResources.astro
new file mode 100644
index 00000000..9f4cd48e
--- /dev/null
+++ b/apps/site/src/components/event-page/EventResources.astro
@@ -0,0 +1,41 @@
+---
+/**
+ * The event's resources (slides, recordings, practice exams, forms, links) as buttons with an icon for each kind,
+ * three across on a computer and one under the other on a phone. Each opens in a new tab. Left out when there are
+ * none yet.
+ */
+import { DOCUMENT_KIND_NAMES, EVENT_PAGE } from '../../content/event-page';
+import type { EventPage } from '../../lib/event-page';
+import { linkTarget } from '../../lib/links';
+import Icon from '../ui/Icon.astro';
+import { DOCUMENT_ICONS } from './event-looks';
+
+type Props = { event: EventPage; class?: string };
+
+const { event, class: className } = Astro.props;
+---
+
+{
+ event.resources.length > 0 && (
+
+ )
+}
diff --git a/apps/site/src/components/event-page/EventSections.astro b/apps/site/src/components/event-page/EventSections.astro
deleted file mode 100644
index d4cfc511..00000000
--- a/apps/site/src/components/event-page/EventSections.astro
+++ /dev/null
@@ -1,118 +0,0 @@
----
-/**
- * The lists under an event's description, each shown only when it has something in it: how to join online (or how
- * to scan in at an in-person event), what they'll cover, the speakers, the resources and last time.
- */
-import { DOCUMENT_KIND_NAMES, EVENT_PAGE, PLATFORM_NAMES } from '../../content/event-page';
-import { fullDate } from '../../lib/dates';
-import type { EventPage } from '../../lib/event-page';
-import { linkTarget } from '../../lib/links';
-
-type Props = { event: EventPage };
-
-const { event } = Astro.props;
-const heading = 'font-display text-2xl font-extrabold';
-const card = 'rounded-(--radius-ticket) border-2 border-line bg-raised p-5';
----
-
-{
- event.place.kind === 'online' ? (
-
- ) : (
- // Always LCS blue, whatever the event's own colours: it's the same for every event.
-
- {EVENT_PAGE.scanIn.title}
- {EVENT_PAGE.scanIn.body}
-
- )
-}
-
-{
- event.topics.length > 0 && (
-
- {EVENT_PAGE.topics}
-
- {event.topics.map((topic) => (
- {topic.text}
- ))}
-
-
- )
-}
-
-{
- event.speakers.length > 0 && (
-
- {EVENT_PAGE.speakers}
- {event.speakersFrom.length > 0 && (
-
- {EVENT_PAGE.speakersFrom}
- {event.speakersFrom.map((company) => (
-
-
- {company.name}
-
- ))}
-
- )}
-
- {event.speakers.map((speaker) => (
-
- {speaker.photoUrl && }
-
-
- {speaker.role &&
{speaker.role}
}
- {speaker.company &&
{speaker.company.name}
}
-
-
- ))}
-
-
- )
-}
-
-{
- event.resources.length > 0 && (
-
- {EVENT_PAGE.resources}
-
-
- )
-}
-
-{
- event.lastTime && (
-
- )
-}
diff --git a/apps/site/src/components/event-page/EventSpeakers.astro b/apps/site/src/components/event-page/EventSpeakers.astro
new file mode 100644
index 00000000..cc374ca1
--- /dev/null
+++ b/apps/site/src/components/event-page/EventSpeakers.astro
@@ -0,0 +1,34 @@
+---
+/**
+ * The event's speakers as cards (`SpeakerCard`), all the same height: three across when the section has room for
+ * three full-size cards, two across from a phone's width, and one under the other on the narrowest screens. The
+ * columns follow the section's own width, not the screen's. One speaker gets a single wider card. Left out when
+ * the event has no guest speakers.
+ */
+import { EVENT_PAGE } from '../../content/event-page';
+import type { EventPage } from '../../lib/event-page';
+import SpeakerCard from './SpeakerCard.astro';
+
+type Props = { event: EventPage; class?: string };
+
+const { event, class: className } = Astro.props;
+const solo = event.speakers.length === 1;
+---
+
+{
+ event.speakers.length > 0 && (
+
+
+
+
{EVENT_PAGE.speakerTotal(event.speakers.length)}
+
+
+ {event.speakers.map((speaker) => (
+
+
+
+ ))}
+
+
+ )
+}
diff --git a/apps/site/src/components/event-page/EventTopics.astro b/apps/site/src/components/event-page/EventTopics.astro
new file mode 100644
index 00000000..95761d01
--- /dev/null
+++ b/apps/site/src/components/event-page/EventTopics.astro
@@ -0,0 +1,29 @@
+---
+/**
+ * "What they'll cover": each topic as a tile with the icon an exec picked for it in the admin, two across on a
+ * computer. Left out when the event has no topics.
+ */
+import { EVENT_PAGE } from '../../content/event-page';
+import type { EventPage } from '../../lib/event-page';
+import Icon from '../ui/Icon.astro';
+
+type Props = { event: EventPage; class?: string };
+
+const { event, class: className } = Astro.props;
+---
+
+{
+ event.topics.length > 0 && (
+
+
+
+ {event.topics.map((topic) => (
+
+
+ {topic.text}
+
+ ))}
+
+
+ )
+}
diff --git a/apps/site/src/components/event-page/PhotoGrid.astro b/apps/site/src/components/event-page/PhotoGrid.astro
new file mode 100644
index 00000000..10b3ddec
--- /dev/null
+++ b/apps/site/src/components/event-page/PhotoGrid.astro
@@ -0,0 +1,61 @@
+---
+/**
+ * An event's photos as buttons that open each one big (`ImageViewer`, via `scripts/photo-grid.ts`). Two layouts:
+ * - `preview`, under an event's page: a row of three on a computer, a sideways scroll on a phone, each cropped to
+ * the same shape;
+ * - `wall`, the photos page: every photo at its own shape, in columns, like prints pinned up.
+ * Each photo's width and height are known, so the page saves its space before it loads.
+ */
+import type { EventPhoto } from '../../lib/event-photos';
+import ImageViewer from '../ui/ImageViewer.astro';
+
+type Props = { photos: readonly EventPhoto[]; layout: 'preview' | 'wall' };
+
+const { photos, layout } = Astro.props;
+const LAYOUTS = {
+ preview: {
+ list: '-mx-4 flex snap-x gap-3 overflow-x-auto px-4 pb-1 nav:mx-0 nav:grid nav:grid-cols-3 nav:overflow-visible nav:px-0',
+ item: 'w-64 shrink-0 snap-start nav:w-auto',
+ image: 'aspect-4/3 w-full object-cover',
+ },
+ wall: {
+ list: 'columns-2 gap-3 nav:columns-3 nav:gap-4',
+ item: 'mb-3 break-inside-avoid nav:mb-4',
+ image: 'h-auto w-full',
+ },
+} as const;
+const look = LAYOUTS[layout];
+---
+
+{/* A block that can shrink, so a sideways row scrolls inside the page rather than widening it. */}
+
+
+ {
+ photos.map((photo) => (
+
+
+
+
+
+ ))
+ }
+
+
+
+
+
diff --git a/apps/site/src/components/event-page/SpeakerCard.astro b/apps/site/src/components/event-page/SpeakerCard.astro
new file mode 100644
index 00000000..e7699f0d
--- /dev/null
+++ b/apps/site/src/components/event-page/SpeakerCard.astro
@@ -0,0 +1,78 @@
+---
+/**
+ * One speaker (card H, "logo on the line"), sized as in Figma: the phone sizes in a narrow card, the computer ones
+ * once the card is wide enough for them (`@speaker`, its own width, not the screen's). A strip across the top in
+ * their company's colour (45% of it, the rest black, so white reads on it), their headshot ringed in the company
+ * colour at the left, and the company's wide logo (the one framed for cards) on a white plate just right of it,
+ * both sitting across the strip's bottom edge. Below, their name with a round LinkedIn button at the end of the
+ * line, and their role. With no headshot their initials stand in; with no logo the plate carries the company's
+ * name.
+ */
+import { EVENT_PAGE } from '../../content/event-page';
+import type { PageSpeaker } from '../../lib/event-page';
+import { linkTarget } from '../../lib/links';
+import { SOCIAL_ICONS } from '../ui/social-icons';
+
+type Props = { speaker: PageSpeaker };
+
+const { speaker } = Astro.props;
+const initials = speaker.name
+ .split(/\s+/)
+ .slice(0, 2)
+ .map((word) => word.charAt(0))
+ .join('');
+const LinkedIn = SOCIAL_ICONS.linkedin;
+---
+
+
+
+
+
+ {
+ speaker.company && (
+
+ {speaker.company.wideLogoUrl ? (
+
+ ) : (
+
+ )}
+
+ )
+ }
+
+
+
+
+
+ {
+ speaker.link && (
+
+
+
+ )
+ }
+
+ {speaker.role &&
{speaker.role}
}
+
+
diff --git a/apps/site/src/components/event-page/event-looks.ts b/apps/site/src/components/event-page/event-looks.ts
new file mode 100644
index 00000000..baafb072
--- /dev/null
+++ b/apps/site/src/components/event-page/event-looks.ts
@@ -0,0 +1,47 @@
+/**
+ * How the event page draws each kind of thing: the Lucide icon beside a highlight, a resource, a fact or a
+ * platform, and each platform's colour. A new highlight, resource kind or platform is one more entry here;
+ * TypeScript points at the record until it has it.
+ */
+import type { DocumentKind, EventHighlight, MeetingPlatform } from '../../lib/event-page';
+
+export const HIGHLIGHT_ICONS: Readonly> = {
+ food: 'pizza',
+ snacks: 'cookie',
+ drinks: 'cup-soda',
+ speaker_series: 'mic',
+};
+
+export const DOCUMENT_ICONS: Readonly> = {
+ practice_exam: 'file-text',
+ slides: 'presentation',
+ recording: 'circle-play',
+ navigator: 'compass',
+ form: 'clipboard-list',
+ website: 'globe',
+ other: 'link',
+};
+
+/** Each platform's Join button: its own colour, so students recognise it at a glance. */
+export const PLATFORM_BUTTONS: Readonly> = {
+ zoom: 'bg-zoom text-white',
+ meet: 'bg-meet text-white',
+ other: 'bg-yellow text-ink',
+};
+
+/** The icons the page uses for its own labels. */
+export const FACT_ICONS = {
+ when: 'calendar',
+ time: 'clock',
+ where: 'map-pin',
+ online: 'video',
+ dress: 'shirt',
+ speakers: 'users',
+ stream: 'radio',
+ scanIn: 'scan-line',
+ calendar: 'calendar-plus',
+ share: 'share-2',
+ back: 'arrow-left',
+ external: 'arrow-up-right',
+ photo: 'image',
+} as const;
diff --git a/apps/site/src/components/events/ComingUp.astro b/apps/site/src/components/events/ComingUp.astro
index aaf45fcc..f5470ffa 100644
--- a/apps/site/src/components/events/ComingUp.astro
+++ b/apps/site/src/components/events/ComingUp.astro
@@ -5,7 +5,9 @@
* it comes into view the event days light up with their mascots' stickers, the booth prints the tickets onto the
* floor, and the next one gets stamped "Next up". Pointing at a ticket lifts its day, and pointing at a day lifts
* its ticket (`scripts/coming-up.ts`). With nothing coming up, the booth makes way for a note on where to hear
- * about the next one. In the calendar's bottom corner, "All events" opens every ticket, past ones included.
+ * about the next one. Clicking another event's day (a past one, or one later than the pile reaches) has the booth
+ * reprint its ticket on top of the pile while the three fade back; "Back to what's next" takes it in again. In the
+ * calendar's bottom corner, "All events" opens every ticket, past ones included.
*/
import { Image } from 'astro:assets';
import { BOOTH_OWL, MASCOT_FACES } from '../../assets/brand';
@@ -26,6 +28,9 @@ type Props = { events: readonly ClubEvent[]; upcoming: readonly ClubEvent[]; tod
const { events, upcoming, today } = Astro.props;
const tickets = upcoming.slice(0, SHOWN_TICKETS);
+const marks = dayMarks(events, tickets, today);
+const reprints = [...marks.values()].flatMap((mark) => (mark.kind === 'reprint' ? [mark] : []));
+const { months, start } = calendarMonths(today, events);
const instagram = socialLink('instagram');
---
@@ -52,13 +57,27 @@ const instagram = socialLink('instagram');
-
+
{events.length > 0 && }
{
tickets.length > 0 ? (
-