express_mailer 0.1.1 → 0.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: bb5a588e9965c42a66bc0d9d0749c434f023c591
4
- data.tar.gz: 05df1a375c41a0cd2ef16e2bf8beb7f2ebdd4054
2
+ SHA256:
3
+ metadata.gz: 332ebc7770039d88ee2ae6ca67e83be18407b2b011f3dabe0a7337968c754c94
4
+ data.tar.gz: 26176daa86256efabde63cbc7a0222bd14160300038843b0b0503ea974571bad
5
5
  SHA512:
6
- metadata.gz: 47556793d808444b37f6206c1fecce4d21d1e129a85dae0782197e266b3cfc353dc1a8afff678b65962184886e55e2e79f93ae8aa98430618b4bde7fd3642d99
7
- data.tar.gz: 9eb2108fa950a7851524d9c2e95e9009b3b7dd00c54f2ff35cc694429e55b59d45daa5ef1f8d99c3130bfceaf173033c7a803f102b84d0f2fa01019406e0ceee
6
+ metadata.gz: 2c0b99fcac76a939943e60ddb98038576835c71dc0320eb842aabf2934900ae7ff7d0a5f7411e747ef83967b2aa701177a496a5a4ac7a3f146a8d50cf90c021e
7
+ data.tar.gz: e970d6ed18405fbf4f8145e4adb2fc697b3494a65837efb9128fb3e7e7a330b5af116b26f95e611f9b731c34fb46b9d6421c20da72284c0f1c31ae57e1d3ff3c
@@ -27,6 +27,9 @@
27
27
  }
28
28
  </style>
29
29
  <style>
30
+ body, html {
31
+ background-color: <%= @attributes.background_color %>;
32
+ }
30
33
  /* Reset styles */
31
34
  body { margin: 0; padding: 0; min-width: 100%; width: 100% !important; height: 100% !important;}
32
35
  body, table, td, div, p, a { -webkit-font-smoothing: antialiased; text-size-adjust: 100%; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; line-height: 100%; }
@@ -78,7 +81,7 @@
78
81
 
79
82
  <!-- SECTION / BACKGROUND -->
80
83
  <!-- Set message background color one again -->
81
- <table width="100%" align="center" border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse; border-spacing: 0; margin: 0; padding: 0; padding-bottom: 50px; width: 100%;" class="background"><tr><td align="center" valign="top" style="border-collapse: collapse; border-spacing: 0; margin: 0; padding: 0;"
84
+ <table width="100%" align="center" border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse; border-spacing: 0; margin: 0; padding: 0; padding-bottom: 50px; width: 100%;" class="background"><tr><td align="center" valign="top" style="border-collapse: collapse; border-spacing: 0; margin: 0; padding: 0; padding-bottom: 50px;"
82
85
  bgcolor="<%= @attributes.background_color %>">
83
86
 
84
87
  <!-- WRAPPER -->
@@ -137,7 +140,7 @@
137
140
  <% if @attributes.image %>
138
141
  <!-- IMAGE -->
139
142
  <tr>
140
- <td align="center" class="color" valign="top" style="border-collapse: collapse; border-spacing: 0; margin: 0; padding: 0; padding-left: 6.25%; padding-right: 6.25%; width: 87.5%; font-size: 14px; font-weight: 400; line-height: 150%; letter-spacing: 2px;
143
+ <td align="center" class="color" valign="top" style="border-collapse: collapse; border-spacing: 0; margin: 0; padding: 0; padding-left: 6.25%; padding-right: 6.25%; width: 87.5%; font-size: 14px; font-weight: 400; line-height: 150%;
141
144
  padding-bottom: 20px;">
142
145
  <div style="display: inline-block; overflow: hidden; background-color: <%= @attributes.image.background %>;" class="<%= @attributes.image.shape_class %>">
143
146
  <img src="<%= @attributes.image.url %>" alt="<%= @attributes.image.alt %>" height="<%= @attributes.image.height %>" style="float: left;" />
@@ -149,7 +152,7 @@
149
152
  <% if @attributes.headline %>
150
153
  <!-- HEADLINE -->
151
154
  <tr>
152
- <td align="center" class="color headline" valign="top" style="border-collapse: collapse; border-spacing: 0; margin: 0; padding: 0; padding-left: 6.25%; padding-right: 6.25%; width: 87.5%; font-size: 60px; font-weight: 600; line-height: 1.1; letter-spacing: 2px;
155
+ <td align="center" class="color headline" valign="top" style="border-collapse: collapse; border-spacing: 0; margin: 0; padding: 0; padding-left: 6.25%; padding-right: 6.25%; width: 87.5%; font-size: 60px; font-weight: 600; line-height: 1.1;
153
156
  padding-bottom: 20px;
154
157
  font-family: <%= @attributes.headline_font_family %>;">
155
158
  <%= @attributes.headline %>
@@ -164,38 +167,54 @@
164
167
  padding-bottom: 30px; padding-top: 10px; padding-left: 6.25%; padding-right: 6.25%;
165
168
  font-family: <%= @attributes.text_font_family %>;">
166
169
  <table style="width: 100%; border-collapse: collapse; border-spacing: 0; margin: 0; padding: 0;">
170
+
171
+ <% @attributes.table.rows.each do |row| %>
172
+ <% if row[0].is_a?(Array) %>
173
+ <% row.each do |subrow| %>
174
+ <tr>
175
+ <% subrow.each_with_index do |col, idx| %>
176
+ <td style="text-align: <%= idx == row.count - 1 ? 'right' : 'left' %>; padding-top: 0px; padding-bottom: 12px; padding-left: 8px; padding-right: 8px; font-weight: 400; font-family: <%= @attributes.text_font_family %>; color: <%= @attributes.text_color %>; opacity: 0.7;"><%= col %></td>
177
+ <% end %>
178
+ </tr>
179
+ <% end %>
180
+ <% else %>
181
+ <tr>
182
+ <td align="center" colspan="<%= @attributes.table.column_count %>" valign="top" style="border-collapse: collapse; border-spacing: 0; margin: 0; padding: 0; width: 87.5%;" class="line">
183
+ <hr color="<%= @attributes.border_color %>" align="center" width="100%" size="1" noshade style="margin: 0; padding: 0;" />
184
+ </td>
185
+ </tr>
186
+ <tr>
187
+ <% row.each_with_index do |col, idx| %>
188
+ <td style="text-align: <%= idx == row.count - 1 ? 'right' : 'left' %>; padding-top: 12px; padding-bottom: 12px; padding-left: 8px; padding-right: 8px; font-weight: 600; font-family: <%= @attributes.text_font_family %>; color: <%= @attributes.text_color %>;"><%= col %></td>
189
+ <% end %>
190
+ </tr>
191
+ <% end %>
192
+ <% end %>
167
193
  <tr>
168
194
  <td align="center" colspan="<%= @attributes.table.column_count %>" valign="top" style="border-collapse: collapse; border-spacing: 0; margin: 0; padding: 0; width: 87.5%;" class="line">
169
195
  <hr color="<%= @attributes.border_color %>" align="center" width="100%" size="1" noshade style="margin: 0; padding: 0;" />
170
196
  </td>
171
197
  </tr>
172
- <% @attributes.table.rows.each do |row| %>
173
- <tr>
174
- <% row.each_with_index do |col, idx| %>
175
- <td style="text-align: <%= idx == row.count - 1 ? 'right' : 'left' %>; padding-top: 12px; padding-bottom: 12px; padding-left: 8px; padding-right: 8px; font-weight: 600; font-family: <%= @attributes.text_font_family %>; color: <%= @attributes.text_color %>;"><%= col %></td>
176
- <% end %>
177
- </tr>
178
- <tr>
179
- <td align="center" colspan="<%= @attributes.table.column_count %>" valign="top" style="border-collapse: collapse; border-spacing: 0; margin: 0; padding: 0; width: 87.5%;" class="line">
180
- <hr color="<%= @attributes.border_color %>" align="center" width="100%" size="1" noshade style="margin: 0; padding: 0;" />
181
- </td>
182
- </tr>
183
- <% end %>
184
198
  </table>
185
199
  </td>
186
200
  </tr>
187
201
  <% end %>
188
202
 
189
- <% if @attributes.text %>
190
- <!-- TEXT -->
191
- <tr>
192
- <td align="<%= @attributes.text_align %>" valign="top" style="border-collapse: collapse; border-spacing: 0; margin: 0; padding: 0; padding-left: 6.25%; padding-right: 6.25%; width: 87.5%; font-size: <%= @attributes.text_size %>px; font-weight: 400; line-height: 1.3;
193
- padding-bottom: 20px;
194
- color: <%= @attributes.text_color %>;
195
- font-family: <%= @attributes.text_font_family %>;" class="paragraph">
196
- <%= @attributes.text %>
197
- </td>
198
- </tr>
203
+ <% if @attributes.text.present? %>
204
+ <!-- TEXT -->
205
+ <% @attributes.text.split("\n").each do |line| %>
206
+ <tr style="padding-top: 10px;">
207
+ <td align="<%= @attributes.text_align %>" valign="top" style="border-collapse: collapse; border-spacing: 0; margin: 0; padding: 0; padding-left: 6.25%; padding-right: 6.25%; width: 87.5%; font-size: <%= @attributes.text_size %>px; font-weight: 400; line-height: 1.3;
208
+ padding-bottom: 0;
209
+ color: <%= @attributes.text_color %>;
210
+ font-family: <%= @attributes.text_font_family %>;" class="paragraph">
211
+ <%= line %>&nbsp;
212
+ </td>
213
+ </tr>
214
+ <% end %>
215
+ <tr>
216
+ <td style="height: 20px; border-collapse: collapse; border-spacing: 0; margin: 0; padding: 0;"></td>
217
+ </tr>
199
218
  <% end %>
200
219
 
201
220
  <% if @attributes.button %>
@@ -1,3 +1,3 @@
1
1
  module ExpressMailer
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: express_mailer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steve Smith
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-03-18 00:00:00.000000000 Z
11
+ date: 2019-09-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -126,7 +126,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
126
126
  version: '0'
127
127
  requirements: []
128
128
  rubyforge_project:
129
- rubygems_version: 2.5.1
129
+ rubygems_version: 2.7.6
130
130
  signing_key:
131
131
  specification_version: 4
132
132
  summary: An easy way to send yourself or your team members nice looking emails about