mirror of
https://github.com/go-gitea/gitea
synced 2024-11-15 06:34:25 +00:00
bf537adf8a
Backport #28320 by @JakobDev Fixes https://codeberg.org/Codeberg/Community/issues/1355 Co-authored-by: JakobDev <jakobdev@gmx.de>
61 lines
2.2 KiB
Handlebars
61 lines
2.2 KiB
Handlebars
<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">
|
|
<a class="text primary name" href="{{.Link}}">
|
|
{{if or $.PageIsExplore $.PageIsProfileStarList}}{{if .Owner}}{{.Owner.Name}} / {{end}}{{end}}{{.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}}
|
|
</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>
|