diff options
| author | Peter Stone <thepeterstone@gmail.com> | 2026-01-24 20:37:54 -1000 |
|---|---|---|
| committer | Peter Stone <thepeterstone@gmail.com> | 2026-01-24 20:37:54 -1000 |
| commit | b03fa42c2d81cf34aa518a420c894c4ae86fac50 (patch) | |
| tree | d45132886848f8f1af47705d7b3a492606c003cc /internal/handlers | |
| parent | 22efca3118676926dec4af74fe8e225606063a35 (diff) | |
Add Conditions page with live volcano and weather feeds
- Standalone full-screen page at /conditions
- Tiled grid layout with autoplaying video feeds
- USGS Kilauea webcams (V1cam, V2cam) via YouTube embeds
- Windy weather maps (local Hawaii + national US)
- Opens in new tab from dashboard nav
Closes #29
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Diffstat (limited to 'internal/handlers')
| -rw-r--r-- | internal/handlers/handlers.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/internal/handlers/handlers.go b/internal/handlers/handlers.go index 366402e..5014f39 100644 --- a/internal/handlers/handlers.go +++ b/internal/handlers/handlers.go @@ -1274,6 +1274,19 @@ func (h *Handler) aggregateShoppingLists(ctx context.Context) []models.ShoppingS return stores } +// HandleTabConditions renders the Conditions tab with live feeds +func (h *Handler) HandleTabConditions(w http.ResponseWriter, r *http.Request) { + HTMLResponse(w, h.templates, "conditions-tab", nil) +} + +// HandleConditionsPage renders the standalone Conditions page with live feeds +func (h *Handler) HandleConditionsPage(w http.ResponseWriter, r *http.Request) { + if err := h.templates.ExecuteTemplate(w, "conditions.html", nil); err != nil { + http.Error(w, "Failed to render conditions page", http.StatusInternalServerError) + log.Printf("Error rendering conditions page: %v", err) + } +} + // isActionableList returns true if the list name indicates an actionable list func isActionableList(name string) bool { lower := strings.ToLower(name) |
