Sha256: 1ea73e3238fa4b75a93be35d0056f13b606a53915d33e2c4dd31e03a045d382b

Contents?: true

Size: 689 Bytes

Versions: 3

Compression:

Stored size: 689 Bytes

Contents

module Maglove
  module Widgets
    class Youtube < Base
      def identifier
        "youtube"
      end

      def defaults
        {
          youtube_id: "LFYNP40vfmE",
          width: "800",
          height: "600"
        }
      end

      def template(&block)
        haml_tag :div, class: "flex-video widescreen", style: style_string(options) 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
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
maglove-widgets-2.0.5 lib/maglove/widgets/youtube.rb
maglove-widgets-2.0.4 lib/maglove/widgets/youtube.rb
maglove-widgets-2.0.3 lib/maglove/widgets/youtube.rb