diff --git a/docs/homepage-redesign-roadmap.md b/docs/homepage-redesign-roadmap.md index d245020..726238b 100644 --- a/docs/homepage-redesign-roadmap.md +++ b/docs/homepage-redesign-roadmap.md @@ -1,6 +1,6 @@ # Homepage Redesign Roadmap -Status: Active — PRs 1–4 and 4A merged; Community links and page order in progress +Status: Active — PRs 1–5 and 4A merged; responsive events in progress Primary audience: People considering their first Kyoto Tech Meetup Secondary audience: Existing community members looking for events, venue details, conversations, and member work @@ -394,6 +394,12 @@ Preserve the detailed calendar for existing members while giving mobile visitors - Render the list at mobile widths and retain the existing server-rendered calendar grid at tablet and desktop widths. - Preserve a useful no-events state linking to the Meetup group. +### Event details consistency + +- Add the cached RSVP count to the hero's next-event card. +- Add the same validated “Open in Maps” action used by calendar events to the hero card when a physical address is available. +- Keep RSVP counts and Maps behavior consistent across the hero, mobile list, and desktop calendar. + ### Happening-now state - Preserve the existing `NextEventCard.astro` behavior, which already renders “Live Now” / “開催中” with an active green status dot when `getHeroEventState` identifies an ongoing event. diff --git a/src/components/Calendar.astro b/src/components/Calendar.astro index eda7753..5eda18e 100644 --- a/src/components/Calendar.astro +++ b/src/components/Calendar.astro @@ -4,15 +4,17 @@ import { type MeetupEvent, } from "../lib/meetup-events"; import { buildFiveWeekCalendar } from "../lib/calendar-grid"; +import { isOngoingEvent } from "../lib/event-status"; import { useTranslations } from "../i18n/utils"; import { FaLocationDot, FaUserGroup } from "react-icons/fa6"; type Props = { events: MeetupEvent[]; lang?: "en" | "ja"; + now?: Date; }; -const { events, lang = "en" } = Astro.props as Props; +const { events, lang = "en", now = new Date() } = Astro.props as Props; const t = useTranslations(lang); const locale = lang === "ja" ? "ja-JP" : "en-US"; const weeks = buildFiveWeekCalendar(events); @@ -90,6 +92,7 @@ const eventColorClass = (event: MeetupEvent) => { const mapsUrl = buildMeetupVenueMapsUrl(event.venue); const venueLabel = event.venue?.name ?? event.venue?.address ?? ""; + const ongoing = isOngoingEvent(event, now); return (
{ "rounded-lg px-2 py-2 text-xs text-white shadow-sm transition", eventColorClass(event), ]} + data-event-live + data-event-start={event.start} + data-event-end={event.endTime ?? undefined} + data-live-state={ongoing ? "ongoing" : "upcoming"} + data-live-emphasis="calendar" > +