Skip to content

Add ticket-sales countdown to The Vibes banner#440

Merged
simonhamp merged 1 commit into
mainfrom
banner-countdown-timer
Jul 23, 2026
Merged

Add ticket-sales countdown to The Vibes banner#440
simonhamp merged 1 commit into
mainfrom
banner-countdown-timer

Conversation

@simonhamp

Copy link
Copy Markdown
Member

What

Adds a live d/h/m/s countdown to the site-wide The Vibes banner, counting down to ticket sales closing at midnight Boston time on July 30, 2026 (2026-07-30T00:00:00-04:00 = 04:00 UTC) — and makes the whole banner disappear once that deadline hits.

  • The deadline is defined once in the component and drives both:
    • a server-side guard (@if (now()->isBefore(...))) — pages loaded after the deadline don't render the banner at all (works without JS, no flash), and
    • the Alpine countdown on the banner root (x-show="! expired") — tabs already open at midnight watch the banner vanish live.
  • Countdown pills use the same Alpine tick pattern as the existing x-course.countdown, with zero-padded tabular-nums digits and dark-mode styles matching the masterclass countdown.
  • The banner now flex-wraps so on smaller screens the countdown drops to its own centered row instead of squeezing the headline text.

Also a drive-by docs fix: the webview example on the SuperNative page ("Is the web view still an option?") now includes the php attribute, matching the PHP mode documented in #437 — without it the example's pre-v4 behavior wouldn't work.

Why

The Vibes is a week away and tickets are only on sale until midnight before the event — the banner should create urgency while sales are open and get out of the way the moment they close, without needing a manual deploy at 4am UTC.

Testing

  • tests/Feature/TheVibesBannerTest.php (4 tests, time-frozen with travelTo so they stay deterministic): countdown renders during the sales window, banner gone at exactly the deadline (component + homepage), homepage shows the countdown beforehand.
  • Verified rendering and live ticking in the browser, including the responsive wrap behavior.

🤖 Generated with Claude Code

The site-wide Vibes banner now shows a live d/h/m/s countdown to ticket
sales closing at midnight Boston time on July 30 (04:00 UTC). The
deadline is defined once and drives both a server-side render guard and
the Alpine timer, so the whole banner disappears the moment sales close
- on page loads after the deadline and live in already-open tabs.

Also adds the php attribute to the webview example on the SuperNative
docs page, matching the documented PHP mode.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@simonhamp
simonhamp marked this pull request as ready for review July 23, 2026 02:52
@simonhamp
simonhamp merged commit 64d5960 into main Jul 23, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant