Files
NHL-Scoreboard/app/templates/index.html
T
josh 2da60e27ae
CI / Lint (push) Failing after 10s
CI / Test (push) Has been skipped
CI / Build & Push (push) Has been skipped
feat: add 10 UX improvements from interface review
- Stale data banner after 3 consecutive fetch failures, auto-clears on recovery
- Date navigation with left/right arrows (Yesterday/Today/Tomorrow labels),
  fetches from NHL API for non-today dates, disables auto-refresh on history
- Empty state message when no games are scheduled
- Series detail page auto-refreshes every 30s when a game is live
- Notification permission deferred until a playoff OT actually occurs
- Scroll position saved/restored when navigating to/from series detail
- Team records rendered with better contrast and tabular nums
- Active bracket round highlighted with gold heading + underline,
  completed rounds dimmed more aggressively, mobile accordion auto-opens
  current round
- Browser tab title shows live game count (e.g. "NHL Scoreboard (3 Live)")
- Service worker update shows a dismissable toast instead of force-reloading

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-23 20:22:03 -04:00

83 lines
4.0 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<title>NHL Scoreboard</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="theme-color" content="#0f172a">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="apple-mobile-web-app-title" content="NHL Scores">
<link rel="manifest" href="/manifest.json">
<link rel="icon" type="image/png" href="{{ static_v('icon-32x32.png') }}">
<link rel="apple-touch-icon" href="{{ static_v('icon-180x180.png') }}">
<link rel="stylesheet" type="text/css" href="{{ static_v('styles.css') }}">
</head>
<body>
<header>
<span class="header-title">NHL Scoreboard</span>
<nav class="date-nav" aria-label="Date navigation">
<button id="date-prev" class="date-btn" aria-label="Previous day">&larr;</button>
<span id="date-label" class="date-label"></span>
<button id="date-next" class="date-btn" aria-label="Next day">&rarr;</button>
</nav>
</header>
<section id="playoff-banner" class="playoff-banner hidden" aria-hidden="true">
<a class="banner-main" href="/bracket" aria-label="View the playoff bracket">
<svg class="banner-trophy" viewBox="0 0 32 40" aria-hidden="true">
<defs>
<linearGradient id="cup-gold" x1="0" x2="1" y1="0" y2="1">
<stop offset="0%" stop-color="#f5d76e"/>
<stop offset="60%" stop-color="#d4af37"/>
<stop offset="100%" stop-color="#8a6d1a"/>
</linearGradient>
</defs>
<path fill="url(#cup-gold)" d="M6 2h20v4c0 5-2 9-5 11l-1 5h-8l-1-5C8 15 6 11 6 6V2zm4 20h12v3H10v-3zm-2 4h16v3H8v-3zm1 4h14v6H9v-6z"/>
<rect x="11" y="9" width="10" height="2" fill="#0a1628" opacity="0.35"/>
<rect x="11" y="13" width="10" height="1.5" fill="#0a1628" opacity="0.35"/>
</svg>
<div class="banner-text">
<div class="banner-title">
STANLEY CUP PLAYOFFS
<span class="banner-year"></span>
</div>
<div class="banner-meta">
<span class="meta-round"></span>
<span class="meta-day hidden"></span>
<span class="meta-series"></span>
<span class="meta-elim hidden"></span>
<span class="meta-game7 hidden"></span>
</div>
</div>
</a>
</section>
<div id="stale-banner" class="stale-banner hidden">Connection lost &mdash; scores may be outdated</div>
<main>
<div id="empty-state" class="empty-state hidden">
<p class="empty-state-heading">No games scheduled today</p>
<p class="empty-state-sub">Check back tomorrow</p>
</div>
<section id="pinned-section" class="section pinned-section hidden">
<h2 class="section-heading section-heading-gold">Spotlight &middot; Game 7</h2>
<div id="pinned-games-section" class="games-grid"></div>
</section>
<section id="live-section" class="section hidden">
<h2 class="section-heading">Live</h2>
<div id="live-games-section" class="games-grid"></div>
</section>
<section id="intermission-section" class="section hidden">
<h2 class="section-heading">Intermission</h2>
<div id="intermission-games-section" class="games-grid"></div>
</section>
<section id="pre-section" class="section hidden">
<h2 class="section-heading">Scheduled</h2>
<div id="pre-games-section" class="games-grid"></div>
</section>
<section id="final-section" class="section hidden">
<h2 class="section-heading">Final</h2>
<div id="final-games-section" class="games-grid"></div>
</section>
</main>
<script src="{{ static_v('script.js') }}"></script>
</body>
</html>