From 2baf6c18b257bdc7e42c4b25ef6664040c97c4b9 Mon Sep 17 00:00:00 2001 From: drummer83 Date: Wed, 17 Jan 2024 23:22:57 +0100 Subject: [PATCH] Add new partial for greeting, intro text and logo (if present) to use in ALL emails Adjust maximum size of logo and improve responsive behaviour on small screens (display logo centered and above text) --- app/assets/stylesheets/mail/email.scss | 9 +++++++++ app/views/shared/mailers/_greeting_and_intro.html.haml | 8 ++++++++ 2 files changed, 17 insertions(+) create mode 100644 app/views/shared/mailers/_greeting_and_intro.html.haml diff --git a/app/assets/stylesheets/mail/email.scss b/app/assets/stylesheets/mail/email.scss index caa20499ca..5542c3d4c7 100644 --- a/app/assets/stylesheets/mail/email.scss +++ b/app/assets/stylesheets/mail/email.scss @@ -181,6 +181,10 @@ a { img.float-right { float: right; display: block; + max-width: 100px; + max-height: 100px; + margin-bottom: 15px; + margin-left: 15px; } del.quantity_was { @@ -379,6 +383,10 @@ ul { } } +.greeting_and_intro { + overflow: hidden; +} + /* Let's make sure tables in the content area are 100% wide */ /* Odds and ends */ @@ -445,6 +453,7 @@ ul { img.float-right { float: none !important; + margin: 0px auto 15px; } } diff --git a/app/views/shared/mailers/_greeting_and_intro.html.haml b/app/views/shared/mailers/_greeting_and_intro.html.haml new file mode 100644 index 0000000000..0dc1719444 --- /dev/null +++ b/app/views/shared/mailers/_greeting_and_intro.html.haml @@ -0,0 +1,8 @@ +.greeting_and_intro + - if @enterprise_for_logo + = image_tag @enterprise_for_logo.logo_url(:medium), class: "float-right" + + %h4 + = greeting + %p + = intro