mirror of
https://github.com/Retrospring/retrospring.git
synced 2025-01-19 07:16:03 +01:00
Use appropriate image sizes and lazy loading in answerbox
This commit is contained in:
parent
aedc0adc2c
commit
99b523bf9c
4 changed files with 4 additions and 4 deletions
|
@ -8,7 +8,7 @@
|
|||
.media
|
||||
.pull-left
|
||||
%a{ href: user_path(comment.user) }
|
||||
%img.comment__user-avatar.avatar-sm{ src: comment.user.profile_picture.url(:medium) }
|
||||
%img.comment__user-avatar.avatar-sm{ src: comment.user.profile_picture.url(:small), loading: :lazy }
|
||||
.media-body
|
||||
%h6.media-heading.comment__user
|
||||
= user_screen_name comment.user
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
.media
|
||||
- unless a.question.author_is_anonymous
|
||||
%a.pull-left{ href: user_path(a.question.user) }
|
||||
%img.answerbox__question-user-avatar.avatar-md{ src: a.question.user.profile_picture.url(:medium) }
|
||||
%img.answerbox__question-user-avatar.avatar-md{ src: a.question.user.profile_picture.url(:small), loading: :lazy }
|
||||
.media-body
|
||||
- if user_signed_in?
|
||||
.pull-right
|
||||
|
|
|
@ -9,4 +9,4 @@
|
|||
%a{ href: user_path(smile.user),
|
||||
title: user_screen_name(smile.user, url: false),
|
||||
data: { toggle: :tooltip, placement: :top, smile_id: smile.id } }
|
||||
%img.avatar-xs{ src: smile.user.profile_picture.url(:medium) }
|
||||
%img.avatar-xs{ src: smile.user.profile_picture.url(:small), loading: :lazy }
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
.media
|
||||
.pull-left
|
||||
%a{ href: user_path(a.user) }
|
||||
%img.answerbox__answer-user-avatar.avatar-sm{ src: a.user.profile_picture.url(:medium) }
|
||||
%img.answerbox__answer-user-avatar.avatar-sm{ src: a.user.profile_picture.url(:small), loading: :lazy }
|
||||
.media-body
|
||||
%h6.media-heading.answerbox__answer-user
|
||||
= raw t(".answered", hide: hidespan(t(".hide"), "d-none d-sm-inline"), user: user_screen_name(a.user))
|
||||
|
|
Loading…
Reference in a new issue