maglove-widgets 1.1.4 → 1.1.5

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: 162b24807ca4b9e465826ca0c456453e5ff1f057
4
- data.tar.gz: e9962fe7c600b162ff949cd9739574c0aea546a4
3
+ metadata.gz: 64b2ebe2db8dbf4664bc3e506278b2013d84436d
4
+ data.tar.gz: b11a0491624192125f684821683e80e6dcd250e7
5
5
  SHA512:
6
- metadata.gz: affd28cbb5c8978be9cdb2e13237f2d7ac67df66005260345911c54e45b23ef6b6e037b76bb7c79abb1f426ae0e490b9a2d0e7ce6c24b76cc130998cb643d893
7
- data.tar.gz: 555c79bc97a6420e46e8c3ea6de6e05fde5d49c743d2e0a50db81a302683b16fdbcc174688bbf445b362b9c0bb80f410935230475fb2fddba5289c107642bd44
6
+ metadata.gz: e77088bfb7227b1c27bb5acb4a2e5f136a25655fa43433615e6de7baf8923658d03b04435a406f83fd50c6b2a970feb2ab65b12fa82e1535a3f2920b08b0a402
7
+ data.tar.gz: 84962b295a34d08c4ffdea531be34c0b8c72a7b4e213c14c4f53927f454ac6f03140748c55b2b6358a1004ae9478c6f688e789026c29068fca10b73f6be4d548
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- maglove-widgets (1.1.4)
4
+ maglove-widgets (1.1.5)
5
5
  bundler (~> 1.14)
6
6
  hamloft (~> 0.2)
7
7
 
@@ -8,6 +8,7 @@ require "maglove/widgets/horizontal_rule"
8
8
  require "maglove/widgets/image"
9
9
  require "maglove/widgets/listitem"
10
10
  require "maglove/widgets/paragraph"
11
+ require "maglove/widgets/raw_html"
11
12
  require "maglove/widgets/scrollable_image"
12
13
  require "maglove/widgets/slider"
13
14
  require "maglove/widgets/video"
@@ -25,6 +26,7 @@ module Maglove
25
26
  Hamloft.register_widget(Image)
26
27
  Hamloft.register_widget(Listitem)
27
28
  Hamloft.register_widget(Paragraph)
29
+ Hamloft.register_widget(RawHtml)
28
30
  Hamloft.register_widget(ScrollableImage)
29
31
  Hamloft.register_widget(Slider)
30
32
  Hamloft.register_widget(Video)
@@ -17,6 +17,7 @@ module Maglove
17
17
  opacity: "",
18
18
  border_radius: "",
19
19
  border_width: "",
20
+ border_color: "#111111",
20
21
  border_style: "",
21
22
  style: "default",
22
23
  padding_top: "",
@@ -55,7 +56,7 @@ module Maglove
55
56
  end
56
57
 
57
58
  def container_styles
58
- style_string @options, :opacity, :border, :opacity, :border_radius, :border_width, :border_style, :margin do |sb|
59
+ style_string @options, :opacity, :border, :opacity, :border_radius, :border_width, :border_color, :border_style, :margin do |sb|
59
60
  sb.add(:background_color, @options[:background_color] == "custom" ? @options[:bg_color] : nil)
60
61
  if @options[:background_color] == "overlay"
61
62
  sb.add(:background_image, @options[:image_source], "linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url(<%= value %>)")
@@ -9,6 +9,7 @@ module Maglove
9
9
  {
10
10
  style: "img-responsive",
11
11
  align: "center",
12
+ title: "",
12
13
  source: false,
13
14
  magnify: false,
14
15
  margin_bottom: "0",
@@ -43,7 +44,7 @@ module Maglove
43
44
  haml_concat(widget.options[:tooltip_text])
44
45
  end
45
46
  end
46
- haml_tag :img, class: "image #{widget.options[:style]} #{widget.options[:magnify] ? 'magnific-image' : ''}", src: widget.options[:source]
47
+ haml_tag :img, class: "image #{widget.options[:style]} #{widget.options[:magnify] ? 'magnific-image' : ''}", src: widget.options[:source], title: widget.options[:title]
47
48
  haml_tag :div, class: "image-drop-target"
48
49
  end
49
50
  end
@@ -8,10 +8,16 @@ module Maglove
8
8
  def defaults
9
9
  {
10
10
  background_color: "#18B545",
11
+ text_color: "#FFFFFF",
12
+ arrow_color: "#FFFFFF",
11
13
  size: "md",
12
14
  badge: nil,
15
+ badge_color: "#FFFFFF",
16
+ badge_background: "rgba(255, 255, 255, 0.25)",
17
+ badge_width: "24px",
13
18
  title: "Title",
14
19
  subtitle: nil,
20
+ subtitle_style: "normal",
15
21
  image_source: nil
16
22
  }
17
23
  end
@@ -34,24 +40,24 @@ module Maglove
34
40
  haml_tag :div, { class: "list-item-image", style: image_style }
35
41
  end
36
42
  haml_tag :div, { class: "list-item-main" } do
37
- haml_tag :div, { class: "list-item-title" } do
43
+ haml_tag :div, { class: "list-item-title", style: "color: #{widget.options[:text_color]}" } do
38
44
  haml_concat(widget.options[:title])
39
45
  end
40
46
  if widget.options[:subtitle]
41
- haml_tag :div, { class: "list-item-subtitle" } do
47
+ haml_tag :div, { class: "list-item-subtitle", style: "color: #{widget.options[:text_color]}; font-style: #{widget.options[:subtitle_style]}" } do
42
48
  haml_concat(widget.options[:subtitle])
43
49
  end
44
50
  end
45
51
  end
46
52
  if widget.options[:badge]
47
53
  haml_tag :div, { class: "list-item-badge" } do
48
- haml_tag :span do
54
+ haml_tag :span, { style: "color: #{widget.options[:badge_color]}; background-color: #{widget.options[:badge_background]}; width: #{widget.options[:badge_width]};" } do
49
55
  haml_concat(widget.options[:badge])
50
56
  end
51
57
  end
52
58
  end
53
59
  if widget.options[:href]
54
- haml_tag :i, { class: "list-item-arrow fa fa-angle-right" }
60
+ haml_tag :i, { class: "list-item-arrow fa fa-angle-right", style: "color: #{widget.options[:arrow_color]}" }
55
61
  end
56
62
  end
57
63
  end
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "maglove-widgets"
6
- s.version = "1.1.4"
6
+ s.version = "1.1.5"
7
7
  s.licenses = ["BSD-3-Clause"]
8
8
  s.platform = Gem::Platform::RUBY
9
9
  s.authors = ["Tobias Strebitzer"]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: maglove-widgets
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.4
4
+ version: 1.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tobias Strebitzer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-28 00:00:00.000000000 Z
11
+ date: 2017-10-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler