diff --git a/deskStructure.js b/deskStructure.js index 1fe1b04..1b98386 100644 --- a/deskStructure.js +++ b/deskStructure.js @@ -33,11 +33,11 @@ export default () => { .schemaType('buyersPage') .child(S.document().schemaType('buyersPage')), S.listItem() - .title('Create Credit Class') + .title('Create Credit Class Page') .schemaType('createCreditClassPage') .child(S.document().schemaType('createCreditClassPage')), S.listItem() - .title('Create Methodology') + .title('Create Methodology Page') .schemaType('createMethodologyPage') .child(S.document().schemaType('createMethodologyPage')), S.listItem() @@ -45,9 +45,21 @@ export default () => { .schemaType('landStewardsPage') .child(S.document().schemaType('landStewardsPage')), S.listItem() - .title('Methodology Review Process') + .title('Methodology Review Process Page') .schemaType('methodologyReviewProcessPage') .child(S.document().schemaType('methodologyReviewProcessPage')), + S.listItem() + .title('Projects Page') + .schemaType('projectsPage') + .child(S.document().schemaType('projectsPage')), + S.listItem() + .title('Project Page') + .schemaType('projectPage') + .child(S.document().schemaType('projectPage')), + S.listItem() + .title('Bridge Page') + .schemaType('bridgePage') + .child(S.document().schemaType('bridgePage')), S.listItem() .title('Methodologies') .schemaType('methodology') @@ -201,6 +213,14 @@ export default () => { .title('Team Members') .schemaType('regenTeamMember') .child(S.documentTypeList('regenTeamMember').title('Team Members')), + S.listItem() + .title('Resources for Getting Started Sections') + .schemaType('gettingStartedResourcesSection') + .child(S.documentTypeList('gettingStartedResourcesSection').title('Resources for Getting Started Sections')), + S.listItem() + .title('Resource for Getting Started Cards') + .schemaType('gettingStartedResourcesCard') + .child(S.documentTypeList('gettingStartedResourcesCard').title('Resource for Getting Started Cards')), ]), ), ]); diff --git a/schemas/documents/registry/bridgePage.js b/schemas/documents/registry/bridgePage.js new file mode 100644 index 0000000..7488ef9 --- /dev/null +++ b/schemas/documents/registry/bridgePage.js @@ -0,0 +1,16 @@ +export default { + name: 'bridgePage', + type: 'document', + title: 'Bridge Page', + __experimental_actions: ['update', /*'create', 'delete', */ 'publish'], + fields: [ + { + name: 'gettingStartedResourcesCard', + type: 'reference', + to: [{ type: 'gettingStartedResourcesCard' }], + title: 'Resources for Getting Started Card', + description: 'This content will appear at the bottom of the Bridge page (on both /ecocredits/bridge and /ecocredits/accounts/{addr}/bridge)', + validation: Rule => Rule.required(), + }, + ], +}; diff --git a/schemas/documents/registry/homePage.js b/schemas/documents/registry/homePage.js index 7f02eb0..07662c8 100644 --- a/schemas/documents/registry/homePage.js +++ b/schemas/documents/registry/homePage.js @@ -16,6 +16,13 @@ export default { title: 'Hero Section', validation: Rule => Rule.required(), }, + { + name: 'gettingStartedResourcesSection', + type: 'reference', + to: [{ type: 'gettingStartedResourcesSection' }], + title: 'Resources for Getting Started Section', + validation: Rule => Rule.required(), + }, { name: 'bottomBanner', type: 'bottomBanner', diff --git a/schemas/documents/registry/projectPage.js b/schemas/documents/registry/projectPage.js new file mode 100644 index 0000000..15c6d4e --- /dev/null +++ b/schemas/documents/registry/projectPage.js @@ -0,0 +1,16 @@ +export default { + name: 'projectPage', + type: 'document', + title: 'Project Page', + __experimental_actions: ['update', /*'create', 'delete', */ 'publish'], + fields: [ + { + name: 'gettingStartedResourcesSection', + description: 'This content will appear on all project pages', + type: 'reference', + to: [{ type: 'gettingStartedResourcesSection' }], + title: 'Resources for Getting Started Section', + validation: Rule => Rule.required(), + }, + ], +}; diff --git a/schemas/documents/registry/projectsPage.js b/schemas/documents/registry/projectsPage.js new file mode 100644 index 0000000..2a25f11 --- /dev/null +++ b/schemas/documents/registry/projectsPage.js @@ -0,0 +1,15 @@ +export default { + name: 'projectsPage', + type: 'document', + title: 'Projects Page', + __experimental_actions: ['update', /*'create', 'delete', */ 'publish'], + fields: [ + { + name: 'gettingStartedResourcesSection', + type: 'reference', + to: [{ type: 'gettingStartedResourcesSection' }], + title: 'Resources for Getting Started Section', + validation: Rule => Rule.required(), + }, + ], +}; diff --git a/schemas/documents/shared/gettingStartedResourcesCard.js b/schemas/documents/shared/gettingStartedResourcesCard.js new file mode 100644 index 0000000..6a4e63d --- /dev/null +++ b/schemas/documents/shared/gettingStartedResourcesCard.js @@ -0,0 +1,43 @@ +export default { + title: 'Resources for Getting Started Card', + name: 'gettingStartedResourcesCard', + type: 'document', + fields: [ + { + title: 'Header', + name: 'header', + type: 'string', + validation: Rule => Rule.required(), + }, + { + title: 'Description', + name: 'description', + type: 'customPortableText', + validation: Rule => Rule.required(), + }, + { + title: 'Image', + name: 'image', + type: 'customImage', + validation: Rule => Rule.required(), + }, + { + title: 'Mobile Image', + name: 'mobileImage', + type: 'customImage', + validation: Rule => Rule.required(), + }, + { + title: 'Links', + name: 'links', + type: 'array', + description: 'Add a maximum of 3 links', + of: [ + { + type: 'button', + }, + ], + validation: Rule => Rule.required().max(3), + }, + ], +}; diff --git a/schemas/documents/shared/gettingStartedResourcesSection.js b/schemas/documents/shared/gettingStartedResourcesSection.js new file mode 100644 index 0000000..591cee0 --- /dev/null +++ b/schemas/documents/shared/gettingStartedResourcesSection.js @@ -0,0 +1,26 @@ +export default { + title: 'Resources for Getting Started Section', + name: 'gettingStartedResourcesSection', + type: 'document', + fields: [ + { + title: 'Header', + name: 'header', + type: 'string', + validation: Rule => Rule.required(), + }, + { + title: 'Resources cards', + name: 'resourcesCards', + type: 'array', + description: 'Select existing resources for getting started cards from "Shared" content, maximum 4', + of: [ + { + type: 'reference', + to: [{ type: 'gettingStartedResourcesCard' }], + }, + ], + validation: Rule => Rule.required().max(4), + }, + ], +}; diff --git a/schemas/schema.js b/schemas/schema.js index 1c46783..f238a7c 100644 --- a/schemas/schema.js +++ b/schemas/schema.js @@ -16,6 +16,9 @@ import creditClass from './documents/registry/creditClass'; import landStewardsPage from './documents/registry/landStewardsPage'; import buyersPage from './documents/registry/buyersPage'; import mainnetPage from './documents/www/mainnetPage'; +import projectsPage from './documents/registry/projectsPage'; +import projectPage from './documents/registry/projectPage'; +import bridgePage from './documents/registry/bridgePage'; import resource from './documents/shared/resource'; import faq from './documents/shared/faq'; @@ -27,6 +30,8 @@ import ecologicalOutcome from './documents/shared/ecologicalOutcome'; import landManagementPractice from './documents/shared/landManagementPractice'; import tag from './documents/shared/tag'; import featuredSection from './documents/shared/featuredSection'; +import gettingStartedResourcesSection from './documents/shared/gettingStartedResourcesSection'; +import gettingStartedResourcesCard from './documents/shared/gettingStartedResourcesCard'; // Object types import heroSection from './objects/sections/heroSection'; @@ -171,6 +176,7 @@ export default createSchema({ blogSection, bodyGreenTextWithPopover, bottomBanner, + bridgePage, button, buyer, buyersPage, @@ -227,6 +233,8 @@ export default createSchema({ fullStepCardSection, fundCallToAction, fundPage, + gettingStartedResourcesCard, + gettingStartedResourcesSection, heroSection, homeFoldSection, homePage, @@ -271,6 +279,8 @@ export default createSchema({ presskitTeamSection, presskitTimelineItem, presskitTimelineSection, + projectPage, + projectsPage, regenTeamMember, requestType, resource,