Files
member-console/internal/embeds/templates/partials/ui_empty_state.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

24 lines
1.2 KiB
HTML

{{/* Page anatomy: the empty state (docs/design-system.md §6; spec
page-anatomy "One empty-state idiom"; branches and copy per
empty-state-guidance). Pipeline: server.EmptyStateParams, computed in
Go so the branch is never guessed in a template. The only template
that renders an empty collection: a warning alert naming the missing
prerequisite when Blocked, otherwise centered muted text with an
optional note and an optional outline action. No borders, no boxes, no
bare "No X found." Parsed into every set by web.ParseUIPartials; the
searched-to-nothing state is the list scaffold's listNoMatch. */}}
{{ define "emptyState" }}
{{ if .Blocked }}
<div class="alert alert-warning" role="alert">
<p class="mb-2">{{ .BlockerCopy }}</p>
<a href="{{ .PrerequisiteURL }}" class="btn btn-outline-secondary btn-sm">{{ .PrerequisiteLabel }}</a>
</div>
{{ else }}
<div class="text-center py-4">
<p class="text-muted mb-2">{{ .Headline }}</p>
{{ if .Note }}<p class="text-muted small mb-2">{{ .Note }}</p>{{ end }}
{{ if .ActionURL }}<a href="{{ .ActionURL }}" class="btn btn-outline-primary btn-sm">{{ .ActionLabel }}</a>{{ end }}
</div>
{{ end }}
{{ end }}