Merge pull request #5768 from adullact/5764_allow_images_to_be_configured
#5764 - Allow logos (mail, webapp) and favicons to be configured in .env file
This commit is contained in:
commit
5c07882679
7 changed files with 38 additions and 11 deletions
|
@ -20,7 +20,7 @@
|
|||
- else
|
||||
- root_profile_link, root_profile_libelle = root_path_info_for_profile(nav_bar_profile)
|
||||
= link_to root_profile_link, class: 'header-logo justify-center', title: root_profile_libelle do
|
||||
= image_tag 'marianne.png', alt: 'Liberté, égalité, fraternité', width: '65', height: 56, loading: 'lazy'
|
||||
= image_tag HEADER_LOGO_SRC, alt: HEADER_LOGO_ALT, width: HEADER_LOGO_WIDTH, height: HEADER_LOGO_HEIGHT, loading: 'lazy'
|
||||
%span.big.site-title>
|
||||
= APPLICATION_NAME
|
||||
%span.small.site-title>
|
||||
|
|
|
@ -9,9 +9,9 @@
|
|||
%title
|
||||
= content_for?(:title) ? "#{yield(:title)} · #{APPLICATION_NAME}" : APPLICATION_NAME
|
||||
|
||||
= favicon_link_tag(image_url("favicons/16x16.png"), type: "image/png", sizes: "16x16")
|
||||
= favicon_link_tag(image_url("favicons/32x32.png"), type: "image/png", sizes: "32x32")
|
||||
= favicon_link_tag(image_url("favicons/96x96.png"), type: "image/png", sizes: "96x96")
|
||||
= favicon_link_tag(image_url("#{FAVICON_16PX_SRC}"), type: "image/png", sizes: "16x16")
|
||||
= favicon_link_tag(image_url("#{FAVICON_32PX_SRC}"), type: "image/png", sizes: "32x32")
|
||||
= favicon_link_tag(image_url("#{FAVICON_96PX_SRC}"), type: "image/png", sizes: "96x96")
|
||||
|
||||
- packs = ['application', 'track', administrateur_signed_in? ? 'track-admin' : nil].compact
|
||||
= javascript_packs_with_chunks_tag *packs, defer: true
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
= t('dynamics.page_title')
|
||||
%meta{ 'http-equiv' => "X-UA-Compatible", :content => "IE=edge" }
|
||||
|
||||
= favicon_link_tag(image_url("favicons/16x16.png"), type: "image/png", sizes: "16x16")
|
||||
= favicon_link_tag(image_url("favicons/32x32.png"), type: "image/png", sizes: "32x32")
|
||||
= favicon_link_tag(image_url("favicons/96x96.png"), type: "image/png", sizes: "96x96")
|
||||
= favicon_link_tag(image_url("#{FAVICON_16PX_SRC}"), type: "image/png", sizes: "16x16")
|
||||
= favicon_link_tag(image_url("#{FAVICON_32PX_SRC}"), type: "image/png", sizes: "32x32")
|
||||
= favicon_link_tag(image_url("#{FAVICON_96PX_SRC}"), type: "image/png", sizes: "96x96")
|
||||
|
||||
= stylesheet_link_tag 'application', media: 'all'
|
||||
= stylesheet_link_tag 'print', media: 'print'
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
<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 <%= "#{APPLICATION_NAME}" %>" src="<%= image_url('mailer/instructeur_mailer/logo.png') %>" 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;" />
|
||||
<img align="middle" alt="Logo <%= "#{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>
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
%title
|
||||
= t("dynamics.page_title")
|
||||
|
||||
= favicon_link_tag(image_url("favicons/16x16.png"), type: "image/png", sizes: "16x16")
|
||||
= favicon_link_tag(image_url("favicons/32x32.png"), type: "image/png", sizes: "32x32")
|
||||
= favicon_link_tag(image_url("favicons/96x96.png"), type: "image/png", sizes: "96x96")
|
||||
= favicon_link_tag(image_url("#{FAVICON_16PX_SRC}"), type: "image/png", sizes: "16x16")
|
||||
= favicon_link_tag(image_url("#{FAVICON_32PX_SRC}"), type: "image/png", sizes: "32x32")
|
||||
= favicon_link_tag(image_url("#{FAVICON_96PX_SRC}"), type: "image/png", sizes: "96x96")
|
||||
|
||||
= stylesheet_link_tag "new_design/print", media: "all"
|
||||
|
||||
|
|
|
@ -27,5 +27,19 @@ APPLICATION_BASE_URL="https://www.demarches-simplifiees.fr"
|
|||
# Personnalisation d'instance - Page externe "Disponibilité" (status page)
|
||||
# STATUS_PAGE_URL=""
|
||||
|
||||
# Personnalisation d'instance - Favicons ---> à placer dans "app/assets/images"
|
||||
# FAVICON_16PX_SRC="favicons/16x16.png"
|
||||
# FAVICON_32PX_SRC="favicons/32x32.png"
|
||||
# FAVICON_96PX_SRC="favicons/96x96.png"
|
||||
|
||||
# Personnalisation d'instance - Logo de l'application ---> à placer dans "app/assets/images"
|
||||
# HEADER_LOGO_SRC="marianne.png"
|
||||
# HEADER_LOGO_ALT=""
|
||||
# HEADER_LOGO_WIDTH="65"
|
||||
# HEADER_LOGO_HEIGHT="56"
|
||||
|
||||
# Personnalisation d'instance - Logo dans l'entête des emails ---> à placer dans "app/assets/images"
|
||||
# MAILER_LOGO_SRC="mailer/instructeur_mailer/logo.png"
|
||||
|
||||
# Personnalisation d'instance - fichier utilisé pour poser un filigrane sur les pièces d'identité
|
||||
# WATERMARK_FILE=""
|
||||
|
|
13
config/initializers/images.rb
Normal file
13
config/initializers/images.rb
Normal file
|
@ -0,0 +1,13 @@
|
|||
# Favicons
|
||||
FAVICON_16PX_SRC = ENV.fetch("FAVICON_16PX_SRC", "favicons/16x16.png")
|
||||
FAVICON_32PX_SRC = ENV.fetch("FAVICON_32PX_SRC", "favicons/32x32.png")
|
||||
FAVICON_96PX_SRC = ENV.fetch("FAVICON_96PX_SRC", "favicons/96x96.png")
|
||||
|
||||
# Header logo
|
||||
HEADER_LOGO_SRC = ENV.fetch("HEADER_LOGO_SRC", "marianne.png")
|
||||
HEADER_LOGO_ALT = ENV.fetch("HEADER_LOGO_ALT", "Liberté, égalité, fraternité")
|
||||
HEADER_LOGO_WIDTH = ENV.fetch("HEADER_LOGO_WIDTH", "65")
|
||||
HEADER_LOGO_HEIGHT = ENV.fetch("HEADER_LOGO_HEIGHT", "56")
|
||||
|
||||
# Mailer logo
|
||||
MAILER_LOGO_SRC = ENV.fetch("MAILER_LOGO_SRC", "mailer/instructeur_mailer/logo.png")
|
Loading…
Reference in a new issue