mirror of
https://github.com/discourse/discourse.git
synced 2025-09-05 08:59:27 +08:00
FIX: Missing styles in HTML digest emails
This commit is contained in:
parent
9b6538832d
commit
3da2285ef1
5 changed files with 12 additions and 6 deletions
|
@ -34,7 +34,9 @@ module Email
|
|||
|
||||
renderer = Email::Renderer.new(@message, opts)
|
||||
|
||||
unless @message.html_part
|
||||
if @message.html_part
|
||||
@message.html_part.body = renderer.html
|
||||
else
|
||||
@message.html_part = Mail::Part.new do
|
||||
content_type 'text/html; charset=UTF-8'
|
||||
body renderer.html
|
||||
|
|
|
@ -59,6 +59,10 @@ module Email
|
|||
style('div.digest-post', 'margin-left: 15px; margin-top: 20px; max-width: 694px;')
|
||||
style('div.digest-post h1', 'font-size: 20px;')
|
||||
style('span.footer-notice', 'color:#666; font-size:80%')
|
||||
|
||||
style('pre', 'white-space: pre-wrap')
|
||||
style('code', 'background-color: f1f1ff; padding: 2px 5px;')
|
||||
style('pre code', 'display: block; background-color: f1f1ff; padding: 5px')
|
||||
end
|
||||
|
||||
def to_html
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue