chore(mail): replace textual logo with simple logo + application name as text

This commit is contained in:
Colin Darie 2024-03-27 16:44:47 +01:00
parent df198a8946
commit 172aeec3dc
No known key found for this signature in database
GPG key ID: 8C76CADD40253590
7 changed files with 18 additions and 25 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

View file

@ -42,23 +42,6 @@
<!--[if mso | IE]>
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
<tr>
<td style="vertical-align:top;width:396px;">
<![endif]-->
<div class="mj-column-per-66 outlook-group-fix" style="vertical-align:top;display:inline-block;direction:ltr;font-size:13px;text-align:left;width:100%;">
<table role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0">
<tbody>
<tr>
<td style="word-wrap:break-word;font-size:0px;padding:0;padding-top:0px;padding-bottom:0px;" align="left">
<div class="" style="cursor:auto;color:#55575d;font-family:Helvetica, Arial, sans-serif;font-size:11px;text-align:left;">
<img align="middle" alt="Logo <%= "#{Current.application_name}" %>" src="<%= image_url("#{MAILER_LOGO_SRC}") %>" style="max-width=600px; padding=30px 0; display=inline !important; vertical-align=bottom; border=0; height=auto; outline=none; text-decoration=none; -ms-interpolation-mode=bicubic;" />
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!--[if mso | IE]>
</td>
<td style="vertical-align:top;width:198px;">
<![endif]-->
<div class="mj-column-per-33 outlook-group-fix" style="vertical-align:top;display:inline-block;direction:ltr;font-size:13px;text-align:left;width:100%;">
@ -108,7 +91,20 @@
<div class="mj-column-per-100 outlook-group-fix" style="vertical-align:top;display:inline-block;direction:ltr;font-size:13px;text-align:left;width:100%;">
<table role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0">
<tbody>
<%= yield(:procedure_logo) %>
<%- if content_for?(:procedure_logo) %>
<%= yield :procedure_logo %>
<%- else -%>
<tr>
<td style="word-wrap:break-word;font-size:0px;padding:0;padding-top:0px;padding-bottom:0px;" align="left">
<p class="" style="cursor:auto;color:#000091;font-family:Helvetica, Arial, sans-serif;font-size:14px;text-align:center">
<img align="middle" alt="Logo <%= "#{Current.application_name}" %>" src="<%= image_url(MAILER_LOGO_SRC) %>" style="max-height:100px; padding:15px 30px 15px 30px; vertical-aligne:middle; display:inline !important; border:0; height:auto; outline:none; text-decoration:none; -ms-interpolation-mode:bicubic;" />
<b style="font-size:28px;font-weight:600;display:inline-block">
<%= Current.application_name %>
</b>
</p>
</td>
</tr>
<%- end -%>
<tr>
<td style="word-wrap:break-word;font-size:0px;padding:0px 25px 0px 25px;padding-top:0px;padding-bottom:0px;" align="left">
<div class="" style="cursor:auto;color:#55575d;font-family:Helvetica, Arial, sans-serif;font-size:13px;line-height:22px;text-align:left;">
@ -168,7 +164,7 @@
<tr>
<td style="word-wrap:break-word;font-size:0px;padding:0px 20px 0px 20px;padding-top:0px;padding-bottom:0px;" align="center">
<div class="" style="cursor:auto;color:#55575d;font-family:Helvetica, Arial, sans-serif;font-size:11px;line-height:22px;text-align:center;">
<img align="middle" alt="Logo <%= "#{Current.application_name}" %>" src="<%= image_url("#{MAILER_FOOTER_LOGO_SRC}") %>" style="max-width=125px; padding=30px 0; display=inline !important; vertical-align=bottom; border=0; height=auto; outline=none; text-decoration=none; -ms-interpolation-mode=bicubic;" />
<%= "#{Current.application_name}" %> est un service fourni par <%= t("links.provider.provided_by") %>
</div>
</td>
</tr>

View file

@ -82,10 +82,7 @@ DS_ENV="staging"
# HEADER_LOGO_HEIGHT="56"
# Instance customization: Emails header logo ---> to be put in "app/assets/images"
# MAILER_LOGO_SRC="mailer/instructeur_mailer/logo.png"
# Instance customization: Emails footer logo ---> to be put in "app/assets/images"
# MAILER_FOOTER_LOGO_SRC="mailer/instructeur_mailer/logo-beta-gouv-fr.png"
# MAILER_LOGO_SRC="mailer/republique-francaise-logo.png"
# Instance customization: Procedure default logo ---> to be put in "app/assets/images"
# PROCEDURE_DEFAULT_LOGO_SRC="republique-francaise-logo.svg"

View file

@ -64,6 +64,7 @@ Rails.application.configure do
# Annotate rendered view with file names.
# config.action_view.annotate_rendered_view_with_filenames = true
config.action_mailer.default_url_options = { host: ENV.fetch("APP_HOST") }
config.action_mailer.asset_host = "http://" + ENV.fetch("APP_HOST")
Rails.application.routes.default_url_options = {
host: ENV.fetch("APP_HOST"),
protocol: :http

View file

@ -13,8 +13,7 @@ HEADER_LOGO_WIDTH = ENV.fetch("HEADER_LOGO_WIDTH", "65")
HEADER_LOGO_HEIGHT = ENV.fetch("HEADER_LOGO_HEIGHT", "56")
# Mailer logos
MAILER_LOGO_SRC = ENV.fetch("MAILER_LOGO_SRC", "mailer/instructeur_mailer/logo.png")
MAILER_FOOTER_LOGO_SRC = ENV.fetch("MAILER_FOOTER_LOGO_SRC", "mailer/instructeur_mailer/logo-beta-gouv-fr.png")
MAILER_LOGO_SRC = ENV.fetch("MAILER_LOGO_SRC", "mailer/republique-francaise-logo.png")
# Default logo of a procedure
PROCEDURE_DEFAULT_LOGO_SRC = ENV.fetch("PROCEDURE_DEFAULT_LOGO_SRC", "republique-francaise-logo.svg")