Skip to content

Block 277 of 297

Sky Time Banner

A park or city banner whose GPU sky follows the visitor's local time: dawn, day, dusk or night.

Puck key
SkyTimeBannerBlock
Export
skyTimeBannerBlock
React component
<SkyTimeBanner />
Files
components/puck/sky-time-banner-block.tsx
components/puck/sky-time-banner.client.tsx
Dependencies
vgpu
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 banner whose sky follows the visitor's local clock, showing dawn, daytime, dusk or night with the sun or moon placed by the hour, stars after dark, clouds and a ridgeline. Copy, hours and a button sit on a frosted dark card at the lower left. There are no color fields; the sky sets the palette.

  • A "today at the park" band on a park or nature center home page
  • Visitor information pages that show daily hours
  • Campgrounds, gardens or zoos that want the page to feel current
Writing the content
  • Hours takes a short status line and can be bound to a P1 data source with {{ }} tokens; it hides when blank.
  • Set Sky time to Dawn, Noon, Dusk or Night while editing, then back to Live; a pinned time shows to every visitor.
  • Live uses the visitor's device clock, not your site's time zone.
  • Clouds sets Clear, Scattered or Cloudy; it does not reflect real weather.
Accessibility
  • All text sits on a dark, semi-opaque card, so it stays readable whether the sky behind it is noon blue or night.
  • The sky canvas is aria-hidden. Reduced-motion visitors get a still frame that refreshes once a minute so the hour stays accurate.
  • The button has a white focus outline and 44px minimum height.
Customizing the code
  • Requires vgpu and sky-time-banner.client.tsx. Preset hours live in PRESETS (dawn 0.272, noon 0.5, dusk 0.735, night 0.02), and sky colors are the zen and hor values in fs_main.
  • Update the FALLBACK gradient, which browsers without WebGPU show at every hour.

Editor fields

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

  • Eyebrowtext
  • Headingtextarea
  • Heading levelselect
  • Bodytextarea
  • Hourstext
  • Button texttext
  • Button linktext
  • Cloudsradio
  • Sky timeselect