~gitpocket/gitpocket

1
cf8bba6cd2cc9418ff80a39d8ddac8bde7936722
mainfeed-discovery
gitpocket/templates/repo.html -rw-r--r--1.6 KiB ViewLogBlameView rawPermalink dd5b828e50 feat(basin): git.sr.ht style summary and file views 2 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
31
{{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="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> — {{.Author}}</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>git@{{.Host}}:{{$p.Repo.Path}}</div>{{end}}
</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}}