Skip to content

v2.0.0 — Embed system, info cards, and blog

Choose a tag to compare

@jamditis jamditis released this 13 Feb 17:43
· 177 commits to main since this release

Embed system v2

The embed page has been completely redesigned with a visual configurator and four output formats:

  • Iframe — Standard embed that loads the full tool in any web page
  • Script tag — Standalone `widget.js` library that creates the embed with a single `<script>` tag
  • PNG image — Canvas-rendered info cards (line, station, or summary) exportable as PNG
  • HTML download — Self-contained HTML file with all styles and data baked in, works offline

The configurator shows a live preview and generates copy-paste code for each format.

Info cards

Three card types for sharing transit information:

  • Line card — Single line impact summary
  • Station card — Station-specific route changes
  • Summary card — All five affected lines at a glance

All cards render on HTML Canvas for pixel-perfect PNG export at 2x resolution.

Blog

Restructured from a single page to a proper blog architecture:

  • Blog index at `blog.html` with post cards
  • Individual posts at `blog/{slug}.html`
  • Blog added as sixth navigation item across all pages

Two posts:

  1. "Why we built Reroute NJ" (Feb 12)
  2. "New: embed Reroute NJ on your website" (Feb 13)

Translations

All new content translated to 10 languages (300+ keys per language). Sitemap expanded to 90 URLs with full hreflang cross-references. Total generated pages: 80 (8 pages × 10 languages).

Architecture changes

  • Extracted `js/line-data.js` from `js/app.js` — shared transit data now loaded by cards, widgets, and the main app
  • New `js/cards.js` — Card rendering and Canvas PNG export
  • New `js/widget.js` — Standalone embed library
  • New `js/embed.js` — Expanded embed configurator logic
  • `tools/generate-pages.py` — Added PAGE_KEY_MAP for decoupling filenames from translation keys, depth-aware asset path resolution

Full diff: v1.1.0...v2.0.0