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{{- if .readme }}
29 <article class="readme">
30 {{- .readme -}}
31 </article>
32{{- end -}}
33
34 <div class="clone-url">
35 <strong>clone</strong>
36 <pre>
37git clone https://{{ .servername }}/{{ .name }}
38 </pre>
39 </div>
40 </main>
41 </body>
42</html>
43{{ end }}