mugit/web/templates/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 48 |
{{ define "index" }}
<!DOCTYPE html>
<html>
<head>
{{ template "head" . }}
<title>{{ .Meta.Title }}</title>
</head>
<body>
<header>
<h1>{{ .Meta.Title }}</h1>
{{ if .Meta.Description }}<h2>{{ .Meta.Description }}</h2>{{ end }}
</header>
<main>
<table class="table index">
<thead>
<tr class="nohover">
<th class="nowrap">Name</th>
<th class="fill">Description</th>
<th class="nowrap">Last update</th>
</tr>
</thead>
<tbody>
{{- range .P }}
<tr>
<td class="nowrap"><a href="/{{ .Name }}">{{ .Name }}</a></td>
<td class="fill">
<a href="/{{ .Name }}">
{{- if .Desc }}{{- .Desc -}}
{{- else }}<span class="muted">No description set</span>{{- end -}}
</a>
<td class="nowrap">
{{ if not .LastCommit.IsZero }}
<span class="age">
{{- humanizeRelTime .LastCommit -}}
<span class="tooltip" role="tooltip">{{- humanizeTime .LastCommit -}}</span>
</span>
{{ else }}
<span class="muted">n/a</span>
{{ end }}
</td>
</tr>
{{ end }}
</tbody>
</table>
</main>
</body>
</html>
{{ end }}
|