internal/web/templates/issue.html
25 lines · 1382 bytes
1{{define "title"}}#{{.Issue.Number}} · {{.Repo.OwnerName}}/{{.Repo.Name}}{{end}}
2{{define "content"}}
3{{template "repoheader" .}}
4<h2 class="issuetitle">{{.Issue.Title}} <span class="issuenumber">#{{.Issue.Number}}</span></h2>
5<p class="issuemeta"><span class="chip {{if eq .Issue.State "open"}}chip-open{{else}}chip-done{{end}}">{{.Issue.State}}</span>
6{{.Issue.Author}} opened this on {{when .Issue.CreatedAt}}
7{{if .Issue.Labels}} · {{range .Issue.Labels}}<span class="chip label" style="{{index $.LabelColors .}}">{{.}}</span> {{end}}{{end}}
8{{if .Issue.Assignees}} · assigned to {{range .Issue.Assignees}}{{.}} {{end}}{{end}}</p>
9{{if .BodyHTML}}<article class="comment">
10 <header class="commenthead"><strong>{{.Issue.Author}}</strong> <span class="when">{{when .Issue.CreatedAt}}</span></header>
11 <div class="rendered">{{.BodyHTML}}</div>
12</article>{{end}}
13{{range .Comments}}
14<article class="comment">
15 <header class="commenthead"><strong>{{.Author}}</strong> <span class="when">{{when .CreatedAt}}</span></header>
16 <div class="rendered">{{.BodyHTML}}</div>
17</article>
18{{end}}
19{{if .Viewer}}
20<form method="post" action="/{{.Repo.OwnerName}}/{{.Repo.Name}}/issues/{{.Issue.Number}}/comment" class="commentform">
21<p><textarea name="body" rows="4" placeholder="comment as {{.Viewer}}"></textarea></p>
22<p><button type="submit">comment</button></p>
23</form>
24{{end}}
25{{end}}