From 3ad77bd2c2883a05a62d414528364ca22852a4db Mon Sep 17 00:00:00 2001 From: Sanne de Vries <65487235+sanne-san@users.noreply.github.com> Date: Tue, 28 May 2024 16:29:49 +0200 Subject: [PATCH] Updated email newsletter spacing and font sizes (#20273) REF MOM-146 - These styling changes are a general newsletter template improvement, and are also laying the groundwork for including a subhead in the newsletter header. Both the newsletter template as well as the newsletter preview in settings have been updated. --- .../admin-x-design-system/tailwind.config.cjs | 2 +- .../newsletters/NewsletterPreviewContent.tsx | 28 +++++----- .../email-templates/partials/styles-old.hbs | 53 ++++++++++--------- .../lib/email-templates/template-old.hbs | 2 +- 4 files changed, 43 insertions(+), 42 deletions(-) diff --git a/apps/admin-x-design-system/tailwind.config.cjs b/apps/admin-x-design-system/tailwind.config.cjs index d554015aa4..7a614ce4f6 100644 --- a/apps/admin-x-design-system/tailwind.config.cjs +++ b/apps/admin-x-design-system/tailwind.config.cjs @@ -270,7 +270,7 @@ module.exports = { base: '1.4rem', xs: '1.2rem', sm: '1.3rem', - md: '1.40rem', + md: '1.4rem', lg: '1.65rem', xl: '2rem', '2xl': '2.4rem', 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 a7c36862e0..fe7d9f4b01 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 @@ -116,30 +116,30 @@ const NewsletterPreviewContent: React.FC<{ )} {showHeader && ( -
+
{headerIcon && } {headerTitle &&

{headerTitle}

} - {headerSubtitle &&
{headerSubtitle}
} + {headerSubtitle &&
{headerSubtitle}
}
)} {showPostTitleSection && ( -
+

Your email newsletter

-

+

By {authorPlaceholder} {currentDate}

-

View in browser

+

View in browser

)} @@ -150,11 +150,11 @@ const NewsletterPreviewContent: React.FC<{
Feature
-
Feature image caption
+
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.

@@ -199,7 +199,7 @@ const NewsletterPreviewContent: React.FC<{

The three latest posts published on your site

-

Posts sent as an email only will never be shown here.

+

Posts sent as an email only will never be shown here.

Latest post @@ -208,7 +208,7 @@ const NewsletterPreviewContent: React.FC<{

Displayed at the bottom of each newsletter

-

Giving your readers one more place to discover your stories.

+

Giving your readers one more place to discover your stories.

Latest post @@ -217,7 +217,7 @@ const NewsletterPreviewContent: React.FC<{

To keep your work front and center

-

Making sure that your audience stays engaged.

+

Making sure that your audience stays engaged.

Latest post @@ -246,9 +246,9 @@ const NewsletterPreviewContent: React.FC<{ {/* Footer */}
-
+
-
+
{siteTitle} © {currentYear} — Unsubscribe
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 2bc6a2dbdb..53dd113540 100644 --- a/ghost/email-service/lib/email-templates/partials/styles-old.hbs +++ b/ghost/email-service/lib/email-templates/partials/styles-old.hbs @@ -311,24 +311,24 @@ figure blockquote p { } .site-icon { - padding-bottom: 10px; - padding-top: 20px; + padding-bottom: 8px; + padding-top: 8px; text-align: center; border-radius: 3px; } .site-icon img { - width: 48px; - height: 48px; + width: 44px; + height: 44px; border-radius: 3px; } .site-info { - padding-top: 50px; + padding-top: 32px; } .site-info-bordered { - padding-top: 50px; + padding-top: 32px; border-bottom: 1px solid #e5eff5; } @@ -342,7 +342,7 @@ figure blockquote p { } .site-url-bottom-padding { - padding-bottom: 50px; + padding-bottom: 32px; } .site-title { @@ -350,7 +350,7 @@ figure blockquote p { } .site-subtitle { - color: #8695a4; + color: #738a94; font-size: 14px; font-weight: 400; text-transform: none; @@ -358,7 +358,7 @@ figure blockquote p { .post-title { padding-bottom: 16px; - font-size: 42px; + font-size: 36px; line-height: 1.1em; font-weight: 700; text-align: center; @@ -375,7 +375,7 @@ figure blockquote p { color: #15212A; display: block; text-align: center; - margin-top: 50px; + margin-top: 32px; } .post-title-link-left { text-align: left; @@ -384,8 +384,8 @@ figure blockquote p { .post-meta, .view-online { color: #738a94; - font-size: 13px; - letter-spacing: 0.1px; + font-size: 14px; + font-weight: 400; text-align: center; } @@ -418,6 +418,7 @@ figure blockquote p { word-wrap: none; white-space: nowrap; color: #738a94; + text-decoration: underline !important; } .feature-image-row:first-child > td { @@ -438,9 +439,9 @@ figure blockquote p { .feature-image-caption { width: 100%; padding-top: 5px; - padding-bottom: 30px; + padding-bottom: 32px; text-align: center; - font-size: 13px!important; + font-size: 13px !important; color: {{secondaryTextColor}}; line-height: 1.5em; } @@ -1327,36 +1328,36 @@ a[data-flickr-embed] img { table.body .site-info, table.body .site-info-bordered { - padding-top: 30px !important; + padding-top: 24px !important; } table.body .site-url-bottom-padding { - padding-bottom: 30px !important; + padding-bottom: 24px !important; } table.body .post-title-link { - margin-top: 30px !important; + margin-top: 24px !important; } table.body .post-meta-wrapper { - padding-bottom: 30px !important; + padding-bottom: 24px !important; } table.body .site-icon img { - width: 40px !important; - height: 40px !important; + width: 36px !important; + height: 36px !important; } table.body .site-url a { - font-size: 14px !important; - padding-bottom: 15px !important; + font-size: 13px !important; + padding-bottom: 16px !important; } table.body .post-meta, table.body .post-meta-date { white-space: normal !important; - font-size: 12px !important; - line-height: 1.5em; + font-size: 13px !important; + line-height: 1.2em; } table.body .post-meta, @@ -1399,8 +1400,8 @@ a[data-flickr-embed] img { } table.body .post-title a { - font-size: 32px !important; - line-height: 1.15em !important; + font-size: 26px !important; + line-height: 1.1em !important; } table.feedback-buttons { diff --git a/ghost/email-service/lib/email-templates/template-old.hbs b/ghost/email-service/lib/email-templates/template-old.hbs index 03921065d8..50317ef07f 100644 --- a/ghost/email-service/lib/email-templates/template-old.hbs +++ b/ghost/email-service/lib/email-templates/template-old.hbs @@ -81,7 +81,7 @@ - +