mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-01-19 22:27:59 +01:00
add size adjust css class
This commit is contained in:
parent
64ff8cfa28
commit
4f0b549469
1 changed files with 11 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
|||
elixir:
|
||||
size =
|
||||
size_class =
|
||||
case @size do
|
||||
:thumb ->
|
||||
"media-box__content--large"
|
||||
|
@ -9,8 +9,16 @@ elixir:
|
|||
"media-box__content--small"
|
||||
end
|
||||
|
||||
header_class =
|
||||
case @size do
|
||||
:thumb_small ->
|
||||
"media-box__header--small"
|
||||
_ ->
|
||||
nil
|
||||
end
|
||||
|
||||
.media-box data-image-id=@image.id
|
||||
.media-box__header.media-box__header--link-row data-image-id=@image.id
|
||||
.media-box__header.media-box__header--link-row class=header_class data-image-id=@image.id
|
||||
a.interaction--fave href="#" rel="nofollow" data-image-id=@image.id
|
||||
span.fave-span title='Fave!'
|
||||
i.fa.fa-star
|
||||
|
@ -25,5 +33,5 @@ elixir:
|
|||
span.comments_count data-image-id=@image.id = @image.comments_count
|
||||
a.interaction--hide href="#" rel="nofollow" data-image-id=@image.id
|
||||
i.fa.fa-eye-slash title='Hide'
|
||||
.media-box__content.flex.flex--centered.flex--center-distributed class=size
|
||||
.media-box__content.flex.flex--centered.flex--center-distributed class=size_class
|
||||
= render PhilomenaWeb.ImageView, "_image_container.html", image: @image, size: @size
|
Loading…
Reference in a new issue