Files
member-console/internal/embeds/templates/partials/ui_page_header.html
T
cgalo5758 408fa6f5a6 Add page anatomy parts and UI quality gate
- Add shared ui_*.html parts (pageHeader, sectionHeader, statusBadge,
  emptyState) parsed into every template set
- Add anatomy lint rules with a shrinking allowlist and screen-coverage
  check
- Add make screens capture harness with contact sheets and baseline diff
- Compose member and FedWiki regions server-side so pages arrive
  complete
- Rebuild Domains and Integrations on the parts as pilots
2026-08-30 04:05:31 -05:00

17 lines
1.3 KiB
HTML

{{/* Page anatomy: the page header (docs/design-system.md §6; spec
page-anatomy "One title size and one header layout"). Pipeline:
server.PageHeader. The only template that renders an <h1>: one size
(h1.h2), an optional back link above it (chrome-conventions "One back
affordance"), an optional one-sentence lead below it, and one
right-hand slot holding a muted count or one action control. Check()
aborts the render when a page supplies both. Parsed into every set by
web.ParseUIPartials. */}}
{{ define "pageHeader" }}{{ .Check }}<div class="d-flex align-items-start justify-content-between gap-3 mb-3 app-page-header">
<div class="app-page-header-text">
{{ if .Back }}<a class="text-decoration-none d-inline-block mb-1" href="{{ .Back.URL }}">← Back to {{ .Back.Label }}</a>{{ end }}
<h1 class="h2 mb-0">{{ .Title }}</h1>
{{ if .Lead }}<p class="text-body-secondary mb-0">{{ .Lead }}</p>{{ end }}
</div>
{{ if .Action }}<a href="{{ .Action.URL }}" class="btn btn-sm {{ if .Action.Primary }}btn-primary{{ else }}btn-outline-secondary{{ end }} flex-shrink-0">{{ .Action.Label }}</a>{{ else if .Count }}<span class="text-body-secondary small flex-shrink-0 pt-2">{{ .Count }}</span>{{ end }}
</div>{{ end }}