all repos

mugit @ 3167cb3

🐮 git server that your cow will love

mugit/web/templates/repo_index.html (view raw)

Oleksandr Smirnov Oleksandr Smirnov
olexsmir@gmail.com
git: refactor the wrappings, 4 months ago
1
{{ define "repo_index" }}
2
<!DOCTYPE html>
3
<html>
4
  <head>
5
    {{ template "head" . }}
6
    <title>{{ .name }} &mdash; {{ .meta.Title }}</title>
7
  </head>
8
  <body>
9
    {{ template "repo_header" . }}
10
11
    <main>
12
      {{ $repo := .name }}
13
      {{ if .empty }}
14
      <h3>Repository is empty</h3>
15
      {{ else }}
16
      <section class="repo-index">
17
        <div class="repo-index-main">
18
          {{ range .commits }}
19
          <div class="box">
20
            <div>
21
              <a href="/{{ $repo }}/commit/{{ .Hash }}" class="commit-hash">{{ .HashShort }}</a>
22
              &mdash; {{ .AuthorName }}
23
              <span class="commit-date commit-info">{{ .Committed.Format "Mon, 02 Jan 2006" }}</span>
24
            </div>
25
            <div>{{ commitSummary .Message }}</div>
26
          </div>
27
          {{ end }}
28
        </div>
29
30
        <div class="repo-index-side">
31
          <h2>Clone urls</h2>
32
          <pre>{{- /* */ -}}
33
https://{{ .servername }}/{{ .name }}
34
git@{{ .servername }}:{{ .name }}
35
{{- /* */ -}}</pre>
36
37
          {{- if .mirrorinfo.isMirror }}
38
          <br>
39
          <h2>Mirror Status</h3>
40
            <p>
41
              Last updated {{ humanizeTime .mirrorinfo.lastSync }} from:
42
              <a href="{{ .mirrorinfo.url }}" target="_blank">{{ .mirrorinfo.url }}</a>
43
            </p>
44
            {{- end }}
45
        </div>
46
      </section>
47
      {{ end }}
48
49
      {{- if .readme }}
50
      <article class="readme">
51
        {{- .readme -}}
52
      </article>
53
      {{- end -}}
54
    </main>
55
  </body>
56
</html>
57
{{ end }}