feat(go): M6.1 — template skeleton, embed.FS, HTML routes
All checks were successful
Deploy to K8s / deploy (push) Successful in 7s
All checks were successful
Deploy to K8s / deploy (push) Successful in 7s
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>
This commit is contained in:
5
go/internal/web/templates/adults.tmpl
Normal file
5
go/internal/web/templates/adults.tmpl
Normal file
@@ -0,0 +1,5 @@
|
||||
{{define "title"}}Adults{{end}}
|
||||
{{define "content"}}
|
||||
<h1>Adults Dashboard</h1>
|
||||
<p class="description">Coming in M6.2</p>
|
||||
{{end}}
|
||||
15
go/internal/web/templates/base.tmpl
Normal file
15
go/internal/web/templates/base.tmpl
Normal file
@@ -0,0 +1,15 @@
|
||||
{{define "base"}}<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>FUJ — {{template "title" .}}</title>
|
||||
<link rel="stylesheet" href="/static/css/app.css">
|
||||
</head>
|
||||
<body>
|
||||
{{template "nav" .}}
|
||||
{{template "content" .}}
|
||||
{{template "footer" .}}
|
||||
</body>
|
||||
</html>
|
||||
{{end}}
|
||||
5
go/internal/web/templates/flush_cache.tmpl
Normal file
5
go/internal/web/templates/flush_cache.tmpl
Normal file
@@ -0,0 +1,5 @@
|
||||
{{define "title"}}Flush Cache{{end}}
|
||||
{{define "content"}}
|
||||
<h1>Flush Cache</h1>
|
||||
<p class="description">Coming in M6.6</p>
|
||||
{{end}}
|
||||
5
go/internal/web/templates/juniors.tmpl
Normal file
5
go/internal/web/templates/juniors.tmpl
Normal file
@@ -0,0 +1,5 @@
|
||||
{{define "title"}}Juniors{{end}}
|
||||
{{define "content"}}
|
||||
<h1>Juniors Dashboard</h1>
|
||||
<p class="description">Coming in M6.3</p>
|
||||
{{end}}
|
||||
3
go/internal/web/templates/partials/footer.tmpl
Normal file
3
go/internal/web/templates/partials/footer.tmpl
Normal file
@@ -0,0 +1,3 @@
|
||||
{{define "footer"}}
|
||||
<div class="footer">{{.Build.Version}}@{{.Build.Commit}} | built {{.Build.BuildDate}}</div>
|
||||
{{end}}
|
||||
17
go/internal/web/templates/partials/nav.tmpl
Normal file
17
go/internal/web/templates/partials/nav.tmpl
Normal file
@@ -0,0 +1,17 @@
|
||||
{{define "nav"}}
|
||||
<div class="nav">
|
||||
<div>
|
||||
<a href="/adults"{{if eq .Active "adults"}} class="active"{{end}}>[Adults]</a>
|
||||
<a href="/juniors"{{if eq .Active "juniors"}} class="active"{{end}}>[Juniors]</a>
|
||||
</div>
|
||||
<div class="nav-archived">
|
||||
<span style="color: #666; margin-right: 5px;">Archived:</span>
|
||||
<a href="/payments"{{if eq .Active "payments"}} class="active"{{end}}>[Payments Ledger]</a>
|
||||
</div>
|
||||
<div class="nav-archived">
|
||||
<span style="color: #666; margin-right: 5px;">Tools:</span>
|
||||
<a href="/sync-bank"{{if eq .Active "sync"}} class="active"{{end}}>[Sync Bank Data]</a>
|
||||
<a href="/flush-cache"{{if eq .Active "flush"}} class="active"{{end}}>[Flush Cache]</a>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
5
go/internal/web/templates/payments.tmpl
Normal file
5
go/internal/web/templates/payments.tmpl
Normal file
@@ -0,0 +1,5 @@
|
||||
{{define "title"}}Payments Ledger{{end}}
|
||||
{{define "content"}}
|
||||
<h1>Payments Ledger</h1>
|
||||
<p class="description">Coming in M6.4</p>
|
||||
{{end}}
|
||||
5
go/internal/web/templates/sync.tmpl
Normal file
5
go/internal/web/templates/sync.tmpl
Normal file
@@ -0,0 +1,5 @@
|
||||
{{define "title"}}Sync Bank Data{{end}}
|
||||
{{define "content"}}
|
||||
<h1>Sync Bank Data</h1>
|
||||
<p class="description">Coming in M6.6</p>
|
||||
{{end}}
|
||||
Reference in New Issue
Block a user