{{define "content" -}}

~{{.Repo.OwnerName}}/{{.Repo.Name}} · memory

{{template "beadsHead" (dict "Repo" .Repo "Ref" .Ref "Head" .Head)}} {{template "viewtabs" (dict "Repo" .Repo "Views" .Views "Current" "memory" "Ref" .Ref)}}
{{if .Ref}}{{end}} {{/* The sort is not a filter, but this form is a GET: without carrying it, searching from the review queue would answer in slug order. */}} {{if eq .Data.Sort "age"}}{{end}} {{/* Clear drops the search and the single-memory selection and keeps the ref and the sort: the sort is how the list is read, not what it is filtered to. */}} {{if or .Data.Search .Data.Key}}Clear{{end}}
{{.Data.Total}} {{if eq .Data.Total 1}}entry{{else}}entries{{end}} sort: {{if eq .Data.Sort "age"}} slug {{else}}slug{{end}} · {{if eq .Data.Sort "age"}}age {{else}}age{{end}}
{{if .Data.Memories}} {{range .Data.Memories}}

{{.Slug}}

{{if .Stale}}stale?{{end}} {{/* The revision's author is deliberately not shown. bd's embedded Dolt commits are all authored "root " โ€” verified against the sourcehut-artifacts tracker, where every one of the nine memories rendered "ยท root" โ€” and the human is recorded only in the commit message ("bd: close (auto-commit) by Eugene Blikh"), and not even in every message. A column that says "root" nine times out of nine is noise; the commit page behind the hash carries whatever the message does say. */}} {{with .Revision}}written {{.Date | agoDays}} · {{.Commit | shortsha}} {{- else}}written before the last {{$.Data.WalkMax}} commits{{end}}
{{range .Paragraphs}}

{{.}}

{{end}}
{{end}} {{else if .Data.Key}}

No memory named {{.Data.Key}}.

{{else if .Data.Search}}

No memory matches “{{.Data.Search}}”.

{{else}}

No memories. bd remember writes them into the config table, and they appear here.

{{end}}
{{- end}}