bootstrap-email 1.0.0.alpha3.1 → 1.0.0.alpha4
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/VERSION +1 -1
- data/core/scss/components/_stack.scss +6 -6
- data/core/scss/utilities/_valign.scss +1 -1
- data/lib/bootstrap-email.rb +0 -1
- data/lib/bootstrap-email/compiler.rb +4 -2
- data/lib/bootstrap-email/converters/align.rb +1 -1
- data/lib/bootstrap-email/converters/force_encoding.rb +5 -7
- data/lib/bootstrap-email/converters/stack.rb +6 -6
- metadata +2 -3
- data/lib/bootstrap-email/initialize.rb +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 56d39a3ac5d5ab4d55c407432aa0cc9145a259b6b256de499a9cbfdadaf927f5
|
4
|
+
data.tar.gz: 9d14f30d758ca9db6f33c3bac05bc5a09027039be8b52e2e452c6b4bd0100f3c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 462b7d5c6ab1b834d9973c12161e870d0b283cba5f435a42f3633fad517aa32667eda4876b4cf0f068b4d068a5db95e8c53d90c887f2e2b0e067cf3c23ce08eb
|
7
|
+
data.tar.gz: 2d1cdd1c3e5c7782f36056befd955b82d8a6e6a8c09ea2c3305fdb8be2f3a2383ceac7dd7e40dd9bd890ee8435fb2c7c79e3e0ce6ba2f2c3c8cffbb5e496c297
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.0.
|
1
|
+
1.0.0.alpha4
|
@@ -1,6 +1,6 @@
|
|
1
1
|
@each $space, $value in $spacers {
|
2
|
-
table.stack-
|
3
|
-
table.stack-
|
2
|
+
table.stack-row.gap-#{$space},
|
3
|
+
table.stack-row.gap-lg-#{$space} {
|
4
4
|
& > tbody > tr > td {
|
5
5
|
padding-right: $value;
|
6
6
|
&:last-child {
|
@@ -8,8 +8,8 @@
|
|
8
8
|
}
|
9
9
|
}
|
10
10
|
}
|
11
|
-
table.stack-
|
12
|
-
table.stack-
|
11
|
+
table.stack-col.gap-#{$space},
|
12
|
+
table.stack-col.gap-lg-#{$space} {
|
13
13
|
& > tbody > tr {
|
14
14
|
& > td {
|
15
15
|
padding-bottom: $value;
|
@@ -27,13 +27,13 @@
|
|
27
27
|
}
|
28
28
|
|
29
29
|
@each $align in $vertical-align {
|
30
|
-
table.stack-
|
30
|
+
table.stack-ay-#{$align} > tbody > tr > td {
|
31
31
|
vertical-align: $align;
|
32
32
|
}
|
33
33
|
}
|
34
34
|
|
35
35
|
@each $align in $text-align {
|
36
|
-
table.stack-
|
36
|
+
table.stack-ax-#{$align} > tbody > tr > td {
|
37
37
|
text-align: $align;
|
38
38
|
}
|
39
39
|
}
|
data/lib/bootstrap-email.rb
CHANGED
@@ -48,6 +48,8 @@ module BootstrapEmail
|
|
48
48
|
html,
|
49
49
|
with_html_string: true,
|
50
50
|
preserve_reset: false,
|
51
|
+
adapter: :nokogiri_fast,
|
52
|
+
output_encoding: 'US-ASCII',
|
51
53
|
css_string: css_string
|
52
54
|
)
|
53
55
|
self.doc = premailer.doc
|
@@ -82,13 +84,13 @@ module BootstrapEmail
|
|
82
84
|
end
|
83
85
|
|
84
86
|
def configure_html!
|
85
|
-
BootstrapEmail::Converter::ForceEncoding.build(doc)
|
86
87
|
BootstrapEmail::Converter::HeadStyle.build(doc)
|
87
88
|
BootstrapEmail::Converter::VersionComment.build(doc)
|
88
89
|
end
|
89
90
|
|
90
91
|
def finalize_document!
|
91
|
-
html =
|
92
|
+
html = doc.to_html(encoding: 'US-ASCII')
|
93
|
+
html = BootstrapEmail::Converter::ForceEncoding.replace(html)
|
92
94
|
case type
|
93
95
|
when :rails
|
94
96
|
(@mail.html_part || @mail).body = html
|
@@ -1,15 +1,13 @@
|
|
1
1
|
module BootstrapEmail
|
2
2
|
module Converter
|
3
3
|
class ForceEncoding < Base
|
4
|
-
def build
|
5
|
-
body = doc.at_css('body')
|
6
|
-
body.add_child('<force-encoding></force-encoding>')
|
7
|
-
end
|
8
|
-
|
9
4
|
def self.replace(html)
|
10
5
|
# force utf-8 character encoded in iOS Mail: https://github.com/bootstrap-email/bootstrap-email/issues/50
|
11
|
-
# this needs to be done after the document has been outputted to a string so it doesn't get converted
|
12
|
-
html.sub(
|
6
|
+
# this needs to be done after the document has been outputted to a ascii string so it doesn't get converted
|
7
|
+
html.sub(
|
8
|
+
'<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">',
|
9
|
+
'<meta http-equiv="Content-Type" content="text/html; charset=utf-8">'
|
10
|
+
)
|
13
11
|
end
|
14
12
|
end
|
15
13
|
end
|
@@ -2,12 +2,12 @@ module BootstrapEmail
|
|
2
2
|
module Converter
|
3
3
|
class Stack < Base
|
4
4
|
def build
|
5
|
-
|
6
|
-
|
5
|
+
stack_row
|
6
|
+
stack_col
|
7
7
|
end
|
8
8
|
|
9
|
-
def
|
10
|
-
each_node('.stack-
|
9
|
+
def stack_row
|
10
|
+
each_node('.stack-row') do |node|
|
11
11
|
html = ''
|
12
12
|
node.xpath('./*').each do |child|
|
13
13
|
html += template('td', classes: 'stack-cell', contents: child.to_html)
|
@@ -16,8 +16,8 @@ module BootstrapEmail
|
|
16
16
|
end
|
17
17
|
end
|
18
18
|
|
19
|
-
def
|
20
|
-
each_node('.stack-
|
19
|
+
def stack_col
|
20
|
+
each_node('.stack-col') do |node|
|
21
21
|
html = ''
|
22
22
|
node.xpath('./*').each do |child|
|
23
23
|
html += template('tr', classes: 'stack-cell', contents: child.to_html)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bootstrap-email
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.
|
4
|
+
version: 1.0.0.alpha4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stuart Yamartino
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-07-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -129,7 +129,6 @@ files:
|
|
129
129
|
- lib/bootstrap-email/converters/table.rb
|
130
130
|
- lib/bootstrap-email/converters/version_comment.rb
|
131
131
|
- lib/bootstrap-email/erb.rb
|
132
|
-
- lib/bootstrap-email/initialize.rb
|
133
132
|
- lib/bootstrap-email/rails/action_mailer.rb
|
134
133
|
- lib/bootstrap-email/rails/engine.rb
|
135
134
|
- lib/bootstrap-email/sass_cache.rb
|
@@ -1 +0,0 @@
|
|
1
|
-
Premailer::Adapter.use = :nokogiri_fast
|