Visitors: full-width Doors analytics dashboard, SVG map, and fixed page titles
Merged
LU
5d ago+636+636+012345678901234567890123456789-1022-1022-0123456789012345678901234567890123456789
Rebuilds /about/visitors/ as a full-width FORRT Doors analytics dashboard with a Past 30 days / Past year switch, crenellated headline stat cards, a local SVG world choropleth map, ranked countries and pages with real page titles, and a daily visitors chart — and retires the site's unused vendored Leaflet copy. Addresses review feedback that the page could be better and had large empty bands.
What changes for visitors
- Period switch & crenellated summary row: replaces two stacked long sections with a keyboard-accessible Past 30 days | Past year switch (supporting
#past-yeardeep links; without JS both periods render cleanly one after the other). Four white stat cards with--brick3slate crenellated tops highlight Visitors, Countries and regions, Typical day (median) with busiest day, and Most-read page — all computed in Hugo templates fromdata/ga_data.jsonon every build. - Doors SVG world map & Top countries: draws the world map directly as SVG from local
countries.geojsonin stepped--brick3slate shades with matching legend and interactive tooltips. Pairs the map beside the Top 10 countries and regions (with a Visitors column header, share bars, no-location note, and Show all N locations disclosure). - Retires vendored Leaflet from the Hugo site:
/about/visitors/was the only page still usingstatic/vendor/assets/leaflet/1.5.1/(static/apps/community_map.htmlis a standalone Rhtmlwidgetsiframe bundling its own copy, and the Contact widget is unused). Removesstatic/vendor/assets/leaflet/(156 KB + 3 PNGs), removes the Leaflet<link>/<script>loaders inlayouts/partials/site_head.html&site_js.html, sets[map] engine = 0inconfig/_default/params.toml, and clears the three Leaflet PNG exemptions fromscripts/webp_conversion/image_ignore_list.txt(data/assets.tomlstays untouched becausedata/is overwritten bydata-artifacton deploy). - Most-read pages (real titles fixed!) & daily chart: fixes a pre-existing template bug where
.Site.GetPageinsiderangealways returnedniland displayed rawforrt.org/tags/paths; all 20 current paths now resolve viasite.GetPage/RelPermalinkto real page titles (guarded by newcheck_seo_html.pycheck 34 + unit tests, handling both root and/rebrand-doors/subfolder builds). Adds a Views column header beside a compact Doors-palette Chart.js daily chart with dashed median and orange busiest-day peak dot. - Dedicated stylesheet: page styles live in
assets/css/doors/visitors.css, loaded conditionally viadoors/assets.html; six legacyga_*shortcodes are consolidated intoga_visitors+ two partials.
Before / After
| Desktop (1440 px) — Before | Desktop (1440 px) — After (Past 30 days) |
|---|---|
| Desktop (1440 px) — After (Past year) |
|---|
| Mobile (390 px) — Before | Mobile (390 px) — After |
|---|---|
Decisions to review
- Four summary stat cards: kept all four crenellated headline KPI cards (Visitors, Countries and regions, Typical day, Most-read page) for immediate at-a-glance scanning; Claude Opus 5.5 noted that median/most-read also appear below and could optionally be trimmed to two stats if a shorter header is preferred.
- Singapore traffic in
data/ga_data.json: the committed localdata/ga_data.jsonshows a large Singapore share (8,079 of 14,206 in 30 days) — worth checking GA4 bot filtering separately in analytics settings, without modifying generateddata/ga_data.jsonhere. - Community map iframe:
static/apps/community_map.html(generated externally by Rhtmlwidgets) still bundles its own inline Leaflet + tile URLs; everything in Hugo templates andstatic/vendor/assets/leaflet/is now Leaflet-free.
Checks & design review
- Rebased onto
rebrand-doors(fcfd974de2);check_seo_html.pycheck renumbered to 34 after Bulgarian glossary checks 32–33 scripts/rebrand/check_source_rules.py --base origin/rebrand-doors: 0 hard-coded URLs, 0 generated paths changedscripts/check_seo_html.py(all 34 checks) &python3 -m unittest scripts/tests/test_check_seo_html.py(84 tests): passscripts/rebrand/check_design.pyon/about/visitors/and/community-map/: 0 failures- Final taste review by Claude Opus 5.5 and GPT-6.2 Astra: both
SHIP WITH MINOR TWEAKS; all tweaks applied.
Created with Claude Opus 5.5 (Claude Code) and Gemini 4 Neon (Antigravity) in T3 Code; mockups and final review by Claude Opus 5.5 and GPT-6.2 Astra.