Fix some account avatars on public pages having incorrect size (#13692)

* Fix some account avatars on public pages having incorrect size

* Remove outdated and overridden width and height attributes

* Remove more hardcoded width/height attributes
remotes/1727458204337373841/tmp_refs/heads/signup-info-prompt
ThibG 2020-05-13 21:20:34 +02:00 committed by GitHub
parent be1e2594fb
commit 48503384d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 11 additions and 6 deletions

View File

@ -149,6 +149,11 @@
&__avatar { &__avatar {
left: 15px; left: 15px;
top: 17px; top: 17px;
.account__avatar {
width: 48px;
height: 48px;
}
} }
&__content { &__content {

View File

@ -27,7 +27,7 @@
.avatar-stack .avatar-stack
- @instance_presenter.sample_accounts.each do |account| - @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 - if Setting.timeline_preview
.directory__tag .directory__tag

View File

@ -25,7 +25,7 @@
.directory__card__bar .directory__card__bar
= link_to TagManager.instance.url_for(account), class: 'directory__card__bar__name' do = link_to TagManager.instance.url_for(account), class: 'directory__card__bar__name' do
.avatar .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 .display-name
%bdi %bdi

View 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 = 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 .detailed-status__display-avatar
- if current_account&.user&.setting_auto_play_gif || autoplay - 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 - 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 %span.display-name
%bdi %bdi
%strong.display-name__html.p-name.emojify= display_name(status.account, custom_emojify: true, autoplay: autoplay) %strong.display-name__html.p-name.emojify= display_name(status.account, custom_emojify: true, autoplay: autoplay)

View File

@ -9,9 +9,9 @@
.status__avatar .status__avatar
%div %div
- if current_account&.user&.setting_auto_play_gif || autoplay - 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 - 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 %span.display-name
%bdi %bdi
%strong.display-name__html.p-name.emojify= display_name(status.account, custom_emojify: true, autoplay: autoplay) %strong.display-name__html.p-name.emojify= display_name(status.account, custom_emojify: true, autoplay: autoplay)