From 6bc91a1e3b1772bc6c51b8f23504f2218a7b8de2 Mon Sep 17 00:00:00 2001 From: Sanne de Vries <65487235+sanne-san@users.noreply.github.com> Date: Thu, 30 May 2024 13:12:00 +0200 Subject: [PATCH] Synced newsletter preview in settings with newsletter template (#20290) REF MOM-147 - Updated newsletter preview in settings to match the newsletter template - Updated spacing for a few edge-case newsletter template combinations --- .../newsletters/NewsletterPreviewContent.tsx | 17 ++++++++++++----- .../lib/email-templates/partials/styles-old.hbs | 13 ++++++++----- .../lib/email-templates/template-old.hbs | 2 +- 3 files changed, 21 insertions(+), 11 deletions(-) diff --git a/apps/admin-x-settings/src/components/settings/email/newsletters/NewsletterPreviewContent.tsx b/apps/admin-x-settings/src/components/settings/email/newsletters/NewsletterPreviewContent.tsx index a190df2c87..3d9c70c848 100644 --- a/apps/admin-x-settings/src/components/settings/email/newsletters/NewsletterPreviewContent.tsx +++ b/apps/admin-x-settings/src/components/settings/email/newsletters/NewsletterPreviewContent.tsx @@ -115,11 +115,11 @@ const NewsletterPreviewContent: React.FC<{
{headerImage && (
- +
)} {showHeader && ( -
+
{headerIcon && } {headerTitle &&

{headerTitle}

} {headerSubtitle &&
{headerSubtitle}
} @@ -135,7 +135,7 @@ const NewsletterPreviewContent: React.FC<{ Your email newsletter {(hasNewsletterSubtitle && showSubhead) && ( -

A subtitle can help highlight key points and engage your readers.

+

A subtitle can help highlight key points and engage your readers.

)}
-
+
Feature
Feature image caption
)} -
+

This is what your content will look like when you send one of your posts as an email newsletter to your subscribers.

Over there on the right you'll see some settings that allow you to customize the look and feel of this template to make it perfectly suited to your brand. Email templates are exceptionally finnicky to make, but we've spent a long time optimising this one to make it work beautifully across devices, email clients and content types.

So, you can trust that every email you send with Ghost will look great and work well. Just like the rest of your site.

diff --git a/ghost/email-service/lib/email-templates/partials/styles-old.hbs b/ghost/email-service/lib/email-templates/partials/styles-old.hbs index 79075d5f4d..bc155c161d 100644 --- a/ghost/email-service/lib/email-templates/partials/styles-old.hbs +++ b/ghost/email-service/lib/email-templates/partials/styles-old.hbs @@ -308,6 +308,7 @@ figure blockquote p { .header-image { padding-top: 24px; + padding-bottom: 16px; } .site-icon { @@ -434,15 +435,17 @@ figure blockquote p { text-decoration: underline !important; } -.feature-image-row:first-child > td { - padding-top: 24px; -} - .feature-image { padding-bottom: 30px; width: 100%; } +.feature-image-row:first-child > td, +.header-image-row + .feature-image-row > td, +.site-info-row + .feature-image-row > td { + padding-top: 24px; +} + .feature-image-with-caption { width: 100%; padding: 0; @@ -609,7 +612,7 @@ figure blockquote p { } .post-content-row:first-child > td, .header-image-row + .post-content-row > td { - padding-top: 52px; + padding-top: 32px; } .post-content a, diff --git a/ghost/email-service/lib/email-templates/template-old.hbs b/ghost/email-service/lib/email-templates/template-old.hbs index b7a97e04b3..88e35a2af3 100644 --- a/ghost/email-service/lib/email-templates/template-old.hbs +++ b/ghost/email-service/lib/email-templates/template-old.hbs @@ -44,7 +44,7 @@ {{/if}} {{#if (or showHeaderIcon showHeaderTitle showHeaderName) }} - + {{#if (and showHeaderIcon site.iconUrl) }}