HTML · 3280 bytes Raw Blame History
1 {{ define "page" -}}
2 <section class="shithub-global-page">
3 <div class="shithub-global-centered">
4 <main class="shithub-global-main">
5 <header class="shithub-global-head shithub-global-head-compact">
6 <h1>{{ .Heading }}</h1>
7 </header>
8
9 <div class="shithub-global-toolbar-row">
10 <nav class="shithub-global-top-tabs" aria-label="Pull request views">
11 {{ range .Views }}
12 <a href="{{ .Href }}" class="{{ if .Selected }}is-selected{{ end }}"{{ if .Selected }} aria-current="page"{{ end }}>{{ .Label }}</a>
13 {{ end }}
14 </nav>
15 <form action="/pulls" method="get" class="shithub-global-query shithub-global-query-inline">
16 {{ range .Views }}{{ if .Selected }}{{ if ne .Key "created" }}<input type="hidden" name="view" value="{{ .Key }}">{{ end }}{{ end }}{{ end }}
17 <label class="sr-only" for="global-pulls-query">Search pull requests</label>
18 <input id="global-pulls-query" type="text" name="q" value="{{ .Query }}" autocomplete="off">
19 <button type="submit" aria-label="Search pull requests">{{ octicon "search" }}</button>
20 </form>
21 </div>
22
23 <section class="shithub-global-panel" aria-label="Pull requests">
24 <div class="shithub-global-panel-head">
25 <nav class="shithub-global-state-tabs" aria-label="Pull request state">
26 {{ range .StateTabs }}
27 <a href="{{ .Href }}" class="{{ if .Selected }}is-selected{{ end }}"{{ if .Selected }} aria-current="page"{{ end }}>{{ octicon .Icon }} {{ .Count }} {{ .Label }}</a>
28 {{ end }}
29 </nav>
30 <div class="shithub-global-filter-set" aria-label="Pull request filters">
31 <button type="button" disabled>Visibility {{ octicon "triangle-down" }}</button>
32 <button type="button" disabled>Organization {{ octicon "triangle-down" }}</button>
33 <button type="button" disabled>Sort {{ octicon "triangle-down" }}</button>
34 </div>
35 </div>
36
37 {{ if .Pulls }}
38 <ol class="shithub-global-thread-list">
39 {{ range .Pulls }}
40 <li class="shithub-global-thread-row">
41 <span class="shithub-global-thread-state shithub-global-thread-state-pr">{{ octicon "git-pull-request" }}</span>
42 <div class="shithub-global-thread-main">
43 <a class="shithub-global-thread-title" href="{{ .URL }}"><span>{{ .Owner }}/{{ .RepoName }}</span> {{ .Title }}</a>
44 <p>#{{ .Number }} opened by {{ if .AuthorName }}{{ .AuthorName }}{{ else }}ghost{{ end }} · Updated {{ relativeTime .UpdatedAt }}</p>
45 </div>
46 {{ if gt .CommentCount 0 }}
47 <a class="shithub-global-thread-comments" href="{{ .URL }}">{{ octicon "comment" }} {{ .CommentCount }}</a>
48 {{ end }}
49 </li>
50 {{ end }}
51 </ol>
52 {{ else }}
53 <div class="shithub-global-empty">
54 <h2>{{ .EmptyTitle }}</h2>
55 <p>Try another pull request view or search term.</p>
56 </div>
57 {{ end }}
58 </section>
59
60 <p class="shithub-global-protip">{{ octicon "light-bulb" }} <strong>ProTip!</strong> Mention someone in a pull request with @{{ .Viewer.Username }}.</p>
61 </main>
62 </div>
63 </section>
64 {{- end }}