summaryrefslogtreecommitdiffstats
path: root/templates/explore/repo_list.tmpl
blob: 35a8b3948c1c8a6c0515e496f3389d950bc50aea (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
48
49
50
51
52
53
54
55
56
57
58
59
<div class="ui repository list">
	{{range .Repos}}
		<div class="item">
			<div class="ui header">
				{{if .RelAvatarLink}}
					<img class="ui avatar image" src="{{.RelAvatarLink}}">
				{{end}}
				<a class="name" href="{{.Link}}">
					{{if or $.PageIsExplore $.PageIsProfileStarList }}{{if .Owner}}{{.Owner.Name}} / {{end}}{{end}}{{.Name}}
				</a>
				{{if .IsArchived}}<span class="ui compact label">{{$.i18n.Tr "repo.desc.archived"}}</span>{{end}}
				{{if .IsTemplate}}
					{{if .IsPrivate}}
						<span class="ui basic label">{{$.i18n.Tr "repo.desc.private_template"}}</span>
					{{else}}
						{{if .Owner.Visibility.IsPrivate}}
							<span class="ui basic label">{{$.i18n.Tr "repo.desc.internal_template"}}</span>
						{{end}}
					{{end}}
				{{else}}
					{{if .IsPrivate}}
						<span class="ui basic label">{{$.i18n.Tr "repo.desc.private"}}</span>
					{{else}}
						{{if .Owner.Visibility.IsPrivate}}
							<span class="ui basic label">{{$.i18n.Tr "repo.desc.internal"}}</span>
						{{end}}
					{{end}}
				{{end}}
				{{if .IsFork}}
					<span class="middle">{{svg "octicon-repo-forked" 16}}</span>
				{{else if .IsMirror}}
					<span class="middle">{{svg "octicon-mirror" 16}}</span>
				{{end}}
				<div class="ui right metas">
					{{if .PrimaryLanguage }}
					<span class="text grey"><i class="color-icon" style="background-color: {{.PrimaryLanguage.Color}}"></i>{{ .PrimaryLanguage.Language }}</span>
					{{end}}
					<span class="text grey">{{svg "octicon-star" 16}} {{.NumStars}}</span>
					<span class="text grey">{{svg "octicon-git-branch" 16}} {{.NumForks}}</span>
				</div>
			</div>
			<div class="description">
				{{if .DescriptionHTML}}<p>{{.DescriptionHTML}}</p>{{end}}
				{{if .Topics }}
					<div class="ui tags">
					{{range .Topics}}
						{{if ne . "" }}<a href="{{AppSubUrl}}/explore/repos?q={{.}}&topic=1"><div class="ui small label topic">{{.}}</div></a>{{end}}
					{{end}}
					</div>
				{{end}}
				<p class="time">{{$.i18n.Tr "org.repo_updated"}} {{TimeSinceUnix .UpdatedUnix $.i18n.Lang}}</p>
			</div>
		</div>
	{{else}}
	<div>
		{{$.i18n.Tr "explore.repo_no_results"}}
	</div>
	{{end}}
</div>