all repos

mugit @ 6e88b48

🐮 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
{{ define "repo_index" }}
<!DOCTYPE html>
<html>
  <head>
    {{ template "head" . }}
    <title>{{ .name }} &mdash; {{ .meta.Title }}</title>
  </head>
  <body>
    {{ template "repo_header" . }}

    <main>
      {{ $repo := .name }}

      <section class="repo-index">
        <div class="repo-index-main">
          {{ range .commits }}
          <div class="box">
            <div>
              <a href="/{{ $repo }}/commit/{{ .Hash.String }}" class="commit-hash">{{ slice .Hash.String 0 8 }}</a>
              &mdash; {{ .Author.Name }}
              <span class="commit-date commit-info">{{ .Author.When.Format "Mon, 02 Jan 2006" }}</span>
            </div>
            <div>{{ commitSummary .Message }}</div>
          </div>
          {{ end }}
        </div>

        <aside class="repo-index-side">
          <div class="box">
            <strong>clone</strong>
            <pre>{{- /**/ -}}
https://{{ .servername }}/{{ .name }}
git@{{ .servername }}:{{ .name }}
{{- /**/ -}}</pre>
          </div>
        </aside>
      </section>

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