return :large
end
-def item_to_img(item, rep: :large, alt: nil, caption: nil)
- unless item
- return "[image not found]"
- end
+def gallery_img(item, rep: :large, alt: nil, caption: nil)
+ return "[image not found]" unless item
alt ||= item[:title]
caption ||= alt
b = Nokogiri::XML::Builder.new do |xml|
xml.a(:href => item_uri(item, rep: :info)) {
- xml.img(attrs)
+ xml.img(attrs, "generate-gallery" => "generate-gallery")
unless caption.empty?
xml << " ⁠"
- xml.small {
- xml << caption
- }
+ xml.small { xml << caption }
end
}
end