2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-06 09:10:25 +08:00

Adds max-width to images in digest emails.

This commit is contained in:
Robin Ward 2013-06-11 12:28:50 -04:00
parent 8b4e3402c2
commit e2ce4947d7

View file

@ -20,6 +20,10 @@ module Email
hr['style'] = 'background-color: #ddd; height: 1px; border: 1px;' hr['style'] = 'background-color: #ddd; height: 1px; border: 1px;'
end end
fragment.css('img').each do |img|
img['style'] = "max-width: 694px;"
end
fragment.css('a').each do |a| fragment.css('a').each do |a|
a['style'] = 'text-decoration: none; font-weight: bold; font-size: 15px; color: #006699;' a['style'] = 'text-decoration: none; font-weight: bold; font-size: 15px; color: #006699;'
end end