all repos

mugit @ 7e01897

🐮 git server that your cow will love

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

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
{{ define "repo_index" }}
<!DOCTYPE html>
<html>
  <head>
    {{ template "head" . }}
    <title>{{ .name }} &mdash; {{ .meta.Title }}</title>
  </head>
  <body>
    {{ template "repo_header" . }}

    <main>
      {{ $repo := .name }}
      {{ if .empty }}
      <h3>Repository is empty</h3>
      {{ else }}
      <section class="repo-index">
        <div class="repo-index-main">
          {{ range .commits }}
          <div class="box">
            <div>
              <a href="/{{ $repo }}/commit/{{ .Hash }}" class="commit-hash">{{ .HashShort }}</a>
              &mdash; {{ .AuthorName }}
              <span class="commit-date commit-info age">
                {{ .Committed.Format "Mon, 02 Jan 2006" }}
                <span class="tooltip" role="tooltip">{{ .Committed }}</span>
              </span>
            </div>
            <div>{{ commitSummary .Message }}</div>
          </div>
          {{ end }}
        </div>

        <div class="repo-index-side">
          <h2>Clone urls</h2>
          <pre>{{- /* */ -}}
https://{{ .servername }}/{{ .name }}
git@{{ .servername }}:{{ .name }}
{{- /* */ -}}</pre>

          {{- if .mirrorinfo.isMirror }}
          <br>
          <h2>Mirror Status</h3>
            <p>
              Last updated {{ humanizeTime .mirrorinfo.lastSync }} from:
              <a href="{{ .mirrorinfo.url }}" target="_blank">{{ .mirrorinfo.url }}</a>
            </p>
            {{- end }}
        </div>
      </section>
      {{ end }}

      {{- if .readme }}
      <article class="readme">
        {{- .readme -}}
      </article>
      {{- end -}}
    </main>
  </body>
</html>
{{ end }}