From f719b472b69bb4603096ec779cb55ddf8a4b3c9e Mon Sep 17 00:00:00 2001 From: Lukasz Gornicki Date: Tue, 5 Apr 2022 17:24:09 +0200 Subject: [PATCH] feat: add new newsletter view (#644) --- components/NewsletterSubscribe.js | 7 +++++-- components/layout/BlogLayout.js | 1 - components/layout/DocsLayout.js | 4 +--- components/layout/GenericLayout.js | 1 - components/layout/GenericPostLayout.js | 1 - components/layout/GenericWideLayout.js | 1 - components/layout/JobsLayout.js | 1 - pages/_app.js | 14 ++++++++++---- pages/blog/index.js | 1 - pages/index.js | 1 - pages/jobs/index.js | 1 - pages/newsletter/index.js | 21 +++++++++++++++++++++ 12 files changed, 37 insertions(+), 17 deletions(-) create mode 100644 pages/newsletter/index.js diff --git a/components/NewsletterSubscribe.js b/components/NewsletterSubscribe.js index 524dd3c9e8be..9268783713c0 100644 --- a/components/NewsletterSubscribe.js +++ b/components/NewsletterSubscribe.js @@ -11,17 +11,20 @@ export default function NewsletterSubscribe ({ }) { if (!formName) throw new Error('Parameter formName is required for the NewsletterSubscribe component.') + const headTextColor = dark ? 'text-white' : '' + const paragraphTextColor = dark ? 'text-gray-300' : '' + return (
{title} - + We respect your inbox. No spam, promise ✌️
diff --git a/components/layout/BlogLayout.js b/components/layout/BlogLayout.js index a72958bf006d..3203a6cec3bf 100644 --- a/components/layout/BlogLayout.js +++ b/components/layout/BlogLayout.js @@ -86,7 +86,6 @@ export default function BlogLayout({ post, children }) { -
) } diff --git a/components/layout/DocsLayout.js b/components/layout/DocsLayout.js index 8494f422c354..baf9f8a11dfb 100644 --- a/components/layout/DocsLayout.js +++ b/components/layout/DocsLayout.js @@ -24,7 +24,6 @@ function generateEditLink(post) { } export default function DocsLayout({ post, navItems = {}, children }) { - if (!post) return if (post.title === undefined) throw new Error('Post title is required') @@ -49,7 +48,7 @@ export default function DocsLayout({ post, navItems = {}, children }) { -
+
{ showMenu && ( setShowMenu(false)} post={post} navigation={navigation} /> ) } @@ -114,7 +113,6 @@ export default function DocsLayout({ post, navItems = {}, children }) {
-