Commit 50ed8b85 authored by Alex Buijs's avatar Alex Buijs

Fix style issues with in product marketing emails

And make images inline attachments
parent ab4c793d
...@@ -27,11 +27,11 @@ module InProductMarketingHelper ...@@ -27,11 +27,11 @@ module InProductMarketingHelper
end end
def in_product_marketing_logo(track, series) def in_product_marketing_logo(track, series)
inline_image_link('mailers/in_product_marketing', "#{track}-#{series}.png", width: '150') inline_image_link('mailers/in_product_marketing', "#{track}-#{series}.png", { width: '150', style: 'width: 150px;' })
end end
def about_link(folder, image, width) def about_link(folder, image, width)
link_to inline_image_link(folder, image, { width: width, alt: s_('InProductMarketing|go to about.gitlab.com') }), 'https://about.gitlab.com/' link_to inline_image_link(folder, image, { width: width, style: "width: #{width}px;", alt: s_('InProductMarketing|go to about.gitlab.com') }), 'https://about.gitlab.com/'
end end
def in_product_marketing_tagline(track, series) def in_product_marketing_tagline(track, series)
...@@ -344,7 +344,7 @@ module InProductMarketingHelper ...@@ -344,7 +344,7 @@ module InProductMarketingHelper
end end
def inline_image_link(folder, image, **options) def inline_image_link(folder, image, **options)
attachments[image] = File.read(Rails.root.join("app/assets/images", folder, image)) attachments.inline[image] = File.read(Rails.root.join("app/assets/images", folder, image))
image_tag attachments[image].url, **options image_tag attachments[image].url, **options
end end
end end
...@@ -162,7 +162,7 @@ ...@@ -162,7 +162,7 @@
#main-story.mktEditable{ mktoname: "main-story" } #main-story.mktEditable{ mktoname: "main-story" }
%table{ border: "0", cellpadding: "0", cellspacing: "0", role: "presentation", width: "100%" } %table{ border: "0", cellpadding: "0", cellspacing: "0", role: "presentation", width: "100%" }
%tr %tr
%td{ align: "left", style: "padding: 0px;" } %td{ align: "left", style: "padding: 0 20px;" }
= about_link('mailers/in_product_marketing', 'gitlab-logo-gray-rgb.png', 200) = about_link('mailers/in_product_marketing', 'gitlab-logo-gray-rgb.png', 200)
%tr %tr
%td{ "aria-hidden" => "true", height: "30", style: "font-size: 0; line-height: 0;" } %td{ "aria-hidden" => "true", height: "30", style: "font-size: 0; line-height: 0;" }
...@@ -187,7 +187,7 @@ ...@@ -187,7 +187,7 @@
%p %p
= in_product_marketing_progress(@track, @series) = in_product_marketing_progress(@track, @series)
%tr{ style: "background-color: #ffffff;" } %tr{ style: "background-color: #ffffff;" }
%td{ align: "center", style: "padding:50px 20px 0 20px;" } %td{ align: "center", style: "padding:75px 20px 25px;" }
= about_link('', 'gitlab_logo.png', 80) = about_link('', 'gitlab_logo.png', 80)
%tr{ style: "background-color: #ffffff;" } %tr{ style: "background-color: #ffffff;" }
%td{ align: "center", style: "padding:0px ;" } %td{ align: "center", style: "padding:0px ;" }
......
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