1{{define "content"}}
2<nav aria-label="breadcrumb">
3 <ul>
4 <li><a href="/{{.Repo.Name}}">{{.Repo.Name}}</a></li>
5 <li><a href="/{{.Repo.Name}}/bugs">Bugs</a></li>
6 <li aria-current="page">{{.ID}}</li>
7 </ul>
8</nav>
9
10<section aria-labelledby="timeline-heading">
11 <h3 id="timeline-heading" class="visually-hidden">Timeline</h3>
12
13 {{range .Timeline}}
14 <article id="{{.ID}}" aria-labelledby="timeline-item-{{.ID}}">
15 {{if eq .Type "create"}}
16 <header>
17 <h4 id="timeline-item-{{.ID}}">
18 {{if eq $.Status "open"}}
19 <svg class="bug-status-icon bug-status-icon-open" aria-label="Open bug" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke-width="2">
20 <circle cx="8" cy="8" r="6" />
21 </svg>
22 {{else if eq $.Status "closed"}}
23 <svg class="bug-status-icon bug-status-icon-closed" aria-label="Closed bug" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke-width="2">
24 <circle cx="8" cy="8" r="6" />
25 <path d="M5 8 l2 2 l4 -4" stroke-linecap="round" stroke-linejoin="round" />
26 </svg>
27 {{end}}
28 {{$.Title}}
29 </h4>
30 </header>
31 {{if .Message}}
32 {{.Message}}
33 {{else}}
34 <em class="muted">No description provided.</em>
35 {{end}}
36 <footer>
37 <strong>{{.Author}}</strong> opened this bug on
38 <time datetime="{{.Timestamp | rfc3339}}">{{.Timestamp | formatDate}}</time>
39 {{if $.Edited}}<em>(edited)</em>{{end}}
40 </footer>
41
42 {{else if eq .Type "comment"}}
43 {{if .Message}}
44 {{.Message}}
45 {{else}}
46 <em class="muted">No comment provided.</em>
47 {{end}}
48 <footer>
49 <strong>{{.Author}}</strong> commented on
50 <time datetime="{{.Timestamp | rfc3339}}">{{.Timestamp | formatDate}}</time>
51 {{if .Edited}}<em>(edited)</em>{{end}}
52 </footer>
53
54 {{else if eq .Type "title"}}
55 <strong>{{.Author}}</strong> changed the title to <strong>{{.Title}}</strong>.
56 <footer>
57 <time datetime="{{.Timestamp | rfc3339}}">{{.Timestamp | formatDate}}</time>
58 </footer>
59
60 {{else if eq .Type "status"}}
61 <strong>{{.Author}}</strong> {{.Status}} the bug.
62 <footer>
63 <time datetime="{{.Timestamp | rfc3339}}">{{.Timestamp | formatDate}}</time>
64 </footer>
65
66 {{else if eq .Type "labels"}}
67 <strong>{{.Author}}</strong>
68 {{if .AddedLabels}}
69 added label{{if gt (len .AddedLabels) 1}}s{{end}}
70 {{range $i, $label := .AddedLabels}}{{if $i}}, {{end}}<code>{{$label}}</code>{{end}}
71 {{end}}
72 {{if and .AddedLabels .RemovedLabels}}and{{end}}
73 {{if .RemovedLabels}}
74 removed label{{if gt (len .RemovedLabels) 1}}s{{end}}
75 {{range $i, $label := .RemovedLabels}}{{if $i}}, {{end}}<code>{{$label}}</code>{{end}}
76 {{end}}
77 <footer>
78 <time datetime="{{.Timestamp | rfc3339}}">{{.Timestamp | formatDate}}</time>
79 </footer>
80 {{end}}
81 </article>
82 {{end}}
83</section>
84{{end}}