Class: Maglove::Widget::LegacyContainer

Inherits:
V1
  • Object
show all
Defined in:
lib/maglove/widget/container.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



29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# File 'lib/maglove/widget/container.rb', line 29

def defaults
  {
    animate: "none",
    image_source: false,
    image_position: "center_center",
    image_size: "cover",
    parallax_effect: "none",
    parallax_speed: 0.6,
    background_color: nil,
    bg_color: nil,
    opacity: nil,
    border_radius: nil,
    border_width: nil,
    border_color: "#111111",
    border_style: nil,
    style: "default",
    padding_top: nil,
    padding_right: nil,
    padding_bottom: nil,
    padding_left: nil,
    alignment: "center",
    min_height: nil,
    max_height: nil,
    max_width: nil,
    margin_top: nil,
    margin_right: nil,
    margin_bottom: nil,
    margin_left: nil,
    overflow_y: nil
  }
end

#identifierObject



25
26
27
# File 'lib/maglove/widget/container.rb', line 25

def identifier
  "container"
end

#render(&block) ⇒ Object



61
62
63
64
65
66
67
68
69
70
# File 'lib/maglove/widget/container.rb', line 61

def render(&block)
  super do
    haml_tag :section, container_options do
      haml_tag :div, image_options do
        yield self if block_given?
        drop_container
      end
    end
  end
end