Sha256: fdb228ed821b5d588214d8807f663c108ef9ed24b7bb2cad3b3bc048e3ec1338

Contents?: true

Size: 814 Bytes

Versions: 3

Compression:

Stored size: 814 Bytes

Contents

if @title_background_image.nil?
  theme_exit("must specify @title_background_image!!")
end

@title_background_image_properties ||= {}
default_title_backgroud_image_properties = {
  "as_large_as_possible" => true,
  "align" => "center",
  "assign_box" => false,
  "keep_ratio" => true,
}

match(TitleSlide) do |slides|
  slides.each do |slide|
    image_properties = default_title_backgroud_image_properties.dup
    @title_background_image_properties.each do |key, value|
      value = value.to_s if value.is_a?(Symbol)
      image_properties[key.to_s.gsub(/-/, "_")] = value
    end
    properties = {
      :file_name => find_file(@title_background_image),
      :proc_name => "title-background-image",
      :properties => image_properties,
    }
    apply_background_image_property(slide, properties)
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rabbit-0.9.2 lib/rabbit/theme/title-background-image/title-background-image.rb
rabbit-0.9.1 lib/rabbit/theme/title-background-image/title-background-image.rb
rabbit-0.9.0 lib/rabbit/theme/title-background-image/title-background-image.rb