mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
correct email styles
This commit is contained in:
parent
01a6b45231
commit
0320a5ae64
@ -38,7 +38,8 @@ module Email
|
|||||||
style('hr', 'background-color: #ddd; height: 1px; border: 1px;')
|
style('hr', 'background-color: #ddd; height: 1px; border: 1px;')
|
||||||
# we can do this but it does not look right
|
# we can do this but it does not look right
|
||||||
# style('#main', 'font-family:"Helvetica Neue", Helvetica, Arial, sans-serif')
|
# style('#main', 'font-family:"Helvetica Neue", Helvetica, Arial, sans-serif')
|
||||||
style('td.body', 'padding-top:10px;', colspan: "2")
|
style('td.body', 'padding-top:5px;', colspan: "2")
|
||||||
|
correct_first_body_margin
|
||||||
correct_footer_style
|
correct_footer_style
|
||||||
reset_tables
|
reset_tables
|
||||||
end
|
end
|
||||||
@ -70,11 +71,17 @@ module Email
|
|||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
|
def correct_first_body_margin
|
||||||
|
@fragment.css('.body p').each do |element|
|
||||||
|
element['style'] = "margin-top:0;"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def correct_footer_style
|
def correct_footer_style
|
||||||
@fragment.css('.footer').each do |element|
|
@fragment.css('.footer').each do |element|
|
||||||
element['style'] = "font-size:13px;font-family:'lucida grande',tahoma,verdana,arial,sans-serif;color:#444;"
|
element['style'] = "font-size:12px;font-family:'lucida grande',tahoma,verdana,arial,sans-serif;color:#666;"
|
||||||
element.css('a').each do |inner|
|
element.css('a').each do |inner|
|
||||||
inner['style'] = "color:#444;"
|
inner['style'] = "color:#666;"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user