all repos

mugit @ 19c8a5c

🐮 git server that your cow will love

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

Oleksandr Smirnov Oleksandr Smirnov
olexsmir@gmail.com
fix formatting in some of the templates , 3 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
    <main>
11
      {{ $repo := .name }}
12
      {{ if .empty }}
13
      <h3>Repository is empty</h3>
14
      {{ else }}
15
      <section class="repo-index">
16
        <div class="repo-index-main">
17
          {{ range .commits }}
18
          <div class="box">
19
            <div>
20
              <a href="/{{ $repo }}/commit/{{ .Hash }}" class="commit-hash link">{{ .HashShort }}</a>
21
              &mdash; {{ .AuthorName }}
22
              <span class="commit-date commit-info age">
23
                {{ .Committed.Format "Mon, 02 Jan 2006" }}
24
                <span class="tooltip" role="tooltip">{{ .Committed }}</span>
25
              </span>
26
            </div>
27
            <div>{{ commitSummary .Message }}</div>
28
          </div>
29
          {{ end }}
30
        </div>
31
32
        <div class="repo-index-side">
33
          <h2>Clone urls</h2>
34
          <pre>{{- /* */ -}}
35
https://{{ .servername }}/{{ .name }}
36
git@{{ .servername }}:{{ .name }}
37
{{- /* */ -}}</pre>
38
39
          {{- if .mirrorinfo.isMirror }}
40
          <br>
41
          <h2>Mirror Status</h3>
42
            <p>
43
              Last updated {{ humanizeTime .mirrorinfo.lastSync }} from:
44
              <a href="{{ .mirrorinfo.url }}" target="_blank">{{ .mirrorinfo.url }}</a>
45
            </p>
46
            {{- end }}
47
        </div>
48
      </section>
49
      {{ end }}
50
51
      {{- if .readme }}
52
      <article class="readme">
53
        {{- .readme -}}
54
      </article>
55
      {{- end -}}
56
    </main>
57
  </body>
58
</html>
59
{{ end }}