Skip to content

Commit

Permalink
feat: add getting started resources to homepage, project pages, all p…
Browse files Browse the repository at this point in the history
…rojects page and bridge page (#22)

* feat: add gettingStartedResourcesCard and gettingStartedResourcesSection documents

* feat: add projects and project pages

* feat: add bridgePage

* chore: update image fields

* chore: use customImage
  • Loading branch information
blushi authored Nov 29, 2022
1 parent fdb0463 commit 1693c92
Show file tree
Hide file tree
Showing 8 changed files with 156 additions and 3 deletions.
26 changes: 23 additions & 3 deletions deskStructure.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,33 @@ 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()
.title('Land Stewards Page')
.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')
Expand Down Expand Up @@ -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')),
]),
),
]);
Expand Down
16 changes: 16 additions & 0 deletions schemas/documents/registry/bridgePage.js
Original file line number Diff line number Diff line change
@@ -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(),
},
],
};
7 changes: 7 additions & 0 deletions schemas/documents/registry/homePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
16 changes: 16 additions & 0 deletions schemas/documents/registry/projectPage.js
Original file line number Diff line number Diff line change
@@ -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(),
},
],
};
15 changes: 15 additions & 0 deletions schemas/documents/registry/projectsPage.js
Original file line number Diff line number Diff line change
@@ -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(),
},
],
};
43 changes: 43 additions & 0 deletions schemas/documents/shared/gettingStartedResourcesCard.js
Original file line number Diff line number Diff line change
@@ -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),
},
],
};
26 changes: 26 additions & 0 deletions schemas/documents/shared/gettingStartedResourcesSection.js
Original file line number Diff line number Diff line change
@@ -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),
},
],
};
10 changes: 10 additions & 0 deletions schemas/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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';
Expand Down Expand Up @@ -171,6 +176,7 @@ export default createSchema({
blogSection,
bodyGreenTextWithPopover,
bottomBanner,
bridgePage,
button,
buyer,
buyersPage,
Expand Down Expand Up @@ -227,6 +233,8 @@ export default createSchema({
fullStepCardSection,
fundCallToAction,
fundPage,
gettingStartedResourcesCard,
gettingStartedResourcesSection,
heroSection,
homeFoldSection,
homePage,
Expand Down Expand Up @@ -271,6 +279,8 @@ export default createSchema({
presskitTeamSection,
presskitTimelineItem,
presskitTimelineSection,
projectPage,
projectsPage,
regenTeamMember,
requestType,
resource,
Expand Down

0 comments on commit 1693c92

Please sign in to comment.