mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-09-20 17:55:55 +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:
parent
9b22ada0a7
commit
e7938c9c44
7 changed files with 112 additions and 104 deletions
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>
|
Loading…
Add table
Add a link
Reference in a new issue