Files
supermarket/internal/web/templates/dashboard.html
T
davidandClaude Opus 5.5 1702fccbcc Overview and sidebar: no phase badges; modules open on their main page
The Overview's module cards drop their "Phase 1"–"Phase 5" badges. The
Content module opens on Posts and the SEO module on the Morning check,
from the sidebar and from the Overview.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 06:43:05 -07:00

62 lines
1.9 KiB
HTML

{{define "content"}}{{$inbox := .Inbox}}{{with .Data}}
<div class="page-head">
<h1>Overview</h1>
<p class="lede">Supermarket's modules, and what's left to set up.</p>
</div>
{{template "reminders" .Reminders}}
<div class="grid">
{{range .Modules}}
{{if .Link}}
<a class="card module" href="{{.Link}}">
<h3>{{template "icon" .ID}}{{.Name}}</h3>
<p>{{.Body}}</p>
{{if eq .ID "content"}}<span class="stat">{{if $inbox}}{{$inbox}} waiting in Posts{{else}}No posts waiting{{end}}{{with $.Data.Scheduled}} · {{.}} scheduled{{end}}</span>{{end}}
</a>
{{else}}
<section class="card module later">
<h3>{{template "icon" .ID}}{{.Name}}</h3>
<p>{{.Body}}</p>
</section>
{{end}}
{{end}}
</div>
{{if .Pending}}
<section class="card">
<h2>Setup</h2>
<ul class="steps">
{{range .Steps}}
<li class="{{if .Done}}done{{else}}todo{{end}}">
<a href="{{.Link}}"><strong>{{.Label}}</strong></a>
<span>{{.Detail}}</span>
</li>
{{end}}
</ul>
</section>
{{else}}
<details class="card">
<summary>Setup: all done</summary>
<ul class="steps">
{{range .Steps}}
<li class="done"><a href="{{.Link}}"><strong>{{.Label}}</strong></a><span>{{.Detail}}</span></li>
{{end}}
</ul>
</details>
{{end}}
{{if .ImportErr}}
<section class="card warn">
<h2>Import from the old app failed</h2>
<p>{{.ImportErr}}</p>
<p>The old files are untouched in the data folder's <code>import/</code> directory. Fix the file named above and restart Supermarket (<code>supermarket restart</code>) to try again.</p>
</section>
{{else if .ImportStatus}}
<details class="card">
<summary>Imported from the old terminal app {{ago .ImportStatus.At}}</summary>
<ul>{{range .ImportStatus.Summary}}<li>{{.}}</li>{{end}}</ul>
{{if .QueuedPosts}}<p>Its queued posts are now drafts: <a href="/posts">{{.QueuedPosts}} waiting in Posts</a>.</p>{{end}}
</details>
{{end}}
{{end}}{{end}}