50 lines
1.2 KiB
HTML
50 lines
1.2 KiB
HTML
{{ define "repo" }}
|
|
<html>
|
|
{{ template "head" . }}
|
|
|
|
<header>
|
|
<h1>{{ .meta.Title }}</h1>
|
|
<h2>{{ .meta.Description }}</h2>
|
|
</header>
|
|
<body>
|
|
{{ template "nav" . }}
|
|
<main>
|
|
{{ $repo := .name }}
|
|
{{ $ref := .ref }}
|
|
{{ $parent := .parent }}
|
|
|
|
<table>
|
|
<tr>
|
|
<td></td>
|
|
<td><a href="../">..</a>
|
|
</tr>
|
|
{{ range .files }}
|
|
{{ if .IsFile }}
|
|
<tr>
|
|
<td><code>{{ .Mode }}</code></td>
|
|
<td>
|
|
{{ if $parent }}
|
|
<a href="/{{ $repo }}/blob/{{ $ref }}/{{ $parent }}/{{ .Name }}">{{ .Name }}</a>
|
|
{{ else }}
|
|
<a href="/{{ $repo }}/blob/{{ $ref }}/{{ .Name }}">{{ .Name }}</a>
|
|
{{ end }}
|
|
</td>
|
|
</tr>
|
|
{{ else }}
|
|
<tr>
|
|
<td><code>{{ .Mode }}</code></td>
|
|
<td>
|
|
{{ if $parent }}
|
|
<a href="/{{ $repo }}/tree/{{ $ref }}/{{ $parent }}/{{ .Name }}">{{ .Name }}/</a>
|
|
{{ else }}
|
|
<a href="{{ $repo }}/tree/{{ $ref }}/{{ .Name }}">{{ .Name }}/</a>
|
|
{{ end }}
|
|
</td>
|
|
</tr>
|
|
{{ end }}
|
|
{{ end }}
|
|
</table>
|
|
</main>
|
|
</body>
|
|
</html>
|
|
{{ end }}
|