gunk-dev/the-valley

plan.tmpl

sourceb9df3fe59e29main's published tip history
4.7 KiB
1{{define "content"}}
2{{- with .Head}}
3{{template "project-head" .}}
4{{- end}}
5<header class="top">
6 <div>
7 <div class="eyebrow">{{.Projects}}</div>
8 <h1>knots</h1>
9 </div>
10 <div class="tally">{{range .Tally}}<span><b>{{.N}}</b> {{.Label}}</span>{{end}}</div>
11</header>
12
13<div class="legend" aria-label="Legend">
14 <span><i class="k done"></i>done</span>
15 <span><i class="k in-progress"></i>in progress</span>
16 <span><i class="k ready"></i>free to start: an open, unclaimed, unblocked outcome or bug</span>
17 <span><i class="k blocked"></i>blocked</span>
18 <span><i class="k active"></i>question or idea</span>
19 <span><i class="k abandoned"></i>abandoned</span>
20</div>
21
22<section class="panel" aria-labelledby="yours-h">
23 <h2 id="yours-h">Waiting on you</h2>
24 <div class="card"><p class="muted">Nothing here waits on you. This page shows the public plan, the same for every reader.</p></div>
25</section>
26
27<section class="panel" aria-labelledby="flight-h">
28 <h2 id="flight-h">In flight</h2>
29 <div class="cols">
30 <div class="card">
31 <div class="eyebrow">Knots in flight</div>
32 <ul class="plain">
33 {{- range .InFlight}}
34 <li class="item">{{template "glyph" .Knot.State}}<span class="t"><a href="{{.Knot.URL}}">{{.Knot.Title}}</a> <span class="mono muted">{{.Knot.ID}}</span> <span class="chip quiet">{{.Knot.Project}}</span></span><span class="note">{{.Note}}</span></li>
35 {{- else}}
36 <li class="muted">No knot is in flight.</li>
37 {{- end}}
38 </ul>
39 </div>
40 <div class="card">
41 <div class="eyebrow">Ready changes — order not assessed</div>
42 <ul class="plain">
43 {{- range .Changes}}
44 <li class="item"><span class="handle">{{.Handle}}</span><span class="t">{{.Title}} <span class="chip quiet">{{.Version}}</span></span><span class="note">{{.Note}}{{range .Knots}} · <a href="{{.URL}}">{{.ID}}</a>{{end}}</span></li>
45 {{- else}}
46 <li class="muted">No change is ready for approval.</li>
47 {{- end}}
48 </ul>
49 </div>
50 </div>
51</section>
52
53<section class="panel" aria-labelledby="paths-h">
54 <h2 id="paths-h">Paths</h2>
55 <p class="muted">Each path is one knot's children in the order their blockers set. Knots at one stage do not wait on one another.</p>
56 {{- if .Paths}}
57 <div class="cols">
58 {{- range .Paths}}
59 <div class="card">
60 <h3><a href="{{.Parent.URL}}">{{.Parent.Title}}</a></h3>
61 <ol class="stages">
62 {{- range $i, $stage := .Stages}}
63 <li><span class="stage-num">{{inc $i}}</span><ul class="plain">{{range $stage}}<li class="item">{{template "glyph" .State}}<span class="t"><a href="{{.URL}}">{{.Title}}</a> <span class="mono muted">{{.ID}}</span></span></li>{{end}}</ul></li>
64 {{- end}}
65 </ol>
66 </div>
67 {{- end}}
68 </div>
69 {{- else}}
70 <div class="card"><p class="muted">No knot's children wait on one another.</p></div>
71 {{- end}}
72</section>
73
74<section class="panel" aria-labelledby="ms-h">
75 <h2 id="ms-h">Milestones</h2>
76 <div class="controls" id="filters" role="group" aria-label="Filter knots" hidden>
77 <button type="button" data-filter="all" aria-pressed="true">All open</button>
78 <button type="button" data-filter="ready" aria-pressed="false">Free to start</button>
79 <button type="button" data-filter="in-progress" aria-pressed="false">In progress</button>
80 <button type="button" data-filter="blocked" aria-pressed="false">Blocked</button>
81 <label><input type="checkbox" id="show-done"> show done</label>
82 </div>
83 <div class="milestones" id="milestones">
84 {{- range .Milestones}}
85 <article class="milestone">
86 <div class="ms-head"><h3>{{with .Knot}}<a href="{{.URL}}">{{.Title}}</a>{{else}}{{.Title}}{{end}}</h3><span class="count">{{.Count}} · {{.Project}}</span></div>
87 {{- if .Cord}}
88 <div class="cord" aria-hidden="true">{{range .Cord}}<i class="k {{glyph .}}"></i>{{end}}</div>
89 {{- end}}
90 {{template "tree" .Tree}}
91 </article>
92 {{- else}}
93 <div class="card"><p class="muted">No milestone is published.</p></div>
94 {{- end}}
95 </div>
96</section>
97{{end}}
98
99{{define "tree"}}<ul class="tree">{{range .}}<li data-state="{{.Row.Filter}}">{{if .Children}}<details{{if .Open}} open{{end}}><summary>{{template "row" .}}</summary>{{template "tree" .Children}}</details>{{else}}{{template "row" .}}{{end}}</li>{{end}}</ul>{{end}}
100
101{{define "row"}}<div class="row {{glyph .Row.State}}">{{if .Children}}<span class="twisty" aria-hidden="true">▸</span>{{else}}<span class="nochild"></span>{{end}}{{template "glyph" .Row.State}}<span class="body"><a class="id" href="{{.Row.URL}}">{{.Row.ID}}</a><a class="title" href="{{.Row.URL}}">{{.Row.Title}}</a>{{range .Row.Chips}}<span class="chip{{with .Class}} {{.}}{{end}}">{{.Text}}</span>{{end}}</span></div>{{end}}