2019-07-17 16:42:34 +02:00
|
|
|
module MailerHelper
|
2019-07-22 15:20:47 +02:00
|
|
|
def vertical_margin(height)
|
|
|
|
render 'shared/mailer_vertical_margin', height: height
|
|
|
|
end
|
|
|
|
|
2019-07-22 15:11:03 +02:00
|
|
|
def round_button(text, url, variant)
|
|
|
|
render 'shared/mailer_round_button', text: text, url: url, theme: theme(variant)
|
|
|
|
end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def theme(variant)
|
|
|
|
case variant
|
|
|
|
when :primary
|
|
|
|
{ color: white, bg_color: blue, border_color: blue }
|
|
|
|
when :secondary
|
|
|
|
{ color: blue, bg_color: white, border_color: blue }
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
def blue
|
2024-03-27 14:41:38 +01:00
|
|
|
'#000091'
|
2019-07-22 15:11:03 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
def white
|
|
|
|
'#FFFFFF'
|
2019-07-17 16:42:34 +02:00
|
|
|
end
|
|
|
|
end
|