Block 179 of 297
Field Conditions
Today's status for fields, courts, trails, pools and rinks, with counts by status and a rain-out hotline.
- Puck key
- FieldConditionsBlock
- Export
- fieldConditionsBlock
- React component
- <FieldConditions />
- Path
- components/puck/field-conditions-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
A conditions board for fields, diamonds, courts, trails, pools and rinks. A left column holds the heading, a dark rain-out hotline box and an alerts link, and stays in view on large screens. The right column lists each facility with a type icon, an optional note and a status pill, under a summary count by status. On phones the columns stack, hotline first.
- A park district's daily field status page for coaches and parents
- A rain-out page linked from league emails
- A winter page for rink and trail closures
Writing the content
- Change Board last updated each time you edit a status, so families trust the board. Each facility's Updated field is optional.
- Use Limited when part of a facility is usable and Wet grounds when there is no play until it dries; the counts at the top add these up.
- Write Note to say what is affected and when you will check again. Leave it blank when a facility is simply open.
Accessibility
- Each status shows an icon and a word (Open, Limited, Wet grounds, Closed) with a hidden "Status:" prefix, so the colored pills never stand alone (WCAG 1.4.1).
- The summary counts are a list labelled "Today at a glance", and each facility name is a heading below the section heading (WCAG 1.3.1).
Customizing the code
- Status colors and icons are in the statuses map; facility types and their icons are in kinds.
- The 4/8 column split comes from lg:col-span-4 and lg:col-span-8; remove lg:sticky to stop the left column from pinning.
Editor fields
What content editors see in the P1 sidebar when they select this block.
- Headingtext
- Heading levelselect
- Introtextarea
- Board last updatedtext
- Facilitiesarray
- Rain-out line labeltext
- Rain-out line phonetext
- Rain-out notetextarea
- Alerts link texttext
- Alerts linktext