-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #600 from CodeForAfrica/feature/guiding-principles…
…-cfa Add Guiding Principles
- Loading branch information
Showing
9 changed files
with
92 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
apps/codeforafrica/src/payload/blocks/GuidingPrinciples.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
const GuidingPrinciples = { | ||
slug: "our-guiding-principles", | ||
imageURL: "/images/cms/blocks/guiding_principles.png", | ||
imageAltText: "Guiding Principles", | ||
fields: [ | ||
{ | ||
name: "title", | ||
label: { | ||
en: "Title", | ||
}, | ||
type: "text", | ||
localized: true, | ||
required: true, | ||
}, | ||
{ | ||
name: "list", | ||
label: { | ||
en: "Guiding Principles", | ||
}, | ||
type: "relationship", | ||
relationTo: "guiding-principles", | ||
hasMany: true, | ||
admin: { | ||
isSortable: true, | ||
}, | ||
}, | ||
], | ||
}; | ||
|
||
export default GuidingPrinciples; |
34 changes: 34 additions & 0 deletions
34
apps/codeforafrica/src/payload/collections/GuidingPrinciples.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import image from "../fields/image"; | ||
import richText from "../fields/richText"; | ||
|
||
const GuidingPrinciples = { | ||
slug: "guiding-principles", | ||
admin: { | ||
useAsTitle: "title", | ||
}, | ||
fields: [ | ||
{ | ||
name: "title", | ||
label: { | ||
en: "Title", | ||
}, | ||
type: "text", | ||
required: true, | ||
}, | ||
image({ | ||
overrides: { | ||
name: "icon", | ||
required: true, | ||
}, | ||
}), | ||
richText({ | ||
name: "description", | ||
label: { | ||
en: "Description", | ||
}, | ||
required: true, | ||
}), | ||
], | ||
}; | ||
|
||
export default GuidingPrinciples; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters