diff --git a/apps/codeforafrica/public/images/cms/blocks/our_mission.jpg b/apps/codeforafrica/public/images/cms/blocks/our_mission.jpg new file mode 100644 index 000000000..e6b4fc1b0 Binary files /dev/null and b/apps/codeforafrica/public/images/cms/blocks/our_mission.jpg differ diff --git a/apps/codeforafrica/src/components/OurMission/OurMission.js b/apps/codeforafrica/src/components/OurMission/OurMission.js index e4ca70d79..78da91361 100644 --- a/apps/codeforafrica/src/components/OurMission/OurMission.js +++ b/apps/codeforafrica/src/components/OurMission/OurMission.js @@ -2,7 +2,7 @@ import { Section } from "@commons-ui/core"; import { RichTypography } from "@commons-ui/next"; import React from "react"; -import CMSContent from "@/codeforafrica/components/CMSContent"; +import RichText from "@/codeforafrica/components/RichText"; const OurMission = React.forwardRef(function OurMission(props, ref) { const { description, subtitle, sx, title } = props; @@ -11,47 +11,39 @@ const OurMission = React.forwardRef(function OurMission(props, ref) { return null; } return ( - -
- - {title} - - - {subtitle} - - - {description} - -
- + + {title} + + - {description} - -
+ {subtitle} + + ({ + mb: "30px", + "& h2": { + typography: { xs: "h4", md: "h2" }, + }, + "& p,& a, & li": { + typography: { xs: "body1", md: "subheading" }, + mb: 2, + }, + "& a": { + textDecorationColor: theme.palette.primary.main, + }, + })} + /> + ); }); diff --git a/apps/codeforafrica/src/components/OurMission/OurMission.snap.js b/apps/codeforafrica/src/components/OurMission/OurMission.snap.js index 98a364054..ca34550cb 100644 --- a/apps/codeforafrica/src/components/OurMission/OurMission.snap.js +++ b/apps/codeforafrica/src/components/OurMission/OurMission.snap.js @@ -3,16 +3,212 @@ exports[` renders unchanged 1`] = `
Our mission
+
+ Our mission subtitle +
+
+

+ CfA builds digital democracy solutions that give citizens unfettered access to actionable information that empowers them to make informed decisions, which strengthens civic engagement for improved public governance and accountability. This includes building infrastructures like the continent’s largest open data portals at  + + openAFRICA + +  and  + + sourceAFRICA + + . CfA incubates initiatives as diverse as the  + + africanDRONE + +  network, the  + + PesaCheck + +  fact-checking initiative and the  + + sensors.AFRICA + +  air quality sensor network. +

+

+ CfA manages the  + + African Network of Centres for Investigative Reporting + +  (ANCIR), which gives the continent’s top muckraking newsrooms the best possible  + + forensic data tools + + ,  + + digital security + +  and  + + whistleblower encryption + +  to help improve their ability to tackle crooked politicians, organised crime and predatory big business. CfA runs  + + academy.AFRICA + + , one of the continent’s largest  + + skills development + +  initiatives for digital journalists, and seed funds cross-border collaboration. CfA’s research and analysis programme  + + CivicSignal + +  offers actionable insights to help navigate Africa’s media ecosystem and emerging civic technology sector using machine learning tools and ‘big data’ resources. +

+

+ CfA is non-partisan and does not support or oppose any political party or candidate. We do not undertake any advocacy work either for ourselves or on behalf of others. +

+

+ CfA is registered as a non-profit organisation in South Africa, registration number 168–092, and in Kenya with registration number CPR/2016/220101. +

+

+ + Partnering for excellence + +

+

+ Collaborations and partnerships are at the heart of our work. To build digital democracies, we partner with organisations aligned with CfA values, acting as a catalyst for new initiatives and strengthening the local ecosystem by investing in and working through these partnerships. +

+

+ + Guiding Principles + +

+

+ CfA shares a covenant with the rest of the  + + Code for All + +  federation, based on the following guiding principles: +

+
    +
  1. + We show what’s possible. CfA seeks to be a catalyst by lowering the political risk of experimentation through creating successful proofs of concept for liberating civic data, for building enabling technologies and for pioneering sustainable revenue models. The organisation also endeavours to lower the financial costs for technology experimentation by creating and managing ‘shared’ backbone civic technology, and availing resources for rapid innovation. +
  2. +
  3. + We empower citizens. Empowering citizens is central to CfA’s theory of change. Strong democracies rely on engaged citizens who have actionable information and easy-to-use channels for making their will known. CfA works primarily with citizen organisations and civic watchdogs, including the media and also supports government and social enterprises in developing their capacity to respond meaningfully to citizens and to collaborate effectively with them. +
  4. +
  5. + We are action-oriented. African societies are asymmetric: the balance of power rests with governments and corporate institutions, at the expense of citizens who are treated as passive recipients of consultation or services. CfA seeks to change this by focusing on actionable data and action-oriented tools that give agency to citizens. +
  6. +
  7. + We operate in public. CfA promotes openness in our operations and in the work of our partners. All digital tools utilised are open source, and the organisation’s information is open data. CfA actively encourages documentation, sharing and collaboration, in addition to reuse of our own tools, programmes and processes, as well as those of our partners. +
  8. +
  9. + We help build ecosystems. CfA actively marshals resources to support the growth of a pan-African ecosystem of civic technologists. Whenever possible, this means reusing existing tools, standards and platforms, encouraging integration and extension. CfA operates as a pan-African federation of organisations who are active members of a global community, leveraging each other’s knowledge and resources. +
  10. +
+
-
`; diff --git a/apps/codeforafrica/src/components/OurMission/OurMission.test.js b/apps/codeforafrica/src/components/OurMission/OurMission.test.js index 50472b70e..37942ad65 100644 --- a/apps/codeforafrica/src/components/OurMission/OurMission.test.js +++ b/apps/codeforafrica/src/components/OurMission/OurMission.test.js @@ -8,9 +8,340 @@ import theme from "@/codeforafrica/theme"; // eslint-disable-next-line testing-library/render-result-naming-convention const render = createRender({ theme }); +const defaultProps = { + title: "Our mission", + subtitle: "Our mission subtitle", + description: [ + { + children: [ + { + text: "CfA builds digital democracy solutions that give citizens unfettered access to actionable information that empowers them to make informed decisions, which strengthens civic engagement for improved public governance and accountability. This includes building infrastructures like the continent’s largest open data portals at ", + children: null, + }, + { + type: "link", + newTab: false, + url: "https://openafrica.net/", + children: [ + { + text: "openAFRICA", + children: null, + }, + ], + href: "https://openafrica.net/", + }, + { + text: " and ", + children: null, + }, + { + type: "link", + newTab: false, + url: "https://sourceafrica.net/", + children: [ + { + text: "sourceAFRICA", + children: null, + }, + ], + href: "https://sourceafrica.net/", + }, + { + text: ". CfA incubates initiatives as diverse as the ", + children: null, + }, + { + type: "link", + newTab: false, + url: "https://africandrone.org/", + children: [ + { + text: "africanDRONE", + children: null, + }, + ], + href: "https://africandrone.org/", + }, + { + text: " network, the ", + children: null, + }, + { + type: "link", + newTab: false, + url: "https://pesacheck.org/", + children: [ + { + text: "PesaCheck", + children: null, + }, + ], + href: "https://pesacheck.org/", + }, + { + text: " fact-checking initiative and the ", + children: null, + }, + { + type: "link", + newTab: false, + url: "https://sensors.africa/", + children: [ + { + text: "sensors.AFRICA", + children: null, + }, + ], + href: "https://sensors.africa/", + }, + { + text: " air quality sensor network.", + children: null, + }, + ], + }, + { + children: [ + { + text: "CfA manages the ", + children: null, + }, + { + type: "link", + newTab: false, + url: "https://investigate.africa/", + children: [ + { + text: "African Network of Centres for Investigative Reporting", + children: null, + }, + ], + href: "https://investigate.africa/", + }, + { + text: " (ANCIR), which gives the continent’s top muckraking newsrooms the best possible ", + children: null, + }, + { + type: "link", + newTab: false, + url: "https://data.investigate.africa/", + children: [ + { + text: "forensic data tools", + children: null, + }, + ], + href: "https://data.investigate.africa/", + }, + { + text: ", ", + children: null, + }, + { + type: "link", + newTab: false, + url: "https://getoutline.org/", + children: [ + { + text: "digital security", + children: null, + }, + ], + href: "https://getoutline.org/", + }, + { + text: " and ", + children: null, + }, + { + type: "link", + newTab: false, + url: "https://afrileaks.org/", + children: [ + { + text: "whistleblower encryption", + children: null, + }, + ], + href: "https://afrileaks.org/", + }, + { + text: " to help improve their ability to tackle crooked politicians, organised crime and predatory big business. CfA runs ", + children: null, + }, + { + type: "link", + newTab: false, + url: "https://academy.africa/", + children: [ + { + text: "academy.AFRICA", + children: null, + }, + ], + href: "https://academy.africa/", + }, + { + text: ", one of the continent’s largest ", + children: null, + }, + { + type: "link", + newTab: false, + url: "https://courses.academy.africa/", + children: [ + { + text: "skills development", + children: null, + }, + ], + href: "https://courses.academy.africa/", + }, + { + text: " initiatives for digital journalists, and seed funds cross-border collaboration. CfA’s research and analysis programme ", + children: null, + }, + { + type: "link", + newTab: false, + url: "https://civicsignal.africa/#/home", + children: [ + { + text: "CivicSignal", + children: null, + }, + ], + href: "https://civicsignal.africa/#/home", + }, + { + text: " offers actionable insights to help navigate Africa’s media ecosystem and emerging civic technology sector using machine learning tools and ‘big data’ resources.", + children: null, + }, + ], + }, + { + children: [ + { + text: "CfA is non-partisan and does not support or oppose any political party or candidate. We do not undertake any advocacy work either for ourselves or on behalf of others.", + children: null, + }, + ], + }, + { + children: [ + { + text: "CfA is registered as a non-profit organisation in South Africa, registration number 168–092, and in Kenya with registration number CPR/2016/220101.", + children: null, + }, + ], + }, + { + children: [ + { + text: "Partnering for excellence", + bold: true, + children: null, + }, + ], + }, + { + children: [ + { + text: "Collaborations and partnerships are at the heart of our work. To build digital democracies, we partner with organisations aligned with CfA values, acting as a catalyst for new initiatives and strengthening the local ecosystem by investing in and working through these partnerships.", + children: null, + }, + ], + }, + { + children: [ + { + text: "Guiding Principles", + bold: true, + children: null, + }, + ], + }, + { + children: [ + { + text: "CfA shares a covenant with the rest of the ", + children: null, + }, + { + type: "link", + newTab: false, + url: "https://codeforall.org/", + children: [ + { + text: "Code for All", + children: null, + }, + ], + href: "https://codeforall.org/", + }, + { + text: " federation, based on the following guiding principles:", + children: null, + }, + ], + }, + { + type: "ol", + children: [ + { + type: "li", + children: [ + { + text: "We show what’s possible. CfA seeks to be a catalyst by lowering the political risk of experimentation through creating successful proofs of concept for liberating civic data, for building enabling technologies and for pioneering sustainable revenue models. The organisation also endeavours to lower the financial costs for technology experimentation by creating and managing ‘shared’ backbone civic technology, and availing resources for rapid innovation.", + children: null, + }, + ], + }, + { + type: "li", + children: [ + { + text: "We empower citizens. Empowering citizens is central to CfA’s theory of change. Strong democracies rely on engaged citizens who have actionable information and easy-to-use channels for making their will known. CfA works primarily with citizen organisations and civic watchdogs, including the media and also supports government and social enterprises in developing their capacity to respond meaningfully to citizens and to collaborate effectively with them.", + children: null, + }, + ], + }, + { + type: "li", + children: [ + { + text: "We are action-oriented. African societies are asymmetric: the balance of power rests with governments and corporate institutions, at the expense of citizens who are treated as passive recipients of consultation or services. CfA seeks to change this by focusing on actionable data and action-oriented tools that give agency to citizens.", + children: null, + }, + ], + }, + { + type: "li", + children: [ + { + text: "We operate in public. CfA promotes openness in our operations and in the work of our partners. All digital tools utilised are open source, and the organisation’s information is open data. CfA actively encourages documentation, sharing and collaboration, in addition to reuse of our own tools, programmes and processes, as well as those of our partners.", + children: null, + }, + ], + }, + { + type: "li", + children: [ + { + text: "We help build ecosystems. CfA actively marshals resources to support the growth of a pan-African ecosystem of civic technologists. Whenever possible, this means reusing existing tools, standards and platforms, encouraging integration and extension. CfA operates as a pan-African federation of organisations who are active members of a global community, leveraging each other’s knowledge and resources.", + children: null, + }, + ], + }, + ], + }, + ], +}; + describe("", () => { it("renders unchanged", () => { - const { container } = render(); + const { container } = render(); expect(container).toMatchSnapshot(); }); }); diff --git a/apps/codeforafrica/src/pages/[...slugs].page.js b/apps/codeforafrica/src/pages/[...slugs].page.js index a9b772ec2..afb4037e0 100644 --- a/apps/codeforafrica/src/pages/[...slugs].page.js +++ b/apps/codeforafrica/src/pages/[...slugs].page.js @@ -14,6 +14,7 @@ import JoinOurSlack from "@/codeforafrica/components/JoinOurSlack"; import MeetOurTeam from "@/codeforafrica/components/MeetOurTeam"; import NewsAndStories from "@/codeforafrica/components/NewsAndStories"; import OurImpact from "@/codeforafrica/components/OurImpact"; +import OurMission from "@/codeforafrica/components/OurMission"; import OurPartners from "@/codeforafrica/components/OurPartners"; import OurTeam from "@/codeforafrica/components/OurTeam"; import PageHeader from "@/codeforafrica/components/PageHeader"; @@ -32,6 +33,7 @@ const componentsBySlugs = { "news-stories": NewsAndStories, "our-guiding-principles": GuidingPrinciplesCardList, "our-impact": OurImpact, + "our-mission": OurMission, "our-partners": OurPartners, "page-header": PageHeader, "our-team": OurTeam, diff --git a/apps/codeforafrica/src/payload/blocks/OurMission.js b/apps/codeforafrica/src/payload/blocks/OurMission.js new file mode 100644 index 000000000..3fbf1dbdf --- /dev/null +++ b/apps/codeforafrica/src/payload/blocks/OurMission.js @@ -0,0 +1,42 @@ +import richText from "../fields/richText"; + +const OurMission = { + slug: "our-mission", + imageURL: "/images/cms/blocks/our_mission.jpg", + imageAltText: "Show Mission Statement", + fields: [ + { + name: "title", + label: "Title", + type: "text", + required: true, + }, + { + name: "subtitle", + label: "Subtitle", + type: "text", + required: true, + }, + richText({ + name: "description", + label: "Description", + required: true, + admin: { + elements: [ + "h1", + "h2", + "h3", + "h4", + "h5", + "h6", + "link", + "ol", + "ul", + "indent", + ], + }, + }), + ], +}; + +export default OurMission; diff --git a/apps/codeforafrica/src/payload/collections/Pages.js b/apps/codeforafrica/src/payload/collections/Pages.js index 2aef30212..66ef89251 100644 --- a/apps/codeforafrica/src/payload/collections/Pages.js +++ b/apps/codeforafrica/src/payload/collections/Pages.js @@ -8,6 +8,7 @@ import Hero from "../blocks/Hero"; import JoinOurSlack from "../blocks/JoinOurSlack"; import MeetOurTeam from "../blocks/MeetOurTeam"; import OurImpact from "../blocks/OurImpact"; +import OurMission from "../blocks/OurMission"; import OurPartners from "../blocks/OurPartners"; import OurTeam from "../blocks/OurTeam"; import PageHeader from "../blocks/PageHeader"; @@ -58,6 +59,7 @@ const Pages = { PageHeader, CustomPageHeader, OurImpact, + OurMission, OurPartners, OurTeam, Stories,