templates/repo.html (view raw)
1{{ define "repo" }}
2<!doctype html>
3<html>
4{{ template "head" . }}
5
6{{ template "repoheader" . }}
7
8 <body>
9 {{ template "nav" . }}
10 <main>
11 {{ $repo := .name }}
12 <div class="log">
13 {{ range .commits }}
14 <div>
15 <div><a href="/{{ $repo }}/commit/{{ .Commit.Hash.String }}" class="commit-hash">{{ slice .Commit.Hash.String 0 8 }}</a></div>
16 <pre>{{ .Commit.Message }}</pre>
17 </div>
18 <div class="commit-info">
19 {{ .Commit.Author.Name }} <a href="mailto:{{ .Commit.Author.Email }}" class="commit-email">{{ .Commit.Author.Email }}</a>
20 <div>{{ .Commit.Author.When.Format "Mon, 02 Jan 2006 15:04:05 -0700" }}</div>
21 </div>
22 {{ end }}
23 </div>
24{{- if .readme }}
25 <article class="readme">
26 {{- .readme -}}
27 </article>
28{{- end -}}
29
30 <div class="clone-url">
31 <strong>clone</strong>
32 <pre>
33git clone https://{{ .servername }}/{{ .name }}
34 </pre>
35 </div>
36 </main>
37 </body>
38</html>
39{{ end }}