legit/templates/repo.html
2022-12-17 21:33:04 +05:30

39 lines
976 B
HTML

{{ define "repo" }}
<html>
<title>{{ .name }}
{{ if .parent }}
&mdash; {{ .parent }}
{{ end }}
</title>
{{ template "head" . }}
<header>
<h2>
<a href="/">all repos</a>
&mdash; {{ .name }}
</h2>
<h3 class="desc">{{ .desc }}</h3>
</header>
<body>
{{ template "nav" . }}
<main>
{{ $repo := .name }}
<div class="log">
{{ range .commits }}
<div>
<div><a href="/{{ $repo }}/commit/{{ .Hash.String }}">{{ slice .Hash.String 0 8 }}</a></div>
<div>{{ .Author.When.Format "Mon, 02 Jan 2006 15:04:05 -0700" }}</div>
<pre>{{ .Message }}</pre>
</div>
<div class="commit-info">{{ .Author.Name }} <span style="color: var(--gray);">{{ .Author.Email }}</span></div>
{{ end }}
</div>
<article class="readme">
<pre>
{{- if .readme }}{{ .readme }}{{- end -}}
</pre>
</article>
</main>
</body>
</html>
{{ end }}