maglove-engine 2.0.10 → 2.0.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 39200244c164c39a252df7cf91240b79b13939cf
4
- data.tar.gz: d304cc2fb57d8bbcb535bbe6f4f975d5cfda8241
3
+ metadata.gz: f43b7be43ac6028cd4b2f505dfeba7ed6b2790a4
4
+ data.tar.gz: 559bfccca0e8f8657db4195dbad3f0d19e929083
5
5
  SHA512:
6
- metadata.gz: 940f678ba5e9f7b219085f748d6cb6a0c28288c6918fc29d8c81057c24b803a4e80d03fa46a19d99015f029d50782013580e287436245064d4511b6c82f4011d
7
- data.tar.gz: '008e36970409da3dfd4a4cafc144abb6caf92f696a8eeeaed1cfd0726acd89486cca642b3e88b44c8f322712c7d08142a9b59cba25ffd8bf22e5d912698a07ed'
6
+ metadata.gz: b35881d7a2b73f36d93323a5055e0303ff1e6d9d70e3c1d036aded939210efd0235a9649e1e0c340110990984e91da742e19cb7025abeecffb7ed63351d276dd
7
+ data.tar.gz: 9277651210e5628d22adceb874dea7bb8e3ae2ef0fa82aaee3afc60c1f189b1b976e228c17987c71444e0c483c65b96915034bfba79371dec24124188780f96a
@@ -1,5 +1,5 @@
1
1
  module Maglove
2
2
  module Engine
3
- VERSION = "2.0.10"
3
+ VERSION = "2.0.11"
4
4
  end
5
5
  end
@@ -0,0 +1,51 @@
1
+ module Maglove
2
+ module Widget
3
+ class Card < V2
4
+ def identifier
5
+ "card"
6
+ end
7
+ end
8
+
9
+ class LegacyCard < V1
10
+ def identifier
11
+ "card"
12
+ end
13
+
14
+ def defaults
15
+ {
16
+ background_color: "#fff",
17
+ margin_bottom: "10px",
18
+ border_radius: "2px",
19
+ title: "Card Title",
20
+ subtitle: "This is the card subtitle",
21
+ title_heading_type: "h2",
22
+ subtitle_heading_type: "h4"
23
+ }
24
+ end
25
+
26
+ def render(&block)
27
+ super do
28
+ haml_tag :div, card_options do
29
+ haml_tag options[:title_heading_type], class: "card-title" do
30
+ haml_concat(options[:"title"])
31
+ end
32
+ haml_tag options[:subtitle_heading_type], class: "card-subtitle" do
33
+ haml_concat(options[:"subtitle"])
34
+ end
35
+ haml_tag :hr, class: "solid dark-maroon"
36
+ yield self if block_given?
37
+ end
38
+ end
39
+ end
40
+
41
+ private
42
+
43
+ def card_options
44
+ {
45
+ class: "card",
46
+ style: style_string(options, :margin_bottom, :background_color, :border_radius)
47
+ }
48
+ end
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,45 @@
1
+ module Maglove
2
+ module Widget
3
+ class Property < V2
4
+ def identifier
5
+ "property"
6
+ end
7
+ end
8
+
9
+ class LegacyProperty < V1
10
+ def identifier
11
+ "property"
12
+ end
13
+
14
+ def defaults
15
+ {
16
+ label: "Label",
17
+ value: "Value"
18
+ }
19
+ end
20
+
21
+ def render(&block)
22
+ super do
23
+ haml_tag :div, property_options do
24
+ haml_tag :span, class:"property-label" do
25
+ haml_concat(options[:label])
26
+ end
27
+ haml_tag :span, class:"property-value" do
28
+ haml_concat(options[:value])
29
+ end
30
+ haml_tag :span, class: "clearfix"
31
+ end
32
+ end
33
+ end
34
+
35
+ private
36
+
37
+ def property_options
38
+ {
39
+ class: "property-container",
40
+ style: style_string(options, :margin_bottom)
41
+ }
42
+ end
43
+ end
44
+ end
45
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: maglove-engine
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.10
4
+ version: 2.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tobias Strebitzer
@@ -143,6 +143,7 @@ files:
143
143
  - lib/maglove/engine/version.rb
144
144
  - lib/maglove/widget.rb
145
145
  - lib/maglove/widget/button.rb
146
+ - lib/maglove/widget/card.rb
146
147
  - lib/maglove/widget/columns.rb
147
148
  - lib/maglove/widget/container.rb
148
149
  - lib/maglove/widget/heading.rb
@@ -151,6 +152,7 @@ files:
151
152
  - lib/maglove/widget/listitem.rb
152
153
  - lib/maglove/widget/page.rb
153
154
  - lib/maglove/widget/paragraph.rb
155
+ - lib/maglove/widget/property.rb
154
156
  - lib/maglove/widget/raw_html.rb
155
157
  - lib/maglove/widget/scrollable_image.rb
156
158
  - lib/maglove/widget/slider.rb