mirror of
https://github.com/go-gitea/gitea.git
synced 2024-12-04 14:46:57 -05:00
e7938c9c44
- 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>
21 lines
490 B
Handlebars
21 lines
490 B
Handlebars
<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>
|