all repos

mugit @ 99ee247

🐮 git server that your cow will love

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

Oleksandr Smirnov Oleksandr Smirnov
olexsmir@gmail.com
ui: add tooltip for commit dates, 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 age">
24
                {{ .Committed.Format "Mon, 02 Jan 2006" }}
25
                <span class="tooltip" role="tooltip">{{ .Committed }}</span>
26
              </span>
27
            </div>
28
            <div>{{ commitSummary .Message }}</div>
29
          </div>
30
          {{ end }}
31
        </div>
32
33
        <div class="repo-index-side">
34
          <h2>Clone urls</h2>
35
          <pre>{{- /* */ -}}
36
https://{{ .servername }}/{{ .name }}
37
git@{{ .servername }}:{{ .name }}
38
{{- /* */ -}}</pre>
39
40
          {{- if .mirrorinfo.isMirror }}
41
          <br>
42
          <h2>Mirror Status</h3>
43
            <p>
44
              Last updated {{ humanizeTime .mirrorinfo.lastSync }} from:
45
              <a href="{{ .mirrorinfo.url }}" target="_blank">{{ .mirrorinfo.url }}</a>
46
            </p>
47
            {{- end }}
48
        </div>
49
      </section>
50
      {{ end }}
51
52
      {{- if .readme }}
53
      <article class="readme">
54
        {{- .readme -}}
55
      </article>
56
      {{- end -}}
57
    </main>
58
  </body>
59
</html>
60
{{ end }}