mirror of
https://github.com/go-gitea/gitea.git
synced 2024-11-22 03:28:31 +01:00
b068dbd40e
Follow #32383 and #32402
72 lines
2.7 KiB
Handlebars
72 lines
2.7 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">
|
|
{{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">
|
|
<span aria-label="{{ctx.Locale.Tr "repo.stars"}}">{{svg "octicon-star" 16}}</span>
|
|
<span {{if ge .NumStars 1000}}data-tooltip-content="{{.NumStars}}"{{end}}>{{CountFmt .NumStars}}</span>
|
|
</a>
|
|
{{end}}
|
|
<a class="flex-text-inline" href="{{.Link}}/forks">
|
|
<span aria-label="{{ctx.Locale.Tr "repo.forks"}}">{{svg "octicon-git-branch" 16}}</span>
|
|
<span {{if ge .NumForks 1000}}data-tooltip-content="{{.NumForks}}"{{end}}>{{CountFmt .NumForks}}</span>
|
|
</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"}} {{DateUtils.TimeSince .UpdatedUnix}}</div>
|
|
</div>
|
|
</div>
|
|
{{else}}
|
|
<div>
|
|
{{ctx.Locale.Tr "search.no_results"}}
|
|
</div>
|
|
{{end}}
|
|
</div>
|