wp-packages/internal/http
Ben Word 154cb2f376
Migrate templates from html/template to Jet v6
Replace Go's html/template with CloudyKit/jet/v6 for server-rendered
templates. Jet provides first-class parameterized blocks, template
inheritance via extends/yield, and C-like expressions — eliminating
the dict helper workarounds that html/template required for reusable
components.

Add components.html with four reusable Jet blocks:
- shell(command, variant, class) — copyable command boxes (replaces
  ~16 duplicated instances across 6 templates)
- notice(variant, class) with yield content — alert boxes with
  variant-based styling and content slots
- input(icon, name, ...) — form inputs with icon and keyboard hint
- pagination(pager, class) — pagination controls driven by
  pre-computed buildPagination() data

Key changes:
- templates.go: embed.FS loader for Jet, function registration via
  AddGlobal, buildPagination() helper, render() using VarMap
- handlers.go: simplified render calls (no more template combinations)
- router.go: *jet.Set replaces *templateSet
- All 13 templates converted to Jet syntax (extends/block/yield)
- Tailwind scanning unaffected (templates remain .html files)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-05 14:05:25 -05:00
..
static Local assets 2026-03-14 15:36:28 -05:00
templates Migrate templates from html/template to Jet v6 2026-04-05 14:05:25 -05:00
admin_auth.go WP Packages rename (#42) 2026-03-19 11:50:12 -05:00
admin_auth_test.go Initial commit 2026-03-14 13:36:07 -05:00
api_monthly_installs.go Add monthly install tracking for per-package install charts (#59) 2026-03-25 12:10:48 -05:00
api_monthly_installs_test.go Add monthly install tracking for per-package install charts (#59) 2026-03-25 12:10:48 -05:00
api_rate_limit.go Add GET /api/stats endpoint for total downloads badge (#53) 2026-03-23 15:08:31 -05:00
api_rate_limit_test.go Add GET /api/stats endpoint for total downloads badge (#53) 2026-03-23 15:08:31 -05:00
api_stats.go Add GET /api/stats endpoint for total downloads badge (#53) 2026-03-23 15:08:31 -05:00
api_stats_test.go Add GET /api/stats endpoint for total downloads badge (#53) 2026-03-23 15:08:31 -05:00
changes.go Add metadata changes feed (#51) 2026-03-21 15:45:31 -05:00
changes_test.go Add metadata changes feed (#51) 2026-03-21 15:45:31 -05:00
composer.go Incremental sync refactor (phase 2) (#90) 2026-04-03 10:11:18 -05:00
composer_test.go Incremental sync refactor (phase 2) (#90) 2026-04-03 10:11:18 -05:00
downloads.go WP Packages rename (#42) 2026-03-19 11:50:12 -05:00
downloads_test.go Remove stale provider_group references and drop column (#49) 2026-03-21 10:41:46 -05:00
handlers.go Migrate templates from html/template to Jet v6 2026-04-05 14:05:25 -05:00
login_rate_limit.go Initial commit 2026-03-14 13:36:07 -05:00
middleware.go WP Packages rename (#42) 2026-03-19 11:50:12 -05:00
router.go Migrate templates from html/template to Jet v6 2026-04-05 14:05:25 -05:00
router_test.go WP Packages rename (#42) 2026-03-19 11:50:12 -05:00
seo.go Add /status to pages sitemap 2026-04-02 21:58:43 -05:00
server.go Implement socket-activated zero-downtime deploy switchover (#67) 2026-04-04 14:07:54 -05:00
tailwind-input.css Add docs page, other front-end updates (#77) 2026-03-28 23:14:30 -05:00
templates.go Migrate templates from html/template to Jet v6 2026-04-05 14:05:25 -05:00