Files
BountyBoard/web/templates/layout.html
T
etalon c69c028028 feat: seed script, forgot-password, hover cards, shortcuts, OpenAPI docs, runbook (phase 12)
- scripts/seed.go: idempotent demo data per §11.11 (make seed)
- forgot/reset password: SMTP-gated, one-shot TTL tokens, uniform responses
  against enumeration, sessions revoked on reset; login page link + pages
- profile hover cards on [data-user-card] elements (§11.13)
- keyboard shortcuts: g b/m/t/h navigation, / focuses search (§10)
- bulk archive endpoint (§11.9)
- hand-written OpenAPI 3.1 covering §6, served at /api/docs + yaml download
- make backup / make restore (mongodump archive via the mongo container)
- README: quick start, demo data, runbook, breaker/job operations, working
  Caddy + nginx reverse-proxy samples (WS block, client_max_body_size),
  documented later-stubs (§11.24)
- smoke.sh now exercises register → logout → login → me → board → pages

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 20:39:38 +02:00

66 lines
3.0 KiB
HTML

{{define "layout"}}<!doctype html>
<html lang="en" data-theme="light" data-default-theme="{{.DefaultTheme}}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{.Title}} · Bounty Board</title>
<link rel="stylesheet" href="/static/css/app.css">
<script src="/static/js/theme.js"></script>
</head>
<body {{if .User}}data-logged-in="1"{{end}}>
<nav class="topnav">
<a class="brand" href="/">Bounty Board</a>
<div class="links">
{{if .User}}
{{if .User.Roles.Developer}}
<a href="/board" {{if eq .Active "board"}}aria-current="page"{{end}}>Bounty Board</a>
<a href="/my-tasks" {{if eq .Active "my-tasks"}}aria-current="page"{{end}}>My Tasks</a>
{{end}}
{{if .User.Roles.Consultant}}
<a href="/consultant/board" {{if eq .Active "atomization"}}aria-current="page"{{end}}>Atomization</a>
<a href="/consultant/reviews" {{if eq .Active "reviews"}}aria-current="page"{{end}}>Reviews</a>
<a href="/consultant/pool" {{if eq .Active "pool"}}aria-current="page"{{end}}>Pool</a>
{{end}}
{{if .User.Roles.Admin}}
<a href="/admin" {{if eq .Active "admin"}}aria-current="page"{{end}}>Admin</a>
{{end}}
<a href="/messages" {{if eq .Active "messages"}}aria-current="page"{{end}}>Messages</a>
<a href="/metrics" {{if eq .Active "metrics"}}aria-current="page"{{end}}>Metrics</a>
{{end}}
</div>
<div class="right">
<button class="btn ghost small" id="nav-theme" type="button" aria-label="Toggle dark / light theme"></button>
{{if .User}}
<span style="position:relative">
<button class="btn ghost small" id="nav-bell" type="button" aria-label="Notifications">🔔<span class="bell-badge" id="nav-bell-count" hidden></span></button>
<div id="notif-panel" class="notif-panel" hidden>
<ul id="notif-list" class="notif-list"></ul>
<a href="/notifications" class="muted">All notifications →</a>
</div>
</span>{{end}}
{{if .User}}
<a href="/profile" aria-label="Your profile">
{{if .User.AvatarFileID}}
<img class="avatar" src="/files/{{.User.AvatarFileID}}" alt="">
{{else}}
<span class="avatar" aria-hidden="true">{{initials .User.Name}}</span>
{{end}}
</a>
<button class="btn small" id="nav-logout" type="button">Log out</button>
{{else}}
<a class="btn small" href="/login">Log in</a>
{{end}}
</div>
</nav>
<main class="container{{if .Narrow}} narrow{{end}}">
{{template "content" .}}
</main>
<div id="toasts" aria-live="polite"></div>
<script type="module" src="/static/js/nav.js"></script>
{{if .User}}<script type="module" src="/static/js/notifications.js"></script>
<script type="module" src="/static/js/shortcuts.js"></script>{{end}}
{{range .Scripts}}<script type="module" src="{{.}}"></script>
{{end}}
</body>
</html>{{end}}