~gitpocket/gitpocket

1
7c7724c4769647a77f129d7b6bc2e84057cb2cec
mainfeed-discovery
gitpocket/templates/index.html -rw-r--r--2.3 KiB ViewLogBlameView rawPermalink ffdd5350e0 feat(web): basin bowl logo, drop landing welcome line 6 hours 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
{{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>
{{if .Data.Shared}}<h3>Shared with you</h3>{{template "repolist" .Data.Shared}}{{end}}</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="landing">
<p><a class="btn primary" href="/register">Register here ▸</a> or <a class="arrow" href="/login">Log in ▸</a> to get started, or check out some of our featured projects:</p>
<h3 class="featured">Featured projects</h3>
<div class="featuredgrid">{{range .Data.Featured}}<div class="feature"><h4><a class="owner" href="/~{{.Owner.Name}}">~{{.Owner.Name}}</a>/<a href="/{{.Path}}">{{.Name}}</a></h4>{{if .Description}}<blockquote>{{.Description}}</blockquote>{{end}}{{if .Tags}}<p class="tags">{{range .Tags}}<a href="/projects?tag={{.}}">#{{.}}</a>{{end}}</p>{{end}}</div>{{end}}</div>
<div class="more"><a class="btn" href="/projects">More projects ▸</a></div>
</div>
{{end}}
{{if .User}}<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}}
{{end}}
{{define "repolist"}}
{{if .}}<div class="events">{{range .}}<div class="event"><h4><a href="/{{.Path}}">{{.Path}}</a>{{if .Private}} <span class="tag">private</span>{{else if .Unlisted}} <span class="tag">unlisted</span>{{end}}{{if .Stars}}<span class="starcount" title="{{.Stars}} stars">☆ {{.Stars}}</span>{{end}}</h4>{{if .Description}}<p>{{.Description}}</p>{{end}}{{if .Tags}}<p class="tags">{{range .Tags}}<a href="/projects?tag={{.}}">#{{.}}</a> {{end}}</p>{{end}}</div>{{end}}</div>{{else}}<p class="muted">Nothing here yet.</p>{{end}}
{{end}}