HTML · 2324 bytes Raw Blame History
1 {{ define "page" -}}
2 <section class="shithub-repo-populated">
3 <div class="shithub-repo-content-grid">
4 <main class="shithub-repo-main">
5 <header class="shithub-repo-populated-head">
6 <h1>
7 <a href="/{{ .Owner }}">{{ .Owner }}</a>
8 <span class="shithub-repo-populated-sep">/</span>
9 <a href="/{{ .Owner }}/{{ .Repo.Name }}">{{ .Repo.Name }}</a>
10 {{ if eq (printf "%s" .Repo.Visibility) "private" }}
11 <span class="shithub-pill shithub-pill-private">private</span>
12 {{ else }}
13 <span class="shithub-pill">public</span>
14 {{ end }}
15 </h1>
16 {{ if .Repo.Description }}<p class="shithub-repo-populated-desc">{{ .Repo.Description }}</p>{{ end }}
17 </header>
18
19 {{ if .HeadFound }}
20 <section class="shithub-repo-headcommit" aria-label="Latest commit">
21 <div class="shithub-repo-headcommit-meta">
22 <span class="shithub-repo-headcommit-branch">{{ .DefaultBranch }}</span>
23 <code class="shithub-repo-headcommit-oid" title="{{ .Head.OID }}">{{ slice .Head.OID 0 7 }}</code>
24 <span class="shithub-repo-headcommit-author">{{ .Head.AuthorName }}</span>
25 <time datetime="{{ .Head.AuthorWhen.Format "2006-01-02T15:04:05Z" }}">{{ relativeTime .Head.AuthorWhen }}</time>
26 </div>
27 <p class="shithub-repo-headcommit-subject">{{ .Head.Subject }}</p>
28 </section>
29 {{ else }}
30 <section class="shithub-repo-headcommit shithub-repo-headcommit-other-branch">
31 <p>This repository has commits, but the default branch <code>{{ .DefaultBranch }}</code> hasn't been pushed yet.
32 Push <code>{{ .DefaultBranch }}</code> or change the default in repo settings to see content here.</p>
33 </section>
34 {{ end }}
35
36 <aside class="shithub-repo-populated-clone" aria-label="Clone URLs">
37 <label>
38 <span>HTTPS</span>
39 <input type="text" readonly value="{{ .HTTPSCloneURL }}" onclick="this.select()">
40 </label>
41 {{ if .SSHEnabled }}
42 <label>
43 <span>SSH</span>
44 <input type="text" readonly value="{{ .SSHCloneURL }}" onclick="this.select()">
45 </label>
46 {{ end }}
47 </aside>
48
49 <p class="shithub-repo-populated-note">
50 Tree view, file blobs, branch list, and commit history land in S17. For now this view confirms a push has reached the server.
51 </p>
52 </main>
53 {{ template "repo-about-sidebar" . }}
54 </div>
55 </section>
56 {{- end }}