37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
# File 'lib/maglove/widgets/image.rb', line 37
def image_widget(options = {})
widget_block(Widgets::Image.new(options)) do |widget|
haml_tag :div, class: widget.image_classes, style: "min-width: #{widget.options[:min_width]}; max-width: #{widget.options[:max_width]}; #{style_string(widget.options, :margin, :padding)}" do
if widget.
haml_tag :i, class: "popup fa fa-lg fa-#{widget.options[:tooltip_icon]}"
haml_tag :div, class: "popup-box", style: "font-size: #{widget.options[:tooltip_text_size]}, text-align: #{widget.options[:tooltip_text_alignment]};" do
haml_concat(widget.options[:tooltip_text])
end
end
haml_tag :img, class: "image #{widget.options[:style]} #{widget.options[:magnify] ? 'magnific-image' : ''}", src: widget.options[:source]
haml_tag :div, class: "image-drop-target"
end
end
end
|