From db3a8a6b302726f58ce27fb17d6e2ad72a29a617 Mon Sep 17 00:00:00 2001 From: Konrad Date: Tue, 18 Mar 2025 15:17:32 +0100 Subject: [PATCH] Header: Improve logo, resizing and styles Use the site's main logo instead of footer logo to allow for better contrast on gray background (dark text on gray instead of white text on gray) The table's background color is defined in the parent table already Limit the max width and max height of the logo and resize the logo accordingly instead of forcing it to squeeze into a fixed size --- app/assets/stylesheets/mail/email.scss | 18 +++++++----------- app/views/layouts/mailer.html.haml | 10 +++++----- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/app/assets/stylesheets/mail/email.scss b/app/assets/stylesheets/mail/email.scss index bfb0684f9c..928b9e5807 100644 --- a/app/assets/stylesheets/mail/email.scss +++ b/app/assets/stylesheets/mail/email.scss @@ -121,6 +121,12 @@ table.order-summary { text-align: right; } +.logo { + vertical-align: middle; + max-height: 50px; + max-width: 300px; +} + .social .soc-btn { padding: 3px 7px; font-size: 12px; @@ -178,17 +184,7 @@ del.quantity_was { table.head-wrap { width: 100%; -} - -.header.container table td { - &.logo { - padding: 15px; - } - - &.label { - padding: 15px; - padding-left: 0px; - } + background-color: #f2f2f2; } /* ------------------------------------- diff --git a/app/views/layouts/mailer.html.haml b/app/views/layouts/mailer.html.haml index f12aad1928..23d7e412b1 100644 --- a/app/views/layouts/mailer.html.haml +++ b/app/views/layouts/mailer.html.haml @@ -8,16 +8,16 @@ = stylesheet_link_tag 'mail' %body{:bgcolor => "#FFFFFF" } - unless @hide_ofn_navigation - %table.head-wrap{:bgcolor => "#f2f2f2"} + %table.head-wrap %tr %td - %td.header.container + %td.container .content - %table{:bgcolor => "#f2f2f2"} + %table %tr %td - = image_tag ContentConfig.url_for(:footer_logo), width: "144", height: "50" - %td{:align => "right"} + = image_tag ContentConfig.url_for(:logo), class: "logo" + %td.text-right %h6.collapse = Spree::Config[:site_name] %td