class Maglove::Widget::LegacyYoutube

Public Instance Methods

defaults() click to toggle source
# File lib/maglove/widget/youtube.rb, line 22
def defaults
  {
    youtube_id: "LFYNP40vfmE",
    width: "800",
    height: "600"
  }
end
identifier() click to toggle source
# File lib/maglove/widget/youtube.rb, line 18
def identifier
  "youtube"
end
render(&block) click to toggle source
Calls superclass method Maglove::Widget::V1#render
# File lib/maglove/widget/youtube.rb, line 30
def render(&block)
  super do
    haml_tag :div, class: "flex-video widescreen", style: style_string(options, :margin, :padding) do
      haml_tag :iframe, src: "https://www.youtube.com/embed/#{options[:youtube_id]}", type: "text/html", style: "max-width: 100%; position: absolute; top: 0px; left: 0px; width: 100%; height: 100%;", allowfullscreen: "", frameborder: "0", webkitallowfullscreen: "", mozallowfullscreen: ""
    end
  end
end