legit/templates/refs.html
2022-12-18 22:18:00 +05:30

46 lines
986 B
HTML

{{ define "refs" }}
<html>
{{ template "head" . }}
<title>
{{ .name }} &mdash; refs
</title>
{{ template "repoheader" . }}
<body>
{{ template "nav" . }}
<main>
{{ $name := .name }}
<h3>branches</h3>
<div class="refs">
{{ range .branches }}
<div>
<strong>{{ .Name.Short }}</strong>
</div>
<div>
<a href="/{{ $name }}/tree/{{ .Name.Short }}/">browse</a>
<a href="/{{ $name }}/log/{{ .Name.Short }}">log</a>
</div>
{{ end }}
</div>
{{ if .tags }}
<h3>tags</h3>
<div class="refs">
{{ range .tags }}
<div>
<strong>{{ .Name }}</strong>
{{ if .Message }}
<pre>{{ .Message }}</pre>
</div>
<div>
<a href="/{{ $name }}/tree/{{ .Name }}/">browse</a>
<a href="/{{ $name }}/log/{{ .Name }}">log</a>
</div>
{{ end }}
{{ end }}
</div>
{{ end }}
</main>
</body>
</html>
{{ end }}