mirror of
https://github.com/Retrospring/retrospring.git
synced 2025-03-31 04:02:12 +02: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
|
.media
|
||||||
.pull-left
|
.pull-left
|
||||||
%a{ href: user_path(comment.user) }
|
%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
|
.media-body
|
||||||
%h6.media-heading.comment__user
|
%h6.media-heading.comment__user
|
||||||
= user_screen_name comment.user
|
= user_screen_name comment.user
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
.media
|
.media
|
||||||
- unless a.question.author_is_anonymous
|
- unless a.question.author_is_anonymous
|
||||||
%a.pull-left{ href: user_path(a.question.user) }
|
%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
|
.media-body
|
||||||
- if user_signed_in?
|
- if user_signed_in?
|
||||||
.pull-right
|
.pull-right
|
||||||
|
|
|
@ -9,4 +9,4 @@
|
||||||
%a{ href: user_path(smile.user),
|
%a{ href: user_path(smile.user),
|
||||||
title: user_screen_name(smile.user, url: false),
|
title: user_screen_name(smile.user, url: false),
|
||||||
data: { toggle: :tooltip, placement: :top, smile_id: smile.id } }
|
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
|
.media
|
||||||
.pull-left
|
.pull-left
|
||||||
%a{ href: user_path(a.user) }
|
%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
|
.media-body
|
||||||
%h6.media-heading.answerbox__answer-user
|
%h6.media-heading.answerbox__answer-user
|
||||||
= raw t(".answered", hide: hidespan(t(".hide"), "d-none d-sm-inline"), user: user_screen_name(a.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