~gitpocket/gitpocket

1
ece10ec87b759061dbb6158366d0cd96f0662987
mainfeed-discovery
gitpocket/templates/index.html -rw-r--r--1.9 KiB ViewLogBlameView rawPermalink 53db246d97 style(repos): compact repository cards 13 days ago
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
{{define "content"}}
{{if .User}}
<div class="dash">
<section><div class="dashhead"><h3>Your repositories</h3><span><a class="btn" href="/orgs/new">New organisation</a> <a class="btn primary" href="/create">New repository</a></span></div>
{{if .Data.Repos}}{{template "repolist" .Data.Repos}}{{else}}<p class="muted">You have no repositories yet.</p>{{end}}
{{if .Data.Shared}}<h3>Shared with you</h3>{{template "repolist" .Data.Shared}}{{end}}</section>
{{else}}
<div class="landing">
{{if eq .Registration "closed"}}<p><a class="btn primary" href="/login">Log in ▸</a> or check out some of our featured projects:</p>{{else}}<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>{{end}}
<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="/search?q=tag:{{.}}">#{{.}}</a>{{end}}</p>{{end}}</div>{{end}}</div>
<div class="more"><a class="btn" href="/search">More projects ▸</a></div>
</div>
{{end}}
{{if .User}}{{with .Data.Recent}}<section><h3>Recently pushed elsewhere</h3>
{{template "repolist" .}}
</section>{{end}}
</div>{{end}}
{{end}}
{{define "repolist"}}
{{if .}}<div class="events">{{range .}}<div class="event repo"><h4><a href="/{{.Path}}">{{.Path}}</a>{{if .Private}} <span class="tag">private</span>{{else if .Unlisted}} <span class="tag">unlisted</span>{{end}}</h4>{{if .Description}}<p>{{.Description}}</p>{{end}}{{if .Tags}}<p class="tags">{{range .Tags}}<a href="/search?q=tag:{{.}}">#{{.}}</a> {{end}}</p>{{end}}{{template "repometa" .}}</div>{{end}}</div>{{else}}<p class="muted">Nothing here yet.</p>{{end}}
{{end}}