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{{ template "repoheader" . }}
11
12 <body>
13 {{ template "nav" . }}
14 <main>
15 {{ $repo := .name }}
16 <div class="log">
17 {{ range .commits }}
18 <div>
19 <div><a href="/{{ $repo }}/commit/{{ .Hash.String }}">{{ slice .Hash.String 0 8 }}</a></div>
20 <pre>{{ .Message }}</pre>
21 </div>
22 <div class="commit-info">
23 {{ .Author.Name }} <span class="commit-email">{{ .Author.Email }}</span>
24 <div>{{ .Author.When.Format "Mon, 02 Jan 2006 15:04:05 -0700" }}</div>
25 </div>
26 {{ end }}
27 </div>
28
29 <article class="readme">
30 <pre>
31 {{- if .readme }}{{ .readme }}{{- end -}}
32 </pre>
33 </article>
34 </main>
35 </body>
36</html>
37{{ end }}