forked from OpenNeo/impress
Use higher-res outfit thumbnails if the device has at least 2x DPI
This commit is contained in:
parent
5d0848bf28
commit
66f20747a9
2 changed files with 8 additions and 1 deletions
|
@ -48,6 +48,13 @@ module OutfitsHelper
|
|||
content_tag :li, :class => class_name, &block
|
||||
end
|
||||
|
||||
def outfit_image_tag(outfit)
|
||||
image_tag(
|
||||
outfit.image.small.url,
|
||||
srcset: [[outfit.image.medium.url, "2x"]],
|
||||
)
|
||||
end
|
||||
|
||||
def pet_attribute_select(name, collection, value=nil)
|
||||
options = options_from_collection_for_select(collection, :id, :human_name, value)
|
||||
select_tag name, options, id: nil, class: name
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
= outfit_li_for(outfit) do
|
||||
- if outfit.image?
|
||||
= link_to image_tag(outfit.image.small.url), outfit
|
||||
= link_to outfit_image_tag(outfit), outfit
|
||||
|
||||
%header
|
||||
.outfit-star
|
||||
|
|
Loading…
Reference in a new issue