Skip to content

Commit

Permalink
feat: move buyers page www (#47)
Browse files Browse the repository at this point in the history
* feat: add new fields to project document

* feat: add area and area unit

* chore: move buyers page to www

* fix: put list into options field
  • Loading branch information
flagrede authored Aug 23, 2023
1 parent 5f475ba commit 9e834ae
Show file tree
Hide file tree
Showing 7 changed files with 68 additions and 12 deletions.
12 changes: 8 additions & 4 deletions deskStructure.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ export default S =>
.title('Home')
.schemaType('homePage')
.child(S.document().schemaType('homePage')),
S.listItem()
.title('Buyers Page')
.schemaType('buyersPage')
.child(S.document().schemaType('buyersPage')),
S.listItem()
.title('Create Credit Class Page')
.schemaType('createCreditClassPage')
Expand Down Expand Up @@ -82,6 +78,10 @@ export default S =>
.title('Home Page')
.schemaType('homePageWeb')
.child(S.document().schemaType('homePageWeb')),
S.listItem()
.title('Buyers Page')
.schemaType('buyersPage')
.child(S.document().schemaType('buyersPage')),
S.listItem()
.title('Developers Page')
.schemaType('developersPage')
Expand Down Expand Up @@ -299,6 +299,10 @@ export default S =>
.title('Person')
.schemaType('person')
.child(S.documentTypeList('person').title('Person')),
S.listItem()
.title('Program')
.schemaType('program')
.child(S.documentTypeList('program').title('Program')),
]),
),
]);
6 changes: 6 additions & 0 deletions schemas/documents/registry/creditClass.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,5 +104,11 @@ export default {
name: 'icon',
type: 'image',
},
{
title: 'Program',
name: 'program',
type: 'reference',
to: [{ type: 'program' }],
},
],
};
5 changes: 0 additions & 5 deletions schemas/documents/shared/featuredProjectCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@ export default {
name: 'featuredProjectCard',
type: 'document',
fields: [
{
title: 'Name',
name: 'name',
type: 'string',
},
{
title: 'Project',
name: 'project',
Expand Down
25 changes: 25 additions & 0 deletions schemas/documents/shared/program.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
export default {
name: 'program',
title: 'Program',
type: 'document',
fields: [
{
title: 'Name',
name: 'name',
type: 'string',
validation: Rule => Rule.required(),
},
{
title: 'Link',
name: 'link',
type: 'string',
validation: Rule => Rule.required(),
},
{
title: 'Image',
name: 'image',
type: 'image',
validation: Rule => Rule.required(),
},
],
};
28 changes: 26 additions & 2 deletions schemas/documents/shared/project.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ export default {
title: 'Project name',
name: 'projectName',
type: 'string',
description:
'optional project name to make it easier to track projects already added to the list',
validation: Rule => Rule.required(),
},
{
title: 'Project id',
Expand All @@ -17,6 +16,31 @@ export default {
description: 'on-chain project id',
validation: Rule => Rule.required(),
},
{
title: 'Project Image',
name: 'image',
type: 'customImage',
validation: Rule => Rule.required(),
},
{
title: 'Project Location',
name: 'location',
type: 'string',
validation: Rule => Rule.required(),
},
{
title: 'Area',
name: 'area',
type: 'number',
},
{
title: 'Area unit',
name: 'areaUnit',
type: 'string',
options: {
list: ['hectares', 'acres'],
},
},
{
title: 'Credibility Cards',
name: 'credibilityCards',
Expand Down
File renamed without changes.
4 changes: 3 additions & 1 deletion schemas/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import methodology from './documents/registry/methodology';
import creditClass from './documents/registry/creditClass';
import creditClassPage from './documents/registry/creditClassPage';
import landStewardsPage from './documents/registry/landStewardsPage';
import buyersPage from './documents/registry/buyersPage';
import buyersPage from './documents/www/buyersPage';
import mainnetPage from './documents/www/mainnetPage';
import projectsPage from './documents/registry/projectsPage';
import projectPage from './documents/registry/projectPage';
Expand Down Expand Up @@ -45,6 +45,7 @@ import statCard from './documents/shared/statCard';
import claim from './documents/shared/claim';
import credibilityCard from './documents/shared/credibilityCard';
import person from './documents/shared/person';
import program from './documents/shared/program';

// Object types
import heroSection from './objects/sections/heroSection';
Expand Down Expand Up @@ -310,6 +311,7 @@ export default [
partnerLogo,
partnersPage,
person,
program,
practicesOutcomesSection,
presskitAwardsSection,
presskitFeaturedSection,
Expand Down

0 comments on commit 9e834ae

Please sign in to comment.