~gitpocket/gitpocket

1
c534f4e9e4f64f4e82a3b5ff40c84783059ea85d
mainfeed-discovery
gitpocket/templates/user.html -rw-r--r--874 bytes ViewLogBlameView rawPermalink c534f4e9e4 feat(basin): user profiles with avatars and self hosted fonts 1 months ago
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
{{define "content"}}
{{$p := .Data.Profile}}
<div class="profile">
{{if $p.Avatar}}<img class="avatar" src="/~{{.Data.Owner.Name}}/avatar" alt="">{{end}}
<div>
<h1>~{{.Data.Owner.Name}}</h1>
{{if $p.Bio}}<p class="bio">{{$p.Bio}}</p>{{end}}
<p class="muted">{{if $p.Location}}{{$p.Location}} · {{end}}{{if $p.Workplace}}{{$p.Workplace}} · {{end}}{{if $p.Website}}<a href="{{$p.Website}}" rel="nofollow me">{{$p.Website}}</a> · {{end}}joined {{ago .Data.Owner.Created}}</p>
</div>
</div>
{{template "repolist" .Data.Repos}}
{{end}}
{{define "repolist"}}
{{if .}}<ul class="repos">{{range .}}<li><a href="/{{.Path}}">{{.Name}}</a>{{if .Private}} <span class="tag">private</span>{{end}}{{if .Description}}<span class="desc">{{.Description}}</span>{{end}}<span class="when">{{ago .Created}}</span></li>{{end}}</ul>{{else}}<p class="muted">no repositories.</p>{{end}}
{{end}}