HTML · 2448 bytes Raw Blame History
1 {{ define "page" -}}
2 <section class="shithub-repo-page">
3 {{ template "repo-header" . }}
4 <section class="shithub-issues">
5 <header class="shithub-issues-head">
6 <h1>Issues</h1>
7 <div class="shithub-issues-actions">
8 <a href="/{{ .Owner }}/{{ .Repo.Name }}/labels" class="shithub-button">Labels</a>
9 <a href="/{{ .Owner }}/{{ .Repo.Name }}/milestones" class="shithub-button">Milestones</a>
10 <a href="/{{ .Owner }}/{{ .Repo.Name }}/issues/new" class="shithub-button shithub-button-primary">New issue</a>
11 </div>
12 </header>
13
14 <nav class="shithub-issues-filter">
15 <a href="?state=open" class="shithub-issues-tab {{ if eq .State "open" }}shithub-issues-tab-active{{ end }}">
16 <span class="shithub-issues-dot shithub-issues-dot-open"></span>
17 {{ .OpenCount }} Open
18 </a>
19 <a href="?state=closed" class="shithub-issues-tab {{ if eq .State "closed" }}shithub-issues-tab-active{{ end }}">
20 <span class="shithub-issues-dot shithub-issues-dot-closed"></span>
21 {{ .ClosedCount }} Closed
22 </a>
23 </nav>
24
25 {{ if .Items }}
26 <ul class="shithub-issues-list">
27 {{ range .Items }}
28 <li class="shithub-issues-row">
29 <span class="shithub-issues-state shithub-issues-state-{{ printf "%s" .Issue.State }}">
30 {{ if eq (printf "%s" .Issue.State) "open" }}●{{ else }}✓{{ end }}
31 </span>
32 <div class="shithub-issues-body">
33 <a class="shithub-issues-title" href="/{{ $.Owner }}/{{ $.Repo.Name }}/issues/{{ .Issue.Number }}">
34 {{ .Issue.Title }}
35 </a>
36 {{ range .Labels }}
37 <span class="shithub-label" style="background-color: #{{ .Color }}">{{ .Name }}</span>
38 {{ end }}
39 <div class="shithub-issues-meta">
40 #{{ .Issue.Number }} opened
41 <time datetime="{{ .Issue.CreatedAt.Time.Format "2006-01-02T15:04:05Z" }}">{{ relativeTime .Issue.CreatedAt.Time }}</time>
42 {{ if .AuthorName }}by <a href="/{{ .AuthorName }}">{{ .AuthorName }}</a>{{ end }}
43 </div>
44 </div>
45 {{ if .Assignees }}
46 <div class="shithub-issues-assignees">
47 {{ range .Assignees }}<a href="/{{ .Username }}" title="{{ .Username }}">@{{ .Username }}</a>{{ end }}
48 </div>
49 {{ end }}
50 </li>
51 {{ end }}
52 </ul>
53 {{ else }}
54 <p class="shithub-issues-empty">No {{ .State }} issues. <a href="/{{ .Owner }}/{{ .Repo.Name }}/issues/new">Open one</a>.</p>
55 {{ end }}
56 </section>
57 </section>
58 {{- end }}