Class: Maglove::Widget::Slider

Inherits:
V2
  • 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 V2

#render, #widget_options

Methods inherited from Base

#initialize, #render, #style_string, #widget_options

Constructor Details

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

Instance Method Details

#defaultsObject



8
9
10
11
12
13
14
15
16
17
# File 'lib/maglove/widget/slider.rb', line 8

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

#identifierObject



4
5
6
# File 'lib/maglove/widget/slider.rb', line 4

def identifier
  "slider"
end

#slide(&block) ⇒ Object



19
20
21
22
23
# File 'lib/maglove/widget/slider.rb', line 19

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