Use appropriate image sizes and lazy loading in notifications
This commit is contained in:
parent
fedfbb1333
commit
8d1bd30615
|
@ -3,7 +3,7 @@
|
||||||
%i.fa.fa-2x.fa-fw.fa-exclamation
|
%i.fa.fa-2x.fa-fw.fa-exclamation
|
||||||
.media-body
|
.media-body
|
||||||
.notification__heading
|
.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 }
|
||||||
= t(".heading_html",
|
= t(".heading_html",
|
||||||
user: user_screen_name(notification.target.user),
|
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)),
|
question: link_to(t(".link_text"), answer_path(username: notification.target.user.screen_name, id: notification.target.id)),
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
%i.fa.fa-2x.fa-fw.fa-comments
|
%i.fa.fa-2x.fa-fw.fa-comments
|
||||||
.media-body
|
.media-body
|
||||||
.notification__heading
|
.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
|
- if notification.target.answer.user == current_user
|
||||||
= t(".heading_html",
|
= t(".heading_html",
|
||||||
user: user_screen_name(notification.target.user),
|
user: user_screen_name(notification.target.user),
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
.media.notification
|
.media.notification
|
||||||
.notification__icon
|
.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
|
.media-body
|
||||||
%h6.media-heading.notification__user
|
%h6.media-heading.notification__user
|
||||||
= user_screen_name notification.target.source
|
= user_screen_name notification.target.source
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
%i.fa.fa-2x.fa-fw.fa-smile-o
|
%i.fa.fa-2x.fa-fw.fa-smile-o
|
||||||
.media-body
|
.media-body
|
||||||
.notification__heading
|
.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'
|
- if notification.target.parent_type == 'Answer'
|
||||||
= t(".heading_html",
|
= t(".heading_html",
|
||||||
user: user_screen_name(notification.target.user),
|
user: user_screen_name(notification.target.user),
|
||||||
|
|
Loading…
Reference in New Issue