mirror of
https://github.com/go-gitea/gitea
synced 2025-07-30 06:08:35 +00:00
Repo avatar fixes (#13891)
- Split up avatar rendering helpers for performance - Fix showing repo SVG icon when no avatar is set - Make repo SVG and avatar same size at 32px - Fix fork line by adding vertical flexbox on repo title Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
20
templates/repo/icon.tmpl
Normal file
20
templates/repo/icon.tmpl
Normal file
@@ -0,0 +1,20 @@
|
||||
<div class="repo-icon mr-3">
|
||||
{{if $.IsTemplate}}
|
||||
{{svg "octicon-repo-template" 32}}
|
||||
{{else}}
|
||||
{{if $.IsPrivate}}
|
||||
{{svg "octicon-lock" 32}}
|
||||
{{else if and (not $.IsMirror) (not $.IsFork) ($.Owner)}}
|
||||
{{svg "octicon-repo" 32}}
|
||||
{{if $.Owner.Visibility.IsPrivate}}
|
||||
{{avatar $.Owner}}
|
||||
{{end}}
|
||||
{{else if $.IsMirror}}
|
||||
{{svg "octicon-mirror" 32}}
|
||||
{{else if $.IsFork}}
|
||||
{{svg "octicon-repo-forked" 32}}
|
||||
{{else}}
|
||||
{{svg "octicon-repo" 32}}
|
||||
{{end}}
|
||||
{{end}}
|
||||
</div>
|
Reference in New Issue
Block a user