]> cat aescling's git repositories - mastodon.git/commitdiff
Fix some account avatars on public pages having incorrect size (#13692)
authorThibG <thib@sitedethib.com>
Wed, 13 May 2020 19:20:34 +0000 (21:20 +0200)
committerGitHub <noreply@github.com>
Wed, 13 May 2020 19:20:34 +0000 (21:20 +0200)
* Fix some account avatars on public pages having incorrect size

* Remove outdated and overridden width and height attributes

* Remove more hardcoded width/height attributes

app/javascript/styles/mastodon/statuses.scss
app/views/about/show.html.haml
app/views/directories/index.html.haml
app/views/statuses/_detailed_status.html.haml
app/views/statuses/_simple_status.html.haml

index 0b7be7afdb7a1333a0cb2126f94fb1edffe95006..a8fd2936cfabce040a816545f63fef1fd17095ba 100644 (file)
     &__avatar {
       left: 15px;
       top: 17px;
+
+      .account__avatar {
+        width: 48px;
+        height: 48px;
+      }
     }
 
     &__content {
index 07e06100aa9b3ee9e03705f57afa29c4d4957fde..565c4ed593e03dee987abd742f1db6ad6b991144 100644 (file)
@@ -27,7 +27,7 @@
 
               .avatar-stack
                 - @instance_presenter.sample_accounts.each do |account|
-                  = image_tag current_account&.user&.setting_auto_play_gif ? account.avatar_original_url : account.avatar_static_url, width: 48, height: 48, alt: '', class: 'account__avatar'
+                  = image_tag current_account&.user&.setting_auto_play_gif ? account.avatar_original_url : account.avatar_static_url, alt: '', class: 'account__avatar'
 
         - if Setting.timeline_preview
           .directory__tag
index bdc1e9d5a324a055a0277d2ee97955acc8e29fce..7975ee9997b2086d496e78340b7be499a0daa2c6 100644 (file)
@@ -25,7 +25,7 @@
         .directory__card__bar
           = link_to TagManager.instance.url_for(account), class: 'directory__card__bar__name' do
             .avatar
-              = image_tag account.avatar.url, alt: '', width: 48, height: 48, class: 'u-photo'
+              = image_tag account.avatar.url, alt: '', class: 'u-photo'
 
             .display-name
               %bdi
index 544b9233080e4a6ba42b627c8323ffe417c2e651..33b81c748ae3e94e6ffe8fd383fb2f1067c2ff6a 100644 (file)
@@ -3,9 +3,9 @@
     = link_to ActivityPub::TagManager.instance.url_for(status.account), class: 'detailed-status__display-name u-url', target: stream_link_target, rel: 'noopener' do
       .detailed-status__display-avatar
         - if current_account&.user&.setting_auto_play_gif || autoplay
-          = image_tag status.account.avatar_original_url, width: 48, height: 48, alt: '', class: 'account__avatar u-photo'
+          = image_tag status.account.avatar_original_url, alt: '', class: 'account__avatar u-photo'
         - else
-          = image_tag status.account.avatar_static_url, width: 48, height: 48, alt: '', class: 'account__avatar u-photo'
+          = image_tag status.account.avatar_static_url, alt: '', class: 'account__avatar u-photo'
       %span.display-name
         %bdi
           %strong.display-name__html.p-name.emojify= display_name(status.account, custom_emojify: true, autoplay: autoplay)
index ff09ab2eec297e082b555619c3ecec0b5844212b..d7853eca9c7e3a52d9c1305d4ee61d8c106fe6cf 100644 (file)
@@ -9,9 +9,9 @@
         .status__avatar
           %div
             - if current_account&.user&.setting_auto_play_gif || autoplay
-              = image_tag status.account.avatar_original_url, width: 48, height: 48, alt: '', class: 'u-photo account__avatar'
+              = image_tag status.account.avatar_original_url, alt: '', class: 'u-photo account__avatar'
             - else
-              = image_tag status.account.avatar_static_url, width: 48, height: 48, alt: '', class: 'u-photo account__avatar'
+              = image_tag status.account.avatar_static_url, alt: '', class: 'u-photo account__avatar'
         %span.display-name
           %bdi
             %strong.display-name__html.p-name.emojify= display_name(status.account, custom_emojify: true, autoplay: autoplay)