all repos

mugit @ 68e246fcdb308a9951048d9c71bb5c21bf1ed494

🐮 git server that your cow will love

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

Oleksandr Smirnov Oleksandr Smirnov
olexsmir@gmail.com
ui: show mirror info, 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
14
      <section class="repo-index">
15
        <div class="repo-index-main">
16
          {{ range .commits }}
17
          <div class="box">
18
            <div>
19
              <a href="/{{ $repo }}/commit/{{ .Hash.String }}" class="commit-hash">{{ slice .Hash.String 0 8 }}</a>
20
              &mdash; {{ .Author.Name }}
21
              <span class="commit-date commit-info">{{ .Author.When.Format "Mon, 02 Jan 2006" }}</span>
22
            </div>
23
            <div>{{ commitSummary .Message }}</div>
24
          </div>
25
          {{ end }}
26
        </div>
27
28
        <div class="repo-index-side">
29
          <h2>Clone urls</h2>
30
          <pre>{{- /* */ -}}
31
https://{{ .servername }}/{{ .name }}
32
git@{{ .servername }}:{{ .name }}
33
{{- /* */ -}}</pre>
34
35
          {{- if .mirrorinfo.isMirror }}
36
          <br>
37
          <h2>Mirror Status</h3>
38
            <p>
39
              Last updated {{ humanizeTime .mirrorinfo.lastSync }} ago from:
40
              <a href="{{ .mirrorinfo.url }}" target="_blank">{{ .mirrorinfo.url }}</a>
41
            </p>
42
            {{- end }}
43
        </div>
44
      </section>
45
46
      {{- if .readme }}
47
      <article class="readme">
48
        {{- .readme -}}
49
      </article>
50
      {{- end -}}
51
    </main>
52
  </body>
53
</html>
54
{{ end }}