From 7e5607c21c6db081753a09b0801dd50f8eafd36d Mon Sep 17 00:00:00 2001 From: Brittany Ellich Date: Fri, 17 Apr 2026 08:54:49 -0700 Subject: [PATCH] Add community to event cards, add discord link, and make rebuilds more resilient to outages --- src/components/EventCard.astro | 10 ++- src/components/Footer.astro | 2 + src/lib/preflight.ts | 47 +++++++++++++ src/pages/events.astro | 21 ++---- src/pages/index.astro | 117 +++++++++++---------------------- 5 files changed, 101 insertions(+), 96 deletions(-) create mode 100644 src/lib/preflight.ts diff --git a/src/components/EventCard.astro b/src/components/EventCard.astro index ea12fdb..4ca0483 100644 --- a/src/components/EventCard.astro +++ b/src/components/EventCard.astro @@ -7,9 +7,10 @@ interface Props { mode?: 'online' | 'in_person' | 'hybrid'; description?: string; href: string; + source?: string; } -const { name, date, endDate, location, mode = 'in_person', description, href } = Astro.props; +const { name, date, endDate, location, mode = 'in_person', description, href, source } = Astro.props; const eventDate = new Date(date); const formattedDate = eventDate.toLocaleDateString('en-US', { @@ -24,6 +25,9 @@ const formattedTime = eventDate.toLocaleTimeString('en-US', { const modeLabel = mode === 'online' ? 'Online' : mode === 'hybrid' ? 'Hybrid' : location ?? 'In Person'; const badgeClass = mode === 'online' ? 'badge--online' : mode === 'hybrid' ? 'badge--online' : 'badge--location'; + +// Format source handle for display +const sourceLabel = source ? `@${source.replace(/\.bsky\.social$/, '')}` : undefined; ---
@@ -35,6 +39,7 @@ const badgeClass = mode === 'online' ? 'badge--online' : mode === 'hybrid' ? 'ba {description &&

{description}

}
@@ -83,5 +88,8 @@ const badgeClass = mode === 'online' ? 'badge--online' : mode === 'hybrid' ? 'ba .event-card__footer { margin-top: var(--space-md); + display: flex; + flex-wrap: wrap; + gap: var(--space-xs); } diff --git a/src/components/Footer.astro b/src/components/Footer.astro index 1377f2c..6cdf3ed 100644 --- a/src/components/Footer.astro +++ b/src/components/Footer.astro @@ -7,6 +7,8 @@ const year = new Date().getFullYear();
- {communities.slice(0, 8).map(c => ( + {communities.slice(0, 10).map(c => ( ))}
-- 2.51.2