Migration This is my new public git source viewer. Source coming soon. Please contact with concerns/bugs. Contact me

templates/views/refs.html

79436f09f5539aac9b6f836b5b9049bbbece48aa · 2.0 KB · 60 lines raw

1 {{ define "refs.html" }}{{ template "base" . }}{{ end }}
2 {{ define "main" }}
3 {{ $slug := print "/" .Info.Slug }}
4 {{ $r := mod "refs" }}
5
6 <header class="hero">
7 <div class="hero-inner">
8 <h1 class="page-title">References</h1>
9 <p class="page-subtitle">
10 <span class="text-muted">{{ len $r.Branches }} branches &middot; {{ len $r.Tags }} tags</span>
11 </p>
12 </div>
13 </header>
14
15 <section>
16 <h2 class="page-subtitle">Branches</h2>
17 <div class="table-wrap">
18 <table class="table">
19 <thead>
20 <tr><th>Name</th><th>Subject</th><th class="text-right">Updated</th><th></th></tr>
21 </thead>
22 <tbody>
23 {{ range $r.Branches }}
24 <tr>
25 <td><a class="chip chip-branch" href="{{ $slug }}/tree/{{ .Name }}">{{ .Name }}</a></td>
26 <td class="text-sm text-muted">{{ trunc 64 .Title }}</td>
27 <td class="text-right text-sm text-muted"><time datetime="{{ rfc3339 .When }}">{{ date .When }}</time></td>
28 <td class="text-right"><a class="chip" href="{{ $slug }}/compare/{{ $.Ref }}...{{ .Name }}">compare</a></td>
29 </tr>
30 {{ else }}
31 <tr><td class="text-center text-muted" colspan="4">No branches.</td></tr>
32 {{ end }}
33 </tbody>
34 </table>
35 </div>
36 </section>
37
38 <section style="margin-top:1.5rem;">
39 <h2 class="page-subtitle">Tags</h2>
40 <div class="table-wrap">
41 <table class="table">
42 <thead>
43 <tr><th>Name</th><th>Subject</th><th class="text-right">Created</th><th></th></tr>
44 </thead>
45 <tbody>
46 {{ range $r.Tags }}
47 <tr>
48 <td><a class="chip chip-tag" href="{{ $slug }}/tree/{{ .Name }}">{{ .Name }}</a></td>
49 <td class="text-sm text-muted">{{ trunc 64 .Title }}</td>
50 <td class="text-right text-sm text-muted"><time datetime="{{ rfc3339 .When }}">{{ date .When }}</time></td>
51 <td class="text-right"><a class="chip" href="{{ $slug }}/compare/{{ $.Ref }}...{{ .Name }}">compare</a></td>
52 </tr>
53 {{ else }}
54 <tr><td class="text-center text-muted" colspan="4">No tags.</td></tr>
55 {{ end }}
56 </tbody>
57 </table>
58 </div>
59 </section>
60 {{ end }}