Sha256: 0575f3e7d8a32c9ac6af298e35f1a725251ce21575097e93135ac55b7b6e2262

Contents?: true

Size: 578 Bytes

Versions: 43

Compression:

Stored size: 578 Bytes

Contents

proc_name = "headline-logo"

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

match("**", HeadLine) do |heads|

  loader = ImageLoader.new(find_file(@headline_logo_image))

  heads.each do |head|
    head.delete_pre_draw_proc_by_name(proc_name)
    head.delete_post_draw_proc_by_name(proc_name)

    head.add_pre_draw_proc(proc_name) do |canvas, x, y, w, h, simulation|
      if simulation
        loader.resize(nil, head.height)
      else
        loader.draw(canvas, x + w - loader.width, y)
      end
      [x, y, w, h]
    end
  end
end

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
rabbit-3.0.3 lib/rabbit/theme/headline-logo/headline-logo.rb
rabbit-3.0.2 lib/rabbit/theme/headline-logo/headline-logo.rb
rabbit-3.0.1 lib/rabbit/theme/headline-logo/headline-logo.rb
rabbit-3.0.0 lib/rabbit/theme/headline-logo/headline-logo.rb
rabbit-2.2.1 lib/rabbit/theme/headline-logo/headline-logo.rb
rabbit-2.2.0 lib/rabbit/theme/headline-logo/headline-logo.rb
rabbit-2.1.9 lib/rabbit/theme/headline-logo/headline-logo.rb
rabbit-2.1.8 lib/rabbit/theme/headline-logo/headline-logo.rb
rabbit-2.1.7 lib/rabbit/theme/headline-logo/headline-logo.rb
rabbit-2.1.6 lib/rabbit/theme/headline-logo/headline-logo.rb
rabbit-2.1.5 lib/rabbit/theme/headline-logo/headline-logo.rb
rabbit-2.1.4 lib/rabbit/theme/headline-logo/headline-logo.rb
rabbit-2.1.3 lib/rabbit/theme/headline-logo/headline-logo.rb
rabbit-2.1.2 lib/rabbit/theme/headline-logo/headline-logo.rb
rabbit-2.1.1 lib/rabbit/theme/headline-logo/headline-logo.rb
rabbit-2.1.0 lib/rabbit/theme/headline-logo/headline-logo.rb
rabbit-2.0.9 lib/rabbit/theme/headline-logo/headline-logo.rb
rabbit-2.0.8 lib/rabbit/theme/headline-logo/headline-logo.rb
rabbit-2.0.7 lib/rabbit/theme/headline-logo/headline-logo.rb
rabbit-2.0.6 lib/rabbit/theme/headline-logo/headline-logo.rb