all repos

mugit @ 1043e315af50cdd442184223ba00346490ba178c

🐮 git server that your cow will love

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

Oleksandr Smirnov Oleksandr Smirnov
olexsmir@gmail.com
some refactoring, 4 months ago
1
{{ define "repo_file" }}
2
<html>
3
  <head>
4
  {{ template "head" . }}
5
  </head>
6
  {{ template "repo_header" . }}
7
  <body>
8
    <main>
9
      <p>{{ .path }} (<a style="color: gray" href="?raw=true">view raw</a>)</p>
10
      {{if .chroma }}
11
      <div class="chroma-file-wrapper">
12
      {{ .content }}
13
      </div>
14
      {{else}}
15
      <div class="file-wrapper">
16
      <table>
17
        <tbody><tr>
18
            <td class="line-numbers">
19
              <pre>
20
            {{- range .linecount }}
21
 <a id="L{{ . }}" href="#L{{ . }}">{{ . }}</a>
22
            {{- end -}}
23
              </pre>
24
            </td>
25
            <td class="file-content">
26
              <pre>
27
             {{- .content -}}
28
              </pre>
29
            </td>
30
        </tbody></tr>
31
      </table>
32
      </div>
33
      {{end}}
34
    </main>
35
  </body>
36
</html>
37
{{ end }}