HTML · 1418 bytes Raw Blame History
1 {{ define "page" -}}
2 <section class="shithub-repo-page">
3 {{ template "repo-header" . }}
4 <div class="shithub-social">
5 <header class="shithub-social-subhead">
6 <h1>Watchers</h1>
7 </header>
8
9 {{ if .Watchers }}
10 <ul class="shithub-social-list">
11 {{ range .Watchers }}
12 <li>
13 <a href="/{{ .Username }}" class="shithub-social-avatar"><img src="/avatars/{{ .Username }}" alt="" width="40" height="40"></a>
14 <div class="shithub-social-person">
15 <a href="/{{ .Username }}"><strong>{{ if .DisplayName }}{{ .DisplayName }}{{ else }}{{ .Username }}{{ end }}</strong></a>
16 <span>@{{ .Username }}</span>
17 </div>
18 <div class="shithub-social-meta">
19 <span class="shithub-pill">{{ .Level }}</span>
20 <time datetime="{{ .UpdatedAt.Time.Format "2006-01-02T15:04:05Z" }}">Watching since {{ relativeTime .UpdatedAt.Time }}</time>
21 </div>
22 </li>
23 {{ end }}
24 </ul>
25 {{ else }}
26 <div class="shithub-social-blank">
27 {{ octicon "eye" }}
28 <h2>No one's watching this repository yet.</h2>
29 <p>You could be the first.</p>
30 </div>
31 {{ end }}
32
33 {{ if or .HasPrev .HasNext }}
34 <nav class="shithub-pagination">
35 {{ if .HasPrev }}<a href="?page={{ sub .Page 1 }}" class="shithub-button">Previous</a>{{ end }}
36 {{ if .HasNext }}<a href="?page={{ add .Page 1 }}" class="shithub-button">Next</a>{{ end }}
37 </nav>
38 {{ end }}
39 </div>
40 </section>
41 {{- end }}