mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-13 23:37:47 +00:00
Improve email footer of all emails
Use wrap style full width background like header Move 'Powered by...' message to footer and rephrase to suit all recipients (not shoppers only) Always show link to openfoodnetwork.org instead of email (if present) because email will be available via icon in the row below now Add social media buttons of instance to email footer Make footer text and icons dark gray (as instance name in email header)
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
@import '../../../webpacker/css/admin/globals/palette.scss';
|
||||
@import 'email';
|
||||
@import 'payments_list';
|
||||
@import '../../../webpacker/css/darkswarm/style.scss';
|
||||
|
||||
@@ -55,18 +55,29 @@ p.callout {
|
||||
color: #0096ad;
|
||||
}
|
||||
|
||||
p.footer, p.footer_icons a {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
p.footer_icons {
|
||||
font-size: 0px;
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
p.footer_icons a:not(.ofn-i_image) {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
p.notice {
|
||||
font-style: italic;
|
||||
font-size: 12px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.powered-by-ofn {
|
||||
background-color: #ebebeb;
|
||||
padding: .5em;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
table.social {
|
||||
background-color: #ebebeb;
|
||||
|
||||
@@ -177,11 +188,12 @@ del.quantity_was {
|
||||
}
|
||||
|
||||
/* -------------------------------------
|
||||
* HEADER
|
||||
* HEADER & FOOTER
|
||||
*------------------------------------- */
|
||||
|
||||
table.head-wrap {
|
||||
.wrap {
|
||||
width: 100%;
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
|
||||
.header.container table td {
|
||||
|
||||
@@ -1,16 +1,6 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module MailerHelper
|
||||
def footer_ofn_link
|
||||
ofn = I18n.t("shared.mailers.powered_by.open_food_network")
|
||||
|
||||
if ContentConfig.footer_email.present?
|
||||
mail_to ContentConfig.footer_email, ofn
|
||||
else
|
||||
link_to ofn, "https://www.openfoodnetwork.org"
|
||||
end
|
||||
end
|
||||
|
||||
def order_reply_email(order)
|
||||
order.distributor.email_address.presence || order.distributor.contact.email
|
||||
end
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
class PaymentMailer < ApplicationMailer
|
||||
include I18nHelper
|
||||
helper MailerHelper
|
||||
|
||||
def authorize_payment(payment)
|
||||
@payment = payment
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
module Spree
|
||||
class ShipmentMailer < ApplicationMailer
|
||||
helper MailerHelper
|
||||
|
||||
def shipped_email(shipment, delivery:)
|
||||
@shipment = shipment.respond_to?(:id) ? shipment : Spree::Shipment.find(shipment)
|
||||
@delivery = delivery
|
||||
|
||||
@@ -6,8 +6,6 @@ module Spree
|
||||
class UserMailer < ApplicationMailer
|
||||
include I18nHelper
|
||||
|
||||
helper MailerHelper
|
||||
|
||||
# Overrides `Devise::Mailer.reset_password_instructions`
|
||||
def reset_password_instructions(user, token, _opts = {})
|
||||
@edit_password_reset_url = spree.
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
= stylesheet_link_tag 'mail'
|
||||
%body{:bgcolor => "#FFFFFF" }
|
||||
- unless @hide_ofn_navigation
|
||||
%table.head-wrap{:bgcolor => "#f2f2f2"}
|
||||
%table.wrap
|
||||
%tr
|
||||
%td
|
||||
%td.header.container
|
||||
@@ -34,15 +34,39 @@
|
||||
= yield
|
||||
%td
|
||||
|
||||
%table.footer-wrap
|
||||
%table.wrap
|
||||
%tr
|
||||
%td
|
||||
%td.container
|
||||
.content
|
||||
%table
|
||||
%tr
|
||||
%td{:align => "center"}
|
||||
%p
|
||||
%td.text-center
|
||||
%p.footer
|
||||
= t(".powered_html", open_food_network: link_to(t(".open_food_network"), "https://www.openfoodnetwork.org", target: '_blank'))
|
||||
|
||||
%tr
|
||||
%td.text-center
|
||||
%p.footer_icons
|
||||
- if ContentConfig.footer_email.present?
|
||||
%a.ofn-i_050-mail-circle{:href => "mailto:#{ContentConfig.footer_email}", :target => "_blank"}
|
||||
- if ContentConfig.footer_instagram_url.present?
|
||||
%a.ofn-i_043-instagram{:href => ContentConfig.footer_instagram_url, :target => "_blank"}
|
||||
- if ContentConfig.footer_facebook_url.present?
|
||||
%a.ofn-i_044-facebook{:href => ContentConfig.footer_facebook_url, :target => "_blank"}
|
||||
- if ContentConfig.footer_linkedin_url.present?
|
||||
%a.ofn-i_042-linkedin{:href => ContentConfig.footer_linkedin_url, :target => "_blank"}
|
||||
- if ContentConfig.footer_googleplus_url.present?
|
||||
%a.ofn-i_046-g{:href => ContentConfig.footer_googleplus_url, :target => "_blank"}
|
||||
- if ContentConfig.footer_pinterest_url.present?
|
||||
%a.ofn-i_045-pintrest{:href => ContentConfig.footer_pinterest_url, :target => "_blank"}
|
||||
- if ContentConfig.footer_twitter_url.present?
|
||||
%a.ofn-i_image{:href => ContentConfig.footer_twitter_url, :target => "_blank"}
|
||||
%img{src: image_path("/map_icons/social-logos/x999.png"), style: "width: 20px; position: relative; top: 1.5px;" }
|
||||
|
||||
%tr
|
||||
%td.text-center
|
||||
%p.footer
|
||||
- if platform_terms_required?
|
||||
= link_to_platform_terms
|
||||
|
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
%p.powered-by-ofn
|
||||
= t(".powered_html", open_food_network: footer_ofn_link)
|
||||
@@ -27,4 +27,3 @@
|
||||
= t(".unpaid_order")
|
||||
|
||||
= render 'signoff'
|
||||
= render 'shared/mailers/powered_by'
|
||||
|
||||
@@ -26,4 +26,3 @@
|
||||
= render 'shipping'
|
||||
= render 'special_instructions'
|
||||
= render 'signoff'
|
||||
= render 'shared/mailers/powered_by'
|
||||
|
||||
@@ -12,7 +12,5 @@
|
||||
|
||||
= render 'shared/mailers/signoff'
|
||||
|
||||
= render 'shared/mailers/powered_by'
|
||||
|
||||
%p.notice
|
||||
= t :email_confirmation_notice_unexpected, sitename: @instance, contact: @contact
|
||||
|
||||
@@ -20,4 +20,3 @@
|
||||
|
||||
%p
|
||||
= render 'shared/mailers/signoff'
|
||||
= render 'shared/mailers/powered_by'
|
||||
|
||||
@@ -20,4 +20,3 @@
|
||||
|
||||
%p
|
||||
= render 'shared/mailers/signoff'
|
||||
= render 'shared/mailers/powered_by'
|
||||
|
||||
@@ -360,6 +360,10 @@ en:
|
||||
report_failed: |
|
||||
This report failed. It may be too big to process.
|
||||
We will look into it but please let us know if the problem persists.
|
||||
layouts:
|
||||
mailer:
|
||||
open_food_network: "Open Food Network"
|
||||
powered_html: "This service is powered by the %{open_food_network}."
|
||||
enterprise_mailer:
|
||||
confirmation_instructions:
|
||||
subject: "Please confirm the email address for %{enterprise}"
|
||||
@@ -2073,11 +2077,6 @@ en:
|
||||
show_closed_shops: "Show closed shops"
|
||||
hide_closed_shops: "Hide closed shops"
|
||||
show_on_map: "Show all on the map"
|
||||
shared:
|
||||
mailers:
|
||||
powered_by:
|
||||
open_food_network: "Open Food Network"
|
||||
powered_html: "Your shopping experience is powered by the %{open_food_network}."
|
||||
menu:
|
||||
cart:
|
||||
cart: "Cart"
|
||||
|
||||
BIN
public/map_icons/social-logos/x999.png
Normal file
BIN
public/map_icons/social-logos/x999.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.8 KiB |
Reference in New Issue
Block a user