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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
{{define "content" -}}
<div class="header-extension"></div>
<h2>
<a href="/~{{.Repo.OwnerName}}">~{{.Repo.OwnerName}}</a>/{{.Repo.Name}}
{{template "visibilityBadge" .Repo.Visibility}}
</h2>
{{if .Repo.Description}}
<p>{{.Repo.Description}}</p>
{{end}}
{{template "viewtabs" (dict "Repo" .Repo "Views" .Views "Current" "overview" "Ref" .DefaultBranch)}}
<div class="clone-url">
<h4>Clone</h4>
<p>With a meta.sr.ht personal access token (Basic auth):</p>
<pre>export DOLT_REMOTE_PASSWORD=<your meta access token>
dolt clone --user {{.Repo.OwnerName}} {{.CloneURL}}</pre>
<p>Or, associate a <a href="/settings/keys">dolt key</a> once and clone with no
credentials (like a git SSH key):</p>
<pre>dolt creds new
dolt login --auth-endpoint {{doltHost .SelfOrigin}} --login-url {{.SelfOrigin}}/settings/keys
dolt clone {{.CloneURL}}</pre>
</div>
<div class="row">
<div class="col-md-4">
<h4>{{icon "code-branch"}} Branches</h4>
{{if .Branches}}
<ul>
{{range .Branches}}
<li>
<a href="/~{{$.Repo.OwnerName}}/{{$.Repo.Name}}/tree/{{.Name}}">{{.Name}}</a>
{{if eq .Name $.DefaultBranch}}<span class="badge badge-secondary">default</span>{{end}}
<code class="text-muted">{{.Head | shorthash}}</code>
</li>
{{end}}
</ul>
{{else}}
<p class="text-muted">No branches.</p>
{{end}}
</div>
<div class="col-md-8">
<h4>{{icon "clock"}} Recent commits</h4>
{{if .BrowseError}}
<div class="alert alert-warning">Could not read history: {{.BrowseError}}</div>
{{end}}
{{if .Commits}}
<table class="table">
<tbody>
{{range .Commits}}
<tr>
<td>
<a href="/~{{$.Repo.OwnerName}}/{{$.Repo.Name}}/commit/{{.Hash}}">
<code>{{.Hash | shorthash}}</code>
</a>
</td>
<td>{{.Message}}</td>
<td class="text-muted">{{.Author}}</td>
<td class="text-muted" title="{{.Date | abstime}}">{{.Date | reltime}}</td>
</tr>
{{end}}
</tbody>
</table>
<a href="/~{{.Repo.OwnerName}}/{{.Repo.Name}}/log">Full log →</a>
{{else}}
<p class="text-muted">No commits.</p>
{{end}}
</div>
</div>
{{- end}}