mirror of
https://github.com/discourse/discourse.git
synced 2025-06-10 19:33:52 +08:00
make first email footer link specially highlighted
This commit is contained in:
@ -206,11 +206,20 @@ module Email
|
|||||||
end
|
end
|
||||||
|
|
||||||
def correct_footer_style
|
def correct_footer_style
|
||||||
|
footernum = 0
|
||||||
@fragment.css('.footer').each do |element|
|
@fragment.css('.footer').each do |element|
|
||||||
element['style'] = "color:#666;"
|
element['style'] = "color:#666;"
|
||||||
|
linknum = 0
|
||||||
element.css('a').each do |inner|
|
element.css('a').each do |inner|
|
||||||
inner['style'] = "color:#666;"
|
# we want the first footer link to be specially highlighted as IMPORTANT
|
||||||
|
if footernum == 0 and linknum == 0
|
||||||
|
inner['style'] = "background-color:#006699;color:#fff;padding:4px 6px;"
|
||||||
|
else
|
||||||
|
inner['style'] = "color:#666;"
|
||||||
|
end
|
||||||
|
linknum += 1
|
||||||
end
|
end
|
||||||
|
footernum += 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user