From f85cc084b796d97902f9bfa1fe61ba9c5dc80f2e Mon Sep 17 00:00:00 2001 From: Josh Wright Date: Sun, 5 Apr 2026 15:01:37 -0400 Subject: [PATCH] feat: blue dot + Weather Delay notice for storm-closed parks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Dot turns blue (instead of green) during weather delay on homepage - Mobile card "Open today" badge becomes blue "⛈ Weather Delay" - Park page LiveRidePanel shows a blue "⛈ Weather Delay — all rides currently closed" badge instead of "Not open yet — check back soon" - Added --color-weather-* CSS variables (blue palette) Co-Authored-By: Claude Sonnet 4.6 --- app/globals.css | 6 ++++++ app/park/[id]/page.tsx | 8 ++++++++ components/LiveRidePanel.tsx | 16 +++++++++++++++- components/ParkCard.tsx | 20 +++++--------------- components/WeekCalendar.tsx | 6 ++---- 5 files changed, 36 insertions(+), 20 deletions(-) diff --git a/app/globals.css b/app/globals.css index e05840c..949c3f0 100644 --- a/app/globals.css +++ b/app/globals.css @@ -27,6 +27,12 @@ --color-open-text: #4ade80; --color-open-hours: #bbf7d0; + /* ── Weather delay — blue (open by schedule but all rides closed) ───────── */ + --color-weather-bg: #0a1020; + --color-weather-border: #3b82f6; + --color-weather-text: #60a5fa; + --color-weather-hours: #bfdbfe; + /* ── Closing — amber (post-close buffer, rides still winding down) ───────── */ --color-closing-bg: #1a1100; --color-closing-border: #d97706; diff --git a/app/park/[id]/page.tsx b/app/park/[id]/page.tsx index 94d6e8e..9662772 100644 --- a/app/park/[id]/page.tsx +++ b/app/park/[id]/page.tsx @@ -73,6 +73,13 @@ export default async function ParkPage({ params, searchParams }: PageProps) { } } + // Weather delay: park is within operating hours but queue-times shows 0 open rides + const isWeatherDelay = + withinWindow && + liveRides !== null && + liveRides.rides.length > 0 && + liveRides.rides.every((r) => !r.isOpen); + // Only hit the schedule API as a fallback when live data is unavailable if (!liveRides && apiId !== null) { // Note: the API drops today's date from its response (only returns future dates), @@ -157,6 +164,7 @@ export default async function ParkPage({ params, searchParams }: PageProps) { ) : ( r.isCoaster); const [coastersOnly, setCoastersOnly] = useState(false); @@ -49,6 +50,19 @@ export function LiveRidePanel({ liveRides, parkOpenToday }: LiveRidePanelProps) }}> {openRides.length} open + ) : isWeatherDelay ? ( +
+ ⛈ Weather Delay — all rides currently closed +
) : (
{isOpenToday ? (
- {isClosing ? "Closing" : "Open today"} + {isWeatherDelay ? "⛈ Weather Delay" : isClosing ? "Closing" : "Open today"}
) : (
)} - {isOpenToday && isWeatherDelay && ( -
- ⛈ Weather Delay -
- )} - {isOpenToday && openRideCount !== undefined && ( + {isOpenToday && !isWeatherDelay && openRideCount !== undefined && (
)}