{{define "dashboard-section"}}

{{if .P.Cached}}cached {{else}}fresh — built {{.P.BuiltAt.Format "15:04:05"}}{{end}}

Open tasks ({{.P.TaskTotal}})

{{if or .P.TaskGroups.Overdue .P.TaskGroups.Today .P.TaskGroups.Tomorrow .P.TaskGroups.Week .P.TaskGroups.NoDue}}

{{if .P.TaskGroups.Overdue}}Overdue ({{.P.TaskGroups.Overdue}}){{end}} {{if .P.TaskGroups.Today}}Today ({{.P.TaskGroups.Today}}){{end}} {{if .P.TaskGroups.Tomorrow}}Tomorrow ({{.P.TaskGroups.Tomorrow}}){{end}} {{if .P.TaskGroups.Week}}This week ({{.P.TaskGroups.Week}}){{end}} {{if .P.TaskGroups.NoDue}}No due ({{.P.TaskGroups.NoDue}}){{end}}

{{end}}
{{if .P.Tasks}}
    {{range .P.Tasks}}
  • {{.Item.PrimaryPath}} {{.Todo.Summary}} {{if .DueRel}}{{.DueRel}}{{end}}
  • {{end}}
{{else}}

Nothing open. Nice.

{{end}}

Open issues ({{.P.IssueTotal}})

{{if .P.Issues}} {{else}}

No open issues across linked repos.

{{end}}

Recent documents ({{.P.RecentDocsTotal}}, last 30d)

{{if .P.RecentDocs}} {{else}}

Nothing dated in the last 30 days.

{{end}}
{{end}}