~gitpocket/gitpocket

4
d0319382a79650abf1fed1de0bf0ae1fcdcfab43
mainfeed-discovery
gitpocket/templates/index.html -rw-r--r--2.3 KiB ViewLogBlameView rawPermalink d96cdcc25c fix(basin): drop logged in welcome blurb 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"}}
{{if .User}}
<div class="cards">
<section class="panel"><h3>Your repositories</h3>
{{if .Data.Repos}}{{template "repolist" .Data.Repos}}{{else}}<p>You have no repositories yet.</p>{{end}}
<a class="btn primary" href="/create">Create a repository ▸</a></section>
<section class="panel"><h3>Your profile</h3><p>Set a bio in Markdown, a location, a workplace and an avatar. Your page is <a href="/~{{.User.Name}}">~{{.User.Name}}</a>.</p><a class="btn" href="/settings">Edit your profile ▸</a></section>
<section class="panel"><h3>Keys and tokens</h3><p>Register SSH public keys for pushing and create access tokens for HTTPS pushes or scripts.</p><a class="btn" href="/settings/keys">Manage keys ▸</a></section>
</div>
{{else}}
<div class="welcome">
<strong>Welcome to {{.Host}}!</strong>
<p>{{.Host}} is a small, self hosted git forge. It serves repositories over SSH and HTTPS and renders trees, logs, diffs and READMEs as plain pages, with Markdown and LaTeX where it helps and no scripts where it doesn't.</p>
</div>
<div class="cards">
<section class="panel"><h3>Host a repository</h3><p>Registration is by invitation. Once you have an account, push any repository and it gets a page with its history, refs and README.</p><a class="btn primary" href="/register">Register ▸</a></section>
<section class="panel"><h3>Browse the code</h3><p>Every public repository can be cloned anonymously over HTTPS and read in the browser with syntax highlighting.</p><a class="btn" href="#recent">Recent repositories ▸</a></section>
<section class="panel"><h3>Already a member?</h3><p>Log in to see your repositories, manage SSH keys and tokens, and edit your profile.</p><a class="btn" href="/login">Log in ▸</a></section>
</div>
{{end}}
<section class="panel wide" id="recent">
<h3>Recent repositories</h3>
<p>{{.Data.Public}} public repositories from {{.Data.Users}} users.</p>
{{template "repolist" .Data.Recent}}
</section>
{{end}}
{{define "repolist"}}
{{if .}}<div class="repos">{{range .}}<div class="repo"><a href="/{{.Path}}">{{.Path}}</a>{{if .Private}} <span class="tag">private</span>{{end}}{{if .Description}}<div>{{.Description}}</div>{{end}}<div class="muted small">{{ago .Created}}</div></div>{{end}}</div>{{else}}<p class="muted">Nothing here yet.</p>{{end}}
{{end}}