summaryrefslogtreecommitdiffstats
path: root/templates/explore/repo_list.tmpl
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2024-10-18 20:33:49 +0200
committerDaniel Baumann <daniel@debian.org>2024-12-12 23:57:56 +0100
commite68b9d00a6e05b3a941f63ffb696f91e554ac5ec (patch)
tree97775d6c13b0f416af55314eb6a89ef792474615 /templates/explore/repo_list.tmpl
parentInitial commit. (diff)
downloadforgejo-e68b9d00a6e05b3a941f63ffb696f91e554ac5ec.tar.xz
forgejo-e68b9d00a6e05b3a941f63ffb696f91e554ac5ec.zip
Adding upstream version 9.0.3.
Signed-off-by: Daniel Baumann <daniel@debian.org>
Diffstat (limited to 'templates/explore/repo_list.tmpl')
-rw-r--r--templates/explore/repo_list.tmpl73
1 files changed, 73 insertions, 0 deletions
diff --git a/templates/explore/repo_list.tmpl b/templates/explore/repo_list.tmpl
new file mode 100644
index 0000000..59bc6c8
--- /dev/null
+++ b/templates/explore/repo_list.tmpl
@@ -0,0 +1,73 @@
+<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 muted-links">
+ {{if .PrimaryLanguage}}
+ <a class="flex-text-inline" href="?q={{$.Keyword}}&sort={{$.SortType}}&language={{.PrimaryLanguage.Language}}{{if $.TabName}}&tab={{$.TabName}}{{end}}">
+ <i class="color-icon tw-mr-2" style="background-color: {{.PrimaryLanguage.Color}}"></i>
+ {{.PrimaryLanguage.Language}}
+ </a>
+ {{end}}
+ {{if not $.DisableStars}}
+ <a class="flex-text-inline" href="{{.Link}}/stars" aria-label="{{ctx.Locale.TrN .NumStars "explore.stars_one" "explore.stars_few" .NumStars}}" {{if ge .NumStars 1000}}data-tooltip-content="{{.NumStars}}"{{end}}>
+ {{svg "octicon-star" 16}}
+ {{CountFmt .NumStars}}
+ </a>
+ {{end}}
+ {{if not $.DisableForks}}
+ <a class="flex-text-inline" href="{{.Link}}/forks" aria-label="{{ctx.Locale.TrN .NumForks "explore.forks_one" "explore.forks_few" .NumForks}}" {{if ge .NumForks 1000}}data-tooltip-content="{{.NumForks}}"{{end}}>
+ {{svg "octicon-git-branch" 16}}
+ {{CountFmt .NumForks}}
+ </a>
+ {{end}}
+ </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 "search.no_results"}}
+ </div>
+ {{end}}
+</div>