module RailsGallery::ViewHelper::Responsive

Public Instance Methods

respgal_image(photo, options = {}) click to toggle source
# File lib/rails-gallery/view_helper/responsive.rb, line 4
def respgal_image photo, options = {}
  options.merge! :alt => photo.alt
  options.merge! :"data-large" => photo.path, :"data-description" => photo.title
  return image_tag photo.thumb, options unless options.delete :wrap
  
  content_tag :li do
    content_tag :a, href: '#' do
      image_tag(photo.thumb, options)
    end
  end          
end
Also aliased as: responsive_gallery_image
respgal_imageset(photo, options = {}) click to toggle source
# File lib/rails-gallery/view_helper/responsive.rb, line 16
def respgal_imageset photo, options = {}
  options.merge! :alt => photo.alt
  options.merge! :"data-large" => photo.path, :"data-description" => photo.title
  options.merge! :srcset => srcset if photo.srcset?
  return imageset_tag photo.thumb, options unless options.delete :wrap
  
  content_tag :li do
    content_tag :a, href: '#' do
      imageset_tag(photo.thumb, options)
    end
  end
end
Also aliased as: responsive_gallery_imageset