1
2
3
4
5
6
7
8
9
10
11
12
13
|
{{define "content"}}
{{if .User}}
<h1>your repositories</h1>
{{template "repolist" .Data.Repos}}
{{else}}
<p class="lede">a small git host. {{.Data.Public}} public repositories from {{.Data.Users}} users.</p>
<h1>recent repositories</h1>
{{template "repolist" .Data.Repos}}
{{end}}
{{end}}
{{define "repolist"}}
{{if .}}<ul class="repos">{{range .}}<li><a href="/{{.Path}}">{{.Path}}</a>{{if .Private}} <span class="tag">private</span>{{end}}{{if .Description}}<span class="desc">{{.Description}}</span>{{end}}<span class="when">{{ago .Created}}</span></li>{{end}}</ul>{{else}}<p class="muted">nothing here yet.</p>{{end}}
{{end}}
|