From 050e739c59d370f3dda3c93ddc70060abe622f91 Mon Sep 17 00:00:00 2001 From: Djordje Vlaisavljevic Date: Mon, 30 Jan 2023 12:23:45 +0000 Subject: [PATCH] Updated new mention notification email design refs https://github.com/TryGhost/Team/issues/2491 --- .../email-templates/new-mention-received.hbs | 139 ++++++++++++------ ghost/staff-service/lib/emails.js | 7 +- 2 files changed, 103 insertions(+), 43 deletions(-) diff --git a/ghost/staff-service/lib/email-templates/new-mention-received.hbs b/ghost/staff-service/lib/email-templates/new-mention-received.hbs index a0c37527ba..0e685fcd10 100644 --- a/ghost/staff-service/lib/email-templates/new-mention-received.hbs +++ b/ghost/staff-service/lib/email-templates/new-mention-received.hbs @@ -1,54 +1,109 @@ - + + + + + + πŸ’Œ New mention from: {{sourceSiteTitle}} + {{> styles}} + + + + + + + +
  +
- - - - - - + + {{#> preview}} + {{#*inline "content"}} + Hey there, your post was mentioned. + {{/inline}} + {{/preview}} - - - - -
+ -
- - + + - - +
+ +
+ + +
+

Hey there,

+

Your post {{targetUrl}} was mentioned in:

-
- - - + -

Team Ghost
- https://ghost.org

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

{{sourceTitle}}

+

+ {{#if sourceSiteTitle}} + {{sourceSiteTitle}} + {{/if}} + {{#if sourceAuthor}} + • {{sourceAuthor}} + {{/if}} +

+
+
- -

You have been mentioned by {{sourceUrl}}!

+ + + + + + +
+ + + + + + +
View mentions
+
+
+

You can also copy & paste this URL into your browser:

+ +
+

This message was sent from {{siteDomain}} to {{toEmail}}

+
+

Don’t want to receive these emails? Manage your preferences here.

+
-
-
- - - - - -
+ +
+
+ + +
- - +
 
+ - diff --git a/ghost/staff-service/lib/emails.js b/ghost/staff-service/lib/emails.js index ef3b57a31e..eda8bff677 100644 --- a/ghost/staff-service/lib/emails.js +++ b/ghost/staff-service/lib/emails.js @@ -146,10 +146,15 @@ class StaffServiceEmails { const users = await this.models.User.findAll(); // sending to all staff users for now for (const user of users) { const to = user.toJSON().email; - const subject = `You've been mentioned!`; + const subject = `πŸ’Œ New mention from: ${mention.sourceSiteTitle}`; const templateData = { + targetUrl: mention.target, sourceUrl: mention.source, + sourceTitle: mention.sourceTitle, + sourceSiteTitle: mention.sourceSiteTitle, + sourceFavicon: mention.sourceFavicon, + sourceAuthor: mention.sourceAuthor, siteTitle: this.settingsCache.get('title'), siteUrl: this.urlUtils.getSiteUrl(), siteDomain: this.siteDomain,