all repos — legit @ e0e4c1ebb6e92077cbc7bbfd51c4ceb8d09e0013

web frontend for git

templates/repo.html (view raw)

 1{{ define "repo" }}
 2<html>
 3  <title>{{ .name }}
 4    {{ if .parent }}
 5    &mdash; {{ .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        <pre>
31          {{- .readme -}}
32        </pre>
33      </article>
34{{- end -}}
35
36      <div class="clone-url">
37      <strong>clone</strong>
38        <pre>
39git clone https://{{ .servername }}/{{ .name }}
40        </pre>
41      </div>
42    </main>
43  </body>
44</html>
45{{ end }}