From 82bb466316d2749e86dcc7aaa72925525eed8e9d Mon Sep 17 00:00:00 2001 From: Rishabh Garg Date: Wed, 24 Mar 2021 18:25:26 +0530 Subject: [PATCH] Removed hardcoded accent color fallbacks (#12813) refs https://github.com/TryGhost/Team/issues/536 From 4.0, we ensure and require that accent colour is always set. This change removes hardcoded accent color fallbacks to avoid confusion as well as cause accidental fallback that is undesired causing themes to look different --- core/frontend/helpers/content.js | 2 +- core/server/services/members/api.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/frontend/helpers/content.js b/core/frontend/helpers/content.js index 323329df15..0b11e7829c 100644 --- a/core/frontend/helpers/content.js +++ b/core/frontend/helpers/content.js @@ -19,7 +19,7 @@ function restrictedCta(options) { options = options || {}; options.data = options.data || {}; _.merge(this, { - accentColor: (options.data.site && options.data.site.accent_color) || '#15171A' + accentColor: (options.data.site && options.data.site.accent_color) }); const data = createFrame(options.data); return templates.execute('content-cta', this, {data}); diff --git a/core/server/services/members/api.js b/core/server/services/members/api.js index 9b8071094e..7fc690d48f 100644 --- a/core/server/services/members/api.js +++ b/core/server/services/members/api.js @@ -133,7 +133,7 @@ function createApiInstance(config) { const siteUrl = urlUtils.urlFor('home', true); const domain = urlUtils.urlFor('home', true).match(new RegExp('^https?://([^/:?#]+)(?:[/:?#]|$)', 'i')); const siteDomain = (domain && domain[1]); - const accentColor = settingsCache.get('accent_color') || '#15212A'; + const accentColor = settingsCache.get('accent_color'); switch (type) { case 'subscribe': return subscribeEmail({url, email, siteTitle, accentColor, siteDomain, siteUrl});