diff --git a/backend/api/features-sections/config/routes.json b/backend/api/features-sections/config/routes.json deleted file mode 100644 index 637da113..00000000 --- a/backend/api/features-sections/config/routes.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "routes": [ - { - "method": "GET", - "path": "/features-sections", - "handler": "features-sections.find", - "config": { - "policies": [] - } - }, - { - "method": "GET", - "path": "/features-sections/count", - "handler": "features-sections.count", - "config": { - "policies": [] - } - }, - { - "method": "GET", - "path": "/features-sections/:id", - "handler": "features-sections.findOne", - "config": { - "policies": [] - } - }, - { - "method": "POST", - "path": "/features-sections", - "handler": "features-sections.create", - "config": { - "policies": [] - } - }, - { - "method": "PUT", - "path": "/features-sections/:id", - "handler": "features-sections.update", - "config": { - "policies": [] - } - }, - { - "method": "DELETE", - "path": "/features-sections/:id", - "handler": "features-sections.delete", - "config": { - "policies": [] - } - } - ] -} diff --git a/backend/api/features-sections/controllers/features-sections.js b/backend/api/features-sections/controllers/features-sections.js deleted file mode 100644 index e8608953..00000000 --- a/backend/api/features-sections/controllers/features-sections.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict'; - -/** - * Read the documentation (https://strapi.io/documentation/developer-docs/latest/development/backend-customization.html#core-controllers) - * to customize this controller - */ - -module.exports = {}; diff --git a/backend/api/features-sections/models/features-sections.js b/backend/api/features-sections/models/features-sections.js deleted file mode 100644 index 0054d33c..00000000 --- a/backend/api/features-sections/models/features-sections.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict'; - -/** - * Read the documentation (https://strapi.io/documentation/developer-docs/latest/development/backend-customization.html#lifecycle-hooks) - * to customize this model - */ - -module.exports = {}; diff --git a/backend/api/features-sections/models/features-sections.settings.json b/backend/api/features-sections/models/features-sections.settings.json deleted file mode 100644 index 9a247eed..00000000 --- a/backend/api/features-sections/models/features-sections.settings.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "kind": "collectionType", - "collectionName": "features_sections", - "info": { - "name": "pageFeaturesSection", - "description": "" - }, - "options": { - "increments": true, - "timestamps": true, - "draftAndPublish": true - }, - "pluginOptions": { - "i18n": { - "localized": true - } - }, - "attributes": { - "blocks": { - "type": "dynamiczone", - "components": [ - "blocks.feature" - ], - "pluginOptions": { - "i18n": { - "localized": true - } - } - } - } -} diff --git a/backend/api/features-sections/services/features-sections.js b/backend/api/features-sections/services/features-sections.js deleted file mode 100644 index 6538a8c8..00000000 --- a/backend/api/features-sections/services/features-sections.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict'; - -/** - * Read the documentation (https://strapi.io/documentation/developer-docs/latest/development/backend-customization.html#core-services) - * to customize this service - */ - -module.exports = {}; diff --git a/backend/api/pages/models/pages.settings.json b/backend/api/pages/models/pages.settings.json index c9e62c1e..37233a06 100644 --- a/backend/api/pages/models/pages.settings.json +++ b/backend/api/pages/models/pages.settings.json @@ -26,26 +26,26 @@ } } }, - "blocks": { - "type": "dynamiczone", - "components": [ - "blocks.card", - "blocks.hero", - "blocks.single-feature" - ], + "path": { + "type": "string", "pluginOptions": { "i18n": { "localized": true } } }, - "path": { - "type": "string", + "sections": { "pluginOptions": { "i18n": { "localized": true } - } + }, + "type": "dynamiczone", + "components": [ + "section.card-section", + "section.hero-section", + "section.single-feature-section" + ] } } } diff --git a/backend/components/blocks/card.json b/backend/components/blocks/card.json index 9d34e461..b250c464 100644 --- a/backend/components/blocks/card.json +++ b/backend/components/blocks/card.json @@ -8,7 +8,7 @@ "options": {}, "attributes": { "title": { - "type": "string", + "type": "text", "required": true }, "description": { @@ -26,9 +26,7 @@ "pluginOptions": {} }, "projectLink": { - "type": "component", - "repeatable": false, - "component": "menu.page-link" + "type": "string" } } } diff --git a/backend/components/blocks/feature.json b/backend/components/blocks/feature.json deleted file mode 100644 index 9849b136..00000000 --- a/backend/components/blocks/feature.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "collectionName": "components_blocks_features", - "info": { - "name": "feature", - "icon": "ad" - }, - "options": {}, - "attributes": { - "featureTitle": { - "type": "string", - "required": true - }, - "featureDescription": { - "type": "text" - }, - "feat": { - "type": "component", - "repeatable": true, - "component": "feat.feat" - } - } -} diff --git a/backend/components/blocks/hero.json b/backend/components/blocks/hero.json index 8e11ba3c..5fa9d44b 100644 --- a/backend/components/blocks/hero.json +++ b/backend/components/blocks/hero.json @@ -9,7 +9,7 @@ "attributes": { "title": { "type": "string", - "required": true + "required": false }, "subtitle": { "type": "text" diff --git a/backend/components/blocks/single-feature.json b/backend/components/blocks/single-feature.json index c536df3b..533eb425 100644 --- a/backend/components/blocks/single-feature.json +++ b/backend/components/blocks/single-feature.json @@ -26,9 +26,7 @@ "pluginOptions": {} }, "serviceLink": { - "type": "component", - "repeatable": true, - "component": "menu.page-link" + "type": "string" } } } diff --git a/backend/components/feat/feat.json b/backend/components/feat/feat.json deleted file mode 100644 index b7f573b9..00000000 --- a/backend/components/feat/feat.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "collectionName": "components_feat_feats", - "info": { - "name": "feat", - "icon": "angle-up" - }, - "options": {}, - "attributes": { - "featDescription": { - "type": "text" - } - } -} diff --git a/backend/components/section/card-section.json b/backend/components/section/card-section.json new file mode 100644 index 00000000..11250353 --- /dev/null +++ b/backend/components/section/card-section.json @@ -0,0 +1,22 @@ +{ + "collectionName": "components_section_card_sections", + "info": { + "name": "cardSection", + "icon": "align-left", + "description": "" + }, + "options": {}, + "attributes": { + "title": { + "type": "string" + }, + "subtitle": { + "type": "text" + }, + "sections": { + "type": "component", + "repeatable": true, + "component": "blocks.card" + } + } +} diff --git a/backend/components/section/hero-section.json b/backend/components/section/hero-section.json new file mode 100644 index 00000000..087742b8 --- /dev/null +++ b/backend/components/section/hero-section.json @@ -0,0 +1,22 @@ +{ + "collectionName": "components_section_hero_sections", + "info": { + "name": "heroSection", + "icon": "arrow-alt-circle-up", + "description": "" + }, + "options": {}, + "attributes": { + "sections": { + "type": "component", + "repeatable": true, + "component": "blocks.hero" + }, + "title": { + "type": "string" + }, + "subtitle": { + "type": "text" + } + } +} diff --git a/backend/components/section/single-feature-section.json b/backend/components/section/single-feature-section.json new file mode 100644 index 00000000..26c2cc02 --- /dev/null +++ b/backend/components/section/single-feature-section.json @@ -0,0 +1,22 @@ +{ + "collectionName": "components_section_single_feature_sections", + "info": { + "name": "singleFeatureSection", + "icon": "anchor", + "description": "" + }, + "options": {}, + "attributes": { + "title": { + "type": "string" + }, + "subtitle": { + "type": "text" + }, + "sections": { + "type": "component", + "repeatable": true, + "component": "blocks.single-feature" + } + } +} diff --git a/frontend/features/pageBlocks/CardBlock.tsx b/frontend/features/pageBlocks/CardBlock.tsx index cfea2d2c..2ed4b434 100644 --- a/frontend/features/pageBlocks/CardBlock.tsx +++ b/frontend/features/pageBlocks/CardBlock.tsx @@ -1,21 +1,18 @@ -import { AspectRatio, Box, Link, Stack, Text } from "@chakra-ui/react"; +import { Image, Box, chakra, Flex, calc } from "@chakra-ui/react"; +import { STRAPI_URL } from "@config/env"; import React from "react"; -import { - Block, - BlocksControls, - InlineImage, - InlineText, -} from "react-tinacms-inline"; +import { Block, BlocksControls, InlineTextarea } from "react-tinacms-inline"; +import { useCMS } from "tinacms"; import { BlockTemplateData } from "./types"; export type CardBlockData = BlockTemplateData< - "card", + "ComponentBlocksCard", { id: string; - imageUrl?: string; + imageUrl?: Nullable; title: string; description: string; - projectLink: string; + projectLink?: Nullable; } >; @@ -26,58 +23,131 @@ interface CardBlockProps { projectLink?: string; } +export const StyledImage = chakra(Image); +export const StyledInlineTextarea = chakra(InlineTextarea); + export function CardBlock({ imageUrl, projectLink }: CardBlockProps) { + const cms = useCMS(); return ( - - - media.id} /> - - - - - - + + + + - - - - - Discover more - - - + + + + + + + + + + Discover more + + ); } export const cardBlock: Block = { - Component: ({ index, data, name, ...other }) => { + Component: ({ index, data }: any) => { return ( - + ); }, @@ -86,7 +156,8 @@ export const cardBlock: Block = { defaultItem: { title: "Default title", description: "Default description", - projectLink: "Default link", + projectLink: "Discover more", + imageUrl: "http://localhost:1337/uploads/80_c6692eb6f8", }, fields: [], }, diff --git a/frontend/features/pageBlocks/FeatureBlock.tsx b/frontend/features/pageBlocks/FeatureBlock.tsx index 4bd5d7df..390c5aae 100644 --- a/frontend/features/pageBlocks/FeatureBlock.tsx +++ b/frontend/features/pageBlocks/FeatureBlock.tsx @@ -1,52 +1,90 @@ -import { Box, Flex, Link } from "@chakra-ui/react"; +import { Box, chakra, Container, Flex, Link } from "@chakra-ui/react"; +import { STRAPI_URL } from "@config/env"; import React from "react"; -import { - Block, - BlocksControls, - InlineImage, - InlineText, -} from "react-tinacms-inline"; +import { Block, BlocksControls, InlineTextarea } from "react-tinacms-inline"; import { BlockTemplateData } from "./types"; export type FeatureBlockData = BlockTemplateData< - "feat", + "ComponentBlocksSingleFeature", { id: string; - imageUrl?: string; + imageUrl?: Nullable; title: string; description: string; - serviceLink: string; + serviceLink?: Nullable; } >; interface FeatureBlockProps { imageUrl?: string; - title?: string; - description?: string; serviceLink?: string; } -export function FeatureBlock({}: FeatureBlockProps) { +export const StyledInlineTextarea = chakra(InlineTextarea); + +export function FeatureBlock({ imageUrl, serviceLink }: FeatureBlockProps) { return ( - - - media.id} /> - - - - - - - + + + + {/* "http://localhost:1337"} + name={"imageUrl"} + parse={(media) => media.filename} + /> */} + + + + + + + + + Learn more → + + + + ); } +export const StyledBlocksControls = chakra(BlocksControls); + export const featureBlock: Block = { - Component: ({ index, data, name, ...other }) => { + Component: ({ index, data }) => { return ( - - - + + + ); }, template: { @@ -56,6 +94,12 @@ export const featureBlock: Block = { description: "Default description", serviceLink: "Default link", }, - fields: [], + fields: [ + { + name: "serviceLink", + label: "Url", + component: "text", + }, + ], }, }; diff --git a/frontend/features/pageBlocks/HeroBlock.tsx b/frontend/features/pageBlocks/HeroBlock.tsx index 843dec34..a6beb299 100644 --- a/frontend/features/pageBlocks/HeroBlock.tsx +++ b/frontend/features/pageBlocks/HeroBlock.tsx @@ -1,14 +1,15 @@ -import { Box, Flex } from "@chakra-ui/react"; +import { Flex, Box, chakra } from "@chakra-ui/react"; + import React from "react"; -import { Block, BlocksControls, InlineText } from "react-tinacms-inline"; +import { Block, BlocksControls, InlineTextarea } from "react-tinacms-inline"; import { BlockTemplateData } from "./types"; export type HeroBlockData = BlockTemplateData< - "hero", + "ComponentBlocksHero", { id: string; - title: string; - subtitle: string; + title?: Nullable; + subtitle?: Nullable; } >; @@ -19,23 +20,57 @@ interface HeroBlockProps { projectLink?: string; } +export const StyledInlineTextarea = chakra(InlineTextarea); + export function HeroBlock({}: HeroBlockProps) { return ( - - - - + + + + - - + + - + ); } +const HeroBox = chakra(Box); export const heroBlock: Block = { - Component: ({ index, data, name, ...other }) => { + Component: ({ index, data }) => { return ( diff --git a/frontend/features/pageBlocks/index.ts b/frontend/features/pageBlocks/index.ts index f1e93b0d..da9a3f45 100644 --- a/frontend/features/pageBlocks/index.ts +++ b/frontend/features/pageBlocks/index.ts @@ -3,11 +3,16 @@ import { cardBlock, CardBlockData } from "./CardBlock"; import { featureBlock, FeatureBlockData } from "./FeatureBlock"; import { heroBlock, HeroBlockData } from "./HeroBlock"; -export const PAGE_BLOCKS = { - /** We will define blocks here later */ - hero: heroBlock, - card: cardBlock, - feat: featureBlock, +export const HERO_BLOCK = { + ComponentBlocksHero: heroBlock, +}; + +export const FEAT_BLOCK = { + ComponentBlocksSingleFeature: featureBlock, +}; + +export const CARD_BLOCK = { + ComponentBlocksCard: cardBlock, }; export type BlockData = HeroBlockData | CardBlockData | FeatureBlockData; diff --git a/frontend/features/plugins/usePagePlugin.ts b/frontend/features/plugins/usePagePlugin.ts index 6e28af02..383c43a0 100644 --- a/frontend/features/plugins/usePagePlugin.ts +++ b/frontend/features/plugins/usePagePlugin.ts @@ -1,4 +1,6 @@ import { BlockData } from "@features/pageBlocks"; +import { HeroBlockData } from "@features/pageBlocks/HeroBlock"; +import { SectionBlockData } from "@features/sectionBlocks"; import { CreatePage, CreatePageInput, @@ -14,12 +16,13 @@ import { useForm, usePlugin, } from "tinacms"; +import { assertNever } from "utils"; export interface PageData { id: string; title?: string; path?: string; - blocks: BlockData[]; + sections: SectionBlockData[]; } export interface PageDataCreateInput { @@ -37,8 +40,6 @@ export function usePagePlugin(pageData: PageData): [PageData, Form] { initialValues: pageData, onSubmit: async (values) => { const input = getPageInput(values); - console.log("Input", getPageInput(values)); - try { const response = await cms.api.strapi.fetchGraphql(UpdatePage, { input, @@ -72,50 +73,74 @@ function getPageInput(data: PageData): UpdatePageInput { data: { pageName: data.title, path: data.path, - blocks: data.blocks.map((block) => { - console.log("Blocks", data.blocks); - - switch (block._template) { - case "hero": { + sections: data.sections.map((section) => { + switch (section._template) { + case "heroSection": { return { - __typename: "ComponentBlocksHero", - id: block.id, - title: block.title, - subtitle: block.subtitle, + __typename: "ComponentSectionHeroSection", + id: section.id, + title: section.title, + subtitle: section.subtitle, + sections: section.blocks?.map( + (hero) => { + if (hero != null) { + return { + id: hero.id, + title: hero.title, + subtitle: hero.subtitle, + _template: "ComponentBlocksHero", + }; + } + } + ), }; } - case "card": { + case "cardSection": { return { - __typename: "ComponentBlocksCard", - id: block.id, - title: block.title, - description: block.description, - projectLink: block.projectLink, - imageUrl: block.imageUrl ? block.imageUrl : "undefined", + __typename: "ComponentSectionCardSection", + id: section.id, + title: section.title, + subtitle: section.subtitle, + sections: section.blocks?.map((card) => { + if (card != null) { + return { + id: card.id, + title: card.title, + description: card.description, + imageUrl: card.imageUrl, + projectLink: card.projectLink, + }; + } + }), }; } - case "feat": { + case "featureSection": { return { - __typename: "ComponentBlocksSingleFeature", - id: block.id, - title: block.title, - description: block.description, - serviceLink: block.serviceLink, - imageUrl: block.imageUrl ? block.imageUrl : "undefined", + __typename: "ComponentSectionSingleFeatureSection", + id: section.id, + title: section.title, + subtitle: section.subtitle, + sections: section.blocks?.map((feature) => { + if (feature != null) { + return { + id: feature.id, + title: feature.title, + description: feature.description, + imageUrl: feature.imageUrl, + serviceLink: feature.serviceLink, + }; + } + }), }; } default: - return assertNever(block); + return assertNever(section); } }), }, }; } -function assertNever(x: never): never { - throw new Error("Unexpected object: " + x); -} - interface PageCreatorPluginOptions { locales: string[]; } @@ -159,7 +184,6 @@ function getPageCreatorPlugin( }, ], onSubmit: async (values, cms) => { - console.log(values); const input = getPageCreateInput(values); try { const response = await cms.api.strapi.fetchGraphql(CreatePage, { diff --git a/frontend/features/sectionBlocks/cardSectionBlock.tsx b/frontend/features/sectionBlocks/cardSectionBlock.tsx new file mode 100644 index 00000000..c8c8e82b --- /dev/null +++ b/frontend/features/sectionBlocks/cardSectionBlock.tsx @@ -0,0 +1,114 @@ +import { Box, chakra } from "@chakra-ui/react"; +import { CARD_BLOCK } from "@features/pageBlocks"; +import { CardBlockData } from "@features/pageBlocks/CardBlock"; +import React from "react"; +import { + Block, + BlocksControls, + InlineBlocks, + InlineTextarea, +} from "react-tinacms-inline"; +import { SectionBlockTemplateData } from "./types"; + +export type CardSectionBlockData = SectionBlockTemplateData< + "cardSection", + { + id: string; + title?: string; + subtitle?: string; + blocks?: CardBlockData[]; + } +>; + +export const StyledInlineBlocks = chakra(InlineBlocks); +export const StyledInlineTextarea = chakra(InlineTextarea); + +export function CardSectionBlock() { + return ( + + + + + + + + + ); +} + +export const cardSectionBlock: Block = { + Component: ({ index, data }) => { + return ( + + + + ); + }, + template: { + label: "cardSection", + defaultItem: { + title: "Default title", + subtitle: "Default subtitle", + blocks: [], + }, + fields: [], + }, +}; diff --git a/frontend/features/sectionBlocks/featureSectionBlock.tsx b/frontend/features/sectionBlocks/featureSectionBlock.tsx new file mode 100644 index 00000000..e3ee2cd6 --- /dev/null +++ b/frontend/features/sectionBlocks/featureSectionBlock.tsx @@ -0,0 +1,146 @@ +import { Box, chakra, Flex } from "@chakra-ui/react"; +import { BlockItemProps, FEAT_BLOCK } from "@features/pageBlocks"; +import { FeatureBlockData } from "@features/pageBlocks/FeatureBlock"; +import React from "react"; +import { + Block, + BlocksControls, + InlineBlocks, + InlineTextarea, +} from "react-tinacms-inline"; +import { SectionBlockTemplateData } from "./types"; + +export type FeatureSectionBlockData = SectionBlockTemplateData< + "featureSection", + { + id: string; + title?: string; + subtitle?: string; + blocks?: FeatureBlockData[]; + } +>; + +export const StyledInlineTextarea = chakra(InlineTextarea); +export const StyledInlineBlocks = chakra(InlineBlocks); + +export function FeatureSectionBlock(preview: boolean) { + const itemProps = React.useMemo(() => { + return { + isPreview: preview, + }; + }, [preview]); + + return ( + + + + + + + + + + + + ); +} + +export const featureSectionBlock: Block = { + Component: ({ index, data }) => { + return ( + + + + ); + }, + template: { + label: "featureSection", + defaultItem: { + title: "Default title", + subtitle: "Default subtitle", + blocks: [], + }, + fields: [], + }, +}; diff --git a/frontend/features/sectionBlocks/heroSectionBlock.tsx b/frontend/features/sectionBlocks/heroSectionBlock.tsx new file mode 100644 index 00000000..14eca9c3 --- /dev/null +++ b/frontend/features/sectionBlocks/heroSectionBlock.tsx @@ -0,0 +1,117 @@ +import { Box, chakra, Flex } from "@chakra-ui/react"; +import { HERO_BLOCK } from "@features/pageBlocks"; +import { HeroBlockData } from "@features/pageBlocks/HeroBlock"; +import React from "react"; +import { + Block, + BlocksControls, + InlineBlocks, + InlineTextarea, +} from "react-tinacms-inline"; +import { BlockItemProps, SectionBlockTemplateData } from "./types"; + +export type HeroSectionBlockData = SectionBlockTemplateData< + "heroSection", + { + id: string; + title: string; + subtitle: string; + blocks: HeroBlockData[]; + } +>; + +export const StyledInlineBlocks = chakra(InlineBlocks); + +export function HeroSectionBlock(preview: boolean) { + const itemProps = React.useMemo(() => { + return { + isPreview: preview, + }; + }, [preview]); + + return ( + + + + + + + + + + + + + + ); +} + +export const heroSectionBlock: Block = { + Component: ({ index, data }) => { + return ( + + + + ); + }, + template: { + label: "heroSection", + defaultItem: { + title: " ", + subtitle: " ", + blocks: [], + }, + fields: [], + }, +}; diff --git a/frontend/features/sectionBlocks/index.ts b/frontend/features/sectionBlocks/index.ts new file mode 100644 index 00000000..08712b04 --- /dev/null +++ b/frontend/features/sectionBlocks/index.ts @@ -0,0 +1,19 @@ +export * from "./types"; +import { heroSectionBlock, HeroSectionBlockData } from "./heroSectionBlock"; +import { + featureSectionBlock, + FeatureSectionBlockData, +} from "./featureSectionBlock"; +import { cardSectionBlock, CardSectionBlockData } from "./cardSectionBlock"; + +export const SECTION_PAGE_BLOCKS = { + /** We will define blocks here later */ + heroSection: heroSectionBlock, + featureSection: featureSectionBlock, + cardSection: cardSectionBlock, +}; + +export type SectionBlockData = + | HeroSectionBlockData + | FeatureSectionBlockData + | CardSectionBlockData; diff --git a/frontend/features/sectionBlocks/types.ts b/frontend/features/sectionBlocks/types.ts new file mode 100644 index 00000000..37bdefb0 --- /dev/null +++ b/frontend/features/sectionBlocks/types.ts @@ -0,0 +1,7 @@ +export type SectionBlockTemplateData = { + _template: TemplateName; +} & Type; + +export interface BlockItemProps { + isPreview: boolean; +} diff --git a/frontend/graphql.schema.json b/frontend/graphql.schema.json index 85fba56a..15987be7 100644 --- a/frontend/graphql.schema.json +++ b/frontend/graphql.schema.json @@ -169,8 +169,8 @@ "description": null, "args": [], "type": { - "kind": "OBJECT", - "name": "ComponentMenuPageLink", + "kind": "SCALAR", + "name": "String", "ofType": null }, "isDeprecated": false, @@ -235,116 +235,6 @@ { "name": "projectLink", "description": null, - "type": { - "kind": "INPUT_OBJECT", - "name": "ComponentMenuPageLinkInput", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "ComponentBlocksFeature", - "description": null, - "fields": [ - { - "name": "id", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "featureTitle", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "featureDescription", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "feat", - "description": null, - "args": [], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "ComponentFeatFeat", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "INPUT_OBJECT", - "name": "ComponentBlocksFeatureInput", - "description": null, - "fields": null, - "inputFields": [ - { - "name": "featureTitle", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "featureDescription", - "description": null, "type": { "kind": "SCALAR", "name": "String", @@ -353,22 +243,6 @@ "defaultValue": null, "isDeprecated": false, "deprecationReason": null - }, - { - "name": "feat", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "INPUT_OBJECT", - "name": "ComponentFeatFeatInput", - "ofType": null - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null } ], "interfaces": null, @@ -401,13 +275,9 @@ "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, "isDeprecated": false, "deprecationReason": null @@ -440,13 +310,9 @@ "name": "title", "description": null, "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, "defaultValue": null, "isDeprecated": false, @@ -539,13 +405,9 @@ "description": null, "args": [], "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "ComponentMenuPageLink", - "ofType": null - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, "isDeprecated": false, "deprecationReason": null @@ -610,13 +472,9 @@ "name": "serviceLink", "description": null, "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "INPUT_OBJECT", - "name": "ComponentMenuPageLinkInput", - "ofType": null - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, "defaultValue": null, "isDeprecated": false, @@ -629,7 +487,7 @@ }, { "kind": "OBJECT", - "name": "ComponentFeatFeat", + "name": "ComponentMenuLink", "description": null, "fields": [ { @@ -649,12 +507,28 @@ "deprecationReason": null }, { - "name": "featDescription", + "name": "linkName", "description": null, "args": [], "type": { - "kind": "SCALAR", - "name": "String", + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "path", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Pages", "ofType": null }, "isDeprecated": false, @@ -668,16 +542,32 @@ }, { "kind": "INPUT_OBJECT", - "name": "ComponentFeatFeatInput", + "name": "ComponentMenuLinkInput", "description": null, "fields": null, "inputFields": [ { - "name": "featDescription", + "name": "linkName", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "path", "description": null, "type": { "kind": "SCALAR", - "name": "String", + "name": "ID", "ofType": null }, "defaultValue": null, @@ -691,7 +581,7 @@ }, { "kind": "OBJECT", - "name": "ComponentMenuLink", + "name": "ComponentMenuPageLink", "description": null, "fields": [ { @@ -711,7 +601,7 @@ "deprecationReason": null }, { - "name": "linkName", + "name": "pageLinkName", "description": null, "args": [], "type": { @@ -746,12 +636,12 @@ }, { "kind": "INPUT_OBJECT", - "name": "ComponentMenuLinkInput", + "name": "ComponentMenuPageLinkInput", "description": null, "fields": null, "inputFields": [ { - "name": "linkName", + "name": "pageLinkName", "description": null, "type": { "kind": "NON_NULL", @@ -785,7 +675,7 @@ }, { "kind": "OBJECT", - "name": "ComponentMenuPageLink", + "name": "ComponentSectionCardSection", "description": null, "fields": [ { @@ -805,32 +695,44 @@ "deprecationReason": null }, { - "name": "pageLinkName", + "name": "title", "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "path", + "name": "subtitle", "description": null, "args": [], "type": { - "kind": "OBJECT", - "name": "Pages", + "kind": "SCALAR", + "name": "String", "ofType": null }, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "sections", + "description": null, + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ComponentBlocksCard", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null } ], "inputFields": null, @@ -840,152 +742,49 @@ }, { "kind": "INPUT_OBJECT", - "name": "ComponentMenuPageLinkInput", + "name": "ComponentSectionCardSectionInput", "description": null, "fields": null, "inputFields": [ { - "name": "pageLinkName", + "name": "title", "description": null, "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "path", + "name": "subtitle", "description": null, "type": { "kind": "SCALAR", - "name": "ID", + "name": "String", "ofType": null }, "defaultValue": null, "isDeprecated": false, "deprecationReason": null - } - ], - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "SCALAR", - "name": "Date", - "description": "A date string, such as 2007-12-03, compliant with the `full-date` format outlined in section 5.6 of the RFC 3339 profile of the ISO 8601 standard for representation of dates and times using the Gregorian calendar.", - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "SCALAR", - "name": "DateTime", - "description": "A date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant with the `date-time` format outlined in section 5.6 of the RFC 3339 profile of the ISO 8601 standard for representation of dates and times using the Gregorian calendar.", - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "INPUT_OBJECT", - "name": "FeaturesSectionInput", - "description": null, - "fields": null, - "inputFields": [ - { - "name": "blocks", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "FeaturesSectionsBlocksDynamicZoneInput", - "ofType": null - } - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null }, { - "name": "localizations", + "name": "sections", "description": null, "type": { "kind": "LIST", "name": null, "ofType": { - "kind": "SCALAR", - "name": "ID", + "kind": "INPUT_OBJECT", + "name": "ComponentBlocksCardInput", "ofType": null } }, "defaultValue": null, "isDeprecated": false, "deprecationReason": null - }, - { - "name": "locale", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "published_at", - "description": null, - "type": { - "kind": "SCALAR", - "name": "DateTime", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "created_by", - "description": null, - "type": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "updated_by", - "description": null, - "type": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null } ], "interfaces": null, @@ -994,7 +793,7 @@ }, { "kind": "OBJECT", - "name": "FeaturesSections", + "name": "ComponentSectionHeroSection", "description": null, "fields": [ { @@ -1014,47 +813,15 @@ "deprecationReason": null }, { - "name": "created_at", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "DateTime", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "updated_at", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "DateTime", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "blocks", + "name": "sections", "description": null, "args": [], "type": { "kind": "LIST", "name": null, "ofType": { - "kind": "UNION", - "name": "FeaturesSectionsBlocksDynamicZone", + "kind": "OBJECT", + "name": "ComponentBlocksHero", "ofType": null } }, @@ -1062,7 +829,7 @@ "deprecationReason": null }, { - "name": "locale", + "name": "title", "description": null, "args": [], "type": { @@ -1074,122 +841,12 @@ "deprecationReason": null }, { - "name": "published_at", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "DateTime", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "localizations", - "description": null, - "args": [ - { - "name": "sort", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "limit", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "start", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "where", - "description": null, - "type": { - "kind": "SCALAR", - "name": "JSON", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "FeaturesSections", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "SCALAR", - "name": "Int", - "description": "The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.", - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "FeaturesSectionsAggregator", - "description": null, - "fields": [ - { - "name": "count", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "totalCount", + "name": "subtitle", "description": null, "args": [], "type": { "kind": "SCALAR", - "name": "Int", + "name": "String", "ofType": null }, "isDeprecated": false, @@ -1202,247 +859,113 @@ "possibleTypes": null }, { - "kind": "UNION", - "name": "FeaturesSectionsBlocksDynamicZone", + "kind": "INPUT_OBJECT", + "name": "ComponentSectionHeroSectionInput", "description": null, "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": null, - "possibleTypes": [ - { - "kind": "OBJECT", - "name": "ComponentBlocksFeature", - "ofType": null - } - ] - }, - { - "kind": "SCALAR", - "name": "FeaturesSectionsBlocksDynamicZoneInput", - "description": "Input type for dynamic zone blocks of FeaturesSections", - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "FeaturesSectionsConnection", - "description": null, - "fields": [ + "inputFields": [ { - "name": "values", + "name": "sections", "description": null, - "args": [], "type": { "kind": "LIST", "name": null, "ofType": { - "kind": "OBJECT", - "name": "FeaturesSections", + "kind": "INPUT_OBJECT", + "name": "ComponentBlocksHeroInput", "ofType": null } }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "groupBy", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "FeaturesSectionsGroupBy", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "aggregate", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "FeaturesSectionsAggregator", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "FeaturesSectionsConnectionCreated_at", - "description": null, - "fields": [ - { - "name": "key", + "name": "title", "description": null, - "args": [], "type": { "kind": "SCALAR", - "name": "DateTime", + "name": "String", "ofType": null }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "connection", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "FeaturesSectionsConnection", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "FeaturesSectionsConnectionId", - "description": null, - "fields": [ - { - "name": "key", + "name": "subtitle", "description": null, - "args": [], "type": { "kind": "SCALAR", - "name": "ID", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "connection", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "FeaturesSectionsConnection", + "name": "String", "ofType": null }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null } ], - "inputFields": null, - "interfaces": [], + "interfaces": null, "enumValues": null, "possibleTypes": null }, { "kind": "OBJECT", - "name": "FeaturesSectionsConnectionLocale", + "name": "ComponentSectionSingleFeatureSection", "description": null, "fields": [ { - "name": "key", + "name": "id", "description": null, "args": [], "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "connection", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "FeaturesSectionsConnection", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "FeaturesSectionsConnectionPublished_at", - "description": null, - "fields": [ - { - "name": "key", + "name": "title", "description": null, "args": [], "type": { "kind": "SCALAR", - "name": "DateTime", + "name": "String", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "connection", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "FeaturesSectionsConnection", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "FeaturesSectionsConnectionUpdated_at", - "description": null, - "fields": [ - { - "name": "key", + "name": "subtitle", "description": null, "args": [], "type": { "kind": "SCALAR", - "name": "DateTime", + "name": "String", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "connection", + "name": "sections", "description": null, "args": [], "type": { - "kind": "OBJECT", - "name": "FeaturesSectionsConnection", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ComponentBlocksSingleFeature", + "ofType": null + } }, "isDeprecated": false, "deprecationReason": null @@ -1454,93 +977,73 @@ "possibleTypes": null }, { - "kind": "OBJECT", - "name": "FeaturesSectionsGroupBy", + "kind": "INPUT_OBJECT", + "name": "ComponentSectionSingleFeatureSectionInput", "description": null, - "fields": [ - { - "name": "id", - "description": null, - "args": [], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "FeaturesSectionsConnectionId", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "created_at", - "description": null, - "args": [], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "FeaturesSectionsConnectionCreated_at", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, + "fields": null, + "inputFields": [ { - "name": "updated_at", + "name": "title", "description": null, - "args": [], "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "FeaturesSectionsConnectionUpdated_at", - "ofType": null - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "locale", + "name": "subtitle", "description": null, - "args": [], "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "FeaturesSectionsConnectionLocale", - "ofType": null - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "published_at", + "name": "sections", "description": null, - "args": [], "type": { "kind": "LIST", "name": null, "ofType": { - "kind": "OBJECT", - "name": "FeaturesSectionsConnectionPublished_at", + "kind": "INPUT_OBJECT", + "name": "ComponentBlocksSingleFeatureInput", "ofType": null } }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null } ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "SCALAR", + "name": "Date", + "description": "A date string, such as 2007-12-03, compliant with the `full-date` format outlined in section 5.6 of the RFC 3339 profile of the ISO 8601 standard for representation of dates and times using the Gregorian calendar.", + "fields": null, "inputFields": null, - "interfaces": [], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "SCALAR", + "name": "DateTime", + "description": "A date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant with the `date-time` format outlined in section 5.6 of the RFC 3339 profile of the ISO 8601 standard for representation of dates and times using the Gregorian calendar.", + "fields": null, + "inputFields": null, + "interfaces": null, "enumValues": null, "possibleTypes": null }, @@ -1834,6 +1337,16 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "SCALAR", + "name": "Int", + "description": "The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, { "kind": "SCALAR", "name": "Float", @@ -2062,66 +1575,6 @@ "name": "UserPermissionsPasswordPayload", "ofType": null }, - { - "kind": "OBJECT", - "name": "FeaturesSections", - "ofType": null - }, - { - "kind": "OBJECT", - "name": "FeaturesSectionsConnection", - "ofType": null - }, - { - "kind": "OBJECT", - "name": "FeaturesSectionsAggregator", - "ofType": null - }, - { - "kind": "OBJECT", - "name": "FeaturesSectionsGroupBy", - "ofType": null - }, - { - "kind": "OBJECT", - "name": "FeaturesSectionsConnectionId", - "ofType": null - }, - { - "kind": "OBJECT", - "name": "FeaturesSectionsConnectionCreated_at", - "ofType": null - }, - { - "kind": "OBJECT", - "name": "FeaturesSectionsConnectionUpdated_at", - "ofType": null - }, - { - "kind": "OBJECT", - "name": "FeaturesSectionsConnectionLocale", - "ofType": null - }, - { - "kind": "OBJECT", - "name": "FeaturesSectionsConnectionPublished_at", - "ofType": null - }, - { - "kind": "OBJECT", - "name": "createFeaturesSectionPayload", - "ofType": null - }, - { - "kind": "OBJECT", - "name": "updateFeaturesSectionPayload", - "ofType": null - }, - { - "kind": "OBJECT", - "name": "deleteFeaturesSectionPayload", - "ofType": null - }, { "kind": "OBJECT", "name": "Navigation", @@ -2539,32 +1992,37 @@ }, { "kind": "OBJECT", - "name": "ComponentBlocksFeature", + "name": "ComponentBlocksHero", "ofType": null }, { "kind": "OBJECT", - "name": "ComponentBlocksHero", + "name": "ComponentBlocksSingleFeature", "ofType": null }, { "kind": "OBJECT", - "name": "ComponentBlocksSingleFeature", + "name": "ComponentMenuLink", "ofType": null }, { "kind": "OBJECT", - "name": "ComponentFeatFeat", + "name": "ComponentMenuPageLink", "ofType": null }, { "kind": "OBJECT", - "name": "ComponentMenuLink", + "name": "ComponentSectionCardSection", "ofType": null }, { "kind": "OBJECT", - "name": "ComponentMenuPageLink", + "name": "ComponentSectionHeroSection", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "ComponentSectionSingleFeatureSection", "ofType": null } ] @@ -2574,81 +2032,6 @@ "name": "Mutation", "description": null, "fields": [ - { - "name": "createFeaturesSection", - "description": null, - "args": [ - { - "name": "input", - "description": null, - "type": { - "kind": "INPUT_OBJECT", - "name": "createFeaturesSectionInput", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "type": { - "kind": "OBJECT", - "name": "createFeaturesSectionPayload", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "updateFeaturesSection", - "description": null, - "args": [ - { - "name": "input", - "description": null, - "type": { - "kind": "INPUT_OBJECT", - "name": "updateFeaturesSectionInput", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "type": { - "kind": "OBJECT", - "name": "updateFeaturesSectionPayload", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "deleteFeaturesSection", - "description": null, - "args": [ - { - "name": "input", - "description": null, - "type": { - "kind": "INPUT_OBJECT", - "name": "deleteFeaturesSectionInput", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "type": { - "kind": "OBJECT", - "name": "deleteFeaturesSectionPayload", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, { "name": "createNavigation", "description": null, @@ -2974,39 +2357,6 @@ "isDeprecated": false, "deprecationReason": null }, - { - "name": "createFeaturesSectionLocalization", - "description": null, - "args": [ - { - "name": "input", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "INPUT_OBJECT", - "name": "updateFeaturesSectionInput", - "ofType": null - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "FeaturesSections", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, { "name": "createNavigationLocalization", "description": null, @@ -4243,7 +3593,19 @@ "deprecationReason": null }, { - "name": "blocks", + "name": "path", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "sections", "description": null, "type": { "kind": "LIST", @@ -4253,7 +3615,7 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "PagesBlocksDynamicZoneInput", + "name": "PagesSectionsDynamicZoneInput", "ofType": null } } @@ -4262,18 +3624,6 @@ "isDeprecated": false, "deprecationReason": null }, - { - "name": "path", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, { "name": "localizations", "description": null, @@ -4405,23 +3755,7 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "blocks", - "description": null, - "args": [], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "UNION", - "name": "PagesBlocksDynamicZone", + "name": "String", "ofType": null } }, @@ -4440,6 +3774,22 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "sections", + "description": null, + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "UNION", + "name": "PagesSectionsDynamicZone", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "locale", "description": null, @@ -4570,42 +3920,6 @@ "enumValues": null, "possibleTypes": null }, - { - "kind": "UNION", - "name": "PagesBlocksDynamicZone", - "description": null, - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": null, - "possibleTypes": [ - { - "kind": "OBJECT", - "name": "ComponentBlocksCard", - "ofType": null - }, - { - "kind": "OBJECT", - "name": "ComponentBlocksHero", - "ofType": null - }, - { - "kind": "OBJECT", - "name": "ComponentBlocksSingleFeature", - "ofType": null - } - ] - }, - { - "kind": "SCALAR", - "name": "PagesBlocksDynamicZoneInput", - "description": "Input type for dynamic zone blocks of Pages", - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, { "kind": "OBJECT", "name": "PagesConnection", @@ -4958,225 +4272,29 @@ { "name": "pageName", "description": null, - "args": [], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "PagesConnectionPageName", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "path", - "description": null, - "args": [], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "PagesConnectionPath", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "locale", - "description": null, - "args": [], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "PagesConnectionLocale", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "published_at", - "description": null, - "args": [], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "PagesConnectionPublished_at", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "ENUM", - "name": "PublicationState", - "description": null, - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": [ - { - "name": "LIVE", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "PREVIEW", - "description": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "Query", - "description": null, - "fields": [ - { - "name": "featuresSection", - "description": null, - "args": [ - { - "name": "id", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "publicationState", - "description": null, - "type": { - "kind": "ENUM", - "name": "PublicationState", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "type": { - "kind": "OBJECT", - "name": "FeaturesSections", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "featuresSections", - "description": null, - "args": [ - { - "name": "sort", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "limit", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "start", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "where", - "description": null, - "type": { - "kind": "SCALAR", - "name": "JSON", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "publicationState", - "description": null, - "type": { - "kind": "ENUM", - "name": "PublicationState", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "locale", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PagesConnectionPageName", + "ofType": null } - ], + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "path", + "description": null, + "args": [], "type": { "kind": "LIST", "name": null, "ofType": { "kind": "OBJECT", - "name": "FeaturesSections", + "name": "PagesConnectionPath", "ofType": null } }, @@ -5184,78 +4302,107 @@ "deprecationReason": null }, { - "name": "featuresSectionsConnection", + "name": "locale", "description": null, - "args": [ - { - "name": "sort", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "limit", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "start", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "where", - "description": null, - "type": { - "kind": "SCALAR", - "name": "JSON", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "locale", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PagesConnectionLocale", + "ofType": null } - ], + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "published_at", + "description": null, + "args": [], "type": { - "kind": "OBJECT", - "name": "FeaturesSectionsConnection", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PagesConnectionPublished_at", + "ofType": null + } }, "isDeprecated": false, "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "UNION", + "name": "PagesSectionsDynamicZone", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": [ + { + "kind": "OBJECT", + "name": "ComponentSectionCardSection", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "ComponentSectionHeroSection", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "ComponentSectionSingleFeatureSection", + "ofType": null + } + ] + }, + { + "kind": "SCALAR", + "name": "PagesSectionsDynamicZoneInput", + "description": "Input type for dynamic zone sections of Pages", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "PublicationState", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "LIVE", + "description": null, + "isDeprecated": false, + "deprecationReason": null }, + { + "name": "PREVIEW", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "Query", + "description": null, + "fields": [ { "name": "navigation", "description": null, @@ -9630,52 +8777,6 @@ "enumValues": null, "possibleTypes": null }, - { - "kind": "INPUT_OBJECT", - "name": "createFeaturesSectionInput", - "description": null, - "fields": null, - "inputFields": [ - { - "name": "data", - "description": null, - "type": { - "kind": "INPUT_OBJECT", - "name": "FeaturesSectionInput", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "createFeaturesSectionPayload", - "description": null, - "fields": [ - { - "name": "featuresSection", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "FeaturesSections", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, { "kind": "INPUT_OBJECT", "name": "createNavigationInput", @@ -9821,57 +8922,11 @@ "fields": null, "inputFields": [ { - "name": "data", - "description": null, - "type": { - "kind": "INPUT_OBJECT", - "name": "UserInput", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "createUserPayload", - "description": null, - "fields": [ - { - "name": "user", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "UsersPermissionsUser", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "INPUT_OBJECT", - "name": "deleteFeaturesSectionInput", - "description": null, - "fields": null, - "inputFields": [ - { - "name": "where", + "name": "data", "description": null, "type": { "kind": "INPUT_OBJECT", - "name": "InputID", + "name": "UserInput", "ofType": null }, "defaultValue": null, @@ -9885,16 +8940,16 @@ }, { "kind": "OBJECT", - "name": "deleteFeaturesSectionPayload", + "name": "createUserPayload", "description": null, "fields": [ { - "name": "featuresSection", + "name": "user", "description": null, "args": [], "type": { "kind": "OBJECT", - "name": "FeaturesSections", + "name": "UsersPermissionsUser", "ofType": null }, "isDeprecated": false, @@ -10193,53 +9248,6 @@ { "name": "projectLink", "description": null, - "type": { - "kind": "INPUT_OBJECT", - "name": "editComponentMenuPageLinkInput", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "INPUT_OBJECT", - "name": "editComponentBlocksFeatureInput", - "description": null, - "fields": null, - "inputFields": [ - { - "name": "id", - "description": null, - "type": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "featureTitle", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "featureDescription", - "description": null, "type": { "kind": "SCALAR", "name": "String", @@ -10248,22 +9256,6 @@ "defaultValue": null, "isDeprecated": false, "deprecationReason": null - }, - { - "name": "feat", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "INPUT_OBJECT", - "name": "editComponentFeatFeatInput", - "ofType": null - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null } ], "interfaces": null, @@ -10375,13 +9367,9 @@ "name": "serviceLink", "description": null, "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "INPUT_OBJECT", - "name": "editComponentMenuPageLinkInput", - "ofType": null - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, "defaultValue": null, "isDeprecated": false, @@ -10394,7 +9382,7 @@ }, { "kind": "INPUT_OBJECT", - "name": "editComponentFeatFeatInput", + "name": "editComponentMenuLinkInput", "description": null, "fields": null, "inputFields": [ @@ -10411,7 +9399,7 @@ "deprecationReason": null }, { - "name": "featDescription", + "name": "linkName", "description": null, "type": { "kind": "SCALAR", @@ -10421,6 +9409,18 @@ "defaultValue": null, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "path", + "description": null, + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null } ], "interfaces": null, @@ -10429,7 +9429,7 @@ }, { "kind": "INPUT_OBJECT", - "name": "editComponentMenuLinkInput", + "name": "editComponentMenuPageLinkInput", "description": null, "fields": null, "inputFields": [ @@ -10446,7 +9446,7 @@ "deprecationReason": null }, { - "name": "linkName", + "name": "pageLinkName", "description": null, "type": { "kind": "SCALAR", @@ -10476,7 +9476,7 @@ }, { "kind": "INPUT_OBJECT", - "name": "editComponentMenuPageLinkInput", + "name": "editComponentSectionCardSectionInput", "description": null, "fields": null, "inputFields": [ @@ -10493,7 +9493,7 @@ "deprecationReason": null }, { - "name": "pageLinkName", + "name": "title", "description": null, "type": { "kind": "SCALAR", @@ -10505,16 +9505,32 @@ "deprecationReason": null }, { - "name": "path", + "name": "subtitle", "description": null, "type": { "kind": "SCALAR", - "name": "ID", + "name": "String", "ofType": null }, "defaultValue": null, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "sections", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "editComponentBlocksCardInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null } ], "interfaces": null, @@ -10523,39 +9539,31 @@ }, { "kind": "INPUT_OBJECT", - "name": "editFeaturesSectionInput", + "name": "editComponentSectionHeroSectionInput", "description": null, "fields": null, "inputFields": [ { - "name": "blocks", + "name": "id", "description": null, "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "FeaturesSectionsBlocksDynamicZoneInput", - "ofType": null - } - } + "kind": "SCALAR", + "name": "ID", + "ofType": null }, "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "localizations", + "name": "sections", "description": null, "type": { "kind": "LIST", "name": null, "ofType": { - "kind": "SCALAR", - "name": "ID", + "kind": "INPUT_OBJECT", + "name": "editComponentBlocksHeroInput", "ofType": null } }, @@ -10564,7 +9572,7 @@ "deprecationReason": null }, { - "name": "locale", + "name": "title", "description": null, "type": { "kind": "SCALAR", @@ -10576,19 +9584,30 @@ "deprecationReason": null }, { - "name": "published_at", + "name": "subtitle", "description": null, "type": { "kind": "SCALAR", - "name": "DateTime", + "name": "String", "ofType": null }, "defaultValue": null, "isDeprecated": false, "deprecationReason": null - }, + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "editComponentSectionSingleFeatureSectionInput", + "description": null, + "fields": null, + "inputFields": [ { - "name": "created_by", + "name": "id", "description": null, "type": { "kind": "SCALAR", @@ -10600,16 +9619,44 @@ "deprecationReason": null }, { - "name": "updated_by", + "name": "title", "description": null, "type": { "kind": "SCALAR", - "name": "ID", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "subtitle", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", "ofType": null }, "defaultValue": null, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "sections", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "editComponentBlocksSingleFeatureInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null } ], "interfaces": null, @@ -11020,7 +10067,19 @@ "deprecationReason": null }, { - "name": "blocks", + "name": "path", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "sections", "description": null, "type": { "kind": "LIST", @@ -11030,7 +10089,7 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "PagesBlocksDynamicZoneInput", + "name": "PagesSectionsDynamicZoneInput", "ofType": null } } @@ -11039,18 +10098,6 @@ "isDeprecated": false, "deprecationReason": null }, - { - "name": "path", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, { "name": "localizations", "description": null, @@ -11366,64 +10413,6 @@ "enumValues": null, "possibleTypes": null }, - { - "kind": "INPUT_OBJECT", - "name": "updateFeaturesSectionInput", - "description": null, - "fields": null, - "inputFields": [ - { - "name": "where", - "description": null, - "type": { - "kind": "INPUT_OBJECT", - "name": "InputID", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "data", - "description": null, - "type": { - "kind": "INPUT_OBJECT", - "name": "editFeaturesSectionInput", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "updateFeaturesSectionPayload", - "description": null, - "fields": [ - { - "name": "featuresSection", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "FeaturesSections", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, { "kind": "INPUT_OBJECT", "name": "updateNavigationInput", diff --git a/frontend/graphql/GetPageData.graphql b/frontend/graphql/GetPageData.graphql deleted file mode 100644 index 74bbf493..00000000 --- a/frontend/graphql/GetPageData.graphql +++ /dev/null @@ -1,42 +0,0 @@ -query GetPageData($locale: String) { - pages(locale: $locale) { - id - locale - pageName - path - blocks { - __typename - ... on ComponentBlocksCard { - id - title - description - image { - url - } - projectLink { - path { - path - } - } - } - ... on ComponentBlocksSingleFeature { - id - title - description - image { - url - } - serviceLink { - path { - path - } - } - } - ... on ComponentBlocksHero { - id - title - subtitle - } - } - } -} diff --git a/frontend/graphql/GetPageSections.graphql b/frontend/graphql/GetPageSections.graphql deleted file mode 100644 index cf0d347d..00000000 --- a/frontend/graphql/GetPageSections.graphql +++ /dev/null @@ -1,15 +0,0 @@ -query GetFeatures { - featuresSections { - blocks { - ... on ComponentBlocksFeature { - featureTitle - featureDescription - feat { - ... on ComponentFeatFeat { - featDescription - } - } - } - } - } -} diff --git a/frontend/graphql/GetPages.graphql b/frontend/graphql/GetPages.graphql index 46fab280..2fc9e9ab 100644 --- a/frontend/graphql/GetPages.graphql +++ b/frontend/graphql/GetPages.graphql @@ -1,43 +1,52 @@ query GetPages($where: JSON, $locale: String) { pages(where: $where, locale: $locale) { id - locale - created_at - updated_at - pageName path - blocks { - __typename - ... on ComponentBlocksCard { + pageName + locale + __typename + sections { + ... on ComponentSectionSingleFeatureSection { + __typename id title - description - image { - url - } - projectLink { - path { - path + subtitle + singleFeature: sections { + __typename + id + description + title + serviceLink + image { + url } } } - ... on ComponentBlocksSingleFeature { + ... on ComponentSectionHeroSection { + __typename id title - description - image { - url - } - serviceLink { - path { - path - } + subtitle + hero: sections { + id + title + subtitle } } - ... on ComponentBlocksHero { + ... on ComponentSectionCardSection { + __typename id title subtitle + card: sections { + id + title + description + image { + url + } + projectLink + } } } } diff --git a/frontend/graphql/generated.ts b/frontend/graphql/generated.ts index 4a02c5af..0ae14e42 100644 --- a/frontend/graphql/generated.ts +++ b/frontend/graphql/generated.ts @@ -13,16 +13,14 @@ export type Scalars = { Date: any; /** A date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant with the `date-time` format outlined in section 5.6 of the RFC 3339 profile of the ISO 8601 standard for representation of dates and times using the Gregorian calendar. */ DateTime: any; - /** Input type for dynamic zone blocks of FeaturesSections */ - FeaturesSectionsBlocksDynamicZoneInput: any; /** The `JSON` scalar type represents JSON values as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf). */ JSON: any; /** The `Long` scalar type represents 52-bit integers */ Long: any; /** Input type for dynamic zone items of Navigation */ NavigationItemsDynamicZoneInput: any; - /** Input type for dynamic zone blocks of Pages */ - PagesBlocksDynamicZoneInput: any; + /** Input type for dynamic zone sections of Pages */ + PagesSectionsDynamicZoneInput: any; /** A time string with format: HH:mm:ss.SSS */ Time: any; /** The `Upload` scalar type represents a file upload. */ @@ -43,39 +41,25 @@ export type ComponentBlocksCard = { title: Scalars['String']; description: Scalars['String']; image?: Maybe; - projectLink?: Maybe; + projectLink?: Maybe; }; export type ComponentBlocksCardInput = { title: Scalars['String']; description: Scalars['String']; image?: Maybe; - projectLink?: Maybe; -}; - -export type ComponentBlocksFeature = { - __typename?: 'ComponentBlocksFeature'; - id: Scalars['ID']; - featureTitle: Scalars['String']; - featureDescription?: Maybe; - feat?: Maybe>>; -}; - -export type ComponentBlocksFeatureInput = { - featureTitle: Scalars['String']; - featureDescription?: Maybe; - feat?: Maybe>>; + projectLink?: Maybe; }; export type ComponentBlocksHero = { __typename?: 'ComponentBlocksHero'; id: Scalars['ID']; - title: Scalars['String']; + title?: Maybe; subtitle?: Maybe; }; export type ComponentBlocksHeroInput = { - title: Scalars['String']; + title?: Maybe; subtitle?: Maybe; }; @@ -85,24 +69,14 @@ export type ComponentBlocksSingleFeature = { description: Scalars['String']; title: Scalars['String']; image?: Maybe; - serviceLink?: Maybe>>; + serviceLink?: Maybe; }; export type ComponentBlocksSingleFeatureInput = { description: Scalars['String']; title: Scalars['String']; image?: Maybe; - serviceLink?: Maybe>>; -}; - -export type ComponentFeatFeat = { - __typename?: 'ComponentFeatFeat'; - id: Scalars['ID']; - featDescription?: Maybe; -}; - -export type ComponentFeatFeatInput = { - featDescription?: Maybe; + serviceLink?: Maybe; }; export type ComponentMenuLink = { @@ -129,90 +103,49 @@ export type ComponentMenuPageLinkInput = { path?: Maybe; }; - - -export type FeaturesSectionInput = { - blocks?: Maybe>; - localizations?: Maybe>>; - locale?: Maybe; - published_at?: Maybe; - created_by?: Maybe; - updated_by?: Maybe; -}; - -export type FeaturesSections = { - __typename?: 'FeaturesSections'; +export type ComponentSectionCardSection = { + __typename?: 'ComponentSectionCardSection'; id: Scalars['ID']; - created_at: Scalars['DateTime']; - updated_at: Scalars['DateTime']; - blocks?: Maybe>>; - locale?: Maybe; - published_at?: Maybe; - localizations?: Maybe>>; -}; - - -export type FeaturesSectionsLocalizationsArgs = { - sort?: Maybe; - limit?: Maybe; - start?: Maybe; - where?: Maybe; -}; - -export type FeaturesSectionsAggregator = { - __typename?: 'FeaturesSectionsAggregator'; - count?: Maybe; - totalCount?: Maybe; + title?: Maybe; + subtitle?: Maybe; + sections?: Maybe>>; }; -export type FeaturesSectionsBlocksDynamicZone = ComponentBlocksFeature; - - -export type FeaturesSectionsConnection = { - __typename?: 'FeaturesSectionsConnection'; - values?: Maybe>>; - groupBy?: Maybe; - aggregate?: Maybe; +export type ComponentSectionCardSectionInput = { + title?: Maybe; + subtitle?: Maybe; + sections?: Maybe>>; }; -export type FeaturesSectionsConnectionCreated_At = { - __typename?: 'FeaturesSectionsConnectionCreated_at'; - key?: Maybe; - connection?: Maybe; +export type ComponentSectionHeroSection = { + __typename?: 'ComponentSectionHeroSection'; + id: Scalars['ID']; + sections?: Maybe>>; + title?: Maybe; + subtitle?: Maybe; }; -export type FeaturesSectionsConnectionId = { - __typename?: 'FeaturesSectionsConnectionId'; - key?: Maybe; - connection?: Maybe; +export type ComponentSectionHeroSectionInput = { + sections?: Maybe>>; + title?: Maybe; + subtitle?: Maybe; }; -export type FeaturesSectionsConnectionLocale = { - __typename?: 'FeaturesSectionsConnectionLocale'; - key?: Maybe; - connection?: Maybe; +export type ComponentSectionSingleFeatureSection = { + __typename?: 'ComponentSectionSingleFeatureSection'; + id: Scalars['ID']; + title?: Maybe; + subtitle?: Maybe; + sections?: Maybe>>; }; -export type FeaturesSectionsConnectionPublished_At = { - __typename?: 'FeaturesSectionsConnectionPublished_at'; - key?: Maybe; - connection?: Maybe; +export type ComponentSectionSingleFeatureSectionInput = { + title?: Maybe; + subtitle?: Maybe; + sections?: Maybe>>; }; -export type FeaturesSectionsConnectionUpdated_At = { - __typename?: 'FeaturesSectionsConnectionUpdated_at'; - key?: Maybe; - connection?: Maybe; -}; -export type FeaturesSectionsGroupBy = { - __typename?: 'FeaturesSectionsGroupBy'; - id?: Maybe>>; - created_at?: Maybe>>; - updated_at?: Maybe>>; - locale?: Maybe>>; - published_at?: Maybe>>; -}; export type FileInfoInput = { name?: Maybe; @@ -262,13 +195,10 @@ export type LocaleInput = { }; -export type Morph = UsersPermissionsMe | UsersPermissionsMeRole | UsersPermissionsLoginPayload | UserPermissionsPasswordPayload | FeaturesSections | FeaturesSectionsConnection | FeaturesSectionsAggregator | FeaturesSectionsGroupBy | FeaturesSectionsConnectionId | FeaturesSectionsConnectionCreated_At | FeaturesSectionsConnectionUpdated_At | FeaturesSectionsConnectionLocale | FeaturesSectionsConnectionPublished_At | CreateFeaturesSectionPayload | UpdateFeaturesSectionPayload | DeleteFeaturesSectionPayload | Navigation | NavigationConnection | NavigationAggregator | NavigationGroupBy | NavigationConnectionId | NavigationConnectionCreated_At | NavigationConnectionUpdated_At | NavigationConnectionNavigationName | NavigationConnectionLocale | NavigationConnectionPublished_At | CreateNavigationPayload | UpdateNavigationPayload | DeleteNavigationPayload | Pages | PagesConnection | PagesAggregator | PagesGroupBy | PagesConnectionId | PagesConnectionCreated_At | PagesConnectionUpdated_At | PagesConnectionPageName | PagesConnectionPath | PagesConnectionLocale | PagesConnectionPublished_At | CreatePagePayload | UpdatePagePayload | DeletePagePayload | I18NLocale | UploadFile | UploadFileConnection | UploadFileAggregator | UploadFileAggregatorSum | UploadFileAggregatorAvg | UploadFileAggregatorMin | UploadFileAggregatorMax | UploadFileGroupBy | UploadFileConnectionId | UploadFileConnectionCreated_At | UploadFileConnectionUpdated_At | UploadFileConnectionName | UploadFileConnectionAlternativeText | UploadFileConnectionCaption | UploadFileConnectionWidth | UploadFileConnectionHeight | UploadFileConnectionFormats | UploadFileConnectionHash | UploadFileConnectionExt | UploadFileConnectionMime | UploadFileConnectionSize | UploadFileConnectionUrl | UploadFileConnectionPreviewUrl | UploadFileConnectionProvider | UploadFileConnectionProvider_Metadata | DeleteFilePayload | UsersPermissionsPermission | UsersPermissionsRole | UsersPermissionsRoleConnection | UsersPermissionsRoleAggregator | UsersPermissionsRoleGroupBy | UsersPermissionsRoleConnectionId | UsersPermissionsRoleConnectionName | UsersPermissionsRoleConnectionDescription | UsersPermissionsRoleConnectionType | CreateRolePayload | UpdateRolePayload | DeleteRolePayload | UsersPermissionsUser | UsersPermissionsUserConnection | UsersPermissionsUserAggregator | UsersPermissionsUserGroupBy | UsersPermissionsUserConnectionId | UsersPermissionsUserConnectionCreated_At | UsersPermissionsUserConnectionUpdated_At | UsersPermissionsUserConnectionUsername | UsersPermissionsUserConnectionEmail | UsersPermissionsUserConnectionProvider | UsersPermissionsUserConnectionConfirmed | UsersPermissionsUserConnectionBlocked | UsersPermissionsUserConnectionRole | CreateUserPayload | UpdateUserPayload | DeleteUserPayload | ComponentBlocksCard | ComponentBlocksFeature | ComponentBlocksHero | ComponentBlocksSingleFeature | ComponentFeatFeat | ComponentMenuLink | ComponentMenuPageLink; +export type Morph = UsersPermissionsMe | UsersPermissionsMeRole | UsersPermissionsLoginPayload | UserPermissionsPasswordPayload | Navigation | NavigationConnection | NavigationAggregator | NavigationGroupBy | NavigationConnectionId | NavigationConnectionCreated_At | NavigationConnectionUpdated_At | NavigationConnectionNavigationName | NavigationConnectionLocale | NavigationConnectionPublished_At | CreateNavigationPayload | UpdateNavigationPayload | DeleteNavigationPayload | Pages | PagesConnection | PagesAggregator | PagesGroupBy | PagesConnectionId | PagesConnectionCreated_At | PagesConnectionUpdated_At | PagesConnectionPageName | PagesConnectionPath | PagesConnectionLocale | PagesConnectionPublished_At | CreatePagePayload | UpdatePagePayload | DeletePagePayload | I18NLocale | UploadFile | UploadFileConnection | UploadFileAggregator | UploadFileAggregatorSum | UploadFileAggregatorAvg | UploadFileAggregatorMin | UploadFileAggregatorMax | UploadFileGroupBy | UploadFileConnectionId | UploadFileConnectionCreated_At | UploadFileConnectionUpdated_At | UploadFileConnectionName | UploadFileConnectionAlternativeText | UploadFileConnectionCaption | UploadFileConnectionWidth | UploadFileConnectionHeight | UploadFileConnectionFormats | UploadFileConnectionHash | UploadFileConnectionExt | UploadFileConnectionMime | UploadFileConnectionSize | UploadFileConnectionUrl | UploadFileConnectionPreviewUrl | UploadFileConnectionProvider | UploadFileConnectionProvider_Metadata | DeleteFilePayload | UsersPermissionsPermission | UsersPermissionsRole | UsersPermissionsRoleConnection | UsersPermissionsRoleAggregator | UsersPermissionsRoleGroupBy | UsersPermissionsRoleConnectionId | UsersPermissionsRoleConnectionName | UsersPermissionsRoleConnectionDescription | UsersPermissionsRoleConnectionType | CreateRolePayload | UpdateRolePayload | DeleteRolePayload | UsersPermissionsUser | UsersPermissionsUserConnection | UsersPermissionsUserAggregator | UsersPermissionsUserGroupBy | UsersPermissionsUserConnectionId | UsersPermissionsUserConnectionCreated_At | UsersPermissionsUserConnectionUpdated_At | UsersPermissionsUserConnectionUsername | UsersPermissionsUserConnectionEmail | UsersPermissionsUserConnectionProvider | UsersPermissionsUserConnectionConfirmed | UsersPermissionsUserConnectionBlocked | UsersPermissionsUserConnectionRole | CreateUserPayload | UpdateUserPayload | DeleteUserPayload | ComponentBlocksCard | ComponentBlocksHero | ComponentBlocksSingleFeature | ComponentMenuLink | ComponentMenuPageLink | ComponentSectionCardSection | ComponentSectionHeroSection | ComponentSectionSingleFeatureSection; export type Mutation = { __typename?: 'Mutation'; - createFeaturesSection?: Maybe; - updateFeaturesSection?: Maybe; - deleteFeaturesSection?: Maybe; createNavigation?: Maybe; updateNavigation?: Maybe; deleteNavigation?: Maybe; @@ -289,7 +219,6 @@ export type Mutation = { updateUser?: Maybe; /** Delete an existing user */ deleteUser?: Maybe; - createFeaturesSectionLocalization: FeaturesSections; createNavigationLocalization: Navigation; createPageLocalization: Pages; upload: UploadFile; @@ -303,21 +232,6 @@ export type Mutation = { }; -export type MutationCreateFeaturesSectionArgs = { - input?: Maybe; -}; - - -export type MutationUpdateFeaturesSectionArgs = { - input?: Maybe; -}; - - -export type MutationDeleteFeaturesSectionArgs = { - input?: Maybe; -}; - - export type MutationCreateNavigationArgs = { input?: Maybe; }; @@ -383,11 +297,6 @@ export type MutationDeleteUserArgs = { }; -export type MutationCreateFeaturesSectionLocalizationArgs = { - input: UpdateFeaturesSectionInput; -}; - - export type MutationCreateNavigationLocalizationArgs = { input: UpdateNavigationInput; }; @@ -543,8 +452,8 @@ export type NavigationItemsDynamicZone = ComponentMenuLink | ComponentMenuPageLi export type PageInput = { pageName: Scalars['String']; - blocks?: Maybe>; path?: Maybe; + sections?: Maybe>; localizations?: Maybe>>; locale?: Maybe; published_at?: Maybe; @@ -558,8 +467,8 @@ export type Pages = { created_at: Scalars['DateTime']; updated_at: Scalars['DateTime']; pageName: Scalars['String']; - blocks?: Maybe>>; path?: Maybe; + sections?: Maybe>>; locale?: Maybe; published_at?: Maybe; localizations?: Maybe>>; @@ -579,9 +488,6 @@ export type PagesAggregator = { totalCount?: Maybe; }; -export type PagesBlocksDynamicZone = ComponentBlocksCard | ComponentBlocksHero | ComponentBlocksSingleFeature; - - export type PagesConnection = { __typename?: 'PagesConnection'; values?: Maybe>>; @@ -642,6 +548,9 @@ export type PagesGroupBy = { published_at?: Maybe>>; }; +export type PagesSectionsDynamicZone = ComponentSectionCardSection | ComponentSectionHeroSection | ComponentSectionSingleFeatureSection; + + export enum PublicationState { Live = 'LIVE', Preview = 'PREVIEW' @@ -649,9 +558,6 @@ export enum PublicationState { export type Query = { __typename?: 'Query'; - featuresSection?: Maybe; - featuresSections?: Maybe>>; - featuresSectionsConnection?: Maybe; navigation?: Maybe; navigations?: Maybe>>; navigationsConnection?: Maybe; @@ -671,31 +577,6 @@ export type Query = { }; -export type QueryFeaturesSectionArgs = { - id: Scalars['ID']; - publicationState?: Maybe; -}; - - -export type QueryFeaturesSectionsArgs = { - sort?: Maybe; - limit?: Maybe; - start?: Maybe; - where?: Maybe; - publicationState?: Maybe; - locale?: Maybe; -}; - - -export type QueryFeaturesSectionsConnectionArgs = { - sort?: Maybe; - limit?: Maybe; - start?: Maybe; - where?: Maybe; - locale?: Maybe; -}; - - export type QueryNavigationArgs = { id: Scalars['ID']; publicationState?: Maybe; @@ -1248,15 +1129,6 @@ export type UsersPermissionsUserGroupBy = { role?: Maybe>>; }; -export type CreateFeaturesSectionInput = { - data?: Maybe; -}; - -export type CreateFeaturesSectionPayload = { - __typename?: 'createFeaturesSectionPayload'; - featuresSection?: Maybe; -}; - export type CreateNavigationInput = { data?: Maybe; }; @@ -1293,15 +1165,6 @@ export type CreateUserPayload = { user?: Maybe; }; -export type DeleteFeaturesSectionInput = { - where?: Maybe; -}; - -export type DeleteFeaturesSectionPayload = { - __typename?: 'deleteFeaturesSectionPayload'; - featuresSection?: Maybe; -}; - export type DeleteFileInput = { where?: Maybe; }; @@ -1352,14 +1215,7 @@ export type EditComponentBlocksCardInput = { title?: Maybe; description?: Maybe; image?: Maybe; - projectLink?: Maybe; -}; - -export type EditComponentBlocksFeatureInput = { - id?: Maybe; - featureTitle?: Maybe; - featureDescription?: Maybe; - feat?: Maybe>>; + projectLink?: Maybe; }; export type EditComponentBlocksHeroInput = { @@ -1373,12 +1229,7 @@ export type EditComponentBlocksSingleFeatureInput = { description?: Maybe; title?: Maybe; image?: Maybe; - serviceLink?: Maybe>>; -}; - -export type EditComponentFeatFeatInput = { - id?: Maybe; - featDescription?: Maybe; + serviceLink?: Maybe; }; export type EditComponentMenuLinkInput = { @@ -1393,13 +1244,25 @@ export type EditComponentMenuPageLinkInput = { path?: Maybe; }; -export type EditFeaturesSectionInput = { - blocks?: Maybe>; - localizations?: Maybe>>; - locale?: Maybe; - published_at?: Maybe; - created_by?: Maybe; - updated_by?: Maybe; +export type EditComponentSectionCardSectionInput = { + id?: Maybe; + title?: Maybe; + subtitle?: Maybe; + sections?: Maybe>>; +}; + +export type EditComponentSectionHeroSectionInput = { + id?: Maybe; + sections?: Maybe>>; + title?: Maybe; + subtitle?: Maybe; +}; + +export type EditComponentSectionSingleFeatureSectionInput = { + id?: Maybe; + title?: Maybe; + subtitle?: Maybe; + sections?: Maybe>>; }; export type EditFileInput = { @@ -1441,8 +1304,8 @@ export type EditNavigationInput = { export type EditPageInput = { pageName?: Maybe; - blocks?: Maybe>; path?: Maybe; + sections?: Maybe>; localizations?: Maybe>>; locale?: Maybe; published_at?: Maybe; @@ -1474,16 +1337,6 @@ export type EditUserInput = { updated_by?: Maybe; }; -export type UpdateFeaturesSectionInput = { - where?: Maybe; - data?: Maybe; -}; - -export type UpdateFeaturesSectionPayload = { - __typename?: 'updateFeaturesSectionPayload'; - featuresSection?: Maybe; -}; - export type UpdateNavigationInput = { where?: Maybe; data?: Maybe; @@ -1549,67 +1402,6 @@ export type GetNavItemsQuery = ( )>>> } ); -export type GetPageDataQueryVariables = Exact<{ - locale?: Maybe; -}>; - - -export type GetPageDataQuery = ( - { __typename?: 'Query' } - & { pages?: Maybe - & { blocks?: Maybe - & { image?: Maybe<( - { __typename?: 'UploadFile' } - & Pick - )>, projectLink?: Maybe<( - { __typename?: 'ComponentMenuPageLink' } - & { path?: Maybe<( - { __typename?: 'Pages' } - & Pick - )> } - )> } - ) | ( - { __typename: 'ComponentBlocksHero' } - & Pick - ) | ( - { __typename: 'ComponentBlocksSingleFeature' } - & Pick - & { image?: Maybe<( - { __typename?: 'UploadFile' } - & Pick - )>, serviceLink?: Maybe - )> } - )>>> } - )>>> } - )>>> } -); - -export type GetFeaturesQueryVariables = Exact<{ [key: string]: never; }>; - - -export type GetFeaturesQuery = ( - { __typename?: 'Query' } - & { featuresSections?: Maybe - & { feat?: Maybe - )>>> } - )>>> } - )>>> } -); - export type GetPagesQueryVariables = Exact<{ where?: Maybe; locale?: Maybe; @@ -1619,35 +1411,35 @@ export type GetPagesQueryVariables = Exact<{ export type GetPagesQuery = ( { __typename?: 'Query' } & { pages?: Maybe - & { blocks?: Maybe - & { image?: Maybe<( - { __typename?: 'UploadFile' } - & Pick - )>, projectLink?: Maybe<( - { __typename?: 'ComponentMenuPageLink' } - & { path?: Maybe<( - { __typename?: 'Pages' } - & Pick + { __typename: 'Pages' } + & Pick + & { sections?: Maybe + & { card?: Maybe + & { image?: Maybe<( + { __typename?: 'UploadFile' } + & Pick )> } - )> } + )>>> } ) | ( - { __typename: 'ComponentBlocksHero' } - & Pick + { __typename: 'ComponentSectionHeroSection' } + & Pick + & { hero?: Maybe + )>>> } ) | ( - { __typename: 'ComponentBlocksSingleFeature' } - & Pick - & { image?: Maybe<( - { __typename?: 'UploadFile' } - & Pick - )>, serviceLink?: Maybe + { __typename: 'ComponentSectionSingleFeatureSection' } + & Pick + & { singleFeature?: Maybe + & { image?: Maybe<( + { __typename?: 'UploadFile' } + & Pick )> } )>>> } )>>> } @@ -1709,108 +1501,56 @@ export const GetNavItems = ` } } `; -export const GetPageData = ` - query GetPageData($locale: String) { - pages(locale: $locale) { - id - locale - pageName - path - blocks { - __typename - ... on ComponentBlocksCard { - id - title - description - image { - url - } - projectLink { - path { - path - } - } - } - ... on ComponentBlocksSingleFeature { - id - title - description - image { - url - } - serviceLink { - path { - path - } - } - } - ... on ComponentBlocksHero { - id - title - subtitle - } - } - } -} - `; -export const GetFeatures = ` - query GetFeatures { - featuresSections { - blocks { - ... on ComponentBlocksFeature { - featureTitle - featureDescription - feat { - ... on ComponentFeatFeat { - featDescription - } - } - } - } - } -} - `; export const GetPages = ` query GetPages($where: JSON, $locale: String) { pages(where: $where, locale: $locale) { id - locale - created_at - updated_at - pageName path - blocks { - __typename - ... on ComponentBlocksCard { + pageName + locale + __typename + sections { + ... on ComponentSectionSingleFeatureSection { + __typename id title - description - image { - url - } - projectLink { - path { - path + subtitle + singleFeature: sections { + __typename + id + description + title + serviceLink + image { + url } } } - ... on ComponentBlocksSingleFeature { + ... on ComponentSectionHeroSection { + __typename id title - description - image { - url - } - serviceLink { - path { - path - } + subtitle + hero: sections { + id + title + subtitle } } - ... on ComponentBlocksHero { + ... on ComponentSectionCardSection { + __typename id title subtitle + card: sections { + id + title + description + image { + url + } + projectLink + } } } } diff --git a/frontend/layouts/defaultLayout/index.tsx b/frontend/layouts/defaultLayout/index.tsx index d5059208..87e07093 100644 --- a/frontend/layouts/defaultLayout/index.tsx +++ b/frontend/layouts/defaultLayout/index.tsx @@ -1,7 +1,7 @@ import { Box, Flex, useColorMode } from "@chakra-ui/react"; import Head from "next/head"; import React from "react"; -import DarkModeSwitch from "@components/DarkModeSwitch"; +// import DarkModeSwitch from "@components/DarkModeSwitch"; export function DefaultLayout({ children, title }: any) { const { colorMode } = useColorMode(); @@ -11,14 +11,15 @@ export function DefaultLayout({ children, title }: any) { {title} + {/* - - + + */} {children} diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 5c8876c8..53d1ed46 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1535,18 +1535,6 @@ } } }, - "@graphql-codegen/typescript": { - "version": "1.22.2", - "resolved": "https://registry.npmjs.org/@graphql-codegen/typescript/-/typescript-1.22.2.tgz", - "integrity": "sha512-M+gJVHnpWanCTrSqzh+jNyJ6HhDICFzWV3SVcns5LX1X4NC/7N+TvYLk9ZzRSpBYCkWWGmTPrZNd0zjwhroRTg==", - "dev": true, - "requires": { - "@graphql-codegen/plugin-helpers": "^1.18.7", - "@graphql-codegen/visitor-plugin-common": "1.21.1", - "auto-bind": "~4.0.0", - "tslib": "~2.3.0" - } - }, "@graphql-codegen/typescript-document-nodes": { "version": "1.17.13", "resolved": "https://registry.npmjs.org/@graphql-codegen/typescript-document-nodes/-/typescript-document-nodes-1.17.13.tgz", @@ -1558,32 +1546,6 @@ "tslib": "~2.3.0" } }, - "@graphql-codegen/typescript-operations": { - "version": "1.18.1", - "resolved": "https://registry.npmjs.org/@graphql-codegen/typescript-operations/-/typescript-operations-1.18.1.tgz", - "integrity": "sha512-6w67j9Y8ZqSMc5a7bxkbNp0Yv1NWUMnCZt30nqXyOlvqlbmPogWWxJGccxSDfhZ8+uSFjQp5kUM07w8/uPMIZQ==", - "dev": true, - "requires": { - "@graphql-codegen/plugin-helpers": "^1.18.7", - "@graphql-codegen/typescript": "^1.22.2", - "@graphql-codegen/visitor-plugin-common": "1.21.1", - "auto-bind": "~4.0.0", - "tslib": "~2.3.0" - } - }, - "@graphql-codegen/typescript-react-apollo": { - "version": "2.2.6", - "resolved": "https://registry.npmjs.org/@graphql-codegen/typescript-react-apollo/-/typescript-react-apollo-2.2.6.tgz", - "integrity": "sha512-aG/0CJPu4YjprC6QTOeaOxKCGg8c0m8Ja+WI5por8/hOqpndieSUYBxLZJ1ZxbXdgLpCkmUIGS9QZsVr7xtVQw==", - "dev": true, - "requires": { - "@graphql-codegen/plugin-helpers": "^1.18.7", - "@graphql-codegen/visitor-plugin-common": "1.21.1", - "auto-bind": "~4.0.0", - "change-case-all": "1.0.14", - "tslib": "~2.3.0" - } - }, "@graphql-codegen/visitor-plugin-common": { "version": "1.21.1", "resolved": "https://registry.npmjs.org/@graphql-codegen/visitor-plugin-common/-/visitor-plugin-common-1.21.1.tgz", @@ -3501,6 +3463,11 @@ "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" }, + "codemirror": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.62.0.tgz", + "integrity": "sha512-Xnl3304iCc8nyVZuRkzDVVwc794uc9QNX0UcPGeNic1fbzkSrO4l4GVXho9tRNKBgPYZXgocUqXyfIv3BILhCQ==" + }, "color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", @@ -4054,6 +4021,11 @@ "ansi-colors": "^4.1.1" } }, + "entities": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", + "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==" + }, "error-ex": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", @@ -6384,6 +6356,14 @@ "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=" }, + "linkify-it": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-2.2.0.tgz", + "integrity": "sha512-GnAl/knGn+i1U/wjBz3akz2stz+HrHLsxMwHQGofCDfPvlf+gDKN58UtfmUquTY4/MXeE2x7k19KQmeoZi94Iw==", + "requires": { + "uc.micro": "^1.0.1" + } + }, "listr": { "version": "0.14.3", "resolved": "https://registry.npmjs.org/listr/-/listr-0.14.3.tgz", @@ -6632,11 +6612,15 @@ "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", "dev": true }, + "lodash.debounce": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", + "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=" + }, "lodash.get": { "version": "4.4.2", "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", - "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", - "dev": true + "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=" }, "lodash.includes": { "version": "4.3.0", @@ -6915,6 +6899,28 @@ "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=" }, + "markdown-it": { + "version": "8.4.2", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-8.4.2.tgz", + "integrity": "sha512-GcRz3AWTqSUphY3vsUqQSFMbgR38a4Lh3GWlHRh/7MRwz8mcu9n2IO7HOh+bXHrR9kOPDl5RNCaEsrneb+xhHQ==", + "requires": { + "argparse": "^1.0.7", + "entities": "~1.1.1", + "linkify-it": "^2.0.0", + "mdurl": "^1.0.1", + "uc.micro": "^1.0.5" + }, + "dependencies": { + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "requires": { + "sprintf-js": "~1.0.2" + } + } + } + }, "material-colors": { "version": "1.2.6", "resolved": "https://registry.npmjs.org/material-colors/-/material-colors-1.2.6.tgz", @@ -6935,6 +6941,11 @@ "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz", "integrity": "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==" }, + "mdurl": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", + "integrity": "sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4=" + }, "memoize-one": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/memoize-one/-/memoize-one-5.2.1.tgz", @@ -7493,6 +7504,11 @@ "word-wrap": "^1.2.3" } }, + "orderedmap": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/orderedmap/-/orderedmap-1.1.1.tgz", + "integrity": "sha512-3Ux8um0zXbVacKUkcytc0u3HgC0b0bBLT+I60r2J/En72cI0nZffqrA7Xtf2Hqs27j1g82llR5Mhbd0Z1XW4AQ==" + }, "os-browserify": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", @@ -7869,6 +7885,126 @@ "react-is": "^16.8.1" } }, + "prosemirror-commands": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/prosemirror-commands/-/prosemirror-commands-1.1.9.tgz", + "integrity": "sha512-zedlbQ+8QK0tIeibb6vbnAX5FO/S5x67xHgF57Fned+3G6RZY3JAGma9kC1jSCmLF/XC7MCZ90oekb0qo2b+Pw==", + "requires": { + "prosemirror-model": "^1.0.0", + "prosemirror-state": "^1.0.0", + "prosemirror-transform": "^1.0.0" + } + }, + "prosemirror-dropcursor": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/prosemirror-dropcursor/-/prosemirror-dropcursor-1.3.5.tgz", + "integrity": "sha512-tNUwcF2lPAkwKBZPZRtbxpwljnODRNZ3eiYloN1DSUqDjMT1nBZm0nejaEMS1TvNQ+3amibUSAiV4hX+jpASFA==", + "requires": { + "prosemirror-state": "^1.0.0", + "prosemirror-transform": "^1.1.0", + "prosemirror-view": "^1.1.0" + } + }, + "prosemirror-gapcursor": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/prosemirror-gapcursor/-/prosemirror-gapcursor-1.1.5.tgz", + "integrity": "sha512-SjbUZq5pgsBDuV3hu8GqgIpZR5eZvGLM+gPQTqjVVYSMUCfKW3EGXTEYaLHEl1bGduwqNC95O3bZflgtAb4L6w==", + "requires": { + "prosemirror-keymap": "^1.0.0", + "prosemirror-model": "^1.0.0", + "prosemirror-state": "^1.0.0", + "prosemirror-view": "^1.0.0" + } + }, + "prosemirror-history": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/prosemirror-history/-/prosemirror-history-1.1.3.tgz", + "integrity": "sha512-zGDotijea+vnfnyyUGyiy1wfOQhf0B/b6zYcCouBV8yo6JmrE9X23M5q7Nf/nATywEZbgRLG70R4DmfSTC+gfg==", + "requires": { + "prosemirror-state": "^1.2.2", + "prosemirror-transform": "^1.0.0", + "rope-sequence": "^1.3.0" + } + }, + "prosemirror-inputrules": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/prosemirror-inputrules/-/prosemirror-inputrules-1.1.3.tgz", + "integrity": "sha512-ZaHCLyBtvbyIHv0f5p6boQTIJjlD6o2NPZiEaZWT2DA+j591zS29QQEMT4lBqwcLW3qRSf7ZvoKNbf05YrsStw==", + "requires": { + "prosemirror-state": "^1.0.0", + "prosemirror-transform": "^1.0.0" + } + }, + "prosemirror-keymap": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/prosemirror-keymap/-/prosemirror-keymap-1.1.4.tgz", + "integrity": "sha512-Al8cVUOnDFL4gcI5IDlG6xbZ0aOD/i3B17VT+1JbHWDguCgt/lBHVTHUBcKvvbSg6+q/W4Nj1Fu6bwZSca3xjg==", + "requires": { + "prosemirror-state": "^1.0.0", + "w3c-keyname": "^2.2.0" + } + }, + "prosemirror-model": { + "version": "1.14.2", + "resolved": "https://registry.npmjs.org/prosemirror-model/-/prosemirror-model-1.14.2.tgz", + "integrity": "sha512-TwkACyEiSi8FJiRhg2ffbzmQRy5DR+aTwAr7trNQNZL24HJR8ouxy4qCkG99PnWK0xZ0AjSMtPXSU6hnxAiP7Q==", + "requires": { + "orderedmap": "^1.1.0" + } + }, + "prosemirror-schema-list": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/prosemirror-schema-list/-/prosemirror-schema-list-1.1.4.tgz", + "integrity": "sha512-pNTuZflacFOBlxrTcWSdWhjoB8BaucwfJVp/gJNxztOwaN3wQiC65axclXyplf6TKgXD/EkWfS/QAov3/Znadw==", + "requires": { + "prosemirror-model": "^1.0.0", + "prosemirror-transform": "^1.0.0" + } + }, + "prosemirror-state": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/prosemirror-state/-/prosemirror-state-1.3.4.tgz", + "integrity": "sha512-Xkkrpd1y/TQ6HKzN3agsQIGRcLckUMA9u3j207L04mt8ToRgpGeyhbVv0HI7omDORIBHjR29b7AwlATFFf2GLA==", + "requires": { + "prosemirror-model": "^1.0.0", + "prosemirror-transform": "^1.0.0" + } + }, + "prosemirror-tables": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/prosemirror-tables/-/prosemirror-tables-1.0.0.tgz", + "integrity": "sha512-zFw5Us4G5Vdq0yIj8GiqZOGA6ud5UKpMKElux9O0HrfmhkuGa1jf1PCpz2R5pmIQJv+tIM24H1mox/ODBAX37Q==", + "requires": { + "prosemirror-keymap": "^1.1.2", + "prosemirror-model": "^1.8.1", + "prosemirror-state": "^1.3.1", + "prosemirror-transform": "^1.2.1", + "prosemirror-view": "^1.13.3" + } + }, + "prosemirror-transform": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/prosemirror-transform/-/prosemirror-transform-1.3.2.tgz", + "integrity": "sha512-/G6d/u9Mf6Bv3H1XR8VxhpjmUO75LYmnvj+s3ZfZpakU1hnQbsvCEybml1B3f2IWUAAQRFkbO1PnsbFhLZsYsw==", + "requires": { + "prosemirror-model": "^1.0.0" + } + }, + "prosemirror-utils": { + "version": "0.9.6", + "resolved": "https://registry.npmjs.org/prosemirror-utils/-/prosemirror-utils-0.9.6.tgz", + "integrity": "sha512-UC+j9hQQ1POYfMc5p7UFxBTptRiGPR7Kkmbl3jVvU8VgQbkI89tR/GK+3QYC8n+VvBZrtAoCrJItNhWSxX3slA==" + }, + "prosemirror-view": { + "version": "1.18.8", + "resolved": "https://registry.npmjs.org/prosemirror-view/-/prosemirror-view-1.18.8.tgz", + "integrity": "sha512-iLNonsRUM+ByIxJZP+tRuE8jUy56jfgf8oxnc4InWYTYdPibARs4FL6DQ6D56GdPMlXyTjXjSdfDp/x8mwHhtw==", + "requires": { + "prosemirror-model": "^1.1.0", + "prosemirror-state": "^1.0.0", + "prosemirror-transform": "^1.1.0" + } + }, "public-encrypt": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", @@ -8203,6 +8339,31 @@ "use-latest": "^1.0.0" } }, + "react-tinacms-editor": { + "version": "0.41.1", + "resolved": "https://registry.npmjs.org/react-tinacms-editor/-/react-tinacms-editor-0.41.1.tgz", + "integrity": "sha512-HEN9shMpnt9xRgAfoNebKvBAAeYYMBFO3kX5p9SbzeRslrQ7xCH/qM+iI+CvOAFunKHNiwHWvChEAJx9G/lweA==", + "requires": { + "codemirror": "^5.42.2", + "lodash.debounce": "^4.0.8", + "lodash.get": "^4.4.2", + "markdown-it": "^8.3.1", + "prosemirror-commands": "^1.0.8", + "prosemirror-dropcursor": "^1.1.2", + "prosemirror-gapcursor": "^1.0.4", + "prosemirror-history": "^1.0.4", + "prosemirror-inputrules": "^1.0.4", + "prosemirror-keymap": "^1.0.1", + "prosemirror-model": "^1.0.0", + "prosemirror-schema-list": "^1.0.3", + "prosemirror-state": "^1.2.4", + "prosemirror-tables": "1.0.0", + "prosemirror-transform": "^1.0.0", + "prosemirror-utils": "^0.9.6", + "prosemirror-view": "^1.11.3", + "react-dismissible": "^1.3.0" + } + }, "react-tinacms-inline": { "version": "0.41.1", "resolved": "https://registry.npmjs.org/react-tinacms-inline/-/react-tinacms-inline-0.41.1.tgz", @@ -8551,6 +8712,11 @@ "inherits": "^2.0.1" } }, + "rope-sequence": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/rope-sequence/-/rope-sequence-1.3.2.tgz", + "integrity": "sha512-ku6MFrwEVSVmXLvy3dYph3LAMNS0890K7fabn+0YIRQ2T96T9F4gkFf0vf0WW0JUraNWwGRtInEpH7yO4tbQZg==" + }, "rtl-css-js": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/rtl-css-js/-/rtl-css-js-1.14.1.tgz", @@ -8815,8 +8981,7 @@ "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" }, "stack-generator": { "version": "2.0.5", @@ -9467,6 +9632,11 @@ "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.28.tgz", "integrity": "sha512-6Gurc1n//gjp9eQNXjD9O3M/sMwVtN5S8Lv9bvOYBfKfDNiIIhqiyi01vMBO45u4zkDE420w/e0se7Vs+sIg+g==" }, + "uc.micro": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz", + "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==" + }, "unbox-primitive": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz", @@ -9668,6 +9838,11 @@ "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz", "integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==" }, + "w3c-keyname": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/w3c-keyname/-/w3c-keyname-2.2.4.tgz", + "integrity": "sha512-tOhfEwEzFLJzf6d1ZPkYfGj+FWhIpBux9ppoP3rlclw3Z0BZv3N7b7030Z1kYth+6rDuAsXUFr+d0VE6Ed1ikw==" + }, "warning": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/warning/-/warning-4.0.3.tgz", diff --git a/frontend/package.json b/frontend/package.json index 044ea756..9d23efb6 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -16,11 +16,12 @@ "@emotion/styled": "11.3.0", "@graphql-codegen/typescript-document-nodes": "1.17.13", "framer-motion": "4.1.17", - "graphql": "^15.5.1", - "graphql-codegen": "^0.4.0", - "next": "^11.0.0", + "graphql": "15.5.1", + "graphql-codegen": "0.4.0", + "next": "11.0.0", "react": "17.0.2", "react-dom": "17.0.2", + "react-tinacms-editor": "0.41.1", "react-tinacms-inline": "0.41.1", "react-tinacms-strapi": "0.41.1", "tinacms": "0.41.1" @@ -36,4 +37,4 @@ "eslint-config-next": "11.0.0", "typescript": "4.3.4" } -} \ No newline at end of file +} diff --git a/frontend/pages/[...slug].tsx b/frontend/pages/[...slug].tsx index 46c3ea6b..f30df1ed 100644 --- a/frontend/pages/[...slug].tsx +++ b/frontend/pages/[...slug].tsx @@ -7,11 +7,18 @@ import { GetPagesQuery, GetPagesQueryVariables, } from "@graphql/generated"; -import { BlockData, BlockItemProps, PAGE_BLOCKS } from "@features/pageBlocks"; import { PageData, usePagePlugin } from "@features/plugins/usePagePlugin"; import { DefaultLayout } from "@layouts/defaultLayout"; import { chakra, useColorMode } from "@chakra-ui/react"; -import { STRAPI_URL } from "@config/env"; +import { + BlockItemProps, + SectionBlockData, + SECTION_PAGE_BLOCKS, +} from "@features/sectionBlocks"; +import { assertNever } from "utils"; +import { HeroBlockData } from "@features/pageBlocks/HeroBlock"; +import { FeatureBlockData } from "@features/pageBlocks/FeatureBlock"; +import { CardBlockData } from "@features/pageBlocks/CardBlock"; interface DynamicPageProps { path: string[]; @@ -40,22 +47,20 @@ export default function DynamicPage({ pageData, preview }: DynamicPageProps) {
- {/* */} - -

SLUG

); } -const StyledComponent = chakra(InlineBlocks); +const StyledInlineBlocks = chakra(InlineBlocks); export const getStaticPaths: GetStaticPaths = async (context) => { // Get all pages from Strapi @@ -83,14 +88,11 @@ export const getStaticPaths: GetStaticPaths = async (context) => { // Decompose the slug that was saved in Strapi const pagePath = page.path?.replace(/^\/+/, "") || ""; const slugArray: any = pagePath.length > 0 ? pagePath.split("/") : false; - console.log("Slug array", slugArray); - return { params: { slug: slugArray }, locale: page.locale!, }; }); - console.log("Paths", paths); return { paths, fallback: true }; }; @@ -117,9 +119,6 @@ export const getStaticProps: GetStaticProps< GetPages, { locale, - where: { - path, - }, } ); @@ -129,7 +128,17 @@ export const getStaticProps: GetStaticProps< }; } - const pageData = getPageData(localePages.pages, locale); + const availablePages = await fetchGraphQL< + GetPagesQuery, + GetPagesQueryVariables + >(GetPages, { + locale, + where: { + path, + }, + }); + + const pageData = getPageData(availablePages.pages, locale); if (pageData == null) { return { @@ -137,8 +146,6 @@ export const getStaticProps: GetStaticProps< }; } - console.log("Page data", pageData); - if (preview) { return { props: { @@ -166,48 +173,83 @@ function getPageData( locale: string ): PageData | undefined { const page = pages?.find((page) => page?.locale === locale); + if (page) { - const blocks = - page.blocks?.map((section) => { + const sections = + page.sections?.map((section) => { if (section == null) { return null; } switch (section.__typename) { - case "ComponentBlocksHero": { + case "ComponentSectionHeroSection": { return { - _template: "hero", + _template: "heroSection", id: section.id, title: section.title, subtitle: section.subtitle, + blocks: section.hero?.map((hero) => { + if (hero != null) { + return { + id: hero.id, + title: hero.title, + subtitle: hero.subtitle, + _template: "ComponentBlocksHero", + }; + } + }), }; } - case "ComponentBlocksCard": { + case "ComponentSectionSingleFeatureSection": { return { - _template: "card", + _template: "featureSection", id: section.id, title: section.title, - description: section.description, - imageUrl: STRAPI_URL + section.image?.url, - projectLink: section.projectLink?.path?.path, + subtitle: section.subtitle, + blocks: section.singleFeature?.map( + (feature) => { + if (feature != null) { + return { + id: feature.id, + title: feature.title, + description: feature.description, + imageUrl: feature.image?.url ? feature.image.url : null, + serviceLink: feature.serviceLink, + _template: "ComponentBlocksSingleFeature", + }; + } + } + ), }; } - case "ComponentBlocksSingleFeature": { + case "ComponentSectionCardSection": { return { - _template: "feat", + _template: "cardSection", id: section.id, title: section.title, - description: section.description, - imageUrl: STRAPI_URL + section.image?.url, - serviceLink: section.serviceLink, + subtitle: section.subtitle, + blocks: section.card?.map((card) => { + if (card != null) { + return { + id: card.id, + title: card.title, + description: card.description, + imageUrl: card.image?.url ? card.image.url : null, + projectLink: card.projectLink, + _template: "ComponentBlocksCard", + }; + } + }), }; } default: - return null; + return assertNever(section); } }) || []; + return { id: page.id, - blocks: filterListNullableItems(blocks), + title: page.pageName, + sections: filterListNullableItems(sections), path: page.path ? page.path : undefined, }; } diff --git a/frontend/pages/_app.tsx b/frontend/pages/_app.tsx index dbcfd647..39dad875 100644 --- a/frontend/pages/_app.tsx +++ b/frontend/pages/_app.tsx @@ -1,7 +1,7 @@ import AppProviders from "@components/AppProviders"; import { AppProps } from "next/app"; import React from "react"; -import "../styles/globals.css"; +import "theme/index.css"; function MyApp({ Component, pageProps }: AppProps) { return ( diff --git a/frontend/pages/_document.tsx b/frontend/pages/_document.tsx index f17228cf..d20215ce 100644 --- a/frontend/pages/_document.tsx +++ b/frontend/pages/_document.tsx @@ -6,8 +6,19 @@ export default class Document extends NextDocument { render() { return ( - - + + + + + +
diff --git a/frontend/pages/_index.tsx b/frontend/pages/_index.tsx index d6f0d94f..cc73beed 100644 --- a/frontend/pages/_index.tsx +++ b/frontend/pages/_index.tsx @@ -1,6 +1,7 @@ import { DefaultLayout } from "@layouts/defaultLayout"; import React from "react"; + export default function HomePage() { return
; } diff --git a/frontend/theme/index.css b/frontend/theme/index.css new file mode 100644 index 00000000..68e24878 --- /dev/null +++ b/frontend/theme/index.css @@ -0,0 +1,19 @@ +@media (max-width: 1000px) { + .card-list a:nth-child(3) { + display: block; + } + .card-list a { + width: calc(50% - 30px); + margin: 15px; + } +} + +@media (max-width: 760px) { + .card-list a:nth-child(3) { + display: block; + } + .card-list a { + width: 90%; + margin: 15px auto; + } +} diff --git a/frontend/theme/index.ts b/frontend/theme/index.ts index ddd3434d..4fea9121 100644 --- a/frontend/theme/index.ts +++ b/frontend/theme/index.ts @@ -4,15 +4,16 @@ import { createBreakpoints } from "@chakra-ui/theme-tools"; const fonts = { ...chakraTheme.fonts, - body: `Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol"`, + body: `"Europa","Roboto Mono", monospace`, heading: `Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol"`, }; const breakpoints = createBreakpoints({ - sm: "40em", - md: "52em", - lg: "64em", + sm: "30em", + md: "48em", + lg: "62em", xl: "80em", + "2xl": "96em", }); const config: ThemeOverride["config"] = { @@ -27,6 +28,7 @@ const overrides: ThemeOverride = { breakpoints, fontWeights: { normal: 300, + subtitle: 400, medium: 600, bold: 700, }, @@ -37,11 +39,21 @@ const overrides: ThemeOverride = { lg: "18px", xl: "20px", "2xl": "24px", - "3xl": "28px", - "4xl": "36px", - "5xl": "48px", + "3xl": "32px", + "4xl": "40px", + "5xl": "46px", "6xl": "64px", }, + lineHeights: { + hero: "1.1em", + subtitle: "1.8em", + }, + colors: { + dark: "rgb(22,19,56)", + description: "rgb(92,92,92)", + cardSectionBg: "rgb(234, 247, 247)", + cardDescription: "rgb(92, 92, 92)", + }, components: { /* Define custom components diff --git a/frontend/utils/index.ts b/frontend/utils/index.ts new file mode 100644 index 00000000..c845c0ff --- /dev/null +++ b/frontend/utils/index.ts @@ -0,0 +1,3 @@ +export function assertNever(x: never): never { + throw new Error("Unexpected object: " + x); +} diff --git a/package-lock.json b/package-lock.json index 1d69586e..8e5f0ce5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -30,7 +30,7 @@ }, "@sideway/formula": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@sideway/formula/-/formula-3.0.0.tgz", + "resolved": "https://registry.npmjs.org/@sideway/formula/-/formula-3.0.f0.tgz", "integrity": "sha512-vHe7wZ4NOXVfkoRb8T5otiENVlT7a3IAiw7H5M2+GO+9CDgcVUUsX1zalAztCmwyOr2RUTGJdgB+ZvSVqmdHmg==", "dev": true },