HTML · 1657 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>Stargazers</h1>
7 </header>
8 <nav class="shithub-social-tabnav" aria-label="Stargazers">
9 <a href="/{{ .Owner }}/{{ .Repo.Name }}/stargazers" class="is-active" aria-current="page">All <span class="shithub-tab-count">{{ .Total }}</span></a>
10 <span class="is-disabled">You know</span>
11 </nav>
12
13 {{ if .Stargazers }}
14 <ul class="shithub-social-list">
15 {{ range .Stargazers }}
16 <li>
17 <a href="/{{ .Username }}" class="shithub-social-avatar"><img src="/avatars/{{ .Username }}" alt="" width="40" height="40"></a>
18 <div class="shithub-social-person">
19 <a href="/{{ .Username }}"><strong>{{ if .DisplayName }}{{ .DisplayName }}{{ else }}{{ .Username }}{{ end }}</strong></a>
20 <span>@{{ .Username }}</span>
21 </div>
22 <time class="shithub-social-time" datetime="{{ .StarredAt.Time.Format "2006-01-02T15:04:05Z" }}">Starred {{ relativeTime .StarredAt.Time }}</time>
23 </li>
24 {{ end }}
25 </ul>
26 {{ else }}
27 <div class="shithub-social-blank">
28 {{ octicon "star" }}
29 <h2>Be the first to star this repository</h2>
30 <p>Stars help people track repositories and show appreciation for useful work.</p>
31 </div>
32 {{ end }}
33
34 {{ if or .HasPrev .HasNext }}
35 <nav class="shithub-pagination">
36 {{ if .HasPrev }}<a href="?page={{ sub .Page 1 }}" class="shithub-button">Previous</a>{{ end }}
37 {{ if .HasNext }}<a href="?page={{ add .Page 1 }}" class="shithub-button">Next</a>{{ end }}
38 </nav>
39 {{ end }}
40 </div>
41 </section>
42 {{- end }}