Sha256: 6eaa180cb0dba4738d882c1dca5d2cdc94573f5ac535476fb84884050c76bc5b
Contents?: true
Size: 670 Bytes
Versions: 11
Compression:
Stored size: 670 Bytes
Contents
module Pageflow # @api private class ImageFileCssBackgroundImageUrls def call(image_file, entry:) { default: { desktop: image_file.ready? ? image_file.attachment.url(desktop_style(entry)) : '', mobile: image_file.ready? ? image_file.attachment.url(:medium) : '' }, panorama: { desktop: image_file.ready? ? image_file.attachment.url(:panorama_large) : '', mobile: image_file.ready? ? image_file.attachment.url(:panorama_medium) : '' } } end private def desktop_style(entry) entry.feature_state('highdef_background_images') ? :ultra : :large end end end
Version data entries
11 entries across 11 versions & 1 rubygems