feat(go): M6.1 — template skeleton, embed.FS, HTML routes #26

Merged
kacerr merged 1 commits from feat/go-m6-1-template-skeleton into main 2026-05-08 00:48:22 +02:00
Owner

Summary

  • go/internal/web/templates/: base.tmpl layout + partials/nav.tmpl (three-tier nav with active-link highlighting), partials/footer.tmpl, and stub pages for all five routes.
  • go/internal/web/static/css/app.css: terminal-green-on-black theme extracted from Python templates/adults.html once — shared by all Go pages via <link>.
  • go/internal/web/assets.go: //go:embed templates static for single-binary deployment.
  • go/internal/web/render.go: NewRenderer() parses a fresh *template.Template per page at startup; parse failure aborts boot.
  • go/internal/web/html_handler.go: HTMLHandler with one method per route.
  • go/internal/web/server.go: drops helloHandler; GET /{$} redirects to /adults; HTML + /static/ routes added alongside the existing /api/* routes.

Test plan

  • make go-test green (all packages, including new web package smoke test)
  • make go-build green, make go-lint clean
  • Browser smoke: make web-go, open http://localhost:8080/adults — terminal-green theme, three-tier nav, "Coming in M6.2" placeholder, footer with build meta
  • Each nav link navigates and highlights correctly (one class="active" per page)
  • curl -sI localhost:8080/static/css/app.css → 200
## Summary - `go/internal/web/templates/`: `base.tmpl` layout + `partials/nav.tmpl` (three-tier nav with active-link highlighting), `partials/footer.tmpl`, and stub pages for all five routes. - `go/internal/web/static/css/app.css`: terminal-green-on-black theme extracted from Python `templates/adults.html` once — shared by all Go pages via `<link>`. - `go/internal/web/assets.go`: `//go:embed templates static` for single-binary deployment. - `go/internal/web/render.go`: `NewRenderer()` parses a fresh `*template.Template` per page at startup; parse failure aborts boot. - `go/internal/web/html_handler.go`: `HTMLHandler` with one method per route. - `go/internal/web/server.go`: drops `helloHandler`; `GET /{$}` redirects to `/adults`; HTML + `/static/` routes added alongside the existing `/api/*` routes. ## Test plan - [ ] `make go-test` green (all packages, including new `web` package smoke test) - [ ] `make go-build` green, `make go-lint` clean - [ ] Browser smoke: `make web-go`, open `http://localhost:8080/adults` — terminal-green theme, three-tier nav, "Coming in M6.2" placeholder, footer with build meta - [ ] Each nav link navigates and highlights correctly (one `class="active"` per page) - [ ] `curl -sI localhost:8080/static/css/app.css` → 200
kacerr added 1 commit 2026-05-08 00:45:58 +02:00
feat(go): M6.1 — template skeleton, embed.FS, HTML routes
All checks were successful
Deploy to K8s / deploy (push) Successful in 7s
78e5059759
Stand up the Go-native HTML frontend foundation:
- base.tmpl layout + nav/footer partials (three-tier nav, active-link highlighting)
- terminal-green-on-black theme extracted to static/css/app.css (served via embed.FS)
- HTMLHandler with stub pages for all five routes; / redirects to /adults
- NewRenderer parses per-page template sets at startup so parse failures abort boot
- Smoke test: each route returns 200 text/html with exactly one class="active" link

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
kacerr merged commit 216b5b437a into main 2026-05-08 00:48:22 +02:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kacerr/fuj-management#26