Sha256: d18c021f638e9d024c96a1ac4f1b54562376d6bddf0b5143d03084aee3b39889
Contents?: true
Size: 918 Bytes
Versions: 36
Compression:
Stored size: 918 Bytes
Contents
module Spotlight ## # JCrop options helpers module JcropHelper def default_masthead_jcrop_options { croppable: true, selector: 'masthead_image', bg_color: 'black', bg_opacity: '.4', aspect_ratio: 10, box_width: '600', initial_set_select: '[0, 0, 1800, 180]' } end def default_thumbnail_jcrop_options w, h = Spotlight::Engine.config.featured_image_thumb_size { croppable: true, selector: 'featuredimage_image', bg_color: 'black', bg_opacity: '.4', box_width: '600', aspect_ratio: w.to_f / h.to_f, initial_set_select: '[0, 0, 100000, 100000]' } end def default_site_thumbnail_jcrop_options w, h = Spotlight::Engine.config.featured_image_square_size default_thumbnail_jcrop_options.merge(aspect_ratio: w.to_f / h.to_f) end end end
Version data entries
36 entries across 36 versions & 1 rubygems