summaryrefslogtreecommitdiffstats
path: root/templates/repo/user_cards.tmpl
blob: c22caf2576452bc911f4c6ac6f60164c30242d17 (plain)
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<div class="ui container user-cards">
	<h2 class="ui dividing header">
		{{.CardsTitle}}
	</h2>
	<ul class="list">
		{{range .Cards}}
			<li class="item ui segment">
				<a href="{{.HomeLink}}">
					<img class="avatar" src="{{.RelAvatarLink}}"/>
				</a>
				<h3 class="name"><a href="{{.HomeLink}}">{{.DisplayName}}</a></h3>

				<div class="meta">
					{{if .Website}}
						<span class="octicon octicon-link"></span> <a href="{{.Website}}" target="_blank" rel="noopener">{{.Website}}</a>
					{{else if .Location}}
						<span class="octicon octicon-location"></span> {{.Location}}
					{{else}}
						<span class="octicon octicon-clock"></span> {{$.i18n.Tr "user.join_on"}} {{DateFmtShort .Created}}
					{{end}}
				</div>
			</li>
		{{end}}
	</ul>

	{{with .Page}}
		{{if gt .TotalPages 1}}
			<div class="center page buttons">
				<div class="ui borderless pagination menu">
					<a class="{{if not .HasPrevious}}disabled{{end}} item" {{if .HasPrevious}}href="{{$.Link}}?page={{.Previous}}"{{end}}>
						<i class="left arrow icon"></i> {{$.i18n.Tr "repo.issues.previous"}}
					</a>
					{{range .Pages}}
						{{if eq .Num -1}}
							<a class="disabled item">...</a>
						{{else}}
							<a class="{{if .IsCurrent}}active{{end}} item" {{if not .IsCurrent}}href="{{$.Link}}?page={{.Num}}"{{end}}>{{.Num}}</a>
						{{end}}
					{{end}}
					<a class="{{if not .HasNext}}disabled{{end}} item" {{if .HasNext}}href="{{$.Link}}?page={{.Next}}"{{end}}>
						{{$.i18n.Tr "repo.issues.next"}}&nbsp;<i class="icon right arrow"></i>
					</a>
				</div>
			</div>
		{{end}}
	{{end}}
</div>