fx_awesome_mails 0.5.8 → 0.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/fx_awesome_mails/version.rb +2 -2
- data/lib/fx_awesome_mails/view_helpers.rb +5 -5
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1e57b98f7344be99af6cdaa4a2168f38051f5b37129eddad42482cc59507a046
|
|
4
|
+
data.tar.gz: ff8550601f82bb797956ea8734ea38c8ee0cffe359d4eb5602997974adfb9dbf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2c6a71bc49637b822d1fb0fea6bc025f2b903a1137922c552de8da66049f0913494497fdc1d8ab0303cf3ab3cfbe3139d9ae159cd192bd37c4b8a9858070678f
|
|
7
|
+
data.tar.gz: 471a14334e952e248181f83eabf4ff7c4a998320b030ddf376704bb06be832eca757d7b8785ea6ef9275efd407c8a5d6e7163d80bfea6c2b89a698bee53f5425
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
module FXAwesomeMails
|
|
2
|
-
VERSION = '0.
|
|
3
|
-
end
|
|
2
|
+
VERSION = '0.6.2'
|
|
3
|
+
end
|
|
@@ -130,12 +130,12 @@ module FXAwesomeMails
|
|
|
130
130
|
|
|
131
131
|
def horizontal(height = '20', **options)
|
|
132
132
|
options = {valign: 'top', class: '',style: "text-align:left;font-size:1px;line-height:1px"}.merge_email_options(options)
|
|
133
|
-
content_tag('th', ' '.html_safe, height: height, valign: "#{options[:valign]}", style: "#{options[:style]}", class: "#{options[:class]} horizontal-gutter", bgcolor:
|
|
133
|
+
content_tag('th', ' '.html_safe, height: height, valign: "#{options[:valign]}", style: "#{options[:style]}", class: "#{options[:class]} horizontal-gutter", bgcolor: options[:style].to_s.to_css_hash["background-color"].try(&:to_s))
|
|
134
134
|
end
|
|
135
135
|
|
|
136
136
|
def vertical(width = '20', **options)
|
|
137
137
|
options = {valign: 'top', class: '',style: "text-align:left;font-size:1px;line-height:1px"}.merge_email_options(options)
|
|
138
|
-
content_tag('th', ' '.html_safe, width: width, valign: "#{options[:valign]}", style: "#{options[:style]}", class: "#{options[:class]} vertical-gutter", bgcolor:
|
|
138
|
+
content_tag('th', ' '.html_safe, width: width, valign: "#{options[:valign]}", style: "#{options[:style]}", class: "#{options[:class]} vertical-gutter", bgcolor: options[:style].to_s.to_css_hash["background-color"].try(&:to_s))
|
|
139
139
|
end
|
|
140
140
|
end
|
|
141
141
|
|
|
@@ -147,8 +147,8 @@ module FXAwesomeMails
|
|
|
147
147
|
delegate :capture, :content_tag, :link_to, :link_to_if, :link_to_if_true, :image_tag, :to => :parent
|
|
148
148
|
|
|
149
149
|
def text(text = nil, **options, &block)
|
|
150
|
-
options = {style: "mso-line-height-rule:exactly;text-align:left;font-weight:400"}.merge_email_options(options)
|
|
151
|
-
content_tag('th', valign: "#{options[:valign]}", style: options[:style], class: "#{options[:class]} text-container", bgcolor:
|
|
150
|
+
options = {valign: "top", style: "mso-line-height-rule:exactly;text-align:left;font-weight:400"}.merge_email_options(options)
|
|
151
|
+
content_tag('th', valign: "#{options[:valign]}", style: options[:style], class: "#{options[:class]} text-container", bgcolor: options[:style].to_s.to_css_hash["background-color"].presence.try(&:to_s)) do
|
|
152
152
|
"#{block_given? ? capture(&block) : text}".html_safe
|
|
153
153
|
end
|
|
154
154
|
end
|
|
@@ -163,7 +163,7 @@ module FXAwesomeMails
|
|
|
163
163
|
|
|
164
164
|
def email_image_tag(source: nil, **options, &block)
|
|
165
165
|
options = {alt: '', link_url: nil, width: 130, height: 50, valign: 'top', align: 'left', class: '', style: "background-color: #FFFFFF;outline: none; text-decoration: none; -ms-interpolation-mode: bicubic; display: block; border: none" }.merge_email_options(options)
|
|
166
|
-
html = "<th valign='#{options[:valign]}' style='text-align:
|
|
166
|
+
html = "<th valign='#{options[:valign]}' style='text-align:#{options[:align]}' class='#{options[:class]} image-container' bgcolor='#{options[:style].to_s.to_css_hash["background-color"]}' align='#{options[:align]}'>"
|
|
167
167
|
html << link_to_if_true(options[:link_url].present?, options[:link_url], target: '_blank') do
|
|
168
168
|
image_tag(source, style: options[:style], width: "#{options[:width]}", height: "#{options[:height]}", alt: "#{options[:alt]}")
|
|
169
169
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fx_awesome_mails
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.6.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Felix Gebhard
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-11-
|
|
11
|
+
date: 2021-11-18 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|