From 65836ab5bf7e5db041db5a68a81feee6e6948b01 Mon Sep 17 00:00:00 2001 From: Viviana Date: Thu, 11 Mar 2021 11:14:29 -0500 Subject: [PATCH 01/33] #1 Added image and group content types to different sections of Homepage --- src/pages/index.js | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/src/pages/index.js b/src/pages/index.js index 6297b24..9f8a508 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -14,14 +14,46 @@ export const query = graphql` data { section_title section_description + section_image { + url + dimensions { + height + width + } + } button_text button_destination hero_button_destination hero_cta_text hero_headline hero_subtext + hero_background_image { + url + dimensions { + height + width + } + } impact_description impact_section_title + impact_image { + url + dimensions { + height + width + } + } + impact_example { + impact_big_text + impact_small_text + impact_example_image { + url + dimensions { + height + width + } + } + } email_description email_eyebrow_heading enter_email_label From 94d39595239c94be2374600fc35d572431299051 Mon Sep 17 00:00:00 2001 From: Viviana Date: Thu, 11 Mar 2021 11:23:53 -0500 Subject: [PATCH 02/33] Deleted files related to process page --- src/pages/process.js | 58 --------------------- src/schemas/Process.json | 106 --------------------------------------- 2 files changed, 164 deletions(-) delete mode 100644 src/pages/process.js delete mode 100644 src/schemas/Process.json diff --git a/src/pages/process.js b/src/pages/process.js deleted file mode 100644 index 3dcd845..0000000 --- a/src/pages/process.js +++ /dev/null @@ -1,58 +0,0 @@ -import { graphql } from "gatsby" - -import React from "react" - -export default function Process({ data }) { - const processData = data.prismicProcessPage.data - - return ( -
-

{processData.process_header}

-
- ) -} - -export const query = graphql` - query ProcessQuery { - prismicProcessPage { - data { - find_button_destination - find_button_text - find_description - find_header - header_image { - url - dimensions { - width - height - } - } - how_description { - text - } - how_header - how_images { - how_image { - url - dimensions { - width - height - } - } - } - process_header - steps { - step_description - step_image { - url - dimensions { - width - height - } - } - step_title - } - } - } - } -` diff --git a/src/schemas/Process.json b/src/schemas/Process.json deleted file mode 100644 index 5ce758f..0000000 --- a/src/schemas/Process.json +++ /dev/null @@ -1,106 +0,0 @@ -{ - "Main" : { }, - "Header" : { - "process_header" : { - "type" : "Text", - "config" : { - "label" : "Process Header" - } - }, - "header_image" : { - "type" : "Image", - "config" : { - "constraint" : { }, - "thumbnails" : [ ], - "label" : "Header Image" - } - } - }, - "How It Works" : { - "how_header" : { - "type" : "Text", - "config" : { - "label" : "How Header" - } - }, - "how_description" : { - "type" : "StructuredText", - "config" : { - "multi" : "paragraph", - "label" : "How Description" - } - }, - "how_images" : { - "type" : "Group", - "config" : { - "fields" : { - "how_image" : { - "type" : "Image", - "config" : { - "constraint" : { }, - "thumbnails" : [ ], - "label" : "How Image" - } - } - }, - "label" : "How Images" - } - } - }, - "Find Solution" : { - "find_header" : { - "type" : "Text", - "config" : { - "label" : "Find Header" - } - }, - "find_description" : { - "type" : "Text", - "config" : { - "label" : "Find Description" - } - }, - "find_button_text" : { - "type" : "Text", - "config" : { - "label" : "Find Button Text" - } - }, - "find_button_destination" : { - "type" : "Text", - "config" : { - "label" : "Find Button Destination" - } - } - }, - "Steps" : { - "steps" : { - "type" : "Group", - "config" : { - "fields" : { - "step_image" : { - "type" : "Image", - "config" : { - "constraint" : { }, - "thumbnails" : [ ], - "label" : "Step Image" - } - }, - "step_title" : { - "type" : "Text", - "config" : { - "label" : "Step Title" - } - }, - "step_description" : { - "type" : "Text", - "config" : { - "label" : "Step Description" - } - } - }, - "label" : "Steps" - } - } - } - } \ No newline at end of file From 6b58c67e77b810f881a44af5742cd74ef1e9c2cd Mon Sep 17 00:00:00 2001 From: Viviana Date: Thu, 11 Mar 2021 11:27:30 -0500 Subject: [PATCH 03/33] #4 Added JSON and JS files for Products page --- src/pages/products.js | 0 src/schemas/Products.json | 3 +++ 2 files changed, 3 insertions(+) create mode 100644 src/pages/products.js create mode 100644 src/schemas/Products.json diff --git a/src/pages/products.js b/src/pages/products.js new file mode 100644 index 0000000..e69de29 diff --git a/src/schemas/Products.json b/src/schemas/Products.json new file mode 100644 index 0000000..c0863a1 --- /dev/null +++ b/src/schemas/Products.json @@ -0,0 +1,3 @@ +{ + "Main": {} +} \ No newline at end of file From e8a5c8bf973ef85dde1e3a3233ee2ceb53cd14f9 Mon Sep 17 00:00:00 2001 From: Viviana Date: Thu, 11 Mar 2021 11:47:19 -0500 Subject: [PATCH 04/33] #4 Added content types for Featured Section of Product Section page --- gatsby-config.js | 2 +- src/pages/products.js | 31 +++++++++++++++++++++++++ src/schemas/Products.json | 48 ++++++++++++++++++++++++++++++++++++++- 3 files changed, 79 insertions(+), 2 deletions(-) diff --git a/gatsby-config.js b/gatsby-config.js index 721ceb1..c399cb6 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -42,7 +42,7 @@ module.exports = { schemas: { // all the schemas here test: require("./src/schemas/test.json"), - Process: require("./src/schemas/Process.json"), + Product: require("./src/schemas/Products.json"), }, typePathsFilenamePrefix: "prismic-typepaths---powerhouse-site", }, diff --git a/src/pages/products.js b/src/pages/products.js index e69de29..9f40a44 100644 --- a/src/pages/products.js +++ b/src/pages/products.js @@ -0,0 +1,31 @@ +import React from "react" +import { graphql } from "gatsby" + +export default function ProductSection({ data }) { + + const productSectionData = data.prismicProduct.data + + return
{productSectionData.featured_product_heading}
+} + +export const query = graphql` + query ProductSectionQuery { + prismicProduct { + data { + featured_product_description + featured_product_heading + featured_product_image { + url + dimensions { + height + width + } + } + featured_product_name + learn_more_button_destination + learn_more_button_text + products_main_heading + } + } + } +` \ No newline at end of file diff --git a/src/schemas/Products.json b/src/schemas/Products.json index c0863a1..2a79822 100644 --- a/src/schemas/Products.json +++ b/src/schemas/Products.json @@ -1,3 +1,49 @@ { - "Main": {} + "Main": {}, + "Featured Section": { + "products_main_heading": { + "type": "Text", + "config": { + "label": "Products Main Heading" + } + }, + "featured_product_heading": { + "type": "Text", + "config": { + "label": "Featured Product Heading" + } + }, + "featured_product_name": { + "type": "Text", + "config": { + "label": "Featured Product Name" + } + }, + "featured_product_description": { + "type": "Text", + "config": { + "label": "Featured Product Description" + } + }, + "featured_product_image": { + "type": "Image", + "config": { + "constraint": {}, + "thumbnails": [], + "label": "Featured Product Image" + } + }, + "learn_more_button_text": { + "type": "Text", + "config": { + "label": "Learn More Button Text" + } + }, + "learn_more_button_destination": { + "type": "Text", + "config": { + "label": "Learn More Button Destination" + } + } + } } \ No newline at end of file From 7b8d112646a9ce7a316203cfe31a2788be410c8b Mon Sep 17 00:00:00 2001 From: Viviana Date: Thu, 11 Mar 2021 11:57:58 -0500 Subject: [PATCH 05/33] #4 Updated JSON file for Product page --- src/schemas/{Products.json => ProductPage.json} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename src/schemas/{Products.json => ProductPage.json} (96%) diff --git a/src/schemas/Products.json b/src/schemas/ProductPage.json similarity index 96% rename from src/schemas/Products.json rename to src/schemas/ProductPage.json index 2a79822..9d67871 100644 --- a/src/schemas/Products.json +++ b/src/schemas/ProductPage.json @@ -1,7 +1,7 @@ { "Main": {}, "Featured Section": { - "products_main_heading": { + "product_page_main_heading": { "type": "Text", "config": { "label": "Products Main Heading" From a02976e54a8318bbfee9daf70106023ef76389c8 Mon Sep 17 00:00:00 2001 From: Viviana Date: Thu, 11 Mar 2021 12:01:45 -0500 Subject: [PATCH 06/33] #4 Updated JS file for Product page --- gatsby-config.js | 2 +- src/pages/productPage.js | 19 +++++++++++++++++++ src/pages/products.js | 31 ------------------------------- 3 files changed, 20 insertions(+), 32 deletions(-) create mode 100644 src/pages/productPage.js delete mode 100644 src/pages/products.js diff --git a/gatsby-config.js b/gatsby-config.js index c399cb6..3332940 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -42,7 +42,7 @@ module.exports = { schemas: { // all the schemas here test: require("./src/schemas/test.json"), - Product: require("./src/schemas/Products.json"), + Product: require("./src/schemas/ProductPage.json"), }, typePathsFilenamePrefix: "prismic-typepaths---powerhouse-site", }, diff --git a/src/pages/productPage.js b/src/pages/productPage.js new file mode 100644 index 0000000..26327b7 --- /dev/null +++ b/src/pages/productPage.js @@ -0,0 +1,19 @@ +import React from "react" +import { graphql } from "gatsby" + +export default function ProductSection({ data }) { + + const productSectionData = data.prismicProductPage.data + + return ( +
+

