screentinker/Examples/PIP-Air-Quality/aqi-overlay.html
screentinker 0b138f10c6
Add PiP overlay example recipes (#132)
Self-contained examples for the PiP overlay API (POST /api/pip), each
with a CSP-safe query-param overlay (external JS), config.example.json,
zero runtime deps, an offline test, and a README:

- PIP-Announce-Broadcast    manual one-shot message to a screen/group
- PIP-Weather-Widget        Open-Meteo current conditions (keyless)
- PIP-Air-Quality           Open-Meteo US AQI widget (keyless)
- PIP-Crypto-Ticker         CoinGecko price strip (keyless)
- PIP-News-Ticker           scrolling RSS/Atom headlines
- PIP-Room-Status-Calendar  ICS-driven Available/Busy room sign
- PIP-Event-Countdown       client-side countdown, auto-clears at zero
- PIP-Welcome-Board         rotating welcome/birthday cards from CSV
- PIP-Fundraiser-Thermometer goal-progress bar from local/URL JSON
- PIP-QR-Rotator            rotating QR codes, encoded client-side
- PIP-Incident-Webhook      event-driven: red on firing, clear on resolved

Also includes the CAP-AU (NSW RFS) and US NWS/NOAA emergency-alert
monitors that push expiry-aware PiP overlays.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-18 20:20:37 -05:00

45 lines
2 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Air Quality</title>
<style>
html, body { margin: 0; height: 100%; background: transparent; }
body { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; display: flex; }
.card { flex: 1; display: flex; flex-direction: column; background: #1a1a1a; color: #fff;
border-radius: 16px; overflow: hidden; box-shadow: 0 10px 40px rgba(0,0,0,.45);
padding: 14px 18px; box-sizing: border-box; border-left: 8px solid #888; }
.top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.loc { font-size: clamp(13px, 3.2vw, 18px); font-weight: 600; opacity: .92;
white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge { font-size: clamp(11px, 2.6vw, 15px); font-weight: 800; text-transform: uppercase;
letter-spacing: .03em; padding: 3px 9px; border-radius: 999px; color: #111; white-space: nowrap; }
.mid { display: flex; align-items: baseline; gap: 10px; margin-top: 2px; }
.aqi { font-size: clamp(40px, 13vw, 68px); font-weight: 800; line-height: 1; }
.aqilabel { font-size: clamp(11px, 2.6vw, 14px); font-weight: 700; opacity: .7; }
.cat { font-size: clamp(13px, 3.2vw, 18px); font-weight: 700; }
.grid { margin-top: auto; display: flex; flex-wrap: wrap; gap: 4px 16px;
font-size: clamp(11px, 2.4vw, 14px); opacity: .85; padding-top: 8px; }
.grid b { font-weight: 700; opacity: 1; }
.updated { opacity: .7; }
</style>
</head>
<body>
<div class="card" id="card">
<div class="top">
<span class="loc" id="loc"></span>
<span class="badge" id="badge"></span>
</div>
<div class="mid">
<span class="aqi" id="aqi"></span>
<span class="aqilabel">US AQI</span>
</div>
<div class="cat" id="cat"></div>
<div class="grid" id="grid"></div>
<div class="grid"><span class="updated" id="updated"></span></div>
</div>
<script src="aqi-overlay.js"></script>
</body>
</html>