mirror of
https://github.com/go-gitea/gitea
synced 2025-07-03 09:07:19 +00:00
Always use HTML attributes for avatar size (#31509)
Many avatars were rendered in HTML with certain width/height but then resized again in CSS. This was pointless so I removed all these cases and made the HTML size match the previous render size. Also did a few CSS cleanups in the tribute rendering: <img width="648" alt="image" src="https://github.com/go-gitea/gitea/assets/115237/cb2fafb3-5e20-46e9-814f-07df20038beb">
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
<div class="commit-form-wrapper">
|
||||
{{ctx.AvatarUtils.Avatar .SignedUser 48 "commit-avatar"}}
|
||||
{{ctx.AvatarUtils.Avatar .SignedUser 40 "commit-avatar"}}
|
||||
<div class="commit-form">
|
||||
<h3>{{- if .CanCommitToBranch.WillSign}}
|
||||
<span title="{{ctx.Locale.Tr "repo.signing.will_sign" .CanCommitToBranch.SigningKey}}">{{svg "octicon-lock" 24}}</span>
|
||||
|
@ -58,16 +58,16 @@
|
||||
{{end}}
|
||||
{{end}}
|
||||
</span>
|
||||
<span class="author tw-flex tw-items-center tw-mr-2">
|
||||
<span class="author tw-flex tw-items-center tw-mr-2 tw-gap-[1px]">
|
||||
{{$userName := $commit.Commit.Author.Name}}
|
||||
{{if $commit.User}}
|
||||
{{if and $commit.User.FullName DefaultShowFullName}}
|
||||
{{$userName = $commit.User.FullName}}
|
||||
{{end}}
|
||||
<span class="tw-mr-1">{{ctx.AvatarUtils.Avatar $commit.User}}</span>
|
||||
{{ctx.AvatarUtils.Avatar $commit.User 18}}
|
||||
<a href="{{$commit.User.HomeLink}}">{{$userName}}</a>
|
||||
{{else}}
|
||||
<span class="tw-mr-1">{{ctx.AvatarUtils.AvatarByEmail $commit.Commit.Author.Email $userName}}</span>
|
||||
{{ctx.AvatarUtils.AvatarByEmail $commit.Commit.Author.Email $userName 18}}
|
||||
{{$userName}}
|
||||
{{end}}
|
||||
</span>
|
||||
|
@ -3,10 +3,10 @@
|
||||
<div title="{{if eq .verification.TrustStatus "trusted"}}{{else if eq .verification.TrustStatus "untrusted"}}{{ctx.Locale.Tr "repo.commits.signed_by_untrusted_user"}}: {{else}}{{ctx.Locale.Tr "repo.commits.signed_by_untrusted_user_unmatched"}}: {{end}}{{.verification.Reason}}">
|
||||
{{if ne .verification.SigningUser.ID 0}}
|
||||
{{svg "gitea-lock"}}
|
||||
{{ctx.AvatarUtils.Avatar .verification.SigningUser 28 "signature"}}
|
||||
{{ctx.AvatarUtils.Avatar .verification.SigningUser 16 "signature"}}
|
||||
{{else}}
|
||||
<span title="{{ctx.Locale.Tr "gpg.default_key"}}">{{svg "gitea-lock-cog"}}</span>
|
||||
{{ctx.AvatarUtils.AvatarByEmail .verification.SigningEmail "" 28 "signature"}}
|
||||
{{ctx.AvatarUtils.AvatarByEmail .verification.SigningEmail "" 16 "signature"}}
|
||||
{{end}}
|
||||
</div>
|
||||
{{else}}
|
||||
|
@ -8,7 +8,7 @@
|
||||
{{range .Cards}}
|
||||
<li class="item ui segment">
|
||||
<a href="{{.HomeLink}}">
|
||||
{{ctx.AvatarUtils.Avatar .}}
|
||||
{{ctx.AvatarUtils.Avatar . 48}}
|
||||
</a>
|
||||
<h3 class="name"><a href="{{.HomeLink}}">{{.DisplayName}}</a></h3>
|
||||
|
||||
|
Reference in New Issue
Block a user