From 575578245fe9cd23fe5552c26c4eee2a9b79c1b2 Mon Sep 17 00:00:00 2001 From: Jason Zimdars Date: Tue, 14 Oct 2025 18:28:27 -0500 Subject: [PATCH] Copy and style improvements to mailer --- app/helpers/magic_link_helper.rb | 2 +- app/views/layouts/mailer.html.erb | 18 +++++++++++++++--- .../sign_in_instructions.html.erb | 17 ++++++++--------- .../sign_in_instructions.text.erb | 2 +- .../bundle_mailer/notification.html.erb | 2 +- 5 files changed, 26 insertions(+), 15 deletions(-) diff --git a/app/helpers/magic_link_helper.rb b/app/helpers/magic_link_helper.rb index d34d71115..e17a78fc1 100644 --- a/app/helpers/magic_link_helper.rb +++ b/app/helpers/magic_link_helper.rb @@ -1,5 +1,5 @@ module MagicLinkHelper def magic_link_code(magic_link) - magic_link.code.scan(/.{3}/).join("-") + magic_link.code end end diff --git a/app/views/layouts/mailer.html.erb b/app/views/layouts/mailer.html.erb index ede44cc77..5e3c6e69f 100644 --- a/app/views/layouts/mailer.html.erb +++ b/app/views/layouts/mailer.html.erb @@ -65,7 +65,7 @@ border-radius: 3rem; color: #ffffff; font-weight: 500; - padding: 0.2em 0.4em; + padding: 0.5em 1em; text-decoration: none; white-space: nowrap; } @@ -81,7 +81,7 @@ margin-bottom: 0; margin-top: 0; } - + .footer { border-top: 1px solid #ccc; margin-top: 3em; @@ -107,10 +107,18 @@ text-transform: uppercase; } + .margin-block-end-double { + margin-bottom: 2em; + } + + .margin-block-start-double { + margin-top: 2em; + } + .subtitle { font-size: 1.2em; font-weight: normal; - margin-bottom: 2em; + margin-bottom: 1em; margin-top: 0.1em; } @@ -119,6 +127,10 @@ font-weight: 900; margin-bottom: 0; } + + .txt-large { + font-size: 1.2em; + } diff --git a/app/views/mailers/magic_link_mailer/sign_in_instructions.html.erb b/app/views/mailers/magic_link_mailer/sign_in_instructions.html.erb index 69cb84cf8..f7e78e8dc 100644 --- a/app/views/mailers/magic_link_mailer/sign_in_instructions.html.erb +++ b/app/views/mailers/magic_link_mailer/sign_in_instructions.html.erb @@ -1,13 +1,12 @@ -

Sign in to Fizzy

+

Sign in to Fizzy

+

Hit the button below to sign in to Fizzy on this device

-
-

Hit the button below to sign in to Fizzy on this device

+<%= link_to "Sign in to Fizzy", session_magic_link_url(code: @magic_link.code), class: "btn" %> -
<%= link_to "Sign in to Fizzy", session_magic_link_url(code: @magic_link.code), class: "btn" %>
-
+

If you're signing in on another device, enter this special code: +
<%= magic_link_code(@magic_link) %> +

-
-

If you're signing in on another device, enter the code below:

+ - <%= magic_link_code(@magic_link) %> -
diff --git a/app/views/mailers/magic_link_mailer/sign_in_instructions.text.erb b/app/views/mailers/magic_link_mailer/sign_in_instructions.text.erb index 129bce961..1cea60920 100644 --- a/app/views/mailers/magic_link_mailer/sign_in_instructions.text.erb +++ b/app/views/mailers/magic_link_mailer/sign_in_instructions.text.erb @@ -4,5 +4,5 @@ Sign in to Fizzy Open this link in your browser to login on this device: <%= session_magic_link_url(code: @magic_link.code) %> -If you're signing in on another device, enter the code below: +If you're signing in on another device, enter this code: <%= magic_link_code(@magic_link) %> diff --git a/app/views/mailers/notification/bundle_mailer/notification.html.erb b/app/views/mailers/notification/bundle_mailer/notification.html.erb index 19191c645..5983a2bc1 100644 --- a/app/views/mailers/notification/bundle_mailer/notification.html.erb +++ b/app/views/mailers/notification/bundle_mailer/notification.html.erb @@ -1,7 +1,7 @@

Everything since <%= @bundle.starts_at.strftime("%-l%P on %A, %B %-d") %>

-

You have <%= link_to pluralize(@notifications.count, "new notification"), notifications_url %>.

+

You have <%= link_to pluralize(@notifications.count, "new notification"), notifications_url %>.

<%= render partial: "notification/bundle_mailer/notification", collection: @notifications, as: :notification %>