Browse Source

Set avatar image dimensions (#12654)

Set the avatar image dimensions to help browsers
avoid layout reflows. Helps page load performance and
user experience (less content jank).

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
for-closed-social
Daniel Aleksandersen 4 years ago
committed by GitHub
parent
commit
72eeb13e4d
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      templates/user/profile.tmpl

+ 2
- 2
templates/user/profile.tmpl View File

@ -6,11 +6,11 @@
<div class="ui card">
{{if eq .SignedUserName .Owner.Name}}
<a class="image poping up" href="{{AppSubUrl}}/user/settings" id="profile-avatar" data-content="{{.i18n.Tr "user.change_avatar"}}" data-variation="inverted tiny" data-position="bottom center">
<img src="{{.Owner.SizedRelAvatarLink 290}}" title="{{.Owner.Name}}"/>
<img src="{{.Owner.SizedRelAvatarLink 290}}" title="{{.Owner.Name}}" height="290" width="290"/>
</a>
{{else}}
<span class="image">
<img src="{{.Owner.SizedRelAvatarLink 290}}" title="{{.Owner.Name}}"/>
<img src="{{.Owner.SizedRelAvatarLink 290}}" title="{{.Owner.Name}}" height="290" width="290"/>
</span>
{{end}}
<div class="content wrap">

Loading…
Cancel
Save