Skip to content

Node.js based forum software built for the modern web

testing new footer with new_post tpl

Julian Lam582dd1ed2eb6
diff --git a/public/images/emails/unreadpost.png b/public/images/emails/unreadpost.png
new file mode 100644
index 0000000000..8228478618
Binary files /dev/null and b/public/images/emails/unreadpost.png differ
diff --git a/src/topics/follow.js b/src/topics/follow.js
index 62ee424eea..5d0de0e5a5 100644
--- a/src/topics/follow.js
+++ b/src/topics/follow.js
@@ -265,6 +265,7 @@ module.exports = function (Topics) {
topicSlug: postData.topic.slug,
postCount: postData.topic.postcount,
base_url: nconf.get('url'),
+ showUnsubscribe: true,
}, next);
} else {
winston.debug('[topics.notifyFollowers] uid ' + toUid + ' does not have post notifications enabled, skipping.');
diff --git a/src/views/emails/notif_post.tpl b/src/views/emails/notif_post.tpl
index 4fd360575f..d85ed96606 100644
--- a/src/views/emails/notif_post.tpl
+++ b/src/views/emails/notif_post.tpl
@@ -1,13 +1,56 @@
-<p>[[email:greeting_with_name, {username}]],</p>
+<!-- IMPORT emails/partials/header.tpl -->
-<p>{intro}:</p>
-<blockquote>{postBody}</blockquote>
+<!-- Email Body : BEGIN -->
+<table role="presentation" cellspacing="0" cellpadding="0" border="0" align="center" width="100%" style="max-width: 600px;">
-<a href="{url}">[[email:notif.post.cta]]</a>
+ <!-- Hero Image, Flush : BEGIN -->
+ <tr>
+ <td bgcolor="#efeff0" style="text-align: center; background-image: url({url}/assets/images/emails/triangularbackground.png); background-size: cover; background-repeat: no-repeat;">
+ <img src="{url}/assets/images/emails/unreadpost.png" width="300" height="300" border="0" align="center" style="width: 300px; height: 300px; max-width: 300px; height: auto; font-family: sans-serif; font-size: 15px; line-height: 20px; color: #555555;" class="g-img">
+ </td>
+ </tr>
+ <!-- Hero Image, Flush : END -->
-<!-- IMPORT emails/partials/footer.tpl -->
+ <!-- 1 Column Text + Button : BEGIN -->
+ <tr>
+ <td bgcolor="#efeff0">
+ <table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
+ <tr>
+ <td style="padding: 40px; font-family: sans-serif; font-size: 15px; line-height: 20px; color: #555555;">
+ <p style="margin: 0;">{intro}</p>
+ </td>
+ </tr>
+ <tr>
+ <td style="padding: 60px; font-family: sans-serif; font-size: 12px; font-style: italic; line-height: 20px; color: #777777;">
+ <p style="margin: 0;">{postBody}</p>
+ </td>
+ </tr>
+ <tr>
+ <td style="padding: 0 40px; font-family: sans-serif; font-size: 15px; line-height: 20px; color: #555555;">
+ <!-- Button : BEGIN -->
+ <table role="presentation" cellspacing="0" cellpadding="0" border="0" align="center" style="margin: auto;">
+ <tr>
+ <td style="border-radius: 3px; background: #222222; text-align: center;" class="button-td">
+ <a href="{url}" style="background: #222222; border: 15px solid #222222; font-family: sans-serif; font-size: 13px; line-height: 1.1; text-align: center; text-decoration: none; display: block; border-radius: 3px; font-weight: bold;" class="button-a">
+ <span style="color:#ffffff;" class="button-link">&nbsp;&nbsp;&nbsp;&nbsp;[[email:notif.post.cta]]&nbsp;&nbsp;&nbsp;&nbsp;</span>
+ </a>
+ </td>
+ </tr>
+ </table>
+ <!-- Button : END -->
+ </td>
+ </tr>
+ <tr>
+ <td style="padding: 40px; font-family: sans-serif; font-size: 15px; line-height: 20px; color: #555555;">
+ <p style="margin: 0;">{site_title}</p>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <!-- 1 Column Text + Button : END -->
+
+</table>
+<!-- Email Body : END -->
-<hr />
-<p>
- [[email:notif.post.unsub.info]] <a href="{base_url}/user/{userslug}/settings">[[email:unsub.cta]]</a>.
-</p>
+<!-- IMPORT emails/partials/footer.tpl -->
diff --git a/src/views/emails/partials/footer.tpl b/src/views/emails/partials/footer.tpl
index af6b7d4369..236887425c 100644
--- a/src/views/emails/partials/footer.tpl
+++ b/src/views/emails/partials/footer.tpl
@@ -3,7 +3,9 @@
<tr>
<td style="padding: 40px 10px;width: 100%;font-size: 12px; font-family: sans-serif; line-height:18px; text-align: center; color: #888888;" class="x-gmail-data-detectors">
<br><br>
- &nbsp;
+ <!-- IF showUnsubscribe -->
+ [[email:notif.post.unsub.info]] <a href="{base_url}/user/{userslug}/settings">[[email:unsub.cta]]</a>.
+ <!-- ENDIF showUnsubscribe -->
<br><br>
</td>
</tr>