forked from OpenNeo/impress
Use hi-res pet images in face picker for new item previews
This commit is contained in:
parent
9f44fd47e4
commit
a88fc14bd7
2 changed files with 9 additions and 1 deletions
|
@ -165,6 +165,10 @@ body.items-show
|
||||||
display: block
|
display: block
|
||||||
position: relative
|
position: relative
|
||||||
|
|
||||||
|
img
|
||||||
|
width: 50px
|
||||||
|
height: 50px
|
||||||
|
|
||||||
input[type=radio]
|
input[type=radio]
|
||||||
position: absolute
|
position: absolute
|
||||||
left: -10000px
|
left: -10000px
|
||||||
|
|
|
@ -246,7 +246,11 @@ module ItemsHelper
|
||||||
|
|
||||||
def pet_type_image(pet_type, emotion, size, **options)
|
def pet_type_image(pet_type, emotion, size, **options)
|
||||||
src = pet_type_image_url(pet_type, emotion:, size:)
|
src = pet_type_image_url(pet_type, emotion:, size:)
|
||||||
image_tag(src, **options)
|
srcset = if size == :face
|
||||||
|
[[pet_type_image_url(pet_type, emotion:, size: :face_2x), "2x"]]
|
||||||
|
end
|
||||||
|
|
||||||
|
image_tag(src, srcset:, **options)
|
||||||
end
|
end
|
||||||
|
|
||||||
def item_header_user_lists_form_state
|
def item_header_user_lists_form_state
|
||||||
|
|
Loading…
Reference in a new issue