1
1
mirror of https://github.com/go-gitea/gitea synced 2025-08-02 07:38:35 +00:00

Remove unnecessary template helper repoAvatar (#26387)

And simplify the "repo/icon" code
This commit is contained in:
wxiaoguang
2023-08-08 15:29:35 +08:00
committed by GitHub
parent 6913053223
commit 78b2a1cc36
6 changed files with 16 additions and 42 deletions

View File

@@ -4,14 +4,9 @@
<div class="repo-header">
<div class="repo-title-wrap gt-df gt-fc">
<div class="repo-title" role="heading" aria-level="1">
{{$avatar := (repoAvatar . 32 "gt-mr-3")}}
{{if $avatar}}
{{$avatar}}
{{else}}
<div class="gt-mr-3">
{{template "repo/icon" .}}
</div>
{{end}}
<div class="gt-mr-3">
{{template "repo/icon" .}}
</div>
<a href="{{.Owner.HomeLink}}">{{.Owner.Name}}</a>
<div class="gt-mx-2">/</div>
<a href="{{$.RepoLink}}">{{.Name}}</a>