Skip to content

Block 176 of 297

Pool Schedule

Today's pool status, a days-by-sessions swim table, closures, the weather policy and a swim lessons link.

Puck key
PoolScheduleBlock
Export
poolScheduleBlock
React component
<PoolSchedule />
Path
components/puck/pool-schedule-block.tsx
Dependencies
None
License
MIT

About this block

When to use it, how to write for it, and what to change in the code.

What it's for

An aquatics schedule with a "today" status box, a weekly table of lap swim, open swim, lessons and water aerobics times, and notes on lifeguards, closures and weather. On tablets and up it is a standard table; on phones each day becomes its own card with session labels. A dark swim lessons panel can sit beside the closures list.

  • A seasonal outdoor pool hours page
  • An indoor natatorium schedule for a rec center
  • A summer aquatics landing page with lessons sign-up
Writing the content
  • Update Status line daily, like "Open today until 8 p.m.", and set Today's status to match. Clearing Status line hides the box.
  • Enter each session's times one range per line. A blank session shows a dash. Up to 14 day rows fit, so you can use ranges like "Mon–Fri".
  • Write Closures one per line as "Date | What's closed", like "Jul 4 | Closed for the holiday".
Accessibility
  • Today's status always includes a word ("Today: Open", "Limited" or "Closed") next to its colored dot, so the color is not the only signal (WCAG 1.4.1).
  • The schedule is a table with a hidden caption and day row headers. On phones CSS restyles rows as cards, which can drop table semantics in some browsers, so test with a screen reader (WCAG 1.3.1).
Customizing the code
  • Session columns are fixed in the sessions constant (lap, open, lessons, aerobics); renaming one there changes its header and phone label.
  • Status colors are in the tones map; the lessons panel is bg-indigo-950 with a decorative wave SVG.

Editor fields

What content editors see in the P1 sidebar when they select this block.

  • Pool nametext
  • Headingtext
  • Heading levelselect
  • Season datestext
  • Introtextarea
  • Today's statusselect
  • Status linetext
  • Status detailtext
  • Daysarray
  • Lifeguard notetextarea
  • Closures headingtext
  • Closurestextarea
  • Weather policy headingtext
  • Weather policytextarea
  • Lessons headingtext
  • Lessons texttextarea
  • Lessons link texttext
  • Lessons linktext