Use appropriate image sizes and lazy loading in notifications
This commit is contained in:
parent
fedfbb1333
commit
8d1bd30615
|
@ -3,9 +3,9 @@
|
|||
%i.fa.fa-2x.fa-fw.fa-exclamation
|
||||
.media-body
|
||||
.notification__heading
|
||||
%img.avatar-xs{ src: notification.target.user.profile_picture.url(:small) }
|
||||
= t(".heading_html",
|
||||
user: user_screen_name(notification.target.user),
|
||||
%img.avatar-xs{ src: notification.target.user.profile_picture.url(:small), loading: :lazy }
|
||||
= t(".heading_html",
|
||||
user: user_screen_name(notification.target.user),
|
||||
question: link_to(t(".link_text"), answer_path(username: notification.target.user.screen_name, id: notification.target.id)),
|
||||
time: time_tooltip(notification.target))
|
||||
.list-group
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
%i.fa.fa-2x.fa-fw.fa-comments
|
||||
.media-body
|
||||
.notification__heading
|
||||
%img.avatar-xs{ src: notification.target.user.profile_picture.url(:small) }
|
||||
%img.avatar-xs{ src: notification.target.user.profile_picture.url(:small), loading: :lazy }
|
||||
- if notification.target.answer.user == current_user
|
||||
= t(".heading_html",
|
||||
user: user_screen_name(notification.target.user),
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
.media.notification
|
||||
.notification__icon
|
||||
%img.avatar-sm{ src: notification.target.source.profile_picture.url(:small) }
|
||||
%img.avatar-sm{ src: notification.target.source.profile_picture.url(:small), loading: :lazy }
|
||||
.media-body
|
||||
%h6.media-heading.notification__user
|
||||
= user_screen_name notification.target.source
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
%i.fa.fa-2x.fa-fw.fa-smile-o
|
||||
.media-body
|
||||
.notification__heading
|
||||
%img.avatar-xs{ src: notification.target.user.profile_picture.url(:small) }
|
||||
%img.avatar-xs{ src: notification.target.user.profile_picture.url(:small), loading: :lazy }
|
||||
- if notification.target.parent_type == 'Answer'
|
||||
= t(".heading_html",
|
||||
user: user_screen_name(notification.target.user),
|
||||
|
|
Loading…
Reference in New Issue