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
|
{{define "content"}}
{{$p := .Data.Page}}
{{template "pushed" .Data}}
{{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><span class="sha"><a class="hash" href="/{{$p.Repo.Path}}/commit/{{.Hash}}">{{short .Hash}}</a>{{template "seal" .}}</span> {{template "who" .}}</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">
{{with .Data.Languages}}<h3>languages</h3>
<div class="langbar">{{range .}}<span style="width:{{printf "%.2f" .Percent}}%;background:{{.Colour}}" title="{{.Name}} {{printf "%.1f" .Percent}}%"></span>{{end}}</div>
<ul class="langlist">{{range .}}<li><i class="dot" style="background:{{.Colour}}"></i><b>{{.Name}}</b><span class="pct">{{printf "%.1f" .Percent}}%</span></li>{{end}}</ul>
<h3 class="rule">clone</h3>{{else}}<h3>clone</h3>{{end}}
<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 class="muted small" href="/{{$p.Repo.Path}}/archive/{{$p.Ref}}.tar.gz.sha256" title="byte for byte reproducible for a given commit">sha256</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}}
|