Module: Maglove::Widgets::RawHtml::Helpers

Defined in:
lib/maglove/widgets/raw_html.rb

Instance Method Summary collapse

Instance Method Details

#raw_html_widget(options = {}, &block) ⇒ Object



16
17
18
19
20
21
22
# File 'lib/maglove/widgets/raw_html.rb', line 16

def raw_html_widget(options = {}, &block)
  widget_block(Widgets::RawHtml.new(options)) do |widget|
    haml_tag :div, class: "iframe-container", style: style_string(widget.options, :margin, :padding) do
      haml_tag :iframe, src: widget.options[:src], style: widget.options[:css]
    end
  end
end