fx_awesome_mails 0.5.5 → 0.5.9
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 +1 -1
- data/lib/fx_awesome_mails/view_helpers.rb +8 -10
- 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: 62c9e7f474154e8f3831761d42af409f9cd0a1ffb59ade192caf9700e531e506
|
|
4
|
+
data.tar.gz: bc631a143ad84eaee839518a67e7e81dffe27fef1b5e7c7e1eeb05e8649a26f6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e425a9c1461f6b1d540937060c64d6b72b9469a3e543f8dcbdcc47592e1d8016635e1a2843669d880d267a0f5c35386029ae56fcfa924ad6acdfd62e1a0d5558
|
|
7
|
+
data.tar.gz: a3a96629ca469db7499402b98c7a8e0d2f16019900c7be142428537418d202b3d446952479d6276ebf9e4872ea66aa1cf6162ca6e7f10b0dc1acf465d47adb6d
|
|
@@ -129,12 +129,12 @@ module FXAwesomeMails
|
|
|
129
129
|
delegate :capture, :content_tag, :link_to, :link_to_if, :link_to_if_true, :image_tag, :to => :parent
|
|
130
130
|
|
|
131
131
|
def horizontal(height = '20', **options)
|
|
132
|
-
options = {valign: 'top', class: '',style: ""}.merge_email_options(options)
|
|
132
|
+
options = {valign: 'top', class: '',style: "text-align:left;font-size:1px;line-height:1px"}.merge_email_options(options)
|
|
133
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"]}")
|
|
134
134
|
end
|
|
135
135
|
|
|
136
136
|
def vertical(width = '20', **options)
|
|
137
|
-
options = {valign: 'top', class: '',style: ""}.merge_email_options(options)
|
|
137
|
+
options = {valign: 'top', class: '',style: "text-align:left;font-size:1px;line-height:1px"}.merge_email_options(options)
|
|
138
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"]}")
|
|
139
139
|
end
|
|
140
140
|
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[:
|
|
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
|
|
@@ -183,7 +183,7 @@ module FXAwesomeMails
|
|
|
183
183
|
|
|
184
184
|
def self.vertical_grid(_capture_helper, **options, &block)
|
|
185
185
|
options = { valign: 'top', style: "text-align: left" }.merge_email_options(options)
|
|
186
|
-
_capture_helper.content_tag('th', valign: "#{options[:valign]}", style: "#{options[:style]}", class: "
|
|
186
|
+
_capture_helper.content_tag('th', valign: "#{options[:valign]}", style: "#{options[:style]}", class: "vertical-grid #{options[:class]}") do
|
|
187
187
|
"<table cellpadding='0' cellspacing='0' border='0' width='100%' style='min-width:100%' role='presentation'>
|
|
188
188
|
<tbody>
|
|
189
189
|
#{_capture_helper.capture(VerticalGrid.new(_capture_helper), &block)}
|
|
@@ -228,7 +228,8 @@ module FXAwesomeMails
|
|
|
228
228
|
delegate :capture, :content_tag, :link_to, :link_to_if, :link_to_if_true, :image_tag, :to => :parent
|
|
229
229
|
|
|
230
230
|
def self.horizontal_grid(_capture_helper, **options, &block)
|
|
231
|
-
|
|
231
|
+
options = { valign: 'top', style: "text-align: left" }.merge_email_options(options)
|
|
232
|
+
"<th valign='#{options[:valign]}' style='#{options[:style]}' class='#{options[:class]} horizontal-grid'>
|
|
232
233
|
<table cellpadding='0' cellspacing='0' border='0' width='100%' style='min-width:100%' role='presentation'>
|
|
233
234
|
<tbody>
|
|
234
235
|
<tr>
|
|
@@ -243,11 +244,8 @@ module FXAwesomeMails
|
|
|
243
244
|
"#{Gutter.new(parent).vertical(...)}".html_safe
|
|
244
245
|
end
|
|
245
246
|
|
|
246
|
-
def text(
|
|
247
|
-
|
|
248
|
-
content_tag('th', valign: "#{options[:valign]}", style: "#{options[:style]}", class: "text-container #{options[:class]}") do
|
|
249
|
-
block_given? ? capture(&block) : text
|
|
250
|
-
end
|
|
247
|
+
def text(...)
|
|
248
|
+
"#{Text.new(parent).text(...)}".html_safe
|
|
251
249
|
end
|
|
252
250
|
|
|
253
251
|
def image(...)
|
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.5.
|
|
4
|
+
version: 0.5.9
|
|
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
|
+
date: 2021-11-17 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|