Move EmailsOnPush highlight CSS inline instead of being in every notification email.
This commit is contained in:
parent
33a8f53f7a
commit
08eac512bd
3 changed files with 3 additions and 9 deletions
|
@ -33,12 +33,8 @@ module EmailsHelper
|
|||
end
|
||||
end
|
||||
|
||||
def add_email_highlight_css
|
||||
Rugments::Themes::Github.render(scope: '.highlight')
|
||||
end
|
||||
|
||||
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
|
||||
raw formatter.format(lexer.lex(diffcontent))
|
||||
end
|
||||
|
|
|
@ -27,8 +27,7 @@
|
|||
}
|
||||
.file-stats .deleted-file {
|
||||
color: #B00;
|
||||
}
|
||||
#{add_email_highlight_css}
|
||||
}}
|
||||
%body
|
||||
%div.content
|
||||
= yield
|
||||
|
|
|
@ -59,8 +59,7 @@
|
|||
%strong
|
||||
= diff.new_path
|
||||
%hr
|
||||
%pre
|
||||
= color_email_diff(diff.diff)
|
||||
= color_email_diff(diff.diff)
|
||||
%br
|
||||
|
||||
- if @compare.timeout
|
||||
|
|
Loading…
Reference in a new issue