~gitpocket/gitpocket

4
bfa87e353b0b3435f4243841ac16cb42f5c8d360
mainfeed-discovery
gitpocket/templates/repo.html -rw-r--r--1.5 KiB ViewLogBlameView rawPermalink 3e4df176f3 feat(basin): light theme, highlighting and latex 1 months 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
{{define "content"}}
{{$p := .Data.Page}}
{{if $p.Empty}}
<p class="muted">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="columns">
<div class="main">
{{with .Data.Readme}}<article class="readme">{{.}}</article>{{end}}
{{with .Data.ReadmeText}}<article class="readme"><pre>{{.}}</pre></article>{{end}}
{{if not .Data.ReadmeName}}<p class="muted">No README.</p>{{end}}
</div>
<aside>
<h3>Clone</h3>
<dl class="clone">
<dt>HTTPS</dt><dd><code>https://{{.Host}}/{{$p.Repo.Path}}</code></dd>
{{if $p.Owner}}<dt>SSH</dt><dd><code>git@{{.Host}}:{{$p.Repo.Path}}</code></dd>{{end}}
</dl>
<h3><a href="/{{$p.Repo.Path}}/log/{{$p.Ref}}">Latest commits</a></h3>
<ul class="side">{{range .Data.Commits}}<li><a href="/{{$p.Repo.Path}}/commit/{{.Hash}}">{{.Subject}}</a><div class="muted"><code>{{short .Hash}}</code> · {{.Author}} · {{ago .Time}}</div></li>{{end}}</ul>
<h3><a href="/{{$p.Repo.Path}}/refs">Branches</a></h3>
<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">{{ago $b.Time}}</span></li>{{end}}{{end}}</ul>
{{if .Data.Tags}}<h3><a href="/{{$p.Repo.Path}}/refs">Tags</a></h3>
<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">{{ago $t.Time}}</span></li>{{end}}{{end}}</ul>{{end}}
</aside>
</div>
{{end}}
{{end}}