TestTestTest

+
) +} + +export const query = graphql` + query ProductSectionQuery { + prismicProductPage { + } + } +` \ No newline at end of file diff --git a/src/pages/products.js b/src/pages/products.js deleted file mode 100644 index 9f40a44..0000000 --- a/src/pages/products.js +++ /dev/null @@ -1,31 +0,0 @@ -import React from "react" -import { graphql } from "gatsby" - -export default function ProductSection({ data }) { - - const productSectionData = data.prismicProduct.data - - return
{productSectionData.featured_product_heading}
-} - -export const query = graphql` - query ProductSectionQuery { - prismicProduct { - data { - featured_product_description - featured_product_heading - featured_product_image { - url - dimensions { - height - width - } - } - featured_product_name - learn_more_button_destination - learn_more_button_text - products_main_heading - } - } - } -` \ No newline at end of file From a1af5a2a289547be0d960555f70ebc6aca512aaf Mon Sep 17 00:00:00 2001 From: Viviana Date: Thu, 11 Mar 2021 12:08:33 -0500 Subject: [PATCH 07/33] #4 Updated content types for Featured Section of Product page --- src/pages/productPage.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/pages/productPage.js b/src/pages/productPage.js index 26327b7..9e390ef 100644 --- a/src/pages/productPage.js +++ b/src/pages/productPage.js @@ -8,12 +8,21 @@ export default function ProductSection({ data }) { return (

TestTestTest

-
) + + ) } export const query = graphql` - query ProductSectionQuery { + query ProductPageQuery { prismicProductPage { + data { + featured_product_description + featured_product_heading + featured_product_name + learn_more_button_text + learn_more_button_text_destination + product_page_main_heading + } } } ` \ No newline at end of file From bc331e8424dbbb2a71ca6767cbfd9f3caac40d85 Mon Sep 17 00:00:00 2001 From: Viviana Date: Thu, 11 Mar 2021 12:32:18 -0500 Subject: [PATCH 08/33] Added content types for Models Section of Product Page --- src/pages/productPage.js | 9 +++ src/schemas/ProductPage.json | 140 ++++++++++++++++++++++++----------- 2 files changed, 107 insertions(+), 42 deletions(-) diff --git a/src/pages/productPage.js b/src/pages/productPage.js index 9e390ef..53b68cf 100644 --- a/src/pages/productPage.js +++ b/src/pages/productPage.js @@ -21,6 +21,15 @@ export const query = graphql` featured_product_name learn_more_button_text learn_more_button_text_destination + model_content { + model_button_destination + model_button_text + model_description + model_name + } + model_scope { + model_scope_heading + } product_page_main_heading } } diff --git a/src/schemas/ProductPage.json b/src/schemas/ProductPage.json index 9d67871..2e64b6d 100644 --- a/src/schemas/ProductPage.json +++ b/src/schemas/ProductPage.json @@ -1,49 +1,105 @@ { - "Main": {}, - "Featured Section": { - "product_page_main_heading": { - "type": "Text", - "config": { - "label": "Products Main Heading" - } - }, - "featured_product_heading": { - "type": "Text", - "config": { - "label": "Featured Product Heading" - } - }, - "featured_product_name": { - "type": "Text", - "config": { - "label": "Featured Product Name" - } - }, - "featured_product_description": { - "type": "Text", - "config": { - "label": "Featured Product Description" - } - }, - "featured_product_image": { - "type": "Image", - "config": { - "constraint": {}, - "thumbnails": [], - "label": "Featured Product Image" + "Main": {}, + "Featured Section": { + "product_page_main_heading": { + "type": "Text", + "config": { + "label": "Products Main Heading" + } + }, + "featured_product_heading": { + "type": "Text", + "config": { + "label": "Featured Product Heading" + } + }, + "featured_product_name": { + "type": "Text", + "config": { + "label": "Featured Product Name" + } + }, + "featured_product_description": { + "type": "Text", + "config": { + "label": "Featured Product Description" + } + }, + "featured_product_image": { + "type": "Image", + "config": { + "constraint": {}, + "thumbnails": [], + "label": "Featured Product Image" + } + }, + "learn_more_button_text": { + "type": "Text", + "config": { + "label": "Learn More Button Text" + } + }, + "learn_more_button_destination": { + "type": "Text", + "config": { + "label": "Learn More Button Destination" + } + } + }, + "Models Section": { + "model_scope": { + "type": "Group", + "config": { + "fields": { + "model_scope_heading": { + "type": "Text", + "config": { + "label": "Model Scope Heading" + } } }, - "learn_more_button_text": { - "type": "Text", - "config": { - "label": "Learn More Button Text" + "label": "Model Scope" + } + }, + "model_content": { + "type": "Group", + "config": { + "fields": { + "model_image": { + "type": "Image", + "config": { + "constraint": {}, + "thumbnails": [], + "label": "Model Image" + } + }, + "model_name": { + "type": "Text", + "config": { + "label": "Model Name" + } + }, + "model_description": { + "type": "Text", + "config": { + "label": "Model Description" + } + }, + "model_button_text": { + "type": "Text", + "config": { + "label": "Model Button Text" + } + }, + "model_button_destination": { + "type": "Text", + "config": { + "label": "Model Button Destination" + } } }, - "learn_more_button_destination": { - "type": "Text", - "config": { - "label": "Learn More Button Destination" - } - } + "label": "Model Content" } + } + } } \ No newline at end of file From a138536e2aa7fc2628487c6f3aa5c80fbee02d30 Mon Sep 17 00:00:00 2001 From: Viviana Date: Fri, 12 Mar 2021 13:15:25 -0500 Subject: [PATCH 09/33] #9 Added JSON and JS files for Use Cases Page --- src/pages/useCasesPage.js | 0 src/schemas/UseCasesPage.json | 3 +++ 2 files changed, 3 insertions(+) create mode 100644 src/pages/useCasesPage.js create mode 100644 src/schemas/UseCasesPage.json diff --git a/src/pages/useCasesPage.js b/src/pages/useCasesPage.js new file mode 100644 index 0000000..e69de29 diff --git a/src/schemas/UseCasesPage.json b/src/schemas/UseCasesPage.json new file mode 100644 index 0000000..c0863a1 --- /dev/null +++ b/src/schemas/UseCasesPage.json @@ -0,0 +1,3 @@ +{ + "Main": {} +} \ No newline at end of file From 2a3fddd944b87862c23bc80103eb717a970be8b5 Mon Sep 17 00:00:00 2001 From: Viviana Date: Fri, 12 Mar 2021 13:22:22 -0500 Subject: [PATCH 10/33] #9 Added content types for Tagline section in Use Cases page --- gatsby-config.js | 1 + src/pages/useCasesPage.js | 31 +++++++++++++++++++++++++++++++ src/schemas/UseCasesPage.json | 24 +++++++++++++++++++++++- 3 files changed, 55 insertions(+), 1 deletion(-) diff --git a/gatsby-config.js b/gatsby-config.js index 721ceb1..814276c 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -43,6 +43,7 @@ module.exports = { // all the schemas here test: require("./src/schemas/test.json"), Process: require("./src/schemas/Process.json"), + UseCasesPage: require("./src/schemas/UseCasesPage.json") }, typePathsFilenamePrefix: "prismic-typepaths---powerhouse-site", }, diff --git a/src/pages/useCasesPage.js b/src/pages/useCasesPage.js index e69de29..6371c89 100644 --- a/src/pages/useCasesPage.js +++ b/src/pages/useCasesPage.js @@ -0,0 +1,31 @@ +import { graphql } from "gatsby" + +import React from "react" + +export default function UseCasesPage({ data }) { + const useCasesPageData = data.prismicUseCasesPage.data + + return ( +
+

{useCasesPageData.process_header}

+
+ ) +} + +export const query = graphql` + query UseCasesPageQuery { + prismicUseCasesPage { + data { + tagline_description + tagline_heading + tagline_image { + url + dimensions { + height + width + } + } + } + } + } +` diff --git a/src/schemas/UseCasesPage.json b/src/schemas/UseCasesPage.json index c0863a1..dcef83f 100644 --- a/src/schemas/UseCasesPage.json +++ b/src/schemas/UseCasesPage.json @@ -1,3 +1,25 @@ { - "Main": {} + "Main": {}, + "Tagline": { + "tagline_heading": { + "type": "Text", + "config": { + "label": "Tagline Heading" + } + }, + "tagline_description": { + "type": "Text", + "config": { + "label": "Tagline Description" + } + }, + "tagline_image": { + "type": "Image", + "config": { + "constraint": {}, + "thumbnails": [], + "label": "Tagline Image" + } + } + } } \ No newline at end of file From c2bee4ec1f219484a4d72a5b27410c2d3b902604 Mon Sep 17 00:00:00 2001 From: Viviana Date: Fri, 12 Mar 2021 13:27:10 -0500 Subject: [PATCH 11/33] #9 Added content types for Use Cases section in Use Cases Page --- src/pages/useCasesPage.js | 3 +++ src/schemas/UseCasesPage.json | 12 ++++++++++++ 2 files changed, 15 insertions(+) diff --git a/src/pages/useCasesPage.js b/src/pages/useCasesPage.js index 6371c89..68039d8 100644 --- a/src/pages/useCasesPage.js +++ b/src/pages/useCasesPage.js @@ -25,6 +25,9 @@ export const query = graphql` width } } + use_case { + link_type + } } } } diff --git a/src/schemas/UseCasesPage.json b/src/schemas/UseCasesPage.json index dcef83f..12ebd04 100644 --- a/src/schemas/UseCasesPage.json +++ b/src/schemas/UseCasesPage.json @@ -21,5 +21,17 @@ "label": "Tagline Image" } } + }, + "Use Cases": { + "use_case": { + "type": "Link", + "config": { + "select": "document", + "customtypes": [ + "use_case" + ], + "label": "Use Case" + } + } } } \ No newline at end of file From fc180181b9a3764234de2e3a9489f9e19ffd14db Mon Sep 17 00:00:00 2001 From: Viviana Date: Fri, 12 Mar 2021 13:30:54 -0500 Subject: [PATCH 12/33] #9 Added content types for Call To Action section in Use Cases Page --- src/pages/useCasesPage.js | 3 +++ src/schemas/UseCasesPage.json | 20 ++++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/src/pages/useCasesPage.js b/src/pages/useCasesPage.js index 68039d8..c59e962 100644 --- a/src/pages/useCasesPage.js +++ b/src/pages/useCasesPage.js @@ -16,6 +16,9 @@ export const query = graphql` query UseCasesPageQuery { prismicUseCasesPage { data { + call_to_action_heading + cta_button_destination + cta_button_text tagline_description tagline_heading tagline_image { diff --git a/src/schemas/UseCasesPage.json b/src/schemas/UseCasesPage.json index 12ebd04..bbccb28 100644 --- a/src/schemas/UseCasesPage.json +++ b/src/schemas/UseCasesPage.json @@ -33,5 +33,25 @@ "label": "Use Case" } } + }, + "Call To Action": { + "call_to_action_heading": { + "type": "Text", + "config": { + "label": "Call To Action Heading" + } + }, + "cta_button_text": { + "type": "Text", + "config": { + "label": "CTA Button Text" + } + }, + "cta_button_destination": { + "type": "Text", + "config": { + "label": "CTA Button Destination" + } + } } } \ No newline at end of file From 9ca2e7bb8d98967a797556506d20dda94815ab33 Mon Sep 17 00:00:00 2001 From: samgildea Date: Fri, 12 Mar 2021 15:57:05 -0500 Subject: [PATCH 13/33] #4 using gatsby node to auto generate individual product pages --- gatsby-config.js | 3 +- gatsby-node.js | 34 ++++++ src/pages/{productPage.js => products.js} | 8 +- src/schemas/Product.json | 133 ++++++++++++++++++++++ src/schemas/ProductPage.json | 46 ++------ src/templates/product.js | 53 +++++++++ 6 files changed, 234 insertions(+), 43 deletions(-) create mode 100644 gatsby-node.js rename src/pages/{productPage.js => products.js} (77%) create mode 100644 src/schemas/Product.json create mode 100644 src/templates/product.js diff --git a/gatsby-config.js b/gatsby-config.js index 3332940..e1d158b 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -42,7 +42,8 @@ module.exports = { schemas: { // all the schemas here test: require("./src/schemas/test.json"), - Product: require("./src/schemas/ProductPage.json"), + ProductPage: require("./src/schemas/ProductPage.json"), + Product: require("./src/schemas/Product.json") }, typePathsFilenamePrefix: "prismic-typepaths---powerhouse-site", }, diff --git a/gatsby-node.js b/gatsby-node.js new file mode 100644 index 0000000..42e82d3 --- /dev/null +++ b/gatsby-node.js @@ -0,0 +1,34 @@ +const path = require("path") +const productTemplate = path.resolve(__dirname, "./src/templates/product.js") + +exports.createPages = async ({ graphql, actions }) => { + const { createPage } = actions + + // Query all Pages with their IDs and template data. + const pages = await graphql(` + { + allPrismicProduct { + edges { + node { + id + uid + data { + product_title + } + } + } + } + } + `) + + // Create pages for each Page in Prismic using the selected template. + pages.data.allPrismicProduct.edges.forEach(node => { + createPage({ + path: `/${node.node.uid}`, + component: productTemplate, + context: { + uid: node.node.uid, + }, + }) + }) +} diff --git a/src/pages/productPage.js b/src/pages/products.js similarity index 77% rename from src/pages/productPage.js rename to src/pages/products.js index 53b68cf..4ec3112 100644 --- a/src/pages/productPage.js +++ b/src/pages/products.js @@ -7,7 +7,7 @@ export default function ProductSection({ data }) { return (
-

TestTestTest

+

Product Page

) } @@ -21,12 +21,6 @@ export const query = graphql` featured_product_name learn_more_button_text learn_more_button_text_destination - model_content { - model_button_destination - model_button_text - model_description - model_name - } model_scope { model_scope_heading } diff --git a/src/schemas/Product.json b/src/schemas/Product.json new file mode 100644 index 0000000..460399d --- /dev/null +++ b/src/schemas/Product.json @@ -0,0 +1,133 @@ +{ + "Main" : { + "uid" : { + "type" : "UID", + "config" : { + "label" : "url" + } + }, + "product_type" : { + "type" : "Select", + "config" : { + "options" : [ "Homeowner", "Commercial" ], + "label" : "Product Type" + } + }, + "product_title" : { + "type" : "Text", + "config" : { + "label" : "Product Title" + } + }, + "product_description" : { + "type" : "StructuredText", + "config" : { + "multi" : "paragraph", + "label" : "Product Description" + } + }, + "product_images" : { + "type" : "Group", + "config" : { + "fields" : { + "image" : { + "type" : "Image", + "config" : { + "constraint" : { }, + "thumbnails" : [ ], + "label" : "Image" + } + } + }, + "label" : "Product Images" + } + } + }, + "Icon Section" : { + "icon_section_title" : { + "type" : "Text", + "config" : { + "label" : "Icon Section Title" + } + }, + "icons" : { + "type" : "Group", + "config" : { + "fields" : { + "icon_image" : { + "type" : "Image", + "config" : { + "constraint" : { }, + "thumbnails" : [ ], + "label" : "Icon Image" + } + }, + "icon_text" : { + "type" : "Text", + "config" : { + "label" : "Icon Text" + } + } + }, + "label" : "Icons" + } + } + }, + "Feature Section" : { + "feature_title" : { + "type" : "Text", + "config" : { + "label" : "Feature Title" + } + }, + "features" : { + "type" : "Group", + "config" : { + "fields" : { + "feature_image" : { + "type" : "Image", + "config" : { + "constraint" : { }, + "thumbnails" : [ ], + "label" : "Feature Image" + } + }, + "feature_name" : { + "type" : "Text", + "config" : { + "label" : "Feature Name" + } + }, + "feature_description" : { + "type" : "StructuredText", + "config" : { + "multi" : "paragraph", + "label" : "feature description" + } + } + }, + "label" : "Features" + } + } + }, + "Product CTA" : { + "cta_title" : { + "type" : "Text", + "config" : { + "label" : "CTA Header" + } + }, + "button_title" : { + "type" : "Text", + "config" : { + "label" : "Button Title" + } + }, + "button_destination" : { + "type" : "Text", + "config" : { + "label" : "Button Destination" + } + } + } + } \ No newline at end of file diff --git a/src/schemas/ProductPage.json b/src/schemas/ProductPage.json index 2e64b6d..120fa64 100644 --- a/src/schemas/ProductPage.json +++ b/src/schemas/ProductPage.json @@ -4,7 +4,7 @@ "product_page_main_heading": { "type": "Text", "config": { - "label": "Products Main Heading" + "label": "Product Page Main Heading" } }, "featured_product_heading": { @@ -39,10 +39,10 @@ "label": "Learn More Button Text" } }, - "learn_more_button_destination": { + "learn_more_button_text_destination": { "type": "Text", "config": { - "label": "Learn More Button Destination" + "label": "Learn More Button Text Destination" } } }, @@ -61,45 +61,21 @@ "label": "Model Scope" } }, - "model_content": { + "products": { "type": "Group", "config": { "fields": { - "model_image": { - "type": "Image", + "product": { + "type": "Link", "config": { - "constraint": {}, - "thumbnails": [], - "label": "Model Image" - } - }, - "model_name": { - "type": "Text", - "config": { - "label": "Model Name" - } - }, - "model_description": { - "type": "Text", - "config": { - "label": "Model Description" - } - }, - "model_button_text": { - "type": "Text", - "config": { - "label": "Model Button Text" - } - }, - "model_button_destination": { - "type": "Text", - "config": { - "label": "Model Button Destination" + "select": "document", + "customtypes": ["product"], + "label": "product" } } }, - "label": "Model Content" + "label": "Products" } } } -} \ No newline at end of file +} diff --git a/src/templates/product.js b/src/templates/product.js new file mode 100644 index 0000000..1732b29 --- /dev/null +++ b/src/templates/product.js @@ -0,0 +1,53 @@ +import React from "react" +import { graphql } from "gatsby" + +export default function Product({ data }) { + const products = data.allPrismicProduct.edges[0].node + + return

{products.data.product_title}

+} + +export const query = graphql` + query($uid: String!) { + allPrismicProduct(filter: { uid: { eq: $uid } }) { + edges { + node { + id + uid + data { + product_title + button_destination + button_title + cta_title + feature_title + features { + feature_name + feature_description { + text + } + feature_image { + url + } + } + icon_section_title + icons { + icon_text + icon_image { + url + } + } + product_description { + text + } + product_images { + image { + url + } + } + product_type + } + } + } + } + } +` From fccd9916d8cbc8b58f2b391470f3b5ad2f54bbea Mon Sep 17 00:00:00 2001 From: Viviana Date: Sun, 14 Mar 2021 22:10:52 -0400 Subject: [PATCH 14/33] #1 Updated Hero Button Destination to a link type --- src/pages/index.js | 4 +++- src/schemas/Homepage.json | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pages/index.js b/src/pages/index.js index 9f8a508..8dfed78 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -23,7 +23,9 @@ export const query = graphql` } button_text button_destination - hero_button_destination + hero_button_destination { + target + } hero_cta_text hero_headline hero_subtext diff --git a/src/schemas/Homepage.json b/src/schemas/Homepage.json index 3f67751..9e98798 100644 --- a/src/schemas/Homepage.json +++ b/src/schemas/Homepage.json @@ -20,7 +20,7 @@ } }, "hero_button_destination" : { - "type" : "Text", + "type" : "Link", "config" : { "label" : "Hero Button Destination" } From da36fcf14ea04b6b2a5da7295153a8682334792f Mon Sep 17 00:00:00 2001 From: samgildea Date: Thu, 18 Mar 2021 14:03:08 -0400 Subject: [PATCH 15/33] updating schemas to properly link individual product content types to the product page --- gatsby-config.js | 4 +- src/pages/products.js | 49 +++++++++++++++++-- .../{ProductPage.json => product_page.json} | 16 +++++- 3 files changed, 62 insertions(+), 7 deletions(-) rename src/schemas/{ProductPage.json => product_page.json} (86%) diff --git a/gatsby-config.js b/gatsby-config.js index b56540e..a91dfb8 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -32,8 +32,8 @@ module.exports = { schemas: { // all the schemas here test: require("./src/schemas/test.json"), - ProductPage: require("./src/schemas/ProductPage.json"), - Product: require("./src/schemas/Product.json") + product_page: require("./src/schemas/product_page.json"), + product: require("./src/schemas/product.json") }, typePathsFilenamePrefix: "prismic-typepaths---powerhouse-site", }, diff --git a/src/pages/products.js b/src/pages/products.js index 4ec3112..825eda0 100644 --- a/src/pages/products.js +++ b/src/pages/products.js @@ -2,12 +2,14 @@ import React from "react" import { graphql } from "gatsby" export default function ProductSection({ data }) { - const productSectionData = data.prismicProductPage.data return (
-

Product Page

+ {/* Mapping over individual products. TODO: separate products based on category (homeowner or commerical) */} + {productSectionData.products.map(product => { + return

{product.product.document.data.product_title}

+ })}
) } @@ -25,7 +27,48 @@ export const query = graphql` model_scope_heading } product_page_main_heading + + products { + product { + document { + ... on PrismicProduct { + data { + product_title + button_destination + button_title + cta_title + feature_title + features { + feature_name + feature_description { + text + } + feature_image { + url + } + } + icon_section_title + icons { + icon_text + icon_image { + url + } + } + product_description { + text + } + product_images { + image { + url + } + } + product_type + } + } + } + } + } } } } -` \ No newline at end of file +` diff --git a/src/schemas/ProductPage.json b/src/schemas/product_page.json similarity index 86% rename from src/schemas/ProductPage.json rename to src/schemas/product_page.json index 120fa64..fa68acf 100644 --- a/src/schemas/ProductPage.json +++ b/src/schemas/product_page.json @@ -69,13 +69,25 @@ "type": "Link", "config": { "select": "document", - "customtypes": ["product"], + "customtypes": [ + "product_page" + ], "label": "product" } } }, "label": "Products" } + }, + "test": { + "type": "Link", + "config": { + "select": "document", + "customtypes": [ + "product" + ], + "label": "test" + } } } -} +} \ No newline at end of file From 19c37d12773336a6d51386b69521efb7df034408 Mon Sep 17 00:00:00 2001 From: samgildea Date: Thu, 18 Mar 2021 14:38:07 -0400 Subject: [PATCH 16/33] removing product schema --- src/schemas/Product.json | 133 --------------------------------------- 1 file changed, 133 deletions(-) delete mode 100644 src/schemas/Product.json diff --git a/src/schemas/Product.json b/src/schemas/Product.json deleted file mode 100644 index 460399d..0000000 --- a/src/schemas/Product.json +++ /dev/null @@ -1,133 +0,0 @@ -{ - "Main" : { - "uid" : { - "type" : "UID", - "config" : { - "label" : "url" - } - }, - "product_type" : { - "type" : "Select", - "config" : { - "options" : [ "Homeowner", "Commercial" ], - "label" : "Product Type" - } - }, - "product_title" : { - "type" : "Text", - "config" : { - "label" : "Product Title" - } - }, - "product_description" : { - "type" : "StructuredText", - "config" : { - "multi" : "paragraph", - "label" : "Product Description" - } - }, - "product_images" : { - "type" : "Group", - "config" : { - "fields" : { - "image" : { - "type" : "Image", - "config" : { - "constraint" : { }, - "thumbnails" : [ ], - "label" : "Image" - } - } - }, - "label" : "Product Images" - } - } - }, - "Icon Section" : { - "icon_section_title" : { - "type" : "Text", - "config" : { - "label" : "Icon Section Title" - } - }, - "icons" : { - "type" : "Group", - "config" : { - "fields" : { - "icon_image" : { - "type" : "Image", - "config" : { - "constraint" : { }, - "thumbnails" : [ ], - "label" : "Icon Image" - } - }, - "icon_text" : { - "type" : "Text", - "config" : { - "label" : "Icon Text" - } - } - }, - "label" : "Icons" - } - } - }, - "Feature Section" : { - "feature_title" : { - "type" : "Text", - "config" : { - "label" : "Feature Title" - } - }, - "features" : { - "type" : "Group", - "config" : { - "fields" : { - "feature_image" : { - "type" : "Image", - "config" : { - "constraint" : { }, - "thumbnails" : [ ], - "label" : "Feature Image" - } - }, - "feature_name" : { - "type" : "Text", - "config" : { - "label" : "Feature Name" - } - }, - "feature_description" : { - "type" : "StructuredText", - "config" : { - "multi" : "paragraph", - "label" : "feature description" - } - } - }, - "label" : "Features" - } - } - }, - "Product CTA" : { - "cta_title" : { - "type" : "Text", - "config" : { - "label" : "CTA Header" - } - }, - "button_title" : { - "type" : "Text", - "config" : { - "label" : "Button Title" - } - }, - "button_destination" : { - "type" : "Text", - "config" : { - "label" : "Button Destination" - } - } - } - } \ No newline at end of file From 1ba0cc234da2b3af35d86a0987e7e29bd20b2563 Mon Sep 17 00:00:00 2001 From: samgildea Date: Thu, 18 Mar 2021 14:40:32 -0400 Subject: [PATCH 17/33] adding product schema --- src/schemas/product.json | 133 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 src/schemas/product.json diff --git a/src/schemas/product.json b/src/schemas/product.json new file mode 100644 index 0000000..460399d --- /dev/null +++ b/src/schemas/product.json @@ -0,0 +1,133 @@ +{ + "Main" : { + "uid" : { + "type" : "UID", + "config" : { + "label" : "url" + } + }, + "product_type" : { + "type" : "Select", + "config" : { + "options" : [ "Homeowner", "Commercial" ], + "label" : "Product Type" + } + }, + "product_title" : { + "type" : "Text", + "config" : { + "label" : "Product Title" + } + }, + "product_description" : { + "type" : "StructuredText", + "config" : { + "multi" : "paragraph", + "label" : "Product Description" + } + }, + "product_images" : { + "type" : "Group", + "config" : { + "fields" : { + "image" : { + "type" : "Image", + "config" : { + "constraint" : { }, + "thumbnails" : [ ], + "label" : "Image" + } + } + }, + "label" : "Product Images" + } + } + }, + "Icon Section" : { + "icon_section_title" : { + "type" : "Text", + "config" : { + "label" : "Icon Section Title" + } + }, + "icons" : { + "type" : "Group", + "config" : { + "fields" : { + "icon_image" : { + "type" : "Image", + "config" : { + "constraint" : { }, + "thumbnails" : [ ], + "label" : "Icon Image" + } + }, + "icon_text" : { + "type" : "Text", + "config" : { + "label" : "Icon Text" + } + } + }, + "label" : "Icons" + } + } + }, + "Feature Section" : { + "feature_title" : { + "type" : "Text", + "config" : { + "label" : "Feature Title" + } + }, + "features" : { + "type" : "Group", + "config" : { + "fields" : { + "feature_image" : { + "type" : "Image", + "config" : { + "constraint" : { }, + "thumbnails" : [ ], + "label" : "Feature Image" + } + }, + "feature_name" : { + "type" : "Text", + "config" : { + "label" : "Feature Name" + } + }, + "feature_description" : { + "type" : "StructuredText", + "config" : { + "multi" : "paragraph", + "label" : "feature description" + } + } + }, + "label" : "Features" + } + } + }, + "Product CTA" : { + "cta_title" : { + "type" : "Text", + "config" : { + "label" : "CTA Header" + } + }, + "button_title" : { + "type" : "Text", + "config" : { + "label" : "Button Title" + } + }, + "button_destination" : { + "type" : "Text", + "config" : { + "label" : "Button Destination" + } + } + } + } \ No newline at end of file From c62d1c1bacd21610d107412ba7c619ff979201a6 Mon Sep 17 00:00:00 2001 From: Viviana Date: Thu, 18 Mar 2021 18:19:09 -0400 Subject: [PATCH 18/33] #1 Updated button destinations to a link type --- src/pages/index.js | 8 ++++++-- src/schemas/Homepage.json | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/pages/index.js b/src/pages/index.js index 8dfed78..8b3f166 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -22,7 +22,9 @@ export const query = graphql` } } button_text - button_destination + button_destination { + target + } hero_button_destination { target } @@ -59,7 +61,9 @@ export const query = graphql` email_description email_eyebrow_heading enter_email_label - sign_up_button_destination + sign_up_button_destination { + target + } sign_up_button_text } } diff --git a/src/schemas/Homepage.json b/src/schemas/Homepage.json index 9e98798..b901d4f 100644 --- a/src/schemas/Homepage.json +++ b/src/schemas/Homepage.json @@ -54,7 +54,7 @@ } }, "button_destination" : { - "type" : "Text", + "type" : "Link", "config" : { "label" : "Button Destination" } @@ -144,7 +144,7 @@ } }, "sign_up_button_destination" : { - "type" : "Text", + "type" : "Link", "config" : { "label" : "Sign up Button Destination" } From d845fa332535e43ed2b7ebe9697e528b01bad312 Mon Sep 17 00:00:00 2001 From: Viviana Date: Thu, 18 Mar 2021 18:24:16 -0400 Subject: [PATCH 19/33] #9 Updated button destinations to link type for Call To Action section --- src/pages/useCasesPage.js | 4 +++- src/schemas/UseCasesPage.json | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pages/useCasesPage.js b/src/pages/useCasesPage.js index c59e962..d8e1443 100644 --- a/src/pages/useCasesPage.js +++ b/src/pages/useCasesPage.js @@ -17,7 +17,9 @@ export const query = graphql` prismicUseCasesPage { data { call_to_action_heading - cta_button_destination + cta_button_destination { + target + } cta_button_text tagline_description tagline_heading diff --git a/src/schemas/UseCasesPage.json b/src/schemas/UseCasesPage.json index bbccb28..c0e8dc7 100644 --- a/src/schemas/UseCasesPage.json +++ b/src/schemas/UseCasesPage.json @@ -48,7 +48,7 @@ } }, "cta_button_destination": { - "type": "Text", + "type": "Link", "config": { "label": "CTA Button Destination" } From 27708c567d5ee8cef0c036ecbc76da50f9bd484c Mon Sep 17 00:00:00 2001 From: Viviana Date: Thu, 18 Mar 2021 18:39:45 -0400 Subject: [PATCH 20/33] #2 Updated button destinations to link type --- src/schemas/About.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/schemas/About.json b/src/schemas/About.json index cafa36c..42c100d 100644 --- a/src/schemas/About.json +++ b/src/schemas/About.json @@ -58,7 +58,7 @@ } }, "cta_button_destination": { - "type": "Text", + "type": "Link", "config": { "label": "CTA Button Destination" } @@ -114,7 +114,7 @@ } }, "contact_button_destination": { - "type": "Text", + "type": "Link", "config": { "label": "Contact Button Destination" } @@ -188,7 +188,7 @@ } }, "products_navigation_button_destination": { - "type": "Text", + "type": "Link", "config": { "label": "Products Navigation Button Destination" } From fd7f1ac0da9a849d688a9ed4a30c697cb30713bc Mon Sep 17 00:00:00 2001 From: samgildea Date: Fri, 19 Mar 2021 12:34:59 -0400 Subject: [PATCH 21/33] #1 adding layout component --- src/components/footer.js | 0 src/pages/index.js | 3 ++- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 src/components/footer.js diff --git a/src/components/footer.js b/src/components/footer.js new file mode 100644 index 0000000..e69de29 diff --git a/src/pages/index.js b/src/pages/index.js index 318eb45..ca77caf 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -1,11 +1,12 @@ import React from "react" import { graphql } from "gatsby" +import Layout from "../components/layout" export default function Home({ data }) { const homepageData = data.prismicHomepage.data - return
{homepageData.hero_headline}
+ return {homepageData.hero_headline} } export const query = graphql` From b00415d5e21440a4568b3b6d2acdb5f0e01f23ed Mon Sep 17 00:00:00 2001 From: samgildea Date: Fri, 19 Mar 2021 17:41:20 -0400 Subject: [PATCH 22/33] #13 basic style and structure for footer --- gatsby-config.js | 1 + src/components/footer.js | 231 +++++++++++++++++++++++++++++++++++++++ src/components/layout.js | 56 ++-------- src/pages/index.js | 3 +- src/pages/process.js | 2 - src/schemas/footer.json | 33 ++++++ src/style/global.scss | 4 + 7 files changed, 279 insertions(+), 51 deletions(-) create mode 100644 src/components/footer.js create mode 100644 src/schemas/footer.json create mode 100644 src/style/global.scss diff --git a/gatsby-config.js b/gatsby-config.js index fe05926..f24350b 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -33,6 +33,7 @@ module.exports = { // all the schemas here test: require("./src/schemas/test.json"), Process: require("./src/schemas/Process.json"), + footer: require("./src/schemas/footer.json") }, typePathsFilenamePrefix: "prismic-typepaths---powerhouse-site", }, diff --git a/src/components/footer.js b/src/components/footer.js new file mode 100644 index 0000000..c8d7956 --- /dev/null +++ b/src/components/footer.js @@ -0,0 +1,231 @@ +import React from "react" +import styled from "styled-components" +import dimensions from "../style/dimensions" +import { StaticQuery, graphql } from "gatsby" + +const FooterContainer = styled.div` + background-color: #c4c4c4; + width: 100%; +` + +const FooterMainContent = styled.div` + @media (min-width: ${dimensions.maxwidthTablet}px) { + display: flex; + } +` + +const SocialSection = styled.div` + margin-left: 32px; + padding-top: 50px; +` + +const FooterHeader = styled.div` + font-weight: bold; + font-size: 24px; +` + +const SocialIcons = styled.div` + display: flex; + padding-top: 15px; +` + +const SocialPlaceholder = styled.div` + margin-right: 12px; +` +const EmailText = styled.div` + text-decoration: underline; + font-size: 18px; + font-weight: bold; + padding-top: 25px; +` + +const LinkSection = styled.div` + display: flex; + margin-left: 9vw; + padding-top: 50px; + @media (max-width: ${dimensions.maxwidthTablet}px) { + margin-left: 0px; + } + + li { + padding-bottom: 47px; + font-size: 18px; + font-weight: bold; + } + + a { + text-decoration: none; + color: black; + } + + ul { + list-style: none; + } +` + +const LinkColumn = styled.div` + padding-right: 9vw; + + @media (max-width: ${dimensions.maxwidthTablet}px) { + padding-right: 0; + } +` + +const EmailSection = styled.div` + margin-left: 32px; + + input { + width: 20vw; + height: 36px; + margin-top: 10px; + border: solid #626262 1px; + } + + @media (max-width: ${dimensions.maxwidthTablet}px) { + input { + width: 80%; + height: 36px; + margin-top: 10px; + border: solid #626262 1px; + } + } + + input::placeholder { + padding-left: 14px; + } + + @media (min-width: ${dimensions.maxwidthTablet}px) { + padding-top: 50px; + position: absolute; + right: 62px; + } +` + +const BottomLinks = styled.div` + a { + text-decoration: none; + color: black; + } + ul { + display: flex; + justify-content: center; + list-style: none; + padding-bottom: 30px; + } + + li { + font-size: 12px; + padding-right: 28px; + } + + @media (max-width: ${dimensions.maxwidthTablet}px) { + ul { + display: flex; + justify-content: center; + list-style: none; + padding-top: 80px; + padding-bottom: 12px; + } + } +` + +const EmailFormHeader = styled.div`` + +export default function footer({ data }) { + return ( + ( + + + + Powerhouse + + {data.prismicFooter.data.social_media.map(social => { + return ( + + + + + + ) + })} + + {data.prismicFooter.data.email} + + + + + + + + + + + + + +
+ Sign Up For Our Newsletter + +
+
+
+ + + + +
+ )} + /> + ) +} diff --git a/src/components/layout.js b/src/components/layout.js index 4d54b27..0bd5ad3 100644 --- a/src/components/layout.js +++ b/src/components/layout.js @@ -1,62 +1,20 @@ import React from "react" import styled from "styled-components" import "../style/typography.scss" - +import "../style/global.scss" import dimensions from "../style/dimensions" import { layoutPaddingDesktop, layoutPaddingMobile } from "../style/variables" +import Footer from "../components/footer.js" const LayoutContainer = styled.div` - body * { - box-sizing: border-box; - margin: 0; - } - - html, - body, - #root { - margin: 0; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - min-height: 100%; - } - - body { - width: 100%; - margin: 0 auto; - font-size: 16px; - line-height: 1.5; - -webkit-font-smoothing: antialiased; - - @media (max-width: ${dimensions.maxwidthMobile}px) { - font-size: 14px; - } - - * { - box-sizing: border-box; - } - } - - /* - A workaround for forcing accessibility wrappers - to have a 100% height. - Reach Router issue here: https: //github.com/reach/router/issues/63 - */ - #___gatsby, - div[role="group"][tabindex] { - height: 100%; - min-height: 100% !important; - } - - padding: 0 ${layoutPaddingDesktop} ${layoutPaddingDesktop}; - margin: 0 auto; ` const LayoutBody = styled.div` - @media (max-width: ${dimensions.maxwidthTablet}px) { - padding: 0 ${layoutPaddingDesktop} ${layoutPaddingDesktop}; + @media (min-width: ${dimensions.maxwidthTablet}px) { + padding: 0 ${layoutPaddingDesktop} ${layoutPaddingDesktop};s } - @media (max-width: ${dimensions.maxwidthMobile}px) { + @media (max-width: ${dimensions.maxwidthTablet}px) { padding: 0 ${layoutPaddingMobile} ${layoutPaddingMobile}; } ` @@ -65,8 +23,10 @@ const Layout = ({ children }) => { return ( {children} + +