From 7c3e5b2b999f3cc830b02a2ec21735cc464bf16d Mon Sep 17 00:00:00 2001 From: Philip How Date: Thu, 2 May 2024 14:42:21 +0100 Subject: [PATCH] update style for new follower email (#20908) --- .../notify_mailer/_email_header.html.erb | 31 ++++++ .../notify_mailer/new_follower_email.html.erb | 57 ++++++++--- .../notify_mailer/new_reply_email.html.erb | 94 +++++++------------ 3 files changed, 109 insertions(+), 73 deletions(-) create mode 100644 app/views/mailers/notify_mailer/_email_header.html.erb diff --git a/app/views/mailers/notify_mailer/_email_header.html.erb b/app/views/mailers/notify_mailer/_email_header.html.erb new file mode 100644 index 000000000..f8d99ab2d --- /dev/null +++ b/app/views/mailers/notify_mailer/_email_header.html.erb @@ -0,0 +1,31 @@ + + + + +
+ + + + + + +
+ "> + <% if Settings::General.resized_logo.present? %> + " alt="<%= community_name %>"> + <% else %> + + <%= community_name %> + + <% end %> + + +
+ + + +
+
+ + <%= yield %> +
\ No newline at end of file diff --git a/app/views/mailers/notify_mailer/new_follower_email.html.erb b/app/views/mailers/notify_mailer/new_follower_email.html.erb index 8318a6a08..112531586 100644 --- a/app/views/mailers/notify_mailer/new_follower_email.html.erb +++ b/app/views/mailers/notify_mailer/new_follower_email.html.erb @@ -1,14 +1,47 @@ -<% num_followers_past_days = Follow.followable_user(@user.id).where("created_at > ?", 24.hours.ago).size %> +<%= render 'mailers/notify_mailer/email_header' do %> + + + + + + + + + + + + + + +
+

+ <%= @follower.name %> just followed you on <%= community_name %> +

+
+ <%= @follower.name %> profile image +
+ + View their profile + +
+ + + + + + +
+

You now have <%= pluralize(@user.good_standing_followers_count, "total follower" + ) %>. +

+ When someone follows you on <%= community_name %>, your posts will be prioritized in their feed and + notifications. The perks of popularity I suppose. +

-<% if num_followers_past_days.positive? %> -

You have <%= num_followers_past_days %> new <%= community_name %> followers in the past day!

+
+
<% end %> - -

- <%= @follower.name %> just followed you 🤗

-

You now have <%= pluralize(@user.good_standing_followers_count, "total follower") %>. See all of your recent followers - ">right here.

-

- When someone follows you on - <%= community_name %>, your posts will be prioritized in their feed and notifications. The perks of popularity I suppose. -

diff --git a/app/views/mailers/notify_mailer/new_reply_email.html.erb b/app/views/mailers/notify_mailer/new_reply_email.html.erb index 39e457188..507991d69 100644 --- a/app/views/mailers/notify_mailer/new_reply_email.html.erb +++ b/app/views/mailers/notify_mailer/new_reply_email.html.erb @@ -1,65 +1,37 @@ - - - - -
- - - - - - -
- "> - <% if Settings::General.resized_logo.present? %> - " alt="<%= community_name %>"> - <% else %> - - <%= community_name %> - - <% end %> - - -
- - - -
-
+<%= render 'mailers/notify_mailer/email_header' do %> + + + + + -
+

<%= @comment.user.name %> replied to you on <%= community_name %>

+
- - - - + + + - - - - - - -
-

<%= @comment.user.name %> replied to you on <%= community_name %>

-
+ + + + - + - - - -
+

re: <%= @comment.commentable&.title || "Content No Longer Available" %>

- -
- - - - + + +
-

re: <%= @comment.commentable&.title || "Content No Longer Available" %>

+ <%= @truncated_comment %> - <%= @truncated_comment %> +
+
-
- - View reply - -
-
\ No newline at end of file + + + + + View reply + + + + +<% end %> \ No newline at end of file