Commit 08eac512 authored by Douwe Maan's avatar Douwe Maan

Move EmailsOnPush highlight CSS inline instead of being in every notification email.

parent 33a8f53f
...@@ -33,12 +33,8 @@ module EmailsHelper ...@@ -33,12 +33,8 @@ module EmailsHelper
end end
end end
def add_email_highlight_css
Rugments::Themes::Github.render(scope: '.highlight')
end
def color_email_diff(diffcontent) def color_email_diff(diffcontent)
formatter = Rugments::Formatters::HTML.new(cssclass: 'highlight') formatter = Rugments::Formatters::HTML.new(cssclass: "highlight", inline_theme: :github)
lexer = Rugments::Lexers::Diff.new lexer = Rugments::Lexers::Diff.new
raw formatter.format(lexer.lex(diffcontent)) raw formatter.format(lexer.lex(diffcontent))
end end
......
...@@ -27,8 +27,7 @@ ...@@ -27,8 +27,7 @@
} }
.file-stats .deleted-file { .file-stats .deleted-file {
color: #B00; color: #B00;
} }}
#{add_email_highlight_css}
%body %body
%div.content %div.content
= yield = yield
......
...@@ -59,7 +59,6 @@ ...@@ -59,7 +59,6 @@
%strong %strong
= diff.new_path = diff.new_path
%hr %hr
%pre
= color_email_diff(diff.diff) = color_email_diff(diff.diff)
%br %br
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment