aboutsummaryrefslogtreecommitdiffstats
path: root/templates/explore/repo_list.tmpl
blob: c51dcaa3ffda2f8bee0f79c46f4d6e88227e45e5 (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
60
61
62
63
64
<div class="flex-list">
	{{range .Repos}}
		<div class="flex-item">
			<div class="flex-item-leading">
				{{template "repo/icon" .}}
			</div>
			<div class="flex-item-main">
				<div class="flex-item-header">
					<div class="flex-item-title">
						{{if and (or $.PageIsExplore $.PageIsProfileStarList) .Owner}}
						<a class="text primary name" href="{{.Owner.HomeLink}}">{{.Owner.Name}}</a>/
						{{end}}
						<a class="text primary name" href="{{.Link}}">{{.Name}}</a>
						<span class="label-list">
							{{if .IsArchived}}
								<span class="ui basic label">{{ctx.Locale.Tr "repo.desc.archived"}}</span>
							{{end}}
							{{if .IsPrivate}}
								<span class="ui basic label">{{ctx.Locale.Tr "repo.desc.private"}}</span>
							{{else}}
								{{if .Owner.Visibility.IsPrivate}}
									<span class="ui basic label">{{ctx.Locale.Tr "repo.desc.internal"}}</span>
								{{end}}
							{{end}}
							{{if .IsTemplate}}
								<span class="ui basic label">{{ctx.Locale.Tr "repo.desc.template"}}</span>
							{{end}}
							{{if eq .ObjectFormatName "sha256"}}
								<span class="ui basic label">{{ctx.Locale.Tr "repo.desc.sha256"}}</span>
							{{end}}
						</span>
					</div>
					<div class="flex-item-trailing">
						{{if .PrimaryLanguage}}
							<a class="muted" href="{{$.Link}}?q={{$.Keyword}}&sort={{$.SortType}}&language={{.PrimaryLanguage.Language}}{{if $.TabName}}&tab={{$.TabName}}{{end}}">
								<span class="flex-text-inline"><i class="color-icon gt-mr-3" style="background-color: {{.PrimaryLanguage.Color}}"></i>{{.PrimaryLanguage.Language}}</span>
							</a>
						{{end}}
						{{if not $.DisableStars}}
							<a class="text grey flex-text-inline" href="{{.Link}}/stars">{{svg "octicon-star" 16}}{{.NumStars}}</a>
						{{end}}
						<a class="text grey flex-text-inline" href="{{.Link}}/forks">{{svg "octicon-git-branch" 16}}{{.NumForks}}</a>
					</div>
				</div>
				{{$description := .DescriptionHTML $.Context}}
				{{if $description}}
					<div class="flex-item-body">{{$description}}</div>
				{{end}}
				{{if .Topics}}
					<div class="label-list">
					{{range .Topics}}
						{{if ne . ""}}<a class="ui label" href="{{AppSubUrl}}/explore/repos?q={{.}}&topic=1">{{.}}</a>{{end}}
					{{end}}
					</div>
				{{end}}
				<div class="flex-item-body">{{ctx.Locale.Tr "org.repo_updated"}} {{TimeSinceUnix .UpdatedUnix ctx.Locale}}</div>
			</div>
		</div>
	{{else}}
	<div>
		{{ctx.Locale.Tr "explore.repo_no_results"}}
	</div>
	{{end}}
</div>