diff --git a/components/CtaButton/CtaButton.js b/components/CtaButton/CtaButton.js new file mode 100644 index 0000000..1dbcf10 --- /dev/null +++ b/components/CtaButton/CtaButton.js @@ -0,0 +1,13 @@ +import Link from 'next/link'; + +const CtaButton = ({ctaLink = null, ctaLabel = null }) => { + return ( +
+ + {ctaLabel} + +
+ ); +}; + +export default CtaButton; diff --git a/components/CtaButton/index.js b/components/CtaButton/index.js new file mode 100644 index 0000000..66d84d2 --- /dev/null +++ b/components/CtaButton/index.js @@ -0,0 +1 @@ +export { default as CtaButton } from './CtaButton.js'; diff --git a/components/ProductCard/ProductCard.js b/components/ProductCard/ProductCard.js index 7c646f0..0e1d3c9 100644 --- a/components/ProductCard/ProductCard.js +++ b/components/ProductCard/ProductCard.js @@ -45,9 +45,9 @@ const ProductCard = ({ product }) => { )} -
+
- View product + View product
diff --git a/components/ProductCard/ProductCard.module.scss b/components/ProductCard/ProductCard.module.scss index 621fd21..ee86fee 100644 --- a/components/ProductCard/ProductCard.module.scss +++ b/components/ProductCard/ProductCard.module.scss @@ -76,21 +76,5 @@ font-weight: 700; margin-bottom: 1rem; } - - .buttonContainer { - .button { - margin: 0px 0.5rem; - background-color: var(--wpe--color--green); - text-decoration: none; - font-weight: 500; - padding: 1rem; - display: inline-block; - color: var(--wpe--color--white); - transition: all 0.5s; - &:hover { - background-color: var(--wpe--color--green); - } - } - } } } diff --git a/components/ProductSection/ProductSection.js b/components/ProductSection/ProductSection.js index 3487992..b5f6779 100644 --- a/components/ProductSection/ProductSection.js +++ b/components/ProductSection/ProductSection.js @@ -1,16 +1,13 @@ -import classNames from 'classnames'; import styles from './ProductSection.module.scss'; import { ProductCard } from '../ProductCard'; import { Container } from '../Container'; -const cx = classNames.bind(styles); - const ProductSection = ({ products, heading }) => { return ( -
+
-

{heading}

-
+

{heading}

+
{products?.map?.((product) => { return ; })} diff --git a/components/PromoSection/PromoSection.js b/components/PromoSection/PromoSection.js new file mode 100644 index 0000000..c347b15 --- /dev/null +++ b/components/PromoSection/PromoSection.js @@ -0,0 +1,23 @@ +import { Container } from '../Container'; +import { CtaButton } from '../CtaButton'; +import styles from './PromoSection.module.scss'; + +const PromoSection = ({ + showCta = false, + ctaLink = null, + ctaLabel = null, + title = null, + description = null +}) => { + return ( +
+ +

{title}

+
{description}
+ { showCta && } +
+
+ ); +}; + +export default PromoSection; diff --git a/components/PromoSection/PromoSection.module.scss b/components/PromoSection/PromoSection.module.scss new file mode 100644 index 0000000..381d83e --- /dev/null +++ b/components/PromoSection/PromoSection.module.scss @@ -0,0 +1,22 @@ +.component { + @import 'styles/css-variables'; + + background-color: var(--wpe--color--grey); + + h2 { + padding: 2em; + } + + .title { + text-align: center; + font-size: 50px; + padding: 1em 0 0 0; + } + + .description { + padding: 1rem 0; + text-align: center; + margin-top: auto; + width: 100%; + } +} diff --git a/components/PromoSection/index.js b/components/PromoSection/index.js new file mode 100644 index 0000000..97fb22a --- /dev/null +++ b/components/PromoSection/index.js @@ -0,0 +1 @@ +export { default as PromoSection } from './PromoSection.js'; diff --git a/components/TestimonialsSection/TestimonialsSection.js b/components/TestimonialsSection/TestimonialsSection.js index 43935df..4763dcc 100644 --- a/components/TestimonialsSection/TestimonialsSection.js +++ b/components/TestimonialsSection/TestimonialsSection.js @@ -1,16 +1,14 @@ import TestimonialCard from './TestimonialCard'; import { Container } from '../Container'; -import classNames from 'classnames'; import styles from './TestimonialsSection.module.scss'; -const cx = classNames.bind(styles); const TestimonialsSection = () => { return ( -
+
-

Customer Testimonials

-
+

Customer Testimonials

+
= 0.6" } }, + "node_modules/cookie-cutter": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/cookie-cutter/-/cookie-cutter-0.2.0.tgz", + "integrity": "sha512-eVyP5liHjDMCmGlp2OD+qoin5TJlwUBRjBKN8R2yJ3ePf8xqUtqmRP6e36ipe0nBm2lTiertH6iHPOptNQzAEw==" + }, "node_modules/cosmiconfig": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.1.0.tgz", @@ -5406,6 +5414,14 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.1.tgz", "integrity": "sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ==" }, + "node_modules/react-icons": { + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/react-icons/-/react-icons-4.8.0.tgz", + "integrity": "sha512-N6+kOLcihDiAnj5Czu637waJqSnwlMNROzVZMhfX68V/9bu9qHaMIJC4UdozWoOk57gahFCNHwVvWzm0MTzRjg==", + "peerDependencies": { + "react": "*" + } + }, "node_modules/react-is": { "version": "17.0.2", "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", @@ -6229,6 +6245,17 @@ "punycode": "^2.1.0" } }, + "node_modules/use-debounce": { + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/use-debounce/-/use-debounce-9.0.4.tgz", + "integrity": "sha512-6X8H/mikbrt0XE8e+JXRtZ8yYVvKkdYRfmIhWZYsP8rcNs9hk3APV8Ua2mFkKRLcJKVdnX2/Vwrmg2GWKUQEaQ==", + "engines": { + "node": ">= 10.0.0" + }, + "peerDependencies": { + "react": ">=16.8.0" + } + }, "node_modules/use-lilius": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/use-lilius/-/use-lilius-2.0.3.tgz", @@ -8448,6 +8475,11 @@ "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==" }, + "cookie-cutter": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/cookie-cutter/-/cookie-cutter-0.2.0.tgz", + "integrity": "sha512-eVyP5liHjDMCmGlp2OD+qoin5TJlwUBRjBKN8R2yJ3ePf8xqUtqmRP6e36ipe0nBm2lTiertH6iHPOptNQzAEw==" + }, "cosmiconfig": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.1.0.tgz", @@ -10518,6 +10550,12 @@ } } }, + "react-icons": { + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/react-icons/-/react-icons-4.8.0.tgz", + "integrity": "sha512-N6+kOLcihDiAnj5Czu637waJqSnwlMNROzVZMhfX68V/9bu9qHaMIJC4UdozWoOk57gahFCNHwVvWzm0MTzRjg==", + "requires": {} + }, "react-is": { "version": "17.0.2", "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", @@ -11117,6 +11155,12 @@ "punycode": "^2.1.0" } }, + "use-debounce": { + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/use-debounce/-/use-debounce-9.0.4.tgz", + "integrity": "sha512-6X8H/mikbrt0XE8e+JXRtZ8yYVvKkdYRfmIhWZYsP8rcNs9hk3APV8Ua2mFkKRLcJKVdnX2/Vwrmg2GWKUQEaQ==", + "requires": {} + }, "use-lilius": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/use-lilius/-/use-lilius-2.0.3.tgz", diff --git a/styles/global.scss b/styles/global.scss index 11168bd..00e13c4 100644 --- a/styles/global.scss +++ b/styles/global.scss @@ -11,6 +11,23 @@ margin: 0 auto; text-align: center; padding-bottom: 4em; + display: flex; +} + +.buttonContainer { + .button { + margin: 0px 0.5rem; + background-color: var(--wpe--color--green); + text-decoration: none; + font-weight: 500; + padding: 1rem; + display: inline-block; + color: var(--wpe--color--white); + transition: all 0.5s; + &:hover { + background-color: var(--wpe--color--green); + } + } } .shop-grid { diff --git a/wp-templates/front-page.js b/wp-templates/front-page.js index 0d9c2ef..8bbb0f1 100644 --- a/wp-templates/front-page.js +++ b/wp-templates/front-page.js @@ -9,6 +9,7 @@ import { SEO, ContentWrapper, ProductSection, + PromoSection, TestimonialsSection, } from '../components'; import productsStub from '../data/stubs/products'; @@ -40,9 +41,12 @@ export default function Component(props) { - {/* -
promo banner
- */} +