templates/repo.html (view raw)
1{{ define "repo" }}
2<html>
3 <title>{{ .name }}
4 {{ if .parent }}
5 — {{ .parent }}
6 {{ end }}
7 </title>
8{{ template "head" . }}
9
10 <header>
11 <h2>
12 <a href="/">all repos</a>
13 — {{ .name }}
14 </h2>
15 <h3 class="desc">{{ .desc }}</h3>
16 </header>
17 <body>
18 {{ template "nav" . }}
19 <main>
20 {{ $repo := .name }}
21 <div class="log">
22 {{ range .commits }}
23 <div>
24 <div><a href="/{{ $repo }}/commit/{{ .Hash.String }}">{{ slice .Hash.String 0 8 }}</a></div>
25 <div>{{ .Author.When.Format "Mon, 02 Jan 2006 15:04:05 -0700" }}</div>
26 <pre>{{ .Message }}</pre>
27 </div>
28 <div class="commit-info">{{ .Author.Name }} <span style="color: var(--gray);">{{ .Author.Email }}</span></div>
29 {{ end }}
30 </div>
31 <article class="readme">
32 <pre>
33 {{- if .readme }}{{ .readme }}{{- end -}}
34 </pre>
35 </article>
36 </main>
37 </body>
38</html>
39{{ end }}