Add local weather forecast with live-weather backgrounds

Visitors can save a postal code (international, via Zippopotam) to get the
local forecast from Open-Meteo — a header chip + a 5-day home-page card —
and the canvas background switches from the seasonal effect to live
conditions. Entirely client-side: no keys, no server logic. Geocode cached
permanently, forecast cached 2h. Celsius by default, Fahrenheit opt-in.

New canvas effects: clear (sun by day, shaded moon + stars at night),
clouds (blurred drifting sprites), snow, fog, and storm (rain + lightning).
Seasonal effects remain the no-location fallback.
This commit is contained in:
prosolis
2026-06-21 00:24:39 -07:00
parent 95f6e71933
commit 1a43616248
6 changed files with 659 additions and 17 deletions

View File

@@ -186,7 +186,7 @@ func (s *Server) handleChannel(w http.ResponseWriter, r *http.Request, ch Channe
}
var (
demoVariants = []string{"rain", "petals", "jacaranda", "motes", "leaves"}
demoVariants = []string{"rain", "petals", "jacaranda", "motes", "leaves", "clear", "clouds", "snow", "fog", "storm"}
demoIntensities = []string{"light", "medium", "heavy"}
demoPhases = []string{"day", "dawn", "dusk", "night"}
)