From cdcb3dcd6fbbc23bbf4663a9d7e67330314da7f5 Mon Sep 17 00:00:00 2001 From: Sanne de Vries <65487235+sanne-san@users.noreply.github.com> Date: Thu, 16 Mar 2023 16:10:53 +0100 Subject: [PATCH] Updated email template to include comment link in header and footer (#16423) Refs https://github.com/TryGhost/Team/issues/2740 --------- Co-authored-by: Steve Larson <9larsons@gmail.com> --- .../__snapshots__/email-previews.test.js.snap | 275 ++++++++++++++---- .../__snapshots__/batch-sending.test.js.snap | 243 +++++++++++++--- ghost/email-service/lib/email-renderer.js | 2 + .../partials/feedback-button.hbs | 6 +- .../lib/email-templates/partials/styles.hbs | 42 ++- .../lib/email-templates/template.hbs | 44 ++- 6 files changed, 506 insertions(+), 106 deletions(-) diff --git a/ghost/core/test/e2e-api/admin/__snapshots__/email-previews.test.js.snap b/ghost/core/test/e2e-api/admin/__snapshots__/email-previews.test.js.snap index e7fad23783..42a2fcfbfa 100644 --- a/ghost/core/test/e2e-api/admin/__snapshots__/email-previews.test.js.snap +++ b/ghost/core/test/e2e-api/admin/__snapshots__/email-previews.test.js.snap @@ -126,11 +126,25 @@ Object { .post-title-link-left { text-align: left; } +.comment-link { + color: #738a94; + font-size: 13px; + letter-spacing: 0.1px; +} +.comment-link img { + width: 16px; + height: 16px; + margin-bottom: 1px; + vertical-align: middle; +} .view-online-link { word-wrap: none; white-space: nowrap; color: #15212A; } +.view-online-labs .view-online-link { + color: #738a94; +} .kg-nft-link { display: block; text-decoration: none !important; @@ -215,13 +229,28 @@ table.body .article { padding-bottom: 15px !important; } - table.body .post-meta { + table.body .post-meta, +table.body .post-meta-date { white-space: normal !important; font-size: 12px !important; line-height: 1.5em; } + table.body .post-meta-labs, +table.body .view-online-labs { + display: inline-block; + } + + table.body .post-meta.author-date { + width: 100%; + } + + table.body .view-online-labs { + text-decoration: underline; + } + table.body .view-online-link, +table.body .comment-link, table.body .footer, table.body .footer a { font-size: 12px !important; @@ -391,13 +420,16 @@ table.body figcaption a { - - - - -
- By Joe Bloggs – 1 Jan 1970 – View online → -
+ + + + + +
+ By Joe Bloggs • 1 Jan 1970 + + View in browser +
@@ -519,7 +551,10 @@ Post with email-only card [http://127.0.0.1:2369/p/d52c42ae-2755-455c-80ec-70b2e -By Joe Bloggs – 1 Jan 1970 – View online → [http://127.0.0.1:2369/p/d52c42ae-2755-455c-80ec-70b2ec55c904/] +By Joe Bloggs • 1 Jan 1970 + + +View in browser [http://127.0.0.1:2369/p/d52c42ae-2755-455c-80ec-70b2ec55c904/] @@ -585,7 +620,7 @@ exports[`Email Preview API Read can read post email preview with email card and Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "18962", + "content-length": "20189", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -625,11 +660,25 @@ Object { .post-title-link-left { text-align: left; } +.comment-link { + color: #738a94; + font-size: 13px; + letter-spacing: 0.1px; +} +.comment-link img { + width: 16px; + height: 16px; + margin-bottom: 1px; + vertical-align: middle; +} .view-online-link { word-wrap: none; white-space: nowrap; color: #15212A; } +.view-online-labs .view-online-link { + color: #738a94; +} .kg-nft-link { display: block; text-decoration: none !important; @@ -714,13 +763,28 @@ table.body .article { padding-bottom: 15px !important; } - table.body .post-meta { + table.body .post-meta, +table.body .post-meta-date { white-space: normal !important; font-size: 12px !important; line-height: 1.5em; } + table.body .post-meta-labs, +table.body .view-online-labs { + display: inline-block; + } + + table.body .post-meta.author-date { + width: 100%; + } + + table.body .view-online-labs { + text-decoration: underline; + } + table.body .view-online-link, +table.body .comment-link, table.body .footer, table.body .footer a { font-size: 12px !important; @@ -890,13 +954,16 @@ table.body figcaption a { - - - - -
- By Joe Bloggs – 1 Jan 2015 – View online → -
+ + + + + +
+ By Joe Bloggs • 1 Jan 2015 + + View in browser +
@@ -1022,7 +1089,10 @@ HTML Ipsum [http://127.0.0.1:2369/html-ipsum/] -By Joe Bloggs – 1 Jan 2015 – View online → [http://127.0.0.1:2369/html-ipsum/] +By Joe Bloggs • 1 Jan 2015 + + +View in browser [http://127.0.0.1:2369/html-ipsum/] @@ -1104,7 +1174,7 @@ exports[`Email Preview API Read can read post email preview with fields 4: [head Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "23785", + "content-length": "25012", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -1175,11 +1245,25 @@ Object { .post-title-link-left { text-align: left; } +.comment-link { + color: #738a94; + font-size: 13px; + letter-spacing: 0.1px; +} +.comment-link img { + width: 16px; + height: 16px; + margin-bottom: 1px; + vertical-align: middle; +} .view-online-link { word-wrap: none; white-space: nowrap; color: #15212A; } +.view-online-labs .view-online-link { + color: #738a94; +} .kg-nft-link { display: block; text-decoration: none !important; @@ -1264,13 +1348,28 @@ table.body .article { padding-bottom: 15px !important; } - table.body .post-meta { + table.body .post-meta, +table.body .post-meta-date { white-space: normal !important; font-size: 12px !important; line-height: 1.5em; } + table.body .post-meta-labs, +table.body .view-online-labs { + display: inline-block; + } + + table.body .post-meta.author-date { + width: 100%; + } + + table.body .view-online-labs { + text-decoration: underline; + } + table.body .view-online-link, +table.body .comment-link, table.body .footer, table.body .footer a { font-size: 12px !important; @@ -1440,13 +1539,16 @@ table.body figcaption a { - - - - -
- By Joe Bloggs – 1 Jan 1970 – View online → -
+ + + + + +
+ By Joe Bloggs • 1 Jan 1970 + + View in browser +
@@ -1568,7 +1670,10 @@ Post with email-only card [http://127.0.0.1:2369/p/d52c42ae-2755-455c-80ec-70b2e -By Joe Bloggs – 1 Jan 1970 – View online → [http://127.0.0.1:2369/p/d52c42ae-2755-455c-80ec-70b2ec55c904/] +By Joe Bloggs • 1 Jan 1970 + + +View in browser [http://127.0.0.1:2369/p/d52c42ae-2755-455c-80ec-70b2ec55c904/] @@ -1641,7 +1746,7 @@ exports[`Email Preview API Read has custom content transformations for email com Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "18728", + "content-length": "19955", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -2041,11 +2146,25 @@ Object { .post-title-link-left { text-align: left; } +.comment-link { + color: #738a94; + font-size: 13px; + letter-spacing: 0.1px; +} +.comment-link img { + width: 16px; + height: 16px; + margin-bottom: 1px; + vertical-align: middle; +} .view-online-link { word-wrap: none; white-space: nowrap; color: #15212A; } +.view-online-labs .view-online-link { + color: #738a94; +} .kg-nft-link { display: block; text-decoration: none !important; @@ -2130,13 +2249,28 @@ table.body .article { padding-bottom: 15px !important; } - table.body .post-meta { + table.body .post-meta, +table.body .post-meta-date { white-space: normal !important; font-size: 12px !important; line-height: 1.5em; } + table.body .post-meta-labs, +table.body .view-online-labs { + display: inline-block; + } + + table.body .post-meta.author-date { + width: 100%; + } + + table.body .view-online-labs { + text-decoration: underline; + } + table.body .view-online-link, +table.body .comment-link, table.body .footer, table.body .footer a { font-size: 12px !important; @@ -2311,13 +2445,16 @@ table.body figcaption a { - - - - -
- By Joe Bloggs – 1 Jan 1970 – View online → -
+ + + + + +
+ By Joe Bloggs • 1 Jan 1970 + + View in browser +
@@ -2444,7 +2581,10 @@ Post with email-only card [http://127.0.0.1:2369/p/d52c42ae-2755-455c-80ec-70b2e -By Joe Bloggs – 1 Jan 1970 – View online → [http://127.0.0.1:2369/p/d52c42ae-2755-455c-80ec-70b2ec55c904/] +By Joe Bloggs • 1 Jan 1970 + + +View in browser [http://127.0.0.1:2369/p/d52c42ae-2755-455c-80ec-70b2ec55c904/] @@ -2517,7 +2657,7 @@ exports[`Email Preview API Read uses the newsletter provided through ?newsletter Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "19220", + "content-length": "20447", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -2943,11 +3083,25 @@ Object { .post-title-link-left { text-align: left; } +.comment-link { + color: #738a94; + font-size: 13px; + letter-spacing: 0.1px; +} +.comment-link img { + width: 16px; + height: 16px; + margin-bottom: 1px; + vertical-align: middle; +} .view-online-link { word-wrap: none; white-space: nowrap; color: #15212A; } +.view-online-labs .view-online-link { + color: #738a94; +} .kg-nft-link { display: block; text-decoration: none !important; @@ -3032,13 +3186,28 @@ table.body .article { padding-bottom: 15px !important; } - table.body .post-meta { + table.body .post-meta, +table.body .post-meta-date { white-space: normal !important; font-size: 12px !important; line-height: 1.5em; } + table.body .post-meta-labs, +table.body .view-online-labs { + display: inline-block; + } + + table.body .post-meta.author-date { + width: 100%; + } + + table.body .view-online-labs { + text-decoration: underline; + } + table.body .view-online-link, +table.body .comment-link, table.body .footer, table.body .footer a { font-size: 12px !important; @@ -3213,13 +3382,16 @@ table.body figcaption a { - - - - -
- By Joe Bloggs – 1 Jan 1970 – View online → -
+ + + + + +
+ By Joe Bloggs • 1 Jan 1970 + + View in browser +
@@ -3346,7 +3518,10 @@ Post with email-only card [http://127.0.0.1:2369/p/d52c42ae-2755-455c-80ec-70b2e -By Joe Bloggs – 1 Jan 1970 – View online → [http://127.0.0.1:2369/p/d52c42ae-2755-455c-80ec-70b2ec55c904/] +By Joe Bloggs • 1 Jan 1970 + + +View in browser [http://127.0.0.1:2369/p/d52c42ae-2755-455c-80ec-70b2ec55c904/] @@ -3419,7 +3594,7 @@ exports[`Email Preview API Read uses the posts newsletter by default 4: [headers Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "19220", + "content-length": "20447", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, diff --git a/ghost/core/test/integration/services/email-service/__snapshots__/batch-sending.test.js.snap b/ghost/core/test/integration/services/email-service/__snapshots__/batch-sending.test.js.snap index cb20dbb437..debebd46f6 100644 --- a/ghost/core/test/integration/services/email-service/__snapshots__/batch-sending.test.js.snap +++ b/ghost/core/test/integration/services/email-service/__snapshots__/batch-sending.test.js.snap @@ -19,11 +19,25 @@ Object { .post-title-link-left { text-align: left; } +.comment-link { + color: #738a94; + font-size: 13px; + letter-spacing: 0.1px; +} +.comment-link img { + width: 16px; + height: 16px; + margin-bottom: 1px; + vertical-align: middle; +} .view-online-link { word-wrap: none; white-space: nowrap; color: #15212A; } +.view-online-labs .view-online-link { + color: #738a94; +} .kg-nft-link { display: block; text-decoration: none !important; @@ -108,13 +122,28 @@ table.body .article { padding-bottom: 15px !important; } - table.body .post-meta { + table.body .post-meta, +table.body .post-meta-date { white-space: normal !important; font-size: 12px !important; line-height: 1.5em; } + table.body .post-meta-labs, +table.body .view-online-labs { + display: inline-block; + } + + table.body .post-meta.author-date { + width: 100%; + } + + table.body .view-online-labs { + text-decoration: underline; + } + table.body .view-online-link, +table.body .comment-link, table.body .footer, table.body .footer a { font-size: 12px !important; @@ -289,13 +318,16 @@ table.body figcaption a { - - - - -
- By Joe Bloggs – 1 Jan 2023 – View online → -
+ + + + + +
+ By Joe Bloggs • 1 Jan 2023 + + View in browser +
@@ -417,7 +449,10 @@ A random test post [http://127.0.0.1:2369/r/xxxxxx?m=member-uuid] -By Joe Bloggs – 1 Jan 2023 – View online → [http://127.0.0.1:2369/r/xxxxxx?m=member-uuid] +By Joe Bloggs • 1 Jan 2023 + + +View in browser [http://127.0.0.1:2369/r/xxxxxx?m=member-uuid] @@ -498,11 +533,25 @@ Object { .post-title-link-left { text-align: left; } +.comment-link { + color: #738a94; + font-size: 13px; + letter-spacing: 0.1px; +} +.comment-link img { + width: 16px; + height: 16px; + margin-bottom: 1px; + vertical-align: middle; +} .view-online-link { word-wrap: none; white-space: nowrap; color: #15212A; } +.view-online-labs .view-online-link { + color: #738a94; +} .kg-nft-link { display: block; text-decoration: none !important; @@ -587,13 +636,28 @@ table.body .article { padding-bottom: 15px !important; } - table.body .post-meta { + table.body .post-meta, +table.body .post-meta-date { white-space: normal !important; font-size: 12px !important; line-height: 1.5em; } + table.body .post-meta-labs, +table.body .view-online-labs { + display: inline-block; + } + + table.body .post-meta.author-date { + width: 100%; + } + + table.body .view-online-labs { + text-decoration: underline; + } + table.body .view-online-link, +table.body .comment-link, table.body .footer, table.body .footer a { font-size: 12px !important; @@ -927,11 +991,25 @@ Object { .post-title-link-left { text-align: left; } +.comment-link { + color: #738a94; + font-size: 13px; + letter-spacing: 0.1px; +} +.comment-link img { + width: 16px; + height: 16px; + margin-bottom: 1px; + vertical-align: middle; +} .view-online-link { word-wrap: none; white-space: nowrap; color: #15212A; } +.view-online-labs .view-online-link { + color: #738a94; +} .kg-nft-link { display: block; text-decoration: none !important; @@ -1016,13 +1094,28 @@ table.body .article { padding-bottom: 15px !important; } - table.body .post-meta { + table.body .post-meta, +table.body .post-meta-date { white-space: normal !important; font-size: 12px !important; line-height: 1.5em; } + table.body .post-meta-labs, +table.body .view-online-labs { + display: inline-block; + } + + table.body .post-meta.author-date { + width: 100%; + } + + table.body .view-online-labs { + text-decoration: underline; + } + table.body .view-online-link, +table.body .comment-link, table.body .footer, table.body .footer a { font-size: 12px !important; @@ -1197,13 +1290,16 @@ table.body figcaption a { - - - - -
- By Joe Bloggs – 1 Jan 2023 – View online → -
+ + + + + +
+ By Joe Bloggs • 1 Jan 2023 + + View in browser +
@@ -1317,7 +1413,10 @@ This is a test post title [http://127.0.0.1:2369/r/xxxxxx?m=member-uuid] -By Joe Bloggs – 1 Jan 2023 – View online → [http://127.0.0.1:2369/r/xxxxxx?m=member-uuid] +By Joe Bloggs • 1 Jan 2023 + + +View in browser [http://127.0.0.1:2369/r/xxxxxx?m=member-uuid] @@ -1392,11 +1491,25 @@ Object { .post-title-link-left { text-align: left; } +.comment-link { + color: #738a94; + font-size: 13px; + letter-spacing: 0.1px; +} +.comment-link img { + width: 16px; + height: 16px; + margin-bottom: 1px; + vertical-align: middle; +} .view-online-link { word-wrap: none; white-space: nowrap; color: #15212A; } +.view-online-labs .view-online-link { + color: #738a94; +} .kg-nft-link { display: block; text-decoration: none !important; @@ -1481,13 +1594,28 @@ table.body .article { padding-bottom: 15px !important; } - table.body .post-meta { + table.body .post-meta, +table.body .post-meta-date { white-space: normal !important; font-size: 12px !important; line-height: 1.5em; } + table.body .post-meta-labs, +table.body .view-online-labs { + display: inline-block; + } + + table.body .post-meta.author-date { + width: 100%; + } + + table.body .view-online-labs { + text-decoration: underline; + } + table.body .view-online-link, +table.body .comment-link, table.body .footer, table.body .footer a { font-size: 12px !important; @@ -1662,13 +1790,16 @@ table.body figcaption a { - - - - -
- By Joe Bloggs – 1 Jan 2023 – View online → -
+ + + + + +
+ By Joe Bloggs • 1 Jan 2023 + + View in browser +
@@ -1782,7 +1913,10 @@ A random test post [http://127.0.0.1:2369/r/xxxxxx?m=member-uuid] -By Joe Bloggs – 1 Jan 2023 – View online → [http://127.0.0.1:2369/r/xxxxxx?m=member-uuid] +By Joe Bloggs • 1 Jan 2023 + + +View in browser [http://127.0.0.1:2369/r/xxxxxx?m=member-uuid] @@ -1859,11 +1993,25 @@ Object { .post-title-link-left { text-align: left; } +.comment-link { + color: #738a94; + font-size: 13px; + letter-spacing: 0.1px; +} +.comment-link img { + width: 16px; + height: 16px; + margin-bottom: 1px; + vertical-align: middle; +} .view-online-link { word-wrap: none; white-space: nowrap; color: #15212A; } +.view-online-labs .view-online-link { + color: #738a94; +} .kg-nft-link { display: block; text-decoration: none !important; @@ -1948,13 +2096,28 @@ table.body .article { padding-bottom: 15px !important; } - table.body .post-meta { + table.body .post-meta, +table.body .post-meta-date { white-space: normal !important; font-size: 12px !important; line-height: 1.5em; } + table.body .post-meta-labs, +table.body .view-online-labs { + display: inline-block; + } + + table.body .post-meta.author-date { + width: 100%; + } + + table.body .view-online-labs { + text-decoration: underline; + } + table.body .view-online-link, +table.body .comment-link, table.body .footer, table.body .footer a { font-size: 12px !important; @@ -2129,13 +2292,16 @@ table.body figcaption a { - - - - -
- By Joe Bloggs – 1 Jan 2023 – View online → -
+ + + + + +
+ By Joe Bloggs • 1 Jan 2023 + + View in browser +
@@ -2249,7 +2415,10 @@ A random test post [http://127.0.0.1:2369/r/xxxxxx?m=member-uuid] -By Joe Bloggs – 1 Jan 2023 – View online → [http://127.0.0.1:2369/r/xxxxxx?m=member-uuid] +By Joe Bloggs • 1 Jan 2023 + + +View in browser [http://127.0.0.1:2369/r/xxxxxx?m=member-uuid] diff --git a/ghost/email-service/lib/email-renderer.js b/ghost/email-service/lib/email-renderer.js index 93de1f2b42..b96a436b09 100644 --- a/ghost/email-service/lib/email-renderer.js +++ b/ghost/email-service/lib/email-renderer.js @@ -621,6 +621,8 @@ class EmailRenderer { showSubscriptionDetails: newsletter.get('show_subscription_details') && this.#labs.isSet('makingItRain') }, + labs: this.#settingsCache.get('labs'), + //CSS accentColor: accentColor, // default to #15212A adjustedAccentColor: adjustedAccentColor || '#3498db', // default to #3498db diff --git a/ghost/email-service/lib/email-templates/partials/feedback-button.hbs b/ghost/email-service/lib/email-templates/partials/feedback-button.hbs index e2402fd8e5..d92ba13e9a 100644 --- a/ghost/email-service/lib/email-templates/partials/feedback-button.hbs +++ b/ghost/email-service/lib/email-templates/partials/feedback-button.hbs @@ -1,5 +1,5 @@ - + - {{buttonText}} + {{buttonText}} - + \ No newline at end of file diff --git a/ghost/email-service/lib/email-templates/partials/styles.hbs b/ghost/email-service/lib/email-templates/partials/styles.hbs index 94fb518a78..f922b38fee 100644 --- a/ghost/email-service/lib/email-templates/partials/styles.hbs +++ b/ghost/email-service/lib/email-templates/partials/styles.hbs @@ -364,6 +364,13 @@ figure blockquote p { text-align: center; } +.post-meta-labs, +.view-online-labs { + padding-bottom: 0; + letter-spacing: 0.1px; + text-transform: none; +} + .post-meta-left { text-align: left; } @@ -372,6 +379,19 @@ figure blockquote p { white-space: nowrap; } +.comment-link { + color: #738a94; + font-size: 13px; + letter-spacing: 0.1px; +} + +.comment-link img { + width: 16px; + height: 16px; + margin-bottom: 1px; + vertical-align: middle; +} + .view-online { text-align: right; } @@ -382,6 +402,10 @@ figure blockquote p { color: #15212A; } +.view-online-labs .view-online-link { + color: #738a94; +} + .feature-image-row:first-child > td { padding-top: 24px; } @@ -984,13 +1008,29 @@ a[data-flickr-embed] img { padding-bottom: 15px !important; } - table.body .post-meta { + table.body .post-meta, + table.body .post-meta-date { white-space: normal !important; font-size: 12px !important; line-height: 1.5em; } + table.body .post-meta-labs, + table.body .view-online-labs { + display: inline-block; + } + + table.body .post-meta.author-date { + width: 100%; + } + + table.body .view-online-labs { + text-decoration: underline; + } + + table.body .view-online-link, + table.body .comment-link, table.body .footer, table.body .footer a { font-size: 12px !important; diff --git a/ghost/email-service/lib/email-templates/template.hbs b/ghost/email-service/lib/email-templates/template.hbs index 918f552245..ad0c94a07c 100644 --- a/ghost/email-service/lib/email-templates/template.hbs +++ b/ghost/email-service/lib/email-templates/template.hbs @@ -79,13 +79,31 @@ - - - - -
- By {{post.authors}} – View online →{{#if newsletter.showCommentCta}} Comment{{/if}} -
+ {{#if labs.makingItRain}} + + + + + +
+ View in browser +
+ {{else}} + + + + +
+ By {{post.authors}} – View online →{{#if newsletter.showCommentCta}} Comment{{/if}} +
+ {{/if}} {{/if}} @@ -131,19 +149,15 @@ {{#if (or feedbackButtons newsletter.showCommentCta) }} - - {{#if feedbackButtons }} -

Give feedback on this post

- {{/if}} + {{#if feedbackButtons }} - {{> feedbackButton feedbackButtons href=feedbackButtons.likeHref buttonText='More like this' iconUrl="https://static.ghost.org/v5.0.0/images/more-like-this.png" }} - {{> feedbackButton feedbackButtons href=feedbackButtons.dislikeHref buttonText='Less like this' iconUrl="https://static.ghost.org/v5.0.0/images/less-like-this.png" }} + {{> feedbackButton feedbackButtons href=feedbackButtons.likeHref buttonText='More like this' iconUrl="https://static.ghost.org/v5.0.0/images/more-like-this.png?v=1" width="145px" }} + {{> feedbackButton feedbackButtons href=feedbackButtons.dislikeHref buttonText='Less like this' iconUrl="https://static.ghost.org/v5.0.0/images/less-like-this.png?v=1" width="142px" }} {{/if}} {{#if newsletter.showCommentCta}} - {{!-- TODO: replace image with comment image --}} - {{> feedbackButton href=post.commentUrl buttonText='Comment' iconUrl="https://static.ghost.org/v5.0.0/images/less-like-this.png" }} + {{> feedbackButton href=post.commentUrl buttonText='Comment' iconUrl="https://static.ghost.org/v5.0.0/images/comment.png?v=1" width="122px" }} {{/if}}