From 2408ca2553fc317360085fa27a3707801363b3c7 Mon Sep 17 00:00:00 2001 From: "Jason R. Stevens, CFA" Date: Tue, 1 Feb 2022 21:14:18 -0600 Subject: [PATCH 01/16] :bug: :art: fix styling of mobile nav button to replicate hero button [sc-645] --- components/MobileNavbar.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/MobileNavbar.jsx b/components/MobileNavbar.jsx index 122e09a..26ddea7 100644 --- a/components/MobileNavbar.jsx +++ b/components/MobileNavbar.jsx @@ -83,7 +83,7 @@ export default function MobileNavbar({
setMobileMenuIsClicked(!mobileMenuIsClicked)} > From 5122d0074d6a7340fa28f2a0662598bcbe4f35d3 Mon Sep 17 00:00:00 2001 From: "Jason R. Stevens, CFA" Date: Tue, 1 Feb 2022 21:17:23 -0600 Subject: [PATCH 02/16] :bug: :art: remove bottom padding from section per [sc-645] --- components/Hero.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/Hero.jsx b/components/Hero.jsx index f523829..a782319 100644 --- a/components/Hero.jsx +++ b/components/Hero.jsx @@ -9,7 +9,7 @@ export default function Hero({ session, }) { return ( -
+

{heading} From 35504af8b1c180f23563978a63f0a89c96dd77d9 Mon Sep 17 00:00:00 2001 From: "Jason R. Stevens, CFA" Date: Tue, 1 Feb 2022 21:23:48 -0600 Subject: [PATCH 03/16] :recycle: change flex items-center to items-start ti fix align stats cards as fixed [sc-645] --- components/FAQCard.jsx | 4 ++-- components/Sections/Stats1.jsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/FAQCard.jsx b/components/FAQCard.jsx index 3f8f4db..93309cd 100644 --- a/components/FAQCard.jsx +++ b/components/FAQCard.jsx @@ -1,8 +1,8 @@ export default function FAQCard({ title, listItems }) { return ( -
+
- +
-
+
{data?.map((props, index) => { return ; })} From e5a10747bb5a2cdecba11240e1ba8d52566e9d46 Mon Sep 17 00:00:00 2001 From: "Jason R. Stevens, CFA" Date: Tue, 1 Feb 2022 21:45:27 -0600 Subject: [PATCH 04/16] :recycle: add aligned bullets + center for mobile [sc-645] --- components/WhyInvestHero.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/WhyInvestHero.jsx b/components/WhyInvestHero.jsx index e583a31..6970a54 100644 --- a/components/WhyInvestHero.jsx +++ b/components/WhyInvestHero.jsx @@ -1,7 +1,7 @@ -export default function WhyInvest1Hero({ subTitle, title, description, cta }) { +export default function WhyInvestHero({ subTitle, title, description, cta }) { return ( -
-
+
+
{subTitle} From 7b4c4251e39419af122821e8c55434b7c4243cdc Mon Sep 17 00:00:00 2001 From: "Jason R. Stevens, CFA" Date: Tue, 1 Feb 2022 21:45:35 -0600 Subject: [PATCH 05/16] :bug: fix items-center to items-start for mobile centering [sc-645] --- components/Sections/WhyInvest.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/Sections/WhyInvest.jsx b/components/Sections/WhyInvest.jsx index 339220b..15d09bc 100644 --- a/components/Sections/WhyInvest.jsx +++ b/components/Sections/WhyInvest.jsx @@ -11,7 +11,7 @@ export default function WhyInvest({ return (
-
+
-
+
{whyInvestCardData?.map((description, index) => { return ( Date: Tue, 1 Feb 2022 21:45:35 -0600 Subject: [PATCH 06/16] :recycle: add centered text w/padding on mobile [sc-645] --- components/WhyInvestCard.jsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/components/WhyInvestCard.jsx b/components/WhyInvestCard.jsx index 2408ea1..c8fae2e 100644 --- a/components/WhyInvestCard.jsx +++ b/components/WhyInvestCard.jsx @@ -1,11 +1,13 @@ export default function WhyInvest1Card({ label, description }) { return ( -
- +
+ {label}
-

{description}

+

+ {description} +

); From 51292af1eb5c8a83c4db7c3aab3729c1f321895d Mon Sep 17 00:00:00 2001 From: "Jason R. Stevens, CFA" Date: Tue, 1 Feb 2022 21:52:40 -0600 Subject: [PATCH 07/16] :bug: :art: fix newsletter styling issue [sc-645] --- components/Footer.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/Footer.jsx b/components/Footer.jsx index be91e55..b0cb8a4 100644 --- a/components/Footer.jsx +++ b/components/Footer.jsx @@ -63,7 +63,7 @@ export default function Footer({ entityTitle, logoSrc, footerItems, socials }) { Email address + {inputError && ( +
+ {message} +
+ )} + +
+ ); +} From ba9e48a8315441cb8c16ae2eef13dd4843c13454 Mon Sep 17 00:00:00 2001 From: "Jason R. Stevens, CFA" Date: Tue, 1 Feb 2022 22:07:14 -0600 Subject: [PATCH 09/16] :sparkles: add newsletterContent prop [sc-645] --- cms.data.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cms.data.js b/cms.data.js index 84c6769..2d34916 100644 --- a/cms.data.js +++ b/cms.data.js @@ -10,6 +10,12 @@ export const navigationLinks = export const navigationHrefs = [ "#why-invest", "#why-invest", "#why-invest" ]; export const cta = "Invest"; export const logoSrc = undefined; +export const newsletterContent = { + newsletterTitle : 'Subscribe', + newsletterSubtitle : 'Say informed with updates from our blog ', + newsletterHref : 'https://slightlysharpe.com', + newsletterName : 'Slightly Sharpe', +}; export const stats1Data = [ { icon : "", From 57534f0c5edc4189e195c98b7d9ae20847845112 Mon Sep 17 00:00:00 2001 From: "Jason R. Stevens, CFA" Date: Tue, 1 Feb 2022 22:07:14 -0600 Subject: [PATCH 10/16] :recycle: import newsletterContent and pass down props to Footer [sc-645] --- pages/index.jsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pages/index.jsx b/pages/index.jsx index 2284f36..b1084c8 100644 --- a/pages/index.jsx +++ b/pages/index.jsx @@ -36,6 +36,7 @@ import { hostname, teamContent, factSnippetsContent, + newsletterContent, } from "../cms.data"; export default function Funded() { @@ -184,6 +185,7 @@ export default function Funded() { logoSrc={logoSrc} footerItems={footerItems} socials={socials} + {...newsletterContent} />
From 249744d09b59e2bb19981f9b52e48aff192e8f64 Mon Sep 17 00:00:00 2001 From: "Jason R. Stevens, CFA" Date: Tue, 1 Feb 2022 22:07:49 -0600 Subject: [PATCH 11/16] :recycle: add sensible defaults for fields if undefined and refactored data inputs [sc-645] --- components/Newsletter.jsx | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/components/Newsletter.jsx b/components/Newsletter.jsx index 67a3823..ca4e833 100644 --- a/components/Newsletter.jsx +++ b/components/Newsletter.jsx @@ -1,6 +1,11 @@ import { useState, useRef } from "react"; -export default function Newsletter({}) { +export default function Newsletter({ + newsletterTitle, + newsletterSubtitle, + newsletterName, + newsletterHref, +}) { const inputEl = useRef(null); const [inputError, setInputError] = useState(false); const [message, setMessage] = useState(""); @@ -39,14 +44,16 @@ export default function Newsletter({}) { className="order-first lg:order-last mb-10 lg:mb-0 w-full lg:w-2/5 lg:text-right" id="newsletter-signup" > -

Subscribe

+

+ {newsletterTitle || "Subscribe"} +

- Stay informed with our updates via our blog,{" "} + {newsletterSubtitle || "Stay informed with updates from our blog "} - Slighly Sharpe + {newsletterName || "Slighly Sharpe"} .

From 5005d5992ca36adb10de464674d2316d29b48836 Mon Sep 17 00:00:00 2001 From: "Jason R. Stevens, CFA" Date: Tue, 1 Feb 2022 22:08:37 -0600 Subject: [PATCH 12/16] :recycle: move callback code to Newsletter component --- components/Footer.jsx | 100 ++++++++---------------------------------- 1 file changed, 18 insertions(+), 82 deletions(-) diff --git a/components/Footer.jsx b/components/Footer.jsx index b0cb8a4..0035dee 100644 --- a/components/Footer.jsx +++ b/components/Footer.jsx @@ -1,42 +1,18 @@ import FooterColumn from "./FooterColumn"; import Image from "next/image"; import Logo from "./Logo"; -import { useState, useRef } from "react"; - -export default function Footer({ entityTitle, logoSrc, footerItems, socials }) { - const inputEl = useRef(null); - const [inputError, setInputError] = useState(false); - const [message, setMessage] = useState(""); - const [subscribed, setSubscribed] = useState(false); - - const subscribe = async (e) => { - e.preventDefault(); - - const res = await fetch(`/api/convertkit`, { - body: JSON.stringify({ - email: inputEl.current.value, - }), - headers: { - "Content-Type": "application/json", - }, - method: "POST", - }); - - const { error } = await res.json(); - if (error) { - setInputError(true); - setMessage( - "Your e-mail address is invalid or you are already subscribed!" - ); - return; - } - - inputEl.current.value = ""; - setInputError(false); - setSubscribed(true); - setMessage("Successfully! 🎉 You are now subscribed."); - }; +import Newsletter from "./Newsletter"; +export default function Footer({ + entityTitle, + logoSrc, + footerItems, + socials, + newsletterTitle, + newsletterSubtitle, + newsletterName, + newsletterHref, +}) { return (
@@ -111,7 +47,7 @@ export default function Footer({ entityTitle, logoSrc, footerItems, socials }) {
From 52ffd1a298edf3ba031e21bc9f4539e4a3ae313a Mon Sep 17 00:00:00 2001 From: "Jason R. Stevens, CFA" Date: Tue, 1 Feb 2022 22:27:48 -0600 Subject: [PATCH 13/16] :recycle: update sizing to be fixed [sc-645] --- components/Sections/FactCards.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/Sections/FactCards.jsx b/components/Sections/FactCards.jsx index 875b453..1d5434a 100644 --- a/components/Sections/FactCards.jsx +++ b/components/Sections/FactCards.jsx @@ -10,7 +10,7 @@ export default function FactCards({ factCardsContent }) { {index + 1} -

+

{title}

From 3d8fbaefb37248c84f069d694aeca84b63ef2c2f Mon Sep 17 00:00:00 2001 From: "Jason R. Stevens, CFA" Date: Tue, 1 Feb 2022 22:30:02 -0600 Subject: [PATCH 14/16] :recycle: change hero authed button to 'invest' [sc-645] --- components/Hero.jsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/Hero.jsx b/components/Hero.jsx index a782319..2784a58 100644 --- a/components/Hero.jsx +++ b/components/Hero.jsx @@ -32,12 +32,12 @@ export default function Hero({ Log in ) : ( - + Invest + )}

From 00e334bd2007652ac2877f8383721c0659281dfe Mon Sep 17 00:00:00 2001 From: "Jason R. Stevens, CFA" Date: Tue, 1 Feb 2022 22:52:57 -0600 Subject: [PATCH 15/16] :recycle: center content headings per [sc-645] --- components/FAQCard.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/FAQCard.jsx b/components/FAQCard.jsx index 93309cd..68cf896 100644 --- a/components/FAQCard.jsx +++ b/components/FAQCard.jsx @@ -2,7 +2,7 @@ export default function FAQCard({ title, listItems }) { return (