1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
{{define "content"}}
{{$p := .Data.Profile}}
{{$own := and .User (eq .User.ID .Data.Owner.ID)}}
<div class="userhead">
<h2>~{{.Data.Owner.Name}}</h2>
<nav class="tabs small"><a class="active" href="/~{{.Data.Owner.Name}}">about</a><a href="/~{{.Data.Owner.Name}}/stars">stars{{if .Data.Count}} <span class="count">{{.Data.Count}}</span>{{end}}</a><a href="/~{{.Data.Owner.Name}}/feed">feed</a></nav>
</div>
<div class="columns user">
<aside class="profile">
{{if $p.Avatar}}<img class="avatar" src="/~{{.Data.Owner.Name}}/avatar?v={{$p.Avatar}}" alt="">{{end}}
{{if $p.Display}}<p class="name">{{$p.Display}}</p>{{end}}
{{if $p.Location}}<p>{{$p.Location}}</p>{{end}}
{{if $p.Workplace}}<p>{{$p.Workplace}}</p>{{end}}
{{if $p.Website}}<p><a href="{{$p.Website}}" rel="nofollow me">{{$p.Website}}</a></p>{{end}}
<p class="muted small" title="{{date .Data.Owner.Created}}">Joined {{.Data.Owner.Created.Format "2 January 2006"}}</p>
{{with .Data.Bio}}<div class="bio readme">{{.}}</div>{{end}}
{{if $own}}<a class="btn primary block" href="/create">Create a new repository ▸</a><a class="btn block" href="/settings">Edit your profile ▸</a>{{end}}
</aside>
<div class="main">
{{with .Data.Activity}}<section class="activity"><div class="heathead"><p class="muted small">{{.Total}} commit{{if ne .Total 1}}s{{end}} {{if .Year}}in {{.Year}}{{else}}in the past 12 months{{end}}</p><nav class="years"><a href="?"{{if not .Year}} class="active"{{end}}>past 12 months</a>{{range .Years}}<a href="?year={{.}}"{{if eq . $.Data.Activity.Year}} class="active"{{end}}>{{.}}</a>{{end}}</nav></div>{{.Grid}}<p class="legend muted small">less <i class="h0"></i><i class="h1"></i><i class="h2"></i><i class="h3"></i><i class="h4"></i> more</p></section>{{end}}
{{if .Data.Repos}}<div class="events">{{range .Data.Repos}}<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 .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="info">This user does not have any repositories.</p>{{end}}
</div>
</div>
{{end}}
|