Changed HTML Digest template. Removed margins, shrunk logo.

This commit is contained in:
Robin Ward 2013-06-06 14:44:58 -04:00
parent 62041da7e0
commit 7bc80c2dcf
2 changed files with 11 additions and 22 deletions

View File

@ -1,24 +1,13 @@
<table style="width: 100%">
<table style="border: 1px solid #ddd;">
<tr>
<td style="background-color: #eee; padding: 30px;">
<center>
<table style="width: 90%; max-width: 500px;">
<tr>
<td>
<a href="<%= Discourse.base_url %>">
<img src="<%= logo_url %>" style="height: 50px; margin-bottom: 15px;"></a>
</td>
</tr>
<tr>
<td style="background-color: #fff; padding: 20px; font-family: Arial, Helvetica, sans-serif; font-size: 14px;">
<%= raw(html_body) %>
</td>
</tr>
</table>
</center>
</td>
<td style="padding: 10px 10px; background-color: #eee; border: 1px solid #ddd;">
<a href="<%= Discourse.base_url %>">
<img src="<%= logo_url %>" style="height: 35px"></a>
</td>
</tr>
<tr>
<td style="background-color: #fff; padding: 0 10px; font-family: Arial, Helvetica, sans-serif; font-size: 14px;">
<%= raw(html_body) %>
</td>
</tr>
</table>

View File

@ -12,7 +12,7 @@ class EmailStyles
fragment = Nokogiri::HTML.fragment(@html)
fragment.css('h3').each do |h3|
h3['style'] = 'margin-bottom: 20px; background-color: #eee; padding: 10px; border: 1px solid #ddd;'
h3['style'] = 'margin: 15px 0 20px 0; border-bottom: 1px solid #ddd;'
end
fragment.css('hr').each do |hr|