~gitpocket/gitpocket

6
4c63af699375e5e1cc2c82b1488d28d33c701cb8
mainfeed-discovery
gitpocket/templates/repositories.html -rw-r--r--1.5 KiB ViewLogBlameView rawPermalink 4c63af6993 feat(profile): pin repositories to the profile 18 days ago
1
2
3
4
5
6
7
8
9
{{define "content"}}
{{$d := .Data}}
<div class="userhead">
<h2>~{{$d.Owner.Name}}</h2>
<nav class="tabs small"><a href="/~{{$d.Owner.Name}}">about</a><a class="active" href="/~{{$d.Owner.Name}}/repositories">repositories{{if $d.Repos}} <span class="count">{{len $d.Repos}}</span>{{end}}</a>{{if not $d.Org}}<a href="/~{{$d.Owner.Name}}/stars">stars{{if $d.Count}} <span class="count">{{$d.Count}}</span>{{end}}</a>{{end}}<a href="/~{{$d.Owner.Name}}/feed">feed</a></nav>
</div>
{{if $d.Member}}<p class="muted small">Pinned repositories show on the profile page, up to {{$d.Max}} of them in the order they were pinned.</p>{{end}}
{{if $d.Repos}}<div class="events">{{range $d.Repos}}{{$pin := index $d.Pins .ID}}<div class="event"><h4><a href="/{{.Path}}">{{.Name}}</a>{{if .Private}} <span class="tag">private</span>{{else if .Unlisted}} <span class="tag">unlisted</span>{{end}}{{if $pin}} <span class="tag">pinned</span>{{end}}{{if .Stars}}<span class="starcount" title="{{.Stars}} stars">☆ {{.Stars}}</span>{{end}}{{if $d.Member}}<form method="post" action="/~{{$d.Owner.Name}}/repositories" class="pinform"><input type="hidden" name="repo" value="{{.ID}}"><button class="btn small" name="action" value="{{if $pin}}unpin{{else}}pin{{end}}">{{if $pin}}Unpin{{else}}Pin{{end}}</button></form>{{end}}</h4>{{if .Description}}<p>{{.Description}}</p>{{end}}{{if .Tags}}<p class="tags">{{range .Tags}}<a href="/search?q=tag:{{.}}">#{{.}}</a> {{end}}</p>{{end}}</div>{{end}}</div>{{else}}<p class="info">No repositories yet.</p>{{end}}
{{end}}