umwd-components 0.1.91 → 0.1.93
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/ColumnsSection.js +15 -12
- package/dist/cjs/components/HeroSection.js +1 -1
- package/dist/cjs/components/Page.js +6 -0
- package/dist/cjs/components/PersonaliaSection.js +87 -0
- package/dist/cjs/components/TextImageSection.js +1 -1
- package/dist/esm/components/ColumnsSection.js +16 -13
- package/dist/esm/components/HeroSection.js +1 -1
- package/dist/esm/components/Page.js +6 -0
- package/dist/esm/components/PersonaliaSection.js +85 -0
- package/dist/esm/components/TextImageSection.js +1 -1
- package/package.json +1 -1
- package/src/components/ColumnsSection.tsx +39 -41
- package/src/components/HeroSection.tsx +17 -15
- package/src/components/Page.js +3 -0
- package/src/components/PersonaliaSection.tsx +128 -0
- package/src/components/TextImageSection.tsx +1 -1
- package/src/stories/Page.stories.js +79 -0
|
@@ -18,25 +18,28 @@ function ColumnsSection(_ref) {
|
|
|
18
18
|
column,
|
|
19
19
|
maxWidth
|
|
20
20
|
} = data;
|
|
21
|
+
|
|
22
|
+
// TODO make suitable for multiple column layouts
|
|
23
|
+
|
|
21
24
|
return /*#__PURE__*/React.createElement(material.Container, {
|
|
22
25
|
maxWidth: maxWidth || "lg",
|
|
23
26
|
sx: {
|
|
24
27
|
my: 1
|
|
25
28
|
}
|
|
26
|
-
}, /*#__PURE__*/React.createElement(material.
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
justifyContent: "stretch",
|
|
30
|
-
flexWrap: "wrap",
|
|
31
|
-
sx: {
|
|
32
|
-
width: "100%"
|
|
33
|
-
},
|
|
34
|
-
useFlexGap: true
|
|
29
|
+
}, /*#__PURE__*/React.createElement(material.Grid, {
|
|
30
|
+
container: true,
|
|
31
|
+
spacing: 2
|
|
35
32
|
}, column.map(column => {
|
|
36
33
|
const Icon = getIcon.default(column.icon);
|
|
37
|
-
return /*#__PURE__*/React.createElement(material.
|
|
34
|
+
return /*#__PURE__*/React.createElement(material.Grid, {
|
|
35
|
+
item: true,
|
|
36
|
+
xs: 12,
|
|
37
|
+
md: 6,
|
|
38
|
+
key: column.id
|
|
39
|
+
}, /*#__PURE__*/React.createElement(material.Paper, {
|
|
38
40
|
sx: {
|
|
39
|
-
p: 2
|
|
41
|
+
p: 2,
|
|
42
|
+
height: "100%"
|
|
40
43
|
}
|
|
41
44
|
}, /*#__PURE__*/React.createElement(material.Typography, {
|
|
42
45
|
variant: "h5",
|
|
@@ -59,7 +62,7 @@ function ColumnsSection(_ref) {
|
|
|
59
62
|
variant: "body2",
|
|
60
63
|
color: "text.secondary",
|
|
61
64
|
component: "div"
|
|
62
|
-
}, column.text));
|
|
65
|
+
}, column.text)));
|
|
63
66
|
})));
|
|
64
67
|
}
|
|
65
68
|
|
|
@@ -38,7 +38,7 @@ function HeroSection(_ref) {
|
|
|
38
38
|
overflow: "hidden",
|
|
39
39
|
minHeight: "600px"
|
|
40
40
|
}
|
|
41
|
-
}, /*#__PURE__*/React.createElement(StrapiImage.StrapiImage, {
|
|
41
|
+
}, bgImage && /*#__PURE__*/React.createElement(StrapiImage.StrapiImage, {
|
|
42
42
|
alt: "Background",
|
|
43
43
|
style: {
|
|
44
44
|
position: "absolute",
|
|
@@ -19,6 +19,7 @@ var IconSection = require('./IconSection.js');
|
|
|
19
19
|
var ColumnsSection = require('./ColumnsSection.js');
|
|
20
20
|
var material = require('@mui/material');
|
|
21
21
|
var ContactForm = require('./ContactForm.js');
|
|
22
|
+
var PersonaliaSection = require('./PersonaliaSection.js');
|
|
22
23
|
|
|
23
24
|
function blockRenderer(block) {
|
|
24
25
|
switch (block.__component) {
|
|
@@ -57,6 +58,11 @@ function blockRenderer(block) {
|
|
|
57
58
|
key: block.id,
|
|
58
59
|
data: block
|
|
59
60
|
});
|
|
61
|
+
case "layout.personalia-section":
|
|
62
|
+
return /*#__PURE__*/React.createElement(PersonaliaSection.PersonaliaSection, {
|
|
63
|
+
key: block.id,
|
|
64
|
+
data: block
|
|
65
|
+
});
|
|
60
66
|
default:
|
|
61
67
|
return null;
|
|
62
68
|
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* UMWD-Components
|
|
3
|
+
* @copyright Jelle Paulus
|
|
4
|
+
* @license MIT
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
'use strict';
|
|
8
|
+
|
|
9
|
+
var React = require('react');
|
|
10
|
+
var material = require('@mui/material');
|
|
11
|
+
var StrapiImage = require('./StrapiImage.js');
|
|
12
|
+
var Link = require('next/link');
|
|
13
|
+
var iconsMaterial = require('@mui/icons-material');
|
|
14
|
+
|
|
15
|
+
function PersonaliaSection(_ref) {
|
|
16
|
+
let {
|
|
17
|
+
data
|
|
18
|
+
} = _ref;
|
|
19
|
+
const {
|
|
20
|
+
partner,
|
|
21
|
+
maxWidth
|
|
22
|
+
} = data;
|
|
23
|
+
material.useTheme();
|
|
24
|
+
return /*#__PURE__*/React.createElement(material.Container, {
|
|
25
|
+
maxWidth: maxWidth || "lg",
|
|
26
|
+
sx: {
|
|
27
|
+
my: 1
|
|
28
|
+
}
|
|
29
|
+
}, /*#__PURE__*/React.createElement(material.Grid, {
|
|
30
|
+
container: true,
|
|
31
|
+
spacing: 2
|
|
32
|
+
}, partner.map(partner => {
|
|
33
|
+
var _partner$links;
|
|
34
|
+
return /*#__PURE__*/React.createElement(material.Grid, {
|
|
35
|
+
item: true,
|
|
36
|
+
xs: 12,
|
|
37
|
+
md: 6,
|
|
38
|
+
key: partner.id
|
|
39
|
+
}, /*#__PURE__*/React.createElement(material.Paper, {
|
|
40
|
+
sx: {
|
|
41
|
+
p: 2,
|
|
42
|
+
height: "100%"
|
|
43
|
+
}
|
|
44
|
+
}, /*#__PURE__*/React.createElement(material.Grid, {
|
|
45
|
+
container: true
|
|
46
|
+
}, /*#__PURE__*/React.createElement(material.Grid, {
|
|
47
|
+
item: true,
|
|
48
|
+
xs: 9
|
|
49
|
+
}, /*#__PURE__*/React.createElement(material.Typography, {
|
|
50
|
+
variant: "h5",
|
|
51
|
+
sx: {
|
|
52
|
+
mb: 2,
|
|
53
|
+
display: "flex",
|
|
54
|
+
justifyContent: "flex-start",
|
|
55
|
+
alignItems: "center"
|
|
56
|
+
}
|
|
57
|
+
}, partner.name), /*#__PURE__*/React.createElement(material.Typography, {
|
|
58
|
+
variant: "body2",
|
|
59
|
+
color: "text.secondary",
|
|
60
|
+
component: "div"
|
|
61
|
+
}, partner.function), ((_partner$links = partner.links) === null || _partner$links === void 0 ? void 0 : _partner$links.length) > 0 && partner.links.map(link => {
|
|
62
|
+
return (
|
|
63
|
+
/*#__PURE__*/
|
|
64
|
+
// TODO use and create MuiLink Component
|
|
65
|
+
React.createElement(Link, {
|
|
66
|
+
href: link.url,
|
|
67
|
+
key: link.id
|
|
68
|
+
}, link.text)
|
|
69
|
+
);
|
|
70
|
+
}), partner.linkedIn && /*#__PURE__*/React.createElement(material.Typography, null, /*#__PURE__*/React.createElement(material.IconButton, null, /*#__PURE__*/React.createElement(iconsMaterial.LinkedIn, null))), partner.email && /*#__PURE__*/React.createElement(material.Typography, null, partner.email)), /*#__PURE__*/React.createElement(material.Grid, {
|
|
71
|
+
item: true,
|
|
72
|
+
xs: 3
|
|
73
|
+
}, /*#__PURE__*/React.createElement(StrapiImage.StrapiImage, {
|
|
74
|
+
src: partner.photo.url,
|
|
75
|
+
alt: partner.photo.alternativeText,
|
|
76
|
+
width: partner.photo.width,
|
|
77
|
+
height: partner.photo.height,
|
|
78
|
+
style: {
|
|
79
|
+
objectFit: "contain",
|
|
80
|
+
width: "100%",
|
|
81
|
+
height: "100%"
|
|
82
|
+
}
|
|
83
|
+
})))));
|
|
84
|
+
})));
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
exports.PersonaliaSection = PersonaliaSection;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import React__default from 'react';
|
|
8
|
-
import { Container,
|
|
8
|
+
import { Container, Grid, Paper, Typography } from '@mui/material';
|
|
9
9
|
import getIcon from '../lib/getIcon.js';
|
|
10
10
|
|
|
11
11
|
function ColumnsSection(_ref) {
|
|
@@ -16,25 +16,28 @@ function ColumnsSection(_ref) {
|
|
|
16
16
|
column,
|
|
17
17
|
maxWidth
|
|
18
18
|
} = data;
|
|
19
|
+
|
|
20
|
+
// TODO make suitable for multiple column layouts
|
|
21
|
+
|
|
19
22
|
return /*#__PURE__*/React__default.createElement(Container, {
|
|
20
23
|
maxWidth: maxWidth || "lg",
|
|
21
24
|
sx: {
|
|
22
25
|
my: 1
|
|
23
26
|
}
|
|
24
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
justifyContent: "stretch",
|
|
28
|
-
flexWrap: "wrap",
|
|
29
|
-
sx: {
|
|
30
|
-
width: "100%"
|
|
31
|
-
},
|
|
32
|
-
useFlexGap: true
|
|
27
|
+
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
28
|
+
container: true,
|
|
29
|
+
spacing: 2
|
|
33
30
|
}, column.map(column => {
|
|
34
31
|
const Icon = getIcon(column.icon);
|
|
35
|
-
return /*#__PURE__*/React__default.createElement(
|
|
32
|
+
return /*#__PURE__*/React__default.createElement(Grid, {
|
|
33
|
+
item: true,
|
|
34
|
+
xs: 12,
|
|
35
|
+
md: 6,
|
|
36
|
+
key: column.id
|
|
37
|
+
}, /*#__PURE__*/React__default.createElement(Paper, {
|
|
36
38
|
sx: {
|
|
37
|
-
p: 2
|
|
39
|
+
p: 2,
|
|
40
|
+
height: "100%"
|
|
38
41
|
}
|
|
39
42
|
}, /*#__PURE__*/React__default.createElement(Typography, {
|
|
40
43
|
variant: "h5",
|
|
@@ -57,7 +60,7 @@ function ColumnsSection(_ref) {
|
|
|
57
60
|
variant: "body2",
|
|
58
61
|
color: "text.secondary",
|
|
59
62
|
component: "div"
|
|
60
|
-
}, column.text));
|
|
63
|
+
}, column.text)));
|
|
61
64
|
})));
|
|
62
65
|
}
|
|
63
66
|
|
|
@@ -36,7 +36,7 @@ function HeroSection(_ref) {
|
|
|
36
36
|
overflow: "hidden",
|
|
37
37
|
minHeight: "600px"
|
|
38
38
|
}
|
|
39
|
-
}, /*#__PURE__*/React__default.createElement(StrapiImage, {
|
|
39
|
+
}, bgImage && /*#__PURE__*/React__default.createElement(StrapiImage, {
|
|
40
40
|
alt: "Background",
|
|
41
41
|
style: {
|
|
42
42
|
position: "absolute",
|
|
@@ -15,6 +15,7 @@ import { IconSection } from './IconSection.js';
|
|
|
15
15
|
import { ColumnsSection } from './ColumnsSection.js';
|
|
16
16
|
import { Box } from '@mui/material';
|
|
17
17
|
import ContactForm from './ContactForm.js';
|
|
18
|
+
import { PersonaliaSection } from './PersonaliaSection.js';
|
|
18
19
|
|
|
19
20
|
function blockRenderer(block) {
|
|
20
21
|
switch (block.__component) {
|
|
@@ -53,6 +54,11 @@ function blockRenderer(block) {
|
|
|
53
54
|
key: block.id,
|
|
54
55
|
data: block
|
|
55
56
|
});
|
|
57
|
+
case "layout.personalia-section":
|
|
58
|
+
return /*#__PURE__*/React__default.createElement(PersonaliaSection, {
|
|
59
|
+
key: block.id,
|
|
60
|
+
data: block
|
|
61
|
+
});
|
|
56
62
|
default:
|
|
57
63
|
return null;
|
|
58
64
|
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* UMWD-Components
|
|
3
|
+
* @copyright Jelle Paulus
|
|
4
|
+
* @license MIT
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import React__default from 'react';
|
|
8
|
+
import { useTheme, Container, Grid, Paper, Typography, IconButton } from '@mui/material';
|
|
9
|
+
import { StrapiImage } from './StrapiImage.js';
|
|
10
|
+
import Link from 'next/link';
|
|
11
|
+
import { LinkedIn } from '@mui/icons-material';
|
|
12
|
+
|
|
13
|
+
function PersonaliaSection(_ref) {
|
|
14
|
+
let {
|
|
15
|
+
data
|
|
16
|
+
} = _ref;
|
|
17
|
+
const {
|
|
18
|
+
partner,
|
|
19
|
+
maxWidth
|
|
20
|
+
} = data;
|
|
21
|
+
useTheme();
|
|
22
|
+
return /*#__PURE__*/React__default.createElement(Container, {
|
|
23
|
+
maxWidth: maxWidth || "lg",
|
|
24
|
+
sx: {
|
|
25
|
+
my: 1
|
|
26
|
+
}
|
|
27
|
+
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
28
|
+
container: true,
|
|
29
|
+
spacing: 2
|
|
30
|
+
}, partner.map(partner => {
|
|
31
|
+
var _partner$links;
|
|
32
|
+
return /*#__PURE__*/React__default.createElement(Grid, {
|
|
33
|
+
item: true,
|
|
34
|
+
xs: 12,
|
|
35
|
+
md: 6,
|
|
36
|
+
key: partner.id
|
|
37
|
+
}, /*#__PURE__*/React__default.createElement(Paper, {
|
|
38
|
+
sx: {
|
|
39
|
+
p: 2,
|
|
40
|
+
height: "100%"
|
|
41
|
+
}
|
|
42
|
+
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
43
|
+
container: true
|
|
44
|
+
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
45
|
+
item: true,
|
|
46
|
+
xs: 9
|
|
47
|
+
}, /*#__PURE__*/React__default.createElement(Typography, {
|
|
48
|
+
variant: "h5",
|
|
49
|
+
sx: {
|
|
50
|
+
mb: 2,
|
|
51
|
+
display: "flex",
|
|
52
|
+
justifyContent: "flex-start",
|
|
53
|
+
alignItems: "center"
|
|
54
|
+
}
|
|
55
|
+
}, partner.name), /*#__PURE__*/React__default.createElement(Typography, {
|
|
56
|
+
variant: "body2",
|
|
57
|
+
color: "text.secondary",
|
|
58
|
+
component: "div"
|
|
59
|
+
}, partner.function), ((_partner$links = partner.links) === null || _partner$links === void 0 ? void 0 : _partner$links.length) > 0 && partner.links.map(link => {
|
|
60
|
+
return (
|
|
61
|
+
/*#__PURE__*/
|
|
62
|
+
// TODO use and create MuiLink Component
|
|
63
|
+
React__default.createElement(Link, {
|
|
64
|
+
href: link.url,
|
|
65
|
+
key: link.id
|
|
66
|
+
}, link.text)
|
|
67
|
+
);
|
|
68
|
+
}), partner.linkedIn && /*#__PURE__*/React__default.createElement(Typography, null, /*#__PURE__*/React__default.createElement(IconButton, null, /*#__PURE__*/React__default.createElement(LinkedIn, null))), partner.email && /*#__PURE__*/React__default.createElement(Typography, null, partner.email)), /*#__PURE__*/React__default.createElement(Grid, {
|
|
69
|
+
item: true,
|
|
70
|
+
xs: 3
|
|
71
|
+
}, /*#__PURE__*/React__default.createElement(StrapiImage, {
|
|
72
|
+
src: partner.photo.url,
|
|
73
|
+
alt: partner.photo.alternativeText,
|
|
74
|
+
width: partner.photo.width,
|
|
75
|
+
height: partner.photo.height,
|
|
76
|
+
style: {
|
|
77
|
+
objectFit: "contain",
|
|
78
|
+
width: "100%",
|
|
79
|
+
height: "100%"
|
|
80
|
+
}
|
|
81
|
+
})))));
|
|
82
|
+
})));
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export { PersonaliaSection };
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import {
|
|
3
3
|
Stack,
|
|
4
|
+
Grid,
|
|
4
5
|
Card,
|
|
5
6
|
CardContent,
|
|
6
7
|
Typography,
|
|
@@ -34,54 +35,51 @@ export function ColumnsSection({
|
|
|
34
35
|
}) {
|
|
35
36
|
const { column, maxWidth } = data;
|
|
36
37
|
|
|
38
|
+
// TODO make suitable for multiple column layouts
|
|
39
|
+
|
|
37
40
|
return (
|
|
38
41
|
<Container maxWidth={maxWidth || "lg"} sx={{ my: 1 }}>
|
|
39
|
-
<
|
|
40
|
-
spacing={2}
|
|
41
|
-
direction="row"
|
|
42
|
-
justifyContent="stretch"
|
|
43
|
-
flexWrap="wrap"
|
|
44
|
-
sx={{ width: "100%" }}
|
|
45
|
-
useFlexGap={true}
|
|
46
|
-
>
|
|
42
|
+
<Grid container spacing={2}>
|
|
47
43
|
{column.map((column) => {
|
|
48
44
|
const Icon = getIcon(column.icon) as React.ElementType | null;
|
|
49
45
|
return (
|
|
50
|
-
<
|
|
51
|
-
<
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
46
|
+
<Grid item xs={12} md={6} key={column.id}>
|
|
47
|
+
<Paper sx={{ p: 2, height: "100%" }}>
|
|
48
|
+
<Typography
|
|
49
|
+
variant="h5"
|
|
50
|
+
sx={{
|
|
51
|
+
mb: 2,
|
|
52
|
+
display: "flex",
|
|
53
|
+
justifyContent: "flex-start",
|
|
54
|
+
alignItems: "center",
|
|
55
|
+
}}
|
|
56
|
+
>
|
|
57
|
+
{Icon !== null && (
|
|
58
|
+
<Icon
|
|
59
|
+
sx={{
|
|
60
|
+
mr: 2,
|
|
61
|
+
mt: 0.2,
|
|
62
|
+
width: "50px",
|
|
63
|
+
height: "50px",
|
|
64
|
+
fill: "currentColor",
|
|
65
|
+
stroke: "none",
|
|
66
|
+
}}
|
|
67
|
+
/>
|
|
68
|
+
)}
|
|
69
|
+
{column.heading}
|
|
70
|
+
</Typography>
|
|
71
|
+
<Typography
|
|
72
|
+
variant="body2"
|
|
73
|
+
color="text.secondary"
|
|
74
|
+
component="div"
|
|
75
|
+
>
|
|
76
|
+
{column.text}
|
|
77
|
+
</Typography>
|
|
78
|
+
</Paper>
|
|
79
|
+
</Grid>
|
|
82
80
|
);
|
|
83
81
|
})}
|
|
84
|
-
</
|
|
82
|
+
</Grid>
|
|
85
83
|
</Container>
|
|
86
84
|
);
|
|
87
85
|
}
|
|
@@ -24,8 +24,8 @@ interface HeroSectionProps {
|
|
|
24
24
|
__component: string;
|
|
25
25
|
heading: string;
|
|
26
26
|
subHeading: string;
|
|
27
|
-
bgImage
|
|
28
|
-
logoImage
|
|
27
|
+
bgImage?: ImageProps;
|
|
28
|
+
logoImage?: ImageProps;
|
|
29
29
|
link: LinkProps;
|
|
30
30
|
};
|
|
31
31
|
}
|
|
@@ -46,19 +46,21 @@ export function HeroSection({ data }: Readonly<HeroSectionProps>) {
|
|
|
46
46
|
minHeight: "600px",
|
|
47
47
|
}}
|
|
48
48
|
>
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
49
|
+
{bgImage && (
|
|
50
|
+
<StrapiImage
|
|
51
|
+
alt="Background"
|
|
52
|
+
style={{
|
|
53
|
+
position: "absolute",
|
|
54
|
+
inset: 0,
|
|
55
|
+
objectFit: "cover",
|
|
56
|
+
width: "100%",
|
|
57
|
+
height: "100%",
|
|
58
|
+
}}
|
|
59
|
+
height={1080}
|
|
60
|
+
src={bgImage.url}
|
|
61
|
+
width={1920}
|
|
62
|
+
/>
|
|
63
|
+
)}
|
|
62
64
|
<Stack
|
|
63
65
|
spacing={2}
|
|
64
66
|
alignItems="center"
|
package/src/components/Page.js
CHANGED
|
@@ -10,6 +10,7 @@ import { IconSection } from "./IconSection.tsx";
|
|
|
10
10
|
import { ColumnsSection } from "./ColumnsSection.tsx";
|
|
11
11
|
import { Box } from "@mui/material";
|
|
12
12
|
import ContactForm from "./ContactForm.tsx";
|
|
13
|
+
import { PersonaliaSection } from "./PersonaliaSection.tsx";
|
|
13
14
|
|
|
14
15
|
function blockRenderer(block) {
|
|
15
16
|
switch (block.__component) {
|
|
@@ -27,6 +28,8 @@ function blockRenderer(block) {
|
|
|
27
28
|
return <FleetSection key={block.id} data={block} />;
|
|
28
29
|
case "layout.columns-section":
|
|
29
30
|
return <ColumnsSection key={block.id} data={block} />;
|
|
31
|
+
case "layout.personalia-section":
|
|
32
|
+
return <PersonaliaSection key={block.id} data={block} />;
|
|
30
33
|
|
|
31
34
|
default:
|
|
32
35
|
return null;
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import {
|
|
3
|
+
Paper,
|
|
4
|
+
Typography,
|
|
5
|
+
Container,
|
|
6
|
+
Grid,
|
|
7
|
+
useTheme,
|
|
8
|
+
IconButton,
|
|
9
|
+
} from "@mui/material";
|
|
10
|
+
import getIcon from "../lib/getIcon.ts";
|
|
11
|
+
import { StrapiImage } from "./StrapiImage.tsx";
|
|
12
|
+
import Link from "next/link";
|
|
13
|
+
import { LinkedIn } from "@mui/icons-material";
|
|
14
|
+
|
|
15
|
+
type MaxWidth = "xs" | "sm" | "md" | "lg" | "xl" | false | undefined;
|
|
16
|
+
|
|
17
|
+
interface ImageProps {
|
|
18
|
+
id: number;
|
|
19
|
+
url: string;
|
|
20
|
+
alternativeText: string;
|
|
21
|
+
style: React.CSSProperties;
|
|
22
|
+
width: number;
|
|
23
|
+
height: number;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
interface LinkProps {
|
|
27
|
+
id: number;
|
|
28
|
+
url: string;
|
|
29
|
+
text: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
interface PartnerProps {
|
|
33
|
+
id: number;
|
|
34
|
+
name: string;
|
|
35
|
+
function: string;
|
|
36
|
+
text: string;
|
|
37
|
+
photo: ImageProps;
|
|
38
|
+
email: string;
|
|
39
|
+
phone: string;
|
|
40
|
+
links: LinkProps[];
|
|
41
|
+
linkedIn: string;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
interface PersonaliaSectionProps {
|
|
45
|
+
id: number;
|
|
46
|
+
__component: string;
|
|
47
|
+
title: string;
|
|
48
|
+
description: string;
|
|
49
|
+
partner: PartnerProps[];
|
|
50
|
+
maxWidth: MaxWidth;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function PersonaliaSection({
|
|
54
|
+
data,
|
|
55
|
+
}: {
|
|
56
|
+
readonly data: PersonaliaSectionProps;
|
|
57
|
+
}) {
|
|
58
|
+
const { partner, maxWidth } = data;
|
|
59
|
+
|
|
60
|
+
const theme = useTheme();
|
|
61
|
+
|
|
62
|
+
return (
|
|
63
|
+
<Container maxWidth={maxWidth || "lg"} sx={{ my: 1 }}>
|
|
64
|
+
<Grid container spacing={2}>
|
|
65
|
+
{partner.map((partner) => {
|
|
66
|
+
return (
|
|
67
|
+
<Grid item xs={12} md={6} key={partner.id}>
|
|
68
|
+
<Paper sx={{ p: 2, height: "100%" }}>
|
|
69
|
+
<Grid container>
|
|
70
|
+
<Grid item xs={9}>
|
|
71
|
+
<Typography
|
|
72
|
+
variant="h5"
|
|
73
|
+
sx={{
|
|
74
|
+
mb: 2,
|
|
75
|
+
display: "flex",
|
|
76
|
+
justifyContent: "flex-start",
|
|
77
|
+
alignItems: "center",
|
|
78
|
+
}}
|
|
79
|
+
>
|
|
80
|
+
{partner.name}
|
|
81
|
+
</Typography>
|
|
82
|
+
<Typography
|
|
83
|
+
variant="body2"
|
|
84
|
+
color="text.secondary"
|
|
85
|
+
component="div"
|
|
86
|
+
>
|
|
87
|
+
{partner.function}
|
|
88
|
+
</Typography>
|
|
89
|
+
{partner.links?.length > 0 &&
|
|
90
|
+
partner.links.map((link) => {
|
|
91
|
+
return (
|
|
92
|
+
// TODO use and create MuiLink Component
|
|
93
|
+
<Link href={link.url} key={link.id}>
|
|
94
|
+
{link.text}
|
|
95
|
+
</Link>
|
|
96
|
+
);
|
|
97
|
+
})}
|
|
98
|
+
{partner.linkedIn && (
|
|
99
|
+
<Typography>
|
|
100
|
+
<IconButton>
|
|
101
|
+
<LinkedIn />
|
|
102
|
+
</IconButton>
|
|
103
|
+
</Typography>
|
|
104
|
+
)}
|
|
105
|
+
{partner.email && <Typography>{partner.email}</Typography>}
|
|
106
|
+
</Grid>
|
|
107
|
+
<Grid item xs={3}>
|
|
108
|
+
<StrapiImage
|
|
109
|
+
src={partner.photo.url}
|
|
110
|
+
alt={partner.photo.alternativeText}
|
|
111
|
+
width={partner.photo.width}
|
|
112
|
+
height={partner.photo.height}
|
|
113
|
+
style={{
|
|
114
|
+
objectFit: "contain",
|
|
115
|
+
width: "100%",
|
|
116
|
+
height: "100%",
|
|
117
|
+
}}
|
|
118
|
+
/>
|
|
119
|
+
</Grid>
|
|
120
|
+
</Grid>
|
|
121
|
+
</Paper>
|
|
122
|
+
</Grid>
|
|
123
|
+
);
|
|
124
|
+
})}
|
|
125
|
+
</Grid>
|
|
126
|
+
</Container>
|
|
127
|
+
);
|
|
128
|
+
}
|
|
@@ -51,7 +51,7 @@ function TextImageSection({ data }: Readonly<TextImageSectionProps>) {
|
|
|
51
51
|
const theme = useTheme();
|
|
52
52
|
|
|
53
53
|
return (
|
|
54
|
-
<Container maxWidth={maxWidth
|
|
54
|
+
<Container maxWidth={maxWidth ? maxWidth : "lg"} sx={{ my: 1 }}>
|
|
55
55
|
<Paper sx={{ p: 2 }}>
|
|
56
56
|
{title && (
|
|
57
57
|
<Typography variant="h1" textAlign="center" sx={{ pb: 2 }}>
|
|
@@ -235,6 +235,85 @@ AMH.args = {
|
|
|
235
235
|
},
|
|
236
236
|
],
|
|
237
237
|
},
|
|
238
|
+
{
|
|
239
|
+
id: 1,
|
|
240
|
+
__component: "layout.personalia-section",
|
|
241
|
+
title: "Personalia",
|
|
242
|
+
description: "Description or text for personalia component",
|
|
243
|
+
partner: [
|
|
244
|
+
{
|
|
245
|
+
id: 1,
|
|
246
|
+
name: "Brenda Groen",
|
|
247
|
+
function: "Medical Director",
|
|
248
|
+
/*
|
|
249
|
+
TODO Figure out a parsing function for this
|
|
250
|
+
"text": [
|
|
251
|
+
{
|
|
252
|
+
"type": "paragraph",
|
|
253
|
+
"children": [
|
|
254
|
+
{
|
|
255
|
+
"type": "text",
|
|
256
|
+
"text": "Founding partner of the company. Medically trained as an Emergency Medicine doctor in the Netherlands. Has worked in the field of medical repatriation since 2015. "
|
|
257
|
+
}
|
|
258
|
+
]
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
"type": "paragraph",
|
|
262
|
+
"children": [
|
|
263
|
+
{
|
|
264
|
+
"type": "text",
|
|
265
|
+
"text": "Aviation medicine has its own complexity and challenges where all my knowledge as an Emergency Physician and also my personal experience in escorting patients safely back home, just blends perfectly together. Thus ensuring the highest level of medical care is provided by overseeing every transport our team will deliver."
|
|
266
|
+
}
|
|
267
|
+
]
|
|
268
|
+
}
|
|
269
|
+
], */
|
|
270
|
+
email: "b.groen@aeromedicalholland.com",
|
|
271
|
+
phone: null,
|
|
272
|
+
linkedIn: "https://nl.linkedin.com/in/brenda-groen",
|
|
273
|
+
photo: {
|
|
274
|
+
id: 3,
|
|
275
|
+
alternativeText: null,
|
|
276
|
+
width: 820,
|
|
277
|
+
height: 860,
|
|
278
|
+
url: "/uploads/woman_in_circle_icon_8fc0f463c8.png",
|
|
279
|
+
},
|
|
280
|
+
links: [
|
|
281
|
+
{
|
|
282
|
+
id: 3,
|
|
283
|
+
url: "https://zoeken.bigregister.nl/zorgverlener/e77b403b-9800-48c0-a722-79d111ec0dc1",
|
|
284
|
+
text: "Registered at Dutch Ministry of Health, Welfare and Sport. ",
|
|
285
|
+
isExternal: true,
|
|
286
|
+
},
|
|
287
|
+
],
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
id: 2,
|
|
291
|
+
name: "Harald Speek",
|
|
292
|
+
function: "Managing Director",
|
|
293
|
+
/* "text": [
|
|
294
|
+
{
|
|
295
|
+
"type": "paragraph",
|
|
296
|
+
"children": [
|
|
297
|
+
{
|
|
298
|
+
"type": "text",
|
|
299
|
+
"text": "Founding partner of the company. Medically trained as an Emergency Medicine nurse in the Netherlands. Has worked in the field of medical repatriation since ??."
|
|
300
|
+
}
|
|
301
|
+
]
|
|
302
|
+
}
|
|
303
|
+
], */
|
|
304
|
+
email: "h.speek@aeromedicalholland.com",
|
|
305
|
+
phone: null,
|
|
306
|
+
linkedIn: null,
|
|
307
|
+
photo: {
|
|
308
|
+
id: 4,
|
|
309
|
+
alternativeText: null,
|
|
310
|
+
width: 1024,
|
|
311
|
+
height: 1024,
|
|
312
|
+
url: "/uploads/man_in_circle_icon_6c77b6d3e4.png",
|
|
313
|
+
},
|
|
314
|
+
},
|
|
315
|
+
],
|
|
316
|
+
},
|
|
238
317
|
{
|
|
239
318
|
id: 1,
|
|
240
319
|
__component: "layout.fleet-section",
|