mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-02 16:29:06 +01:00
d68a613ba8
Currently only SHA1 repositories are supported by Gitea. This adds support for alternate SHA256 with the additional aim of easier support for additional hash types in the future. Fixes: #13794 Limited by: https://github.com/go-git/go-git/issues/899 Depend on: #28138 <img width="776" alt="图片" src="https://github.com/go-gitea/gitea/assets/81045/5448c9a7-608e-4341-a149-5dd0069c9447"> --------- Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: 6543 <6543@obermui.de>
64 lines
2.4 KiB
Go HTML Template
64 lines
2.4 KiB
Go HTML Template
<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>
|