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

157 lines
6.5 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<title>{{ deploymentName }}</title>
<meta name="description" content="Console for {{ deploymentName }} members">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta property="og:title" content="{{ deploymentName }}">
<meta property="og:description" content="Console for {{ deploymentName }} members">
<meta property="og:image" content="/static/apple-touch-icon.png">
<meta property="og:url" content="/index.html">
<meta property="og:site_name" content="{{ deploymentName }}">
<meta name="htmx-config" content='{"includeIndicatorStyles": false}'>
<link href="/static/bootstrap.css" rel="stylesheet">
<script defer src="/static/bootstrap.bundle.js"></script>
<script defer src="/static/shell.js"></script>
<script defer src="/static/htmx.min.js"></script>
<script defer src="/static/error-handler.js"></script>
<script defer src="/static/success-toast.js"></script>
{{/* Integration dashboard-card scripts: page-level deferred external
tags only — CSP forbids inline scripts, and script tags inside
HTMX-swapped fragments have unreliable execution order. */}}
{{ range .DashboardCards }}{{ range .Scripts }}
<script defer src="{{ . }}"></script>{{ end }}{{ end }}
<link rel="apple-touch-icon" sizes="180x180" href="/static/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/static/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/static/favicon-16x16.png">
<link rel="manifest" href="/static/site.webmanifest">
<link href="/static/app.css" rel="stylesheet">
</head>
<body class="d-flex flex-column vh-100" hx-headers='{"X-CSRF-Token": "{{ .CSRFToken }}"}'>
{{ template "shell_topbar.html" .Shell }}
<div class="d-flex flex-column flex-lg-row flex-grow-1">
{{ template "shell_rail_member.html" .Shell }}
<!-- Main Content -->
<div class="flex-fill p-4">
<div class="container-xxl px-0">
<h1>Dashboard</h1>
{{ if eq .CheckoutStatus "success" }}
<div class="alert alert-success" role="alert">
<strong>Thanks!</strong> We're finalizing your upgrade &mdash; this can take a moment.
<a href="/products">View your plan on the Plans page</a>.
</div>
{{ else if eq .CheckoutStatus "cancel" }}
<div class="alert alert-secondary" role="alert">
Checkout canceled. Your current plan is unchanged.
</div>
{{ end }}
{{/* Pending domain claims (dissolve-member-domains): the durable
re-entry point for an in-flight DNS verification now that the
standalone Domains page is gone. Server-side conditional — no
empty chrome when there is nothing pending. Opening a claim swaps
the claim-status partial into this same .domains-surface wrapper;
reopening mints nothing (pure read). */}}
{{ if .PendingDomainClaims }}
<div class="alert alert-info mt-3 domains-surface" role="status">
<strong>Domain verification in progress.</strong>
{{ range .PendingDomainClaims }}
<div class="d-flex align-items-center gap-2 mt-1">
<code class="text-break">{{ .Root }}</code>
<button type="button" class="btn btn-link btn-sm p-0 align-baseline"
hx-get="{{ routeURL "/partials/domains/claims/{claimID}" .ClaimID }}"
hx-target="closest .domains-surface" hx-swap="innerHTML">View DNS records</button>
</div>
{{ end }}
</div>
{{ end }}
<div class="row">
<div class="col-12">
<div class="card mt-3">
<div class="card-header">Account Overview</div>
<div class="card-body">
<p><strong>Name:</strong> {{ .Name }}</p>
<p><strong>Username:</strong> {{ .Username }}</p>
<p><strong>Email:</strong> {{ .Email }}</p>
</div>
</div>
</div>
</div>
<!-- Workspace Management Section (progressive disclosure) -->
{{ if .HasMultipleWorkspaces }}
<div class="row mt-4" id="workspace-management">
<div class="col-12">
<div class="card">
<div class="card-header">Workspaces</div>
<div class="card-body">
<!-- Composed on the server from /partials/workspaces (page-anatomy
"A page arrives complete"); the id stays the swap target for
the create and switch actions. -->
<div id="workspaceContent">{{ .Workspaces }}</div>
</div>
</div>
</div>
</div>
{{ end }}
{{/* Integration dashboard cards: one generic shell per declaration
collected from the integration registry (registry order). The
body is integration-owned: the server composes it from the
declared partial route; core renders no integration markup. */}}
{{ range .DashboardCards }}
<div class="row mt-4">
<div class="col-12">
<div class="card">
<div class="card-header">
<span>{{ .Title }}</span>
</div>
<div class="card-body">
<!-- The body is composed on the server from the declared partial
route (page-anatomy "A page arrives complete"); the route
stays the swap source for the card's refresh event. -->
{{ if .RefreshEvent }}<div hx-get="{{ .PartialPath }}" hx-trigger="{{ .RefreshEvent }} from:body" hx-swap="innerHTML">{{ .Body }}</div>{{ else }}<div>{{ .Body }}</div>{{ end }}
</div>
</div>
</div>
</div>
{{ end }}
</div>
</div>
<!-- Toast Container -->
<div class="toast-container">
<div id="errorToast" class="toast align-items-center text-bg-danger border-0" role="alert" aria-live="assertive"
aria-atomic="true">
<div class="d-flex">
<div class="toast-body" id="errorToastBody">
An error occurred. Please try again.
</div>
<button type="button" class="btn-close btn-close-white me-2 m-auto" data-bs-dismiss="toast"
aria-label="Close"></button>
</div>
</div>
<div id="successToast" class="toast align-items-center text-bg-success border-0" role="status" aria-live="polite"
aria-atomic="true">
<div class="d-flex">
<div class="toast-body" id="successToastBody">
Done.
</div>
<button type="button" class="btn-close btn-close-white me-2 m-auto" data-bs-dismiss="toast"
aria-label="Close"></button>
</div>
</div>
</div>
</body>
</html>