diff --git a/backend/src/api/boardmember/content-types/boardmember/schema.json b/backend/src/api/boardmember/content-types/boardmember/schema.json new file mode 100644 index 0000000..9e34a3d --- /dev/null +++ b/backend/src/api/boardmember/content-types/boardmember/schema.json @@ -0,0 +1,42 @@ +{ + "kind": "collectionType", + "collectionName": "boardmembers", + "info": { + "singularName": "boardmember", + "pluralName": "boardmembers", + "displayName": "Bestuurslid", + "description": "" + }, + "options": { + "draftAndPublish": true + }, + "pluginOptions": {}, + "attributes": { + "name": { + "type": "string", + "required": true + }, + "role": { + "type": "string", + "required": false + }, + "email": { + "type": "email", + "required": false + }, + "extra": { + "type": "richtext" + }, + "photo": { + "type": "media", + "multiple": false, + "required": false, + "allowedTypes": ["images"] + }, + "order": { + "type": "integer", + "required": true, + "default": 10 + } + } +} diff --git a/backend/src/api/boardmember/controllers/boardmember.js b/backend/src/api/boardmember/controllers/boardmember.js new file mode 100644 index 0000000..ea4bb3d --- /dev/null +++ b/backend/src/api/boardmember/controllers/boardmember.js @@ -0,0 +1,9 @@ +"use strict"; + +/** + * boardmember controller + */ + +const { createCoreController } = require("@strapi/strapi").factories; + +module.exports = createCoreController("api::boardmember.boardmember"); diff --git a/backend/src/api/boardmember/routes/boardmember.js b/backend/src/api/boardmember/routes/boardmember.js new file mode 100644 index 0000000..7b54663 --- /dev/null +++ b/backend/src/api/boardmember/routes/boardmember.js @@ -0,0 +1,9 @@ +"use strict"; + +/** + * boardmember router + */ + +const { createCoreRouter } = require("@strapi/strapi").factories; + +module.exports = createCoreRouter("api::boardmember.boardmember"); diff --git a/backend/src/api/boardmember/services/boardmember.js b/backend/src/api/boardmember/services/boardmember.js new file mode 100644 index 0000000..9be9e7a --- /dev/null +++ b/backend/src/api/boardmember/services/boardmember.js @@ -0,0 +1,9 @@ +"use strict"; + +/** + * boardmember service + */ + +const { createCoreService } = require("@strapi/strapi").factories; + +module.exports = createCoreService("api::boardmember.boardmember"); diff --git a/frontend/src/components/BoardmemberCard.tsx b/frontend/src/components/BoardmemberCard.tsx new file mode 100644 index 0000000..453ef50 --- /dev/null +++ b/frontend/src/components/BoardmemberCard.tsx @@ -0,0 +1,54 @@ +import Image from "next/image"; +import imageLoader from "../utils/image-loader"; +import { Boardmember } from "../models/Boardmember"; +import Subheader from "./Subheader"; +import { IconContext } from "react-icons"; +import { FaEnvelope, FaPhone } from "react-icons/fa"; +import Markdown from "./Markdown"; + +interface Props { + boardmember: Boardmember; +} + +export default function BoardmemberCard(props: Props) { + const boardmember = props.boardmember; + return ( +
{boardmember.role}
+ +