diff --git a/views/emails/statsNotification.html b/views/emails/statsNotification.html index 66abc66296..7d6a562163 100644 --- a/views/emails/statsNotification.html +++ b/views/emails/statsNotification.html @@ -1,29 +1,5 @@ - - - - - - - <%= subject %> - +<% extends 'emails/statsNotificationLayout.html' %> - <% if opened > 30 %> <% set openedColor = '2993ab' %> <% elseif opened > 10 %> @@ -31,6 +7,7 @@ <% else %> <% set openedColor = 'd54e21' %> <% endif %> + <% if clicked > 3 %> <% set clickedColor = '2993ab' %> <% elseif clicked > 1 %> @@ -38,301 +15,189 @@ <% else %> <% set clickedColor = 'd54e21' %> <% endif %> - - - + +<% block content %> - + -
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ new_logo_orange +
+

+ <%= __('Your stats are in!') %> +

+
+

+ <%= subject %> +

+
+
+
+
+ - - - - <% if topLinkClicks > 0 %> - - + + <% if topLinkClicks > 0 %> + +
- + - - -
+ -
- - - - - - - - - - - - -
- -
-

- - <%= number_format_i18n(opened, 1) %>% - -

-
- - - -
- - <%= __('open rate') %> - -
-
-
- -
- - - - - - - - - - - - -
- -
-

- - <%= number_format_i18n(clicked, 1) %>% - -

-
- - - -
- - <%= __('click rate') %> - -
-
-
-
- + - - - + + +
+ +
- - -
- - + + + +
+

+ + <%= number_format_i18n(opened, 1) %>% + +

+
+ - - - - - - -
+ + <%= __('open rate') %>
- - - -
- <% if topLink starts with 'http' %> - - <%= topLink %> - - <% else %> - <%= topLink %> - <% endif %> -
- - - -
- - <%= __('%s unique clicks')|replace({'%s': topLinkClicks}) %> - -
-
+
+ + +
+ + + + + + + + + + + + +
+ +
+

+ + <%= number_format_i18n(clicked, 1) %>% + +

+
+ + + +
+ + <%= __('click rate') %> + +
+
+
+
+ + - + + + <% endif %> + + + +<% endblock %> diff --git a/views/emails/statsNotification.txt b/views/emails/statsNotification.txt index ef8708fca4..b089898ef7 100644 --- a/views/emails/statsNotification.txt +++ b/views/emails/statsNotification.txt @@ -1,3 +1,6 @@ +<% extends 'emails/statsNotificationLayout.txt' %> + +<% block content %> <%= __('Your stats are in!') %> <%= subject %> @@ -30,7 +33,4 @@ <%= __('View all stats') %> <%= linkStats %> - -<%= __('How to improve my open rate?') %> https://www.mailpoet.com/how-to-improve-open-rates/ -<%= __('And my click rate?') %> https://www.mailpoet.com/how-to-improve-click-rates/ -<%= __('Disable these emails') %> <%= linkSettings %> +<% endblock %> diff --git a/views/emails/statsNotificationLayout.html b/views/emails/statsNotificationLayout.html new file mode 100644 index 0000000000..c2df27e555 --- /dev/null +++ b/views/emails/statsNotificationLayout.html @@ -0,0 +1,134 @@ + + + + + + + <%= subject %> + + + + +
- + + - -
+ - - - - -
- - + @@ -340,90 +205,102 @@
+ - - - - - - - - - - -
- - - - -
-
+
- -
- - - - - - -
- - - - - - - - - -
- new_logo_white -
-
-
- - - +
+ + + + + + +
+ + + + + + + + + +
+ + + +
+ <% if topLink starts with 'http' %> + + <%= topLink %> + + <% else %> + <%= topLink %> + <% endif %> +
+ + + +
+ + <%= __('%s unique clicks')|replace({'%s': topLinkClicks}) %> + +
+
+
+
+ + + + + + +
+ + + + + + + + + + + + + + + +
+ + + + +
+
+
+ +
+
+
+ + + <% if preheader %> + + <% endif %> + + + + + +
+ + + <% block content %><% endblock %> + + + + + +
+ + + + + + +
+ + + + + + + + + +
+ new_logo_white +
+
+
+ + + diff --git a/views/emails/statsNotificationLayout.txt b/views/emails/statsNotificationLayout.txt new file mode 100644 index 0000000000..b898e2577f --- /dev/null +++ b/views/emails/statsNotificationLayout.txt @@ -0,0 +1,5 @@ +<% block content %><% endblock %> + +<%= __('How to improve my open rate?') %> https://www.mailpoet.com/how-to-improve-open-rates/ +<%= __('And my click rate?') %> https://www.mailpoet.com/how-to-improve-click-rates/ +<%= __('Disable these emails') %> <%= linkSettings %>