0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-03 23:00:14 -05:00

Made subscription link in newsletter preview use brand color

closes https://linear.app/tryghost/issue/DES-220/email-preview-manage-subscription-link-in-sub-details-is-hardcoded-to
This commit is contained in:
Djordje Vlaisavljevic 2024-04-24 16:25:56 +01:00
parent 4b4af65fce
commit 7f915215f3
2 changed files with 4 additions and 1 deletions

View file

@ -92,6 +92,7 @@ const NewsletterPreview: React.FC<{newsletter: Newsletter}> = ({newsletter}) =>
} : {}; } : {};
return <NewsletterPreviewContent return <NewsletterPreviewContent
accentColor={siteData.accent_color}
authorPlaceholder={currentUser.name || currentUser.email} authorPlaceholder={currentUser.name || currentUser.email}
backgroundColor={colors.backgroundColor || '#ffffff'} backgroundColor={colors.backgroundColor || '#ffffff'}
bodyFontCategory={newsletter.body_font_category} bodyFontCategory={newsletter.body_font_category}

View file

@ -36,6 +36,7 @@ const NewsletterPreviewContent: React.FC<{
backgroundColor?: string; backgroundColor?: string;
borderColor?: string; borderColor?: string;
secondaryBorderColor?: string; secondaryBorderColor?: string;
accentColor?: string;
textColor?: string; textColor?: string;
secondaryTextColor?: string; secondaryTextColor?: string;
titleColor?: string; titleColor?: string;
@ -66,6 +67,7 @@ const NewsletterPreviewContent: React.FC<{
backgroundColor, backgroundColor,
borderColor, borderColor,
secondaryBorderColor, secondaryBorderColor,
accentColor,
textColor, textColor,
secondaryTextColor, secondaryTextColor,
titleColor titleColor
@ -235,7 +237,7 @@ const NewsletterPreviewContent: React.FC<{
<p style={{color: textColor}}>Email: jamie@example.com</p> <p style={{color: textColor}}>Email: jamie@example.com</p>
<p style={{color: textColor}}>Member since: 17 July 2023</p> <p style={{color: textColor}}>Member since: 17 July 2023</p>
</div> </div>
<span className={clsx('w-full self-end whitespace-nowrap text-right text-base font-semibold', backgroundColorIsDark ? 'text-white underline' : 'text-pink')}> <span className={clsx('w-full self-end whitespace-nowrap text-right text-base font-semibold', backgroundColorIsDark && 'text-white underline')} style={{color: accentColor}}>
Manage subscription Manage subscription
</span> </span>
</div> </div>