Régulier — Moyenne
—
-¢/L
-diff --git a/AGENTS.md b/AGENTS.md index 0849baf..c8dc345 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -4,10 +4,16 @@ Guidance for agentic coding agents working in this repository. ## Project Overview -**Essence** is a Quebec gas price heatmap — a minimal, self-contained web application with two source files: +**Essence** is a Quebec gas price heatmap — a minimal web application with the following source files: -- `main.go` — the entire Go backend (HTTP server, SQLite persistence, upstream polling) -- `static/index.html` — the entire frontend (Leaflet map, Chart.js charts, vanilla JS) +- `main.go` — the entire Go backend (HTTP server, SQLite persistence, upstream polling, HTML template rendering) +- `templates/` — Go `html/template` files rendered server-side + - `layout.html` — base layout (head, nav, htmx script, oat CSS); defines `content` and `scripts` blocks + - `map.html` — map page content + scripts blocks + - `stats.html` — stats page shell (region dropdown, `#stats-content` target div) + - `stats-content.html` — stats fragment (cards, Chart.js canvas, history table); swapped by htmx on region/range changes +- `static/map.js` — Leaflet map initialization, marker rendering, cluster logic, controls wiring +- `static/stats.js` — Chart.js initialization; re-runs after htmx swaps `#stats-content` Keep this architecture. Do not split `main.go` into multiple files or introduce a frontend build step unless explicitly asked. @@ -179,19 +185,22 @@ type Station struct { ... } func poller() { ... } ``` -## Frontend Code Style (`static/index.html`) +## Frontend Code Style -- **No framework, no build step.** Plain HTML, CSS, and JavaScript in a single file. -- **Inline** ` - -
- - -Régulier — Moyenne
—
-¢/L
-Régulier — Min
—
-¢/L
-Régulier — Max
—
-¢/L
-Super — Moyenne
—
-¢/L
-Diesel — Moyenne
—
-¢/L
-Stations
—
-dernière mise à jour
-Prix moyen par carburant (¢/L)
-10 dernières mises à jour
-| Date | -Régulier moy. | -Régulier min | -Régulier max | -Super moy. | -Diesel moy. | -Stations | -
|---|---|---|---|---|---|---|
| Chargement... | ||||||