~gitpocket/gitpocket

1
bfa87e353b0b3435f4243841ac16cb42f5c8d360
mainfeed-discovery
gitpocket/templates/index.html -rw-r--r--1.0 KiB ViewLogBlameView rawPermalink bfa87e353b feat(basin): failure based rate limits and size caps 1 months ago
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
{{define "content"}}
{{if .User}}
<div class="row">
<h2>Your repositories</h2>
<a class="button" href="/create">New repository</a>
</div>
{{template "repolist" .Data.Repos}}
{{else}}
<section class="hero">
<h1><img src="/static/logo.svg" alt="">{{.Host}}</h1>
<p>A small git host. Push over SSH or HTTPS, browse trees, logs and diffs, and read READMEs with Markdown and LaTeX rendering. No JavaScript is needed to use it.</p>
<p class="muted">{{.Data.Public}} public repositories from {{.Data.Users}} users.</p>
<p><a class="button" href="/login">Log in</a> <a class="button secondary" href="/register">Register</a></p>
</section>
<h2>Recent repositories</h2>
{{template "repolist" .Data.Repos}}
{{end}}
{{end}}
{{define "repolist"}}
{{if .}}<ul class="repos">{{range .}}<li><div><a href="/{{.Path}}">{{.Path}}</a>{{if .Private}} <span class="tag">private</span>{{end}}</div>{{if .Description}}<div class="muted">{{.Description}}</div>{{end}}<div class="when">{{ago .Created}}</div></li>{{end}}</ul>{{else}}<p class="muted">Nothing here yet.</p>{{end}}
{{end}}