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
|
{{define "content"}}
{{$p := .Data.Page}}
{{if $p.Empty}}
<p>This repository is empty. Push something to it:</p>
<pre>git remote add origin {{.SSHUser}}@{{.Host}}:{{$p.Repo.Path}}
git push -u origin {{$p.Ref}}</pre>
{{else}}
<div class="summary">
<div class="commits">
{{range .Data.Commits}}<div class="event"><div class="row"><span><a class="hash" href="/{{$p.Repo.Path}}/commit/{{.Hash}}">{{short .Hash}}</a> — {{template "who" .}}{{with signer .}}<span class="verified" title="Signed with a key registered by ~{{.}}">Verified</span>{{end}}</span><a class="when" href="/{{$p.Repo.Path}}/commit/{{.Hash}}" title="{{date .Time}}">{{ago .Time}}</a></div><pre class="subject">{{.Subject}}</pre></div>{{end}}
</div>
<div class="refs">
<h3>refs</h3>
{{range $i, $b := .Data.Branches}}{{if lt $i 4}}<div class="ref"><strong>{{$b.Name}}</strong><div><a href="/{{$p.Repo.Path}}/tree/{{$b.Name}}/">browse ▸</a> <a href="/{{$p.Repo.Path}}/log/{{$b.Name}}">log ▸</a></div></div>{{end}}{{end}}
{{range $i, $t := .Data.Tags}}{{if lt $i 3}}<div class="ref"><strong>{{$t.Name}}</strong><div><a href="/{{$p.Repo.Path}}/tree/{{$t.Name}}/">browse ▸</a> <a href="/{{$p.Repo.Path}}/log/{{$t.Name}}">log ▸</a></div></div>{{end}}{{end}}
</div>
<div class="clone">
<h3>clone</h3>
<strong>read-only</strong>
<div><a href="https://{{.Host}}/{{$p.Repo.Path}}">https://{{.Host}}/{{$p.Repo.Path}}</a></div>
{{if $p.Owner}}<strong>read/write</strong>
<div>{{.SSHUser}}@{{.Host}}:{{$p.Repo.Path}}</div>{{end}}
<strong>download</strong>
<div><a href="/{{$p.Repo.Path}}/archive/{{$p.Ref}}.tar.gz">{{$p.Ref}}.tar.gz</a> · <a href="/{{$p.Repo.Path}}/archive/{{$p.Ref}}.zip">{{$p.Ref}}.zip</a></div>
<div><a href="/{{$p.Repo.Path}}/feed">atom feed</a> · <a href="/{{$p.Repo.Path}}/compare">compare</a></div>
</div>
</div>
<div class="readme">
{{with .Data.Readme}}<article>{{.}}</article>{{end}}
{{with .Data.ReadmeText}}<pre class="plain">{{.}}</pre>{{end}}
{{if not .Data.ReadmeName}}<p class="muted">No README.</p>{{end}}
</div>
{{end}}
{{end}}
|