Class: Maglove::Widget::LegacySlider

Inherits:
V1
  • Object
show all
Defined in:
lib/maglove/widget/slider.rb

Instance Attribute Summary

Attributes inherited from Base

#options, #scope

Instance Method Summary collapse

Methods inherited from V1

#drop_container, #widget_options

Methods inherited from Base

#initialize, #style_string, #widget_options

Constructor Details

This class inherits a constructor from Maglove::Widget::Base

Instance Method Details

#defaultsObject



31
32
33
34
35
36
37
38
39
40
41
# File 'lib/maglove/widget/slider.rb', line 31

def defaults
  {
    slides: "3",
    height: "auto",
    margin_bottom: "0px",
    background_color: "#EEEEEE",
    buttons_position: "bottom",
    autoplay: "true",
    autoplay_timeout: "3000"
  }
end

#identifierObject



27
28
29
# File 'lib/maglove/widget/slider.rb', line 27

def identifier
  "slider"
end

#render(&block) ⇒ Object



43
44
45
46
47
48
49
# File 'lib/maglove/widget/slider.rb', line 43

def render(&block)
  super do
    haml_tag :div, slider_options do
      yield self if block_given?
    end
  end
end

#slide(&block) ⇒ Object



51
52
53
54
55
56
# File 'lib/maglove/widget/slider.rb', line 51

def slide(&block)
  haml_tag :div, class: "item" do
    yield self if block_given?
    drop_container
  end
end