From 461afda22f7a40715363e4a156b9a588ed57ef5c Mon Sep 17 00:00:00 2001 From: b4sleal Date: Sun, 29 Nov 2026 22:54:32 -0500 Subject: [PATCH 1/7] chore(site): add markdown-it for event descriptions --- apps/site/package.json | 2 ++ apps/site/pnpm-lock.yaml | 65 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+) diff --git a/apps/site/package.json b/apps/site/package.json index 3f593ef7..6328615e 100644 --- a/apps/site/package.json +++ b/apps/site/package.json @@ -21,6 +21,7 @@ "@tailwindcss/vite": "^4.3.5", "astro": "^7.4.13", "gsap": "^3.15.1", + "markdown-it": "14.1.0", "sharp": "^0.35.5", "tailwindcss": "^4.3.5", "zod": "^4.6.7" @@ -29,6 +30,7 @@ "@astrojs/check": "^0.9.12", "@testing-library/dom": "^10.4.2", "@types/jsdom": "^30.0.0", + "@types/markdown-it": "14.1.2", "jsdom": "^31.0.1", "typescript": "^5.9.3", "vitest": "^5.1.1" diff --git a/apps/site/pnpm-lock.yaml b/apps/site/pnpm-lock.yaml index db53edf6..e0459ff4 100644 --- a/apps/site/pnpm-lock.yaml +++ b/apps/site/pnpm-lock.yaml @@ -29,6 +29,9 @@ importers: gsap: specifier: ^3.15.1 version: 3.15.1 + markdown-it: + specifier: 14.1.0 + version: 14.1.0 sharp: specifier: ^0.35.5 version: 0.35.5(@types/node@26.6.6) @@ -48,6 +51,9 @@ importers: '@types/jsdom': specifier: ^30.0.0 version: 30.0.0 + '@types/markdown-it': + specifier: 14.1.2 + version: 14.1.2 jsdom: specifier: ^31.0.1 version: 31.0.1 @@ -920,9 +926,18 @@ packages: '@types/jsdom@30.0.0': resolution: {integrity: sha512-uAHGxujGE0cDaKGdK28zgDotFtNA7MKq5DXl8LrfdxdCI8VHcg15oJz+amHTChPNI5JpgEPQWc2xFdrw3em/nQ==} + '@types/linkify-it@5.0.0': + resolution: {integrity: sha512-sVDA58zAw4eWAffKOaQH5/5j3XeayukzDk+ewSsnv3p4yJEZHCCzMDiZM8e0OUrRvmpGZ85jf4yDHkHsgBNr9Q==} + + '@types/markdown-it@14.1.2': + resolution: {integrity: sha512-promo4eFwuiW+TfGxhi+0x3czqTYJkG8qB17ZUJiVF10Xm7NLVRSLUsfRTU/6h1e24VvRnXCx+hG7li58lkzog==} + '@types/mdast@4.0.4': resolution: {integrity: sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==} + '@types/mdurl@2.0.0': + resolution: {integrity: sha512-RGdgjQUZba5p6QEFAVx2OGb8rQDL/cPRG7GiedRzMcJ1tYnUANBncjbSB1NRGwbvjcPeikRABz2nshyPk1bhWg==} + '@types/nlcst@2.0.3': resolution: {integrity: sha512-vSYNSDe6Ix3q+6Z7ri9lyWqgGhJTmzRjZRqyq15N0Z/1/UnVsno9G/N40NBijoYx2seFDIl0+B2mgAb9mezUCA==} @@ -1114,6 +1129,9 @@ packages: resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} engines: {node: '>= 8'} + argparse@2.0.1: + resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + aria-query@5.3.0: resolution: {integrity: sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==} @@ -1597,6 +1615,9 @@ packages: resolution: {integrity: sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA==} engines: {node: '>= 12.0.0'} + linkify-it@5.0.2: + resolution: {integrity: sha512-ONTm2jCMAVZjgQa/Fy1kScXsuOoF5NPTsoFBdE1KVIZ2vAh/r9+Bqo+0jINCBYnavTPQZz38QzFTme79ENoN3Q==} + lru-cache@11.5.3: resolution: {integrity: sha512-U4N8FgzmWxc8k1VH8Kr6lQg18U7Fjvby6wXHVRX/ZZ7IwWbRMgrRbP0Wrb5q5NVinryp4SQampHKdvtecItxUg==} engines: {node: 20 || >=22} @@ -1611,6 +1632,10 @@ packages: magicast@0.5.5: resolution: {integrity: sha512-UicdXN8zQ3JHlxVq+28afMXPr1z7WNY6+7EJnzTdQWkTAlMLF5fNCCKxJHBQwGaNGR11581EiQmQzx73+MvszA==} + markdown-it@14.1.0: + resolution: {integrity: sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==} + hasBin: true + mdast-util-to-hast@13.2.2: resolution: {integrity: sha512-l2pnmOuqs+SGLVpTVXnRLQu5v1AzvDe181404fbXzzqObVxrAnnVxapAP27pUwzLBL/ABIkgUhGlPVU7QSvIFg==} @@ -1620,6 +1645,9 @@ packages: mdn-data@2.27.1: resolution: {integrity: sha512-9Yubnt3e8A0OKwxYSXyhLymGW4sCufcLG6VdiDdUGVkPhpqLxlvP5vl1983gQjJl3tqbrM731mjaZaP68AgosQ==} + mdurl@2.1.0: + resolution: {integrity: sha512-1+HBaOx0zi/dQWht8rNv9MYf9qqpqL/kxI0hXImU6Y547zM6Sni8BQibt7ifgMcYtQg41ao3Ivd6cnSM86inpg==} + merge-stream@2.0.0: resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} @@ -1808,6 +1836,10 @@ packages: property-information@7.2.0: resolution: {integrity: sha512-IAtzIB6sUiWaJYrX9smp3V46pBGbBeLFRGdh25kg1334VcBlD8HzhPeNIWQH9zhGmo2itIe25EHt9dQP7G5hmg==} + punycode.js@2.3.1: + resolution: {integrity: sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==} + engines: {node: '>=6'} + punycode@2.3.1: resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} engines: {node: '>=6'} @@ -2017,6 +2049,9 @@ packages: engines: {node: '>=14.17'} hasBin: true + uc.micro@2.1.0: + resolution: {integrity: sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==} + ufo@1.6.4: resolution: {integrity: sha512-JFNbkD1Svwe0KvGi8GOeLcP4kAWQ609twvCdcHxq1oSL8svv39ZuSvajcD8B+5D0eL4+s1Is2D/O6KN3qcTeRA==} @@ -3209,10 +3244,19 @@ snapshots: parse5: 8.1.1 undici-types: 8.13.1 + '@types/linkify-it@5.0.0': {} + + '@types/markdown-it@14.1.2': + dependencies: + '@types/linkify-it': 5.0.0 + '@types/mdurl': 2.0.0 + '@types/mdast@4.0.4': dependencies: '@types/unist': 3.0.3 + '@types/mdurl@2.0.0': {} + '@types/nlcst@2.0.3': dependencies: '@types/unist': 3.0.3 @@ -3391,6 +3435,8 @@ snapshots: normalize-path: 3.0.0 picomatch: 2.3.2 + argparse@2.0.1: {} + aria-query@5.3.0: dependencies: dequal: 2.0.3 @@ -3900,6 +3946,10 @@ snapshots: lightningcss-win32-arm64-msvc: 1.33.0 lightningcss-win32-x64-msvc: 1.33.0 + linkify-it@5.0.2: + dependencies: + uc.micro: 2.1.0 + lru-cache@11.5.3: {} lz-string@1.5.0: {} @@ -3914,6 +3964,15 @@ snapshots: '@babel/types': 7.29.15 source-map-js: 1.2.4 + markdown-it@14.1.0: + dependencies: + argparse: 2.0.1 + entities: 4.5.0 + linkify-it: 5.0.2 + mdurl: 2.1.0 + punycode.js: 2.3.1 + uc.micro: 2.1.0 + mdast-util-to-hast@13.2.2: dependencies: '@types/hast': 3.0.5 @@ -3930,6 +3989,8 @@ snapshots: mdn-data@2.27.1: {} + mdurl@2.1.0: {} + merge-stream@2.0.0: {} micromark-util-character@2.1.1: @@ -4081,6 +4142,8 @@ snapshots: property-information@7.2.0: {} + punycode.js@2.3.1: {} + punycode@2.3.1: {} radix3@1.1.2: {} @@ -4339,6 +4402,8 @@ snapshots: typescript@5.9.3: {} + uc.micro@2.1.0: {} + ufo@1.6.4: {} ultrahtml@1.7.0: {} From 0efd7ddcccbfdf292f250d22d1f46a72f465b126 Mon Sep 17 00:00:00 2001 From: b4sleal Date: Sun, 29 Nov 2026 22:54:32 -0500 Subject: [PATCH 2/7] fix(site): the picked speaker's face is no longer clipped --- apps/site/src/components/mtp/SpeakerFaces.astro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/site/src/components/mtp/SpeakerFaces.astro b/apps/site/src/components/mtp/SpeakerFaces.astro index 290506db..7ccb1737 100644 --- a/apps/site/src/components/mtp/SpeakerFaces.astro +++ b/apps/site/src/components/mtp/SpeakerFaces.astro @@ -36,7 +36,7 @@ const { speakers } = Astro.props; aria-label={`Show ${speaker.name}, ${speaker.company}`} aria-pressed={index === 0 ? 'true' : 'false'} style={{ '--company': speaker.colour }} - class="group/face relative grid size-11.5 place-items-center rounded-full bg-window ring-3 ring-line-quiet transition-[translate,scale,background-color] duration-(--dur-fast) ease-(--ease-spring) hover:-translate-y-0.5 active:scale-95 aria-pressed:scale-120 sm:aria-pressed:scale-135 aria-pressed:bg-white aria-pressed:ring-0 motion-reduce:transition-none sm:size-13 nav:size-16" + class="group/face relative grid size-11.5 place-items-center rounded-full bg-window ring-3 ring-line-quiet transition-[translate,scale,background-color] duration-(--dur-fast) ease-(--ease-spring) hover:-translate-y-0.5 active:scale-95 aria-pressed:scale-120 sm:aria-pressed:scale-125 nav:aria-pressed:scale-120 aria-pressed:bg-white aria-pressed:ring-0 motion-reduce:transition-none sm:size-13 nav:size-16" > Date: Sun, 29 Nov 2026 22:54:33 -0500 Subject: [PATCH 3/7] feat(db): drop events.will_stream, since an event is streamed when it has a stream link --- apps/admin/src/types/database.types.ts | 3 --- supabase/v2/03_populate.sql | 2 +- supabase/v2/14_drop_will_stream.sql | 24 ++++++++++++++++++++++++ supabase/v2/README.md | 1 + 4 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 supabase/v2/14_drop_will_stream.sql diff --git a/apps/admin/src/types/database.types.ts b/apps/admin/src/types/database.types.ts index fefd15ba..c7cea70e 100644 --- a/apps/admin/src/types/database.types.ts +++ b/apps/admin/src/types/database.types.ts @@ -436,7 +436,6 @@ export type Database = { start_time: string | null stream_url: string | null title: string - will_stream: boolean } Insert: { building_code?: string | null @@ -459,7 +458,6 @@ export type Database = { start_time?: string | null stream_url?: string | null title: string - will_stream?: boolean } Update: { building_code?: string | null @@ -482,7 +480,6 @@ export type Database = { start_time?: string | null stream_url?: string | null title?: string - will_stream?: boolean } Relationships: [ { diff --git a/supabase/v2/03_populate.sql b/supabase/v2/03_populate.sql index c31cc4c6..082f20bc 100644 --- a/supabase/v2/03_populate.sql +++ b/supabase/v2/03_populate.sql @@ -2,7 +2,7 @@ -- -- Only reads from public.events and public.team; nothing in `public` changes. Keeps every id, so links and -- bookmarks still match. Safe to run again (for example right before the new site goes live): rows that already --- exist are updated from `public`, and fields that only exist in v2 (category after the first copy, will_stream, stream_url, hosts, +-- exist are updated from `public`, and fields that only exist in v2 (category after the first copy, stream_url, hosts, -- documents, related events, extra photos) are left as they are. -- -- Run 04_copy_event_photos.mjs after this to copy the picture files themselves. diff --git a/supabase/v2/14_drop_will_stream.sql b/supabase/v2/14_drop_will_stream.sql new file mode 100644 index 00000000..fd94c8cb --- /dev/null +++ b/supabase/v2/14_drop_will_stream.sql @@ -0,0 +1,24 @@ +-- v2 step 15: an event is streamed when it has a stream link, so `will_stream` goes. +-- +-- Nothing reads it any more: the admin and the site both go by `stream_url`. No event has it set, so nothing is +-- lost; the check below stops the run if one does. +-- +-- Run once. Swap `commit` for `rollback` at the bottom for a dry run. + +begin; + +-- Dropping a column needs the events table to itself. Give up after a few seconds rather than wait behind the +-- site's and the admin's reads; run it again a moment later. +set local lock_timeout = '5s'; + +do $$ +begin + if exists (select 1 from v2.events where will_stream and stream_url is null) then + raise exception 'An event is marked as streamed but has no stream link. Add its link in the admin first.'; + end if; +end; +$$; + +alter table v2.events drop column will_stream; + +commit; diff --git a/supabase/v2/README.md b/supabase/v2/README.md index d4fce55a..9c8ec215 100644 --- a/supabase/v2/README.md +++ b/supabase/v2/README.md @@ -167,6 +167,7 @@ Run in the Supabase SQL editor (or `psql`), in order. Each step can be checked b | 12 | `11_photo_order.sql` | `photos.team_sort_order`, and functions that save a new order in one go for an event's gallery, the team credits and a speaker's photos | No | | 13 | `12_company_card_logo.sql` | `companies.card_logo_path`: each company's logo framed wide for the back of a speaker's card (`logo_path` stays the round one for their face); empty means the card uses `logo_path` | No | | 14 | `13_event_details.sql` | What an event's page shows: `buildings` (code and name), and on events a unique link name (`slug`, filled in from the title and year when missing), building and room (copied from `location`), in person or online with a meeting link, highlights (food, snacks, drinks, speaker series), dress code and two colours; `event_topics` ("What they'll cover", with Lucide icon names), `event_partners` ("In collaboration with") and documents that are a file or a link, with a kind | No | +| 15 | `14_drop_will_stream.sql` | Drops `events.will_stream`: an event is streamed when it has a `stream_url`. Stops if an event is marked streamed with no link | No | | undo | `99_rollback.sql` | Drops `v2` and the new bucket rules (empty and delete the two buckets in the dashboard) | No | Until the new site goes live, the current admin still writes to `public`. **Re-run steps 3 to 5 right before From 85fa763aef20f7759caf9a5b7a6cf65d78d83d37 Mon Sep 17 00:00:00 2001 From: b4sleal Date: Sun, 29 Nov 2026 22:54:33 -0500 Subject: [PATCH 4/7] feat(site): read where an event is from its building and room, starting with Meet the Pros --- apps/site/src/lib/places.ts | 35 +++++++++++++++++++++++++++ apps/site/src/lib/queries/speakers.ts | 3 ++- apps/site/src/lib/speakers.ts | 8 +++--- apps/site/tests/lib/places.test.ts | 17 +++++++++++++ apps/site/tests/lib/speakers.test.ts | 6 +++-- 5 files changed, 62 insertions(+), 7 deletions(-) create mode 100644 apps/site/src/lib/places.ts create mode 100644 apps/site/tests/lib/places.test.ts diff --git a/apps/site/src/lib/places.ts b/apps/site/src/lib/places.ts new file mode 100644 index 00000000..62c26de9 --- /dev/null +++ b/apps/site/src/lib/places.ts @@ -0,0 +1,35 @@ +/** + * Where an event is, read from the events table: online, or a building and room. Events saved before buildings + * existed only have the old free-text `location`, which is used until an exec picks a building. + */ +import { z } from 'zod'; + +/** The columns that say where an event is. Select these with every event the site shows a place for. */ +export const PLACE_COLUMNS = 'format, building_code, room, location'; + +const optionalText = z + .string() + .trim() + .nullable() + .transform((value) => value || null); + +/** Those columns, checked. */ +export const PlaceRowSchema = z.object({ + format: z.enum(['in_person', 'online']), + building_code: optionalText, + room: optionalText, + location: optionalText, +}); +export type PlaceRow = z.infer; + +/** + * Where an event is, short, the way a ticket says it: "N2085", "LH · 3rd floor staircase", "AC" or "Online". + * Null when nothing is known yet (the site says "Location TBA"). + */ +export function placeLabel(place: PlaceRow): string | null { + if (place.format === 'online') return 'Online'; + if (place.building_code === null) return place.location; + if (place.room === null) return place.building_code; + // A room number joins its building the way students write it ("BA201", "P110A/B"); words get a dot. + return /^\d\S*$/.test(place.room) ? `${place.building_code}${place.room}` : `${place.building_code} · ${place.room}`; +} diff --git a/apps/site/src/lib/queries/speakers.ts b/apps/site/src/lib/queries/speakers.ts index f17284c7..c19f8c7b 100644 --- a/apps/site/src/lib/queries/speakers.ts +++ b/apps/site/src/lib/queries/speakers.ts @@ -3,12 +3,13 @@ * that has guests hosting it, with each guest's company and the photos they're tagged in. Anyone may read these. */ import { UnavailableError } from '../errors'; +import { PLACE_COLUMNS } from '../places'; import { toEditionEvent, toSpeaker, type MtpEdition, type SpeakerUrls } from '../speakers'; import { BUCKETS, publicUrl } from '../storage'; import { getSupabase } from '../supabase'; // `!inner` keeps only events with guest hosts, and only the hosts who are guests. -const COLUMNS = `date, location, poster_path, +const COLUMNS = `date, ${PLACE_COLUMNS}, poster_path, event_hosts!inner(sort_order, guests!inner(name, title, picture_path, link_url, companies(name, colour, logo_path, card_logo_path), diff --git a/apps/site/src/lib/speakers.ts b/apps/site/src/lib/speakers.ts index ef023a8b..607ee1e8 100644 --- a/apps/site/src/lib/speakers.ts +++ b/apps/site/src/lib/speakers.ts @@ -5,6 +5,7 @@ */ import { z } from 'zod'; import { termOf } from './dates'; +import { PlaceRowSchema, placeLabel } from './places'; /** One speaker, as the spotlight shows them. Their links can be missing; then the button is left out. */ export type Speaker = Readonly<{ @@ -51,9 +52,8 @@ const optionalText = z .nullable() .transform((value) => value || null); -const EventRowSchema = z.object({ +const EventRowSchema = PlaceRowSchema.extend({ date: z.iso.date(), - location: optionalText, poster_path: optionalText, event_hosts: z.array(z.unknown()), }); @@ -82,8 +82,8 @@ const HostRowSchema = z.object({ export function toEditionEvent(row: unknown): EditionEvent | null { const parsed = EventRowSchema.safeParse(row); if (!parsed.success) return null; - const { date, location, poster_path, event_hosts } = parsed.data; - return { edition: termOf(date), room: location, posterPath: poster_path, hosts: event_hosts }; + const { date, poster_path, event_hosts } = parsed.data; + return { edition: termOf(date), room: placeLabel(parsed.data), posterPath: poster_path, hosts: event_hosts }; } /** diff --git a/apps/site/tests/lib/places.test.ts b/apps/site/tests/lib/places.test.ts new file mode 100644 index 00000000..e53c8b93 --- /dev/null +++ b/apps/site/tests/lib/places.test.ts @@ -0,0 +1,17 @@ +import { describe, expect, it } from 'vitest'; +import { placeLabel, type PlaceRow } from '../../src/lib/places'; + +const inPerson: PlaceRow = { format: 'in_person', building_code: null, room: null, location: null }; + +describe('placeLabel', () => { + it.each([ + ['a building and a room number', { ...inPerson, building_code: 'BA', room: '201' }, 'BA201'], + ['a building and a room in words', { ...inPerson, building_code: 'LH', room: '3rd floor staircase' }, 'LH · 3rd floor staircase'], + ['a building with no room', { ...inPerson, building_code: 'AC' }, 'AC'], + ['only the old free-text place', { ...inPerson, location: 'Arts 1E1' }, 'Arts 1E1'], + ['an online event', { ...inPerson, format: 'online' as const, location: 'Discord' }, 'Online'], + ['nothing known yet', inPerson, null], + ])('shows %s', (_, place, label) => { + expect(placeLabel(place)).toBe(label); + }); +}); diff --git a/apps/site/tests/lib/speakers.test.ts b/apps/site/tests/lib/speakers.test.ts index ccb3f8d3..2d845223 100644 --- a/apps/site/tests/lib/speakers.test.ts +++ b/apps/site/tests/lib/speakers.test.ts @@ -34,12 +34,14 @@ const EVENT: EditionEvent = { edition: 'Fall 2026', room: 'LH3094', posterPath: describe('toEditionEvent', () => { it('reads the event into its term and room, keeping its hosts for toSpeaker', () => { const hosts = [host()]; - const row = { date: '2026-11-19', location: 'LH3094', poster_path: 'mtp/poster.png', event_hosts: hosts }; + const place = { format: 'in_person', building_code: 'LH', room: '3094', location: null }; + const row = { date: '2026-11-19', ...place, poster_path: 'mtp/poster.png', event_hosts: hosts }; expect(toEditionEvent(row)).toEqual({ ...EVENT, hosts }); }); it('has no room when the event has none, and is null without a date', () => { - const row = { date: '2026-11-19', location: ' ', poster_path: null, event_hosts: [] }; + const place = { format: 'in_person', building_code: null, room: null, location: ' ' }; + const row = { date: '2026-11-19', ...place, poster_path: null, event_hosts: [] }; expect(toEditionEvent(row)?.room).toBeNull(); expect(toEditionEvent({ ...row, date: 'soon' })).toBeNull(); }); From 9c088c3cdf6463cdbee9f8260b699007c07b990d Mon Sep 17 00:00:00 2001 From: b4sleal Date: Sun, 29 Nov 2026 22:54:33 -0500 Subject: [PATCH 5/7] feat(site): Coming up reads the events table, tickets open their event, and All events opens every ticket --- .../site/src/components/events/ComingUp.astro | 15 ++- .../src/components/events/EventTicket.astro | 104 ++--------------- .../src/components/events/MonthCalendar.astro | 29 +++-- .../src/components/events/TicketArchive.astro | 102 ++++++++++++++++ .../src/components/events/TicketFace.astro | 110 ++++++++++++++++++ apps/site/src/components/events/day-marks.ts | 2 +- apps/site/src/components/hero/Hero.astro | 2 +- .../site/src/components/hero/NextUpCard.astro | 2 +- apps/site/src/content/events.ts | 58 --------- apps/site/src/content/home.ts | 2 +- apps/site/src/lib/club-events.ts | 54 +++++++++ apps/site/src/lib/events.ts | 14 ++- apps/site/src/lib/queries/events.ts | 25 +++- apps/site/src/lib/queries/home.ts | 13 ++- apps/site/src/pages/index.astro | 9 +- apps/site/src/scripts/coming-up.ts | 5 +- apps/site/src/scripts/ticket-archive.ts | 19 +++ apps/site/src/styles/global.css | 12 ++ apps/site/src/styles/tokens.css | 2 + apps/site/tests/components/ComingUp.test.ts | 29 ++++- apps/site/tests/components/Hero.test.ts | 3 +- apps/site/tests/lib/club-events.test.ts | 45 +++++++ apps/site/tests/lib/day-marks.test.ts | 3 +- apps/site/tests/lib/events.test.ts | 15 ++- 24 files changed, 476 insertions(+), 198 deletions(-) create mode 100644 apps/site/src/components/events/TicketArchive.astro create mode 100644 apps/site/src/components/events/TicketFace.astro delete mode 100644 apps/site/src/content/events.ts create mode 100644 apps/site/src/lib/club-events.ts create mode 100644 apps/site/src/scripts/ticket-archive.ts create mode 100644 apps/site/tests/lib/club-events.test.ts diff --git a/apps/site/src/components/events/ComingUp.astro b/apps/site/src/components/events/ComingUp.astro index 1a667f57..aaf45fcc 100644 --- a/apps/site/src/components/events/ComingUp.astro +++ b/apps/site/src/components/events/ComingUp.astro @@ -5,11 +5,11 @@ * 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. + * about the next one. 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'; -import type { ClubEvent } from '../../content/events'; +import type { ClubEvent } from '../../lib/club-events'; import type { IsoDate } from '../../lib/dates'; import { calendarMonths } from '../../lib/events'; import { linkTarget } from '../../lib/links'; @@ -18,6 +18,7 @@ import { dayMarks } from './day-marks'; import { SHOWN_TICKETS, TICKET_ACCENTS } from './event-accents'; import EventTicket from './EventTicket.astro'; import MonthCalendar from './MonthCalendar.astro'; +import TicketArchive from './TicketArchive.astro'; import { DOODLE_SPOTS } from '../ui/doodle-spots'; import Doodles from '../ui/Doodles.astro'; @@ -51,7 +52,9 @@ const instagram = socialLink('instagram');