~gitpocket/gitpocket

1
8a60bcae512b7c6ffead4d3cfd40d99a8ad89ff9
mainfeed-discovery
gitpocket/templates/repo.html -rw-r--r--1.6 KiB ViewLogBlameView rawPermalink 224ff77762 feat(basin): sourcehut style layout, settings tabs, display name, versioned avatars 3 days ago
 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
{{define "content"}}
{{$p := .Data.Page}}
{{if $p.Empty}}
<p>This repository is empty. Push something to it:</p>
<pre>git remote add origin git@{{.Host}}:{{$p.Repo.Path}}
git push -u origin {{$p.Ref}}</pre>
{{else}}
<div class="cards commits">
{{range .Data.Commits}}<div class="panel"><div><a class="hash" href="/{{$p.Repo.Path}}/commit/{{.Hash}}">{{short .Hash}}</a> <span class="subject">{{.Subject}}</span></div><div>{{.Author}} pushed to <a href="/{{$p.Repo.Path}}">{{$p.Repo.Path}}</a></div><div class="muted small">{{ago .Time}}</div></div>{{end}}
</div>
<div class="columns">
<div class="main">
{{with .Data.Readme}}<article class="readme">{{.}}</article>{{end}}
{{with .Data.ReadmeText}}<pre class="plain">{{.}}</pre>{{end}}
{{if not .Data.ReadmeName}}<p class="muted">No README.</p>{{end}}
</div>
<aside>
<h4>Clone</h4>
<dl class="clone">
<dt>read-only</dt><dd><code>https://{{.Host}}/{{$p.Repo.Path}}</code></dd>
{{if $p.Owner}}<dt>read/write</dt><dd><code>git@{{.Host}}:{{$p.Repo.Path}}</code></dd>{{end}}
</dl>
<h4><a href="/{{$p.Repo.Path}}/refs">Branches</a></h4>
<ul class="side">{{range $i, $b := .Data.Branches}}{{if lt $i 5}}<li><a href="/{{$p.Repo.Path}}/tree/{{$b.Name}}/">{{$b.Name}}</a> <span class="muted small">{{ago $b.Time}}</span></li>{{end}}{{end}}</ul>
{{if .Data.Tags}}<h4><a href="/{{$p.Repo.Path}}/refs">Tags</a></h4>
<ul class="side">{{range $i, $t := .Data.Tags}}{{if lt $i 5}}<li><a href="/{{$p.Repo.Path}}/tree/{{$t.Name}}/">{{$t.Name}}</a> <span class="muted small">{{ago $t.Time}}</span></li>{{end}}{{end}}</ul>{{end}}
</aside>
</div>
{{end}}
{{end}}