umwd-components 0.1.74 → 0.1.76
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/FleetSection.js +136 -0
- package/dist/cjs/components/IconSection.js +2 -2
- package/dist/cjs/components/Page.js +6 -0
- package/dist/cjs/components/TextImageSection.js +13 -0
- package/dist/esm/components/FleetSection.js +134 -0
- package/dist/esm/components/IconSection.js +2 -2
- package/dist/esm/components/Page.js +6 -0
- package/dist/esm/components/TextImageSection.js +13 -0
- package/package.json +1 -1
- package/src/components/FleetSection.tsx +180 -0
- package/src/components/IconSection.tsx +1 -1
- package/src/components/Page.js +3 -0
- package/src/components/TextImageSection.tsx +12 -0
- package/src/stories/Page.stories.js +46 -0
|
@@ -0,0 +1,136 @@
|
|
|
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 RadarIcon = require('@mui/icons-material/Radar');
|
|
13
|
+
var SpeedIcon = require('@mui/icons-material/Speed');
|
|
14
|
+
var HeightIcon = require('@mui/icons-material/Height');
|
|
15
|
+
|
|
16
|
+
function FleetSection(_ref) {
|
|
17
|
+
let {
|
|
18
|
+
data
|
|
19
|
+
} = _ref;
|
|
20
|
+
const {
|
|
21
|
+
airplane
|
|
22
|
+
} = data;
|
|
23
|
+
return /*#__PURE__*/React.createElement(material.Container, {
|
|
24
|
+
maxWidth: "lg",
|
|
25
|
+
sx: {
|
|
26
|
+
my: 1
|
|
27
|
+
}
|
|
28
|
+
}, /*#__PURE__*/React.createElement(material.Stack, {
|
|
29
|
+
spacing: 2,
|
|
30
|
+
direction: "row",
|
|
31
|
+
justifyContent: "stretch",
|
|
32
|
+
flexWrap: "wrap",
|
|
33
|
+
sx: {
|
|
34
|
+
width: "100%"
|
|
35
|
+
},
|
|
36
|
+
useFlexGap: true
|
|
37
|
+
}, airplane.map(airplane => /*#__PURE__*/React.createElement(material.Card, {
|
|
38
|
+
key: airplane.id,
|
|
39
|
+
sx: {
|
|
40
|
+
display: "flex",
|
|
41
|
+
flexDirection: "column",
|
|
42
|
+
justifyContent: "space-between",
|
|
43
|
+
flex: 1,
|
|
44
|
+
minWidth: "350px"
|
|
45
|
+
}
|
|
46
|
+
}, /*#__PURE__*/React.createElement(material.CardHeader, {
|
|
47
|
+
title: airplane.name,
|
|
48
|
+
subheader: airplane.description
|
|
49
|
+
}), /*#__PURE__*/React.createElement(material.CardMedia, {
|
|
50
|
+
sx: {
|
|
51
|
+
p: 1
|
|
52
|
+
}
|
|
53
|
+
}, /*#__PURE__*/React.createElement(material.Paper, {
|
|
54
|
+
sx: {
|
|
55
|
+
p: 1,
|
|
56
|
+
py: 2,
|
|
57
|
+
height: "250px",
|
|
58
|
+
position: "relative",
|
|
59
|
+
display: "grid",
|
|
60
|
+
alignItems: "center",
|
|
61
|
+
justifyContent: "center"
|
|
62
|
+
},
|
|
63
|
+
variant: "outlined"
|
|
64
|
+
}, airplane.floorplan !== null && /*#__PURE__*/React.createElement(StrapiImage.StrapiImage, {
|
|
65
|
+
src: airplane.floorplan.url,
|
|
66
|
+
alt: airplane.floorplan.alternativeText,
|
|
67
|
+
width: airplane.floorplan.width,
|
|
68
|
+
height: airplane.floorplan.height,
|
|
69
|
+
style: {}
|
|
70
|
+
}), /*#__PURE__*/React.createElement(material.Box, {
|
|
71
|
+
sx: {
|
|
72
|
+
position: "absolute",
|
|
73
|
+
right: "1rem",
|
|
74
|
+
bottom: "1rem"
|
|
75
|
+
}
|
|
76
|
+
}, /*#__PURE__*/React.createElement(material.Typography, {
|
|
77
|
+
variant: "body2",
|
|
78
|
+
color: "text.secondary",
|
|
79
|
+
align: "right"
|
|
80
|
+
}, /*#__PURE__*/React.createElement("strong", null, "Cabin Dimensions:"), " ", /*#__PURE__*/React.createElement("strong", null, "H"), " ", airplane.cabinHeight, " m ", /*#__PURE__*/React.createElement("strong", null, "W"), " ", airplane.cabinWidth, " m ", /*#__PURE__*/React.createElement("strong", null, "L"), " ", airplane.cabinLength, " m")))), /*#__PURE__*/React.createElement(material.CardContent, null, /*#__PURE__*/React.createElement(material.Stack, {
|
|
81
|
+
direction: "row",
|
|
82
|
+
spacing: 1
|
|
83
|
+
}, /*#__PURE__*/React.createElement(material.Chip, {
|
|
84
|
+
label: "Range: ".concat(airplane.range, " km"),
|
|
85
|
+
variant: "filled",
|
|
86
|
+
color: "primary",
|
|
87
|
+
icon: /*#__PURE__*/React.createElement(RadarIcon, null)
|
|
88
|
+
}), /*#__PURE__*/React.createElement(material.Chip, {
|
|
89
|
+
label: "Speed: ".concat(airplane.speed, " km/h"),
|
|
90
|
+
variant: "filled",
|
|
91
|
+
color: "primary",
|
|
92
|
+
icon: /*#__PURE__*/React.createElement(SpeedIcon, null)
|
|
93
|
+
}), /*#__PURE__*/React.createElement(material.Chip, {
|
|
94
|
+
label: "Ceiling: ".concat(airplane.ceiling, " ft"),
|
|
95
|
+
variant: "filled",
|
|
96
|
+
color: "primary",
|
|
97
|
+
icon: /*#__PURE__*/React.createElement(HeightIcon, null)
|
|
98
|
+
})))))));
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/*
|
|
102
|
+
{
|
|
103
|
+
id: 1,
|
|
104
|
+
__component: "layout.fleet-section",
|
|
105
|
+
title: "Fleet",
|
|
106
|
+
description: "Description of our fleet",
|
|
107
|
+
airplane: [
|
|
108
|
+
{
|
|
109
|
+
id: 1,
|
|
110
|
+
name: "CHALLENGER 604",
|
|
111
|
+
description:
|
|
112
|
+
"Bombardier Challenger 604. Is our best long-range jet and can be equipped with an intensive care unit for one critical care patient or the option to carry 2 stable patients. ",
|
|
113
|
+
range: "7408",
|
|
114
|
+
speed: "854",
|
|
115
|
+
ceiling: "41000",
|
|
116
|
+
cabinHeight: 1.83,
|
|
117
|
+
cabinWidth: 2.11,
|
|
118
|
+
cabinLength: 8.66,
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
id: 2,
|
|
122
|
+
name: "BEECHCRAFT KING AIR 200",
|
|
123
|
+
description:
|
|
124
|
+
"A twin turboprop aircraft with pressurized cabin. Is our best air ambulance for Europe and North Africa. It is equipped with a single stretcher for one stable ICU patient.",
|
|
125
|
+
range: "2200",
|
|
126
|
+
speed: "500",
|
|
127
|
+
ceiling: "35000",
|
|
128
|
+
cabinHeight: 1.46,
|
|
129
|
+
cabinWidth: 1.37,
|
|
130
|
+
cabinLength: 5.08,
|
|
131
|
+
},
|
|
132
|
+
],
|
|
133
|
+
},
|
|
134
|
+
*/
|
|
135
|
+
|
|
136
|
+
exports.FleetSection = FleetSection;
|
|
@@ -114,8 +114,8 @@ function IconSection(_ref) {
|
|
|
114
114
|
}
|
|
115
115
|
}, Icon !== null && /*#__PURE__*/React.createElement(Icon, {
|
|
116
116
|
sx: {
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
mr: 2,
|
|
118
|
+
mt: 0.2
|
|
119
119
|
}
|
|
120
120
|
}), icon.title), /*#__PURE__*/React.createElement(material.Typography, {
|
|
121
121
|
variant: "caption",
|
|
@@ -14,6 +14,7 @@ var PropTypes = require('prop-types');
|
|
|
14
14
|
var TextImageSection = require('./TextImageSection.js');
|
|
15
15
|
var HeroSection = require('./HeroSection.js');
|
|
16
16
|
var FeaturesSection = require('./FeaturesSection.js');
|
|
17
|
+
var FleetSection = require('./FleetSection.js');
|
|
17
18
|
var IconSection = require('./IconSection.js');
|
|
18
19
|
var material = require('@mui/material');
|
|
19
20
|
var ContactForm = require('./ContactForm.js');
|
|
@@ -45,6 +46,11 @@ function blockRenderer(block) {
|
|
|
45
46
|
key: block.id,
|
|
46
47
|
data: block
|
|
47
48
|
});
|
|
49
|
+
case "layout.fleet-section":
|
|
50
|
+
return /*#__PURE__*/React.createElement(FleetSection.FleetSection, {
|
|
51
|
+
key: block.id,
|
|
52
|
+
data: block
|
|
53
|
+
});
|
|
48
54
|
default:
|
|
49
55
|
return null;
|
|
50
56
|
}
|
|
@@ -14,6 +14,19 @@ var material = require('@mui/material');
|
|
|
14
14
|
var StrapiImage = require('./StrapiImage.js');
|
|
15
15
|
|
|
16
16
|
const MuiMarkdown = /*#__PURE__*/React.lazy(() => import( /* webpackChunkName: "mui-markdown" */'mui-markdown'));
|
|
17
|
+
|
|
18
|
+
/*
|
|
19
|
+
TODO intregrate this interface into StrapiImage.tsx
|
|
20
|
+
|
|
21
|
+
interface ImageProps {
|
|
22
|
+
id: number;
|
|
23
|
+
url: string;
|
|
24
|
+
alternativeText: string;
|
|
25
|
+
style: React.CSSProperties;
|
|
26
|
+
width: number;
|
|
27
|
+
height: number;
|
|
28
|
+
} */
|
|
29
|
+
|
|
17
30
|
function TextImageSection(_ref) {
|
|
18
31
|
let {
|
|
19
32
|
data
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* UMWD-Components
|
|
3
|
+
* @copyright Jelle Paulus
|
|
4
|
+
* @license MIT
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import { Container, Stack, Card, CardHeader, CardMedia, Paper, Box, Typography, CardContent, Chip } from '@mui/material';
|
|
9
|
+
import { StrapiImage } from './StrapiImage.js';
|
|
10
|
+
import RadarIcon from '@mui/icons-material/Radar';
|
|
11
|
+
import SpeedIcon from '@mui/icons-material/Speed';
|
|
12
|
+
import HeightIcon from '@mui/icons-material/Height';
|
|
13
|
+
|
|
14
|
+
function FleetSection(_ref) {
|
|
15
|
+
let {
|
|
16
|
+
data
|
|
17
|
+
} = _ref;
|
|
18
|
+
const {
|
|
19
|
+
airplane
|
|
20
|
+
} = data;
|
|
21
|
+
return /*#__PURE__*/React.createElement(Container, {
|
|
22
|
+
maxWidth: "lg",
|
|
23
|
+
sx: {
|
|
24
|
+
my: 1
|
|
25
|
+
}
|
|
26
|
+
}, /*#__PURE__*/React.createElement(Stack, {
|
|
27
|
+
spacing: 2,
|
|
28
|
+
direction: "row",
|
|
29
|
+
justifyContent: "stretch",
|
|
30
|
+
flexWrap: "wrap",
|
|
31
|
+
sx: {
|
|
32
|
+
width: "100%"
|
|
33
|
+
},
|
|
34
|
+
useFlexGap: true
|
|
35
|
+
}, airplane.map(airplane => /*#__PURE__*/React.createElement(Card, {
|
|
36
|
+
key: airplane.id,
|
|
37
|
+
sx: {
|
|
38
|
+
display: "flex",
|
|
39
|
+
flexDirection: "column",
|
|
40
|
+
justifyContent: "space-between",
|
|
41
|
+
flex: 1,
|
|
42
|
+
minWidth: "350px"
|
|
43
|
+
}
|
|
44
|
+
}, /*#__PURE__*/React.createElement(CardHeader, {
|
|
45
|
+
title: airplane.name,
|
|
46
|
+
subheader: airplane.description
|
|
47
|
+
}), /*#__PURE__*/React.createElement(CardMedia, {
|
|
48
|
+
sx: {
|
|
49
|
+
p: 1
|
|
50
|
+
}
|
|
51
|
+
}, /*#__PURE__*/React.createElement(Paper, {
|
|
52
|
+
sx: {
|
|
53
|
+
p: 1,
|
|
54
|
+
py: 2,
|
|
55
|
+
height: "250px",
|
|
56
|
+
position: "relative",
|
|
57
|
+
display: "grid",
|
|
58
|
+
alignItems: "center",
|
|
59
|
+
justifyContent: "center"
|
|
60
|
+
},
|
|
61
|
+
variant: "outlined"
|
|
62
|
+
}, airplane.floorplan !== null && /*#__PURE__*/React.createElement(StrapiImage, {
|
|
63
|
+
src: airplane.floorplan.url,
|
|
64
|
+
alt: airplane.floorplan.alternativeText,
|
|
65
|
+
width: airplane.floorplan.width,
|
|
66
|
+
height: airplane.floorplan.height,
|
|
67
|
+
style: {}
|
|
68
|
+
}), /*#__PURE__*/React.createElement(Box, {
|
|
69
|
+
sx: {
|
|
70
|
+
position: "absolute",
|
|
71
|
+
right: "1rem",
|
|
72
|
+
bottom: "1rem"
|
|
73
|
+
}
|
|
74
|
+
}, /*#__PURE__*/React.createElement(Typography, {
|
|
75
|
+
variant: "body2",
|
|
76
|
+
color: "text.secondary",
|
|
77
|
+
align: "right"
|
|
78
|
+
}, /*#__PURE__*/React.createElement("strong", null, "Cabin Dimensions:"), " ", /*#__PURE__*/React.createElement("strong", null, "H"), " ", airplane.cabinHeight, " m ", /*#__PURE__*/React.createElement("strong", null, "W"), " ", airplane.cabinWidth, " m ", /*#__PURE__*/React.createElement("strong", null, "L"), " ", airplane.cabinLength, " m")))), /*#__PURE__*/React.createElement(CardContent, null, /*#__PURE__*/React.createElement(Stack, {
|
|
79
|
+
direction: "row",
|
|
80
|
+
spacing: 1
|
|
81
|
+
}, /*#__PURE__*/React.createElement(Chip, {
|
|
82
|
+
label: "Range: ".concat(airplane.range, " km"),
|
|
83
|
+
variant: "filled",
|
|
84
|
+
color: "primary",
|
|
85
|
+
icon: /*#__PURE__*/React.createElement(RadarIcon, null)
|
|
86
|
+
}), /*#__PURE__*/React.createElement(Chip, {
|
|
87
|
+
label: "Speed: ".concat(airplane.speed, " km/h"),
|
|
88
|
+
variant: "filled",
|
|
89
|
+
color: "primary",
|
|
90
|
+
icon: /*#__PURE__*/React.createElement(SpeedIcon, null)
|
|
91
|
+
}), /*#__PURE__*/React.createElement(Chip, {
|
|
92
|
+
label: "Ceiling: ".concat(airplane.ceiling, " ft"),
|
|
93
|
+
variant: "filled",
|
|
94
|
+
color: "primary",
|
|
95
|
+
icon: /*#__PURE__*/React.createElement(HeightIcon, null)
|
|
96
|
+
})))))));
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/*
|
|
100
|
+
{
|
|
101
|
+
id: 1,
|
|
102
|
+
__component: "layout.fleet-section",
|
|
103
|
+
title: "Fleet",
|
|
104
|
+
description: "Description of our fleet",
|
|
105
|
+
airplane: [
|
|
106
|
+
{
|
|
107
|
+
id: 1,
|
|
108
|
+
name: "CHALLENGER 604",
|
|
109
|
+
description:
|
|
110
|
+
"Bombardier Challenger 604. Is our best long-range jet and can be equipped with an intensive care unit for one critical care patient or the option to carry 2 stable patients. ",
|
|
111
|
+
range: "7408",
|
|
112
|
+
speed: "854",
|
|
113
|
+
ceiling: "41000",
|
|
114
|
+
cabinHeight: 1.83,
|
|
115
|
+
cabinWidth: 2.11,
|
|
116
|
+
cabinLength: 8.66,
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
id: 2,
|
|
120
|
+
name: "BEECHCRAFT KING AIR 200",
|
|
121
|
+
description:
|
|
122
|
+
"A twin turboprop aircraft with pressurized cabin. Is our best air ambulance for Europe and North Africa. It is equipped with a single stretcher for one stable ICU patient.",
|
|
123
|
+
range: "2200",
|
|
124
|
+
speed: "500",
|
|
125
|
+
ceiling: "35000",
|
|
126
|
+
cabinHeight: 1.46,
|
|
127
|
+
cabinWidth: 1.37,
|
|
128
|
+
cabinLength: 5.08,
|
|
129
|
+
},
|
|
130
|
+
],
|
|
131
|
+
},
|
|
132
|
+
*/
|
|
133
|
+
|
|
134
|
+
export { FleetSection };
|
|
@@ -112,8 +112,8 @@ function IconSection(_ref) {
|
|
|
112
112
|
}
|
|
113
113
|
}, Icon !== null && /*#__PURE__*/React.createElement(Icon, {
|
|
114
114
|
sx: {
|
|
115
|
-
|
|
116
|
-
|
|
115
|
+
mr: 2,
|
|
116
|
+
mt: 0.2
|
|
117
117
|
}
|
|
118
118
|
}), icon.title), /*#__PURE__*/React.createElement(Typography, {
|
|
119
119
|
variant: "caption",
|
|
@@ -10,6 +10,7 @@ import PropTypes from 'prop-types';
|
|
|
10
10
|
import TextImageSection from './TextImageSection.js';
|
|
11
11
|
import { HeroSection } from './HeroSection.js';
|
|
12
12
|
import { FeatureSection } from './FeaturesSection.js';
|
|
13
|
+
import { FleetSection } from './FleetSection.js';
|
|
13
14
|
import { IconSection } from './IconSection.js';
|
|
14
15
|
import { Box } from '@mui/material';
|
|
15
16
|
import ContactForm from './ContactForm.js';
|
|
@@ -41,6 +42,11 @@ function blockRenderer(block) {
|
|
|
41
42
|
key: block.id,
|
|
42
43
|
data: block
|
|
43
44
|
});
|
|
45
|
+
case "layout.fleet-section":
|
|
46
|
+
return /*#__PURE__*/React.createElement(FleetSection, {
|
|
47
|
+
key: block.id,
|
|
48
|
+
data: block
|
|
49
|
+
});
|
|
44
50
|
default:
|
|
45
51
|
return null;
|
|
46
52
|
}
|
|
@@ -10,6 +10,19 @@ import { Container, Paper, Typography, Stack, Box } from '@mui/material';
|
|
|
10
10
|
import { StrapiImage } from './StrapiImage.js';
|
|
11
11
|
|
|
12
12
|
const MuiMarkdown = /*#__PURE__*/React.lazy(() => import( /* webpackChunkName: "mui-markdown" */'mui-markdown'));
|
|
13
|
+
|
|
14
|
+
/*
|
|
15
|
+
TODO intregrate this interface into StrapiImage.tsx
|
|
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
|
+
|
|
13
26
|
function TextImageSection(_ref) {
|
|
14
27
|
let {
|
|
15
28
|
data
|
package/package.json
CHANGED
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import {
|
|
3
|
+
Stack,
|
|
4
|
+
Card,
|
|
5
|
+
CardHeader,
|
|
6
|
+
CardContent,
|
|
7
|
+
Typography,
|
|
8
|
+
Container,
|
|
9
|
+
CardMedia,
|
|
10
|
+
Box,
|
|
11
|
+
Chip,
|
|
12
|
+
Paper,
|
|
13
|
+
} from "@mui/material";
|
|
14
|
+
import { StrapiImage } from "./StrapiImage.tsx";
|
|
15
|
+
import RadarIcon from "@mui/icons-material/Radar";
|
|
16
|
+
import SpeedIcon from "@mui/icons-material/Speed";
|
|
17
|
+
import HeightIcon from "@mui/icons-material/Height";
|
|
18
|
+
|
|
19
|
+
interface ImageProps {
|
|
20
|
+
id: number;
|
|
21
|
+
url: string;
|
|
22
|
+
alternativeText: string;
|
|
23
|
+
style: React.CSSProperties;
|
|
24
|
+
width: number;
|
|
25
|
+
height: number;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
interface AirplaneProps {
|
|
29
|
+
id: number;
|
|
30
|
+
name: string;
|
|
31
|
+
description: string;
|
|
32
|
+
range: number;
|
|
33
|
+
speed: number;
|
|
34
|
+
ceiling: number;
|
|
35
|
+
cabinHeight: number;
|
|
36
|
+
cabinWidth: number;
|
|
37
|
+
cabinLength: number;
|
|
38
|
+
floorplan: ImageProps;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
interface FleetSectionProps {
|
|
42
|
+
id: number;
|
|
43
|
+
__component: string;
|
|
44
|
+
title: string;
|
|
45
|
+
description: string;
|
|
46
|
+
airplane: AirplaneProps[];
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function FleetSection({ data }: { readonly data: FleetSectionProps }) {
|
|
50
|
+
const { airplane } = data;
|
|
51
|
+
return (
|
|
52
|
+
<Container maxWidth="lg" sx={{ my: 1 }}>
|
|
53
|
+
<Stack
|
|
54
|
+
spacing={2}
|
|
55
|
+
direction="row"
|
|
56
|
+
justifyContent="stretch"
|
|
57
|
+
flexWrap="wrap"
|
|
58
|
+
sx={{ width: "100%" }}
|
|
59
|
+
useFlexGap={true}
|
|
60
|
+
>
|
|
61
|
+
{airplane.map((airplane) => (
|
|
62
|
+
<Card
|
|
63
|
+
key={airplane.id}
|
|
64
|
+
sx={{
|
|
65
|
+
display: "flex",
|
|
66
|
+
flexDirection: "column",
|
|
67
|
+
justifyContent: "space-between",
|
|
68
|
+
flex: 1,
|
|
69
|
+
minWidth: "350px",
|
|
70
|
+
}}
|
|
71
|
+
>
|
|
72
|
+
<CardHeader
|
|
73
|
+
title={airplane.name}
|
|
74
|
+
subheader={airplane.description}
|
|
75
|
+
/>
|
|
76
|
+
<CardMedia
|
|
77
|
+
sx={{
|
|
78
|
+
p: 1,
|
|
79
|
+
}}
|
|
80
|
+
>
|
|
81
|
+
<Paper
|
|
82
|
+
sx={{
|
|
83
|
+
p: 1,
|
|
84
|
+
py: 2,
|
|
85
|
+
height: "250px",
|
|
86
|
+
position: "relative",
|
|
87
|
+
display: "grid",
|
|
88
|
+
alignItems: "center",
|
|
89
|
+
justifyContent: "center",
|
|
90
|
+
}}
|
|
91
|
+
variant="outlined"
|
|
92
|
+
>
|
|
93
|
+
{airplane.floorplan !== null && (
|
|
94
|
+
<StrapiImage
|
|
95
|
+
src={airplane.floorplan.url}
|
|
96
|
+
alt={airplane.floorplan.alternativeText}
|
|
97
|
+
width={airplane.floorplan.width}
|
|
98
|
+
height={airplane.floorplan.height}
|
|
99
|
+
style={{}}
|
|
100
|
+
/>
|
|
101
|
+
)}
|
|
102
|
+
<Box
|
|
103
|
+
sx={{ position: "absolute", right: "1rem", bottom: "1rem" }}
|
|
104
|
+
>
|
|
105
|
+
<Typography
|
|
106
|
+
variant="body2"
|
|
107
|
+
color="text.secondary"
|
|
108
|
+
align="right"
|
|
109
|
+
>
|
|
110
|
+
<strong>Cabin Dimensions:</strong> <strong>H</strong>{" "}
|
|
111
|
+
{airplane.cabinHeight} m <strong>W</strong>{" "}
|
|
112
|
+
{airplane.cabinWidth} m <strong>L</strong>{" "}
|
|
113
|
+
{airplane.cabinLength} m
|
|
114
|
+
</Typography>
|
|
115
|
+
</Box>
|
|
116
|
+
</Paper>
|
|
117
|
+
</CardMedia>
|
|
118
|
+
<CardContent>
|
|
119
|
+
<Stack direction="row" spacing={1}>
|
|
120
|
+
<Chip
|
|
121
|
+
label={`Range: ${airplane.range} km`}
|
|
122
|
+
variant="filled"
|
|
123
|
+
color="primary"
|
|
124
|
+
icon={<RadarIcon />}
|
|
125
|
+
/>
|
|
126
|
+
<Chip
|
|
127
|
+
label={`Speed: ${airplane.speed} km/h`}
|
|
128
|
+
variant="filled"
|
|
129
|
+
color="primary"
|
|
130
|
+
icon={<SpeedIcon />}
|
|
131
|
+
/>
|
|
132
|
+
<Chip
|
|
133
|
+
label={`Ceiling: ${airplane.ceiling} ft`}
|
|
134
|
+
variant="filled"
|
|
135
|
+
color="primary"
|
|
136
|
+
icon={<HeightIcon />}
|
|
137
|
+
/>
|
|
138
|
+
</Stack>
|
|
139
|
+
</CardContent>
|
|
140
|
+
</Card>
|
|
141
|
+
))}
|
|
142
|
+
</Stack>
|
|
143
|
+
</Container>
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/*
|
|
148
|
+
{
|
|
149
|
+
id: 1,
|
|
150
|
+
__component: "layout.fleet-section",
|
|
151
|
+
title: "Fleet",
|
|
152
|
+
description: "Description of our fleet",
|
|
153
|
+
airplane: [
|
|
154
|
+
{
|
|
155
|
+
id: 1,
|
|
156
|
+
name: "CHALLENGER 604",
|
|
157
|
+
description:
|
|
158
|
+
"Bombardier Challenger 604. Is our best long-range jet and can be equipped with an intensive care unit for one critical care patient or the option to carry 2 stable patients. ",
|
|
159
|
+
range: "7408",
|
|
160
|
+
speed: "854",
|
|
161
|
+
ceiling: "41000",
|
|
162
|
+
cabinHeight: 1.83,
|
|
163
|
+
cabinWidth: 2.11,
|
|
164
|
+
cabinLength: 8.66,
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
id: 2,
|
|
168
|
+
name: "BEECHCRAFT KING AIR 200",
|
|
169
|
+
description:
|
|
170
|
+
"A twin turboprop aircraft with pressurized cabin. Is our best air ambulance for Europe and North Africa. It is equipped with a single stretcher for one stable ICU patient.",
|
|
171
|
+
range: "2200",
|
|
172
|
+
speed: "500",
|
|
173
|
+
ceiling: "35000",
|
|
174
|
+
cabinHeight: 1.46,
|
|
175
|
+
cabinWidth: 1.37,
|
|
176
|
+
cabinLength: 5.08,
|
|
177
|
+
},
|
|
178
|
+
],
|
|
179
|
+
},
|
|
180
|
+
*/
|
|
@@ -121,7 +121,7 @@ export function IconSection({ data }: { readonly data: IconSectionProps }) {
|
|
|
121
121
|
minHeight: "4.2rem",
|
|
122
122
|
}}
|
|
123
123
|
>
|
|
124
|
-
{Icon !== null && <Icon sx={{
|
|
124
|
+
{Icon !== null && <Icon sx={{ mr: 2, mt: 0.2 }} />}
|
|
125
125
|
{icon.title}
|
|
126
126
|
</Typography>
|
|
127
127
|
|
package/src/components/Page.js
CHANGED
|
@@ -5,6 +5,7 @@ import PropTypes from "prop-types";
|
|
|
5
5
|
import TextImageSection from "./TextImageSection.tsx";
|
|
6
6
|
import { HeroSection } from "./HeroSection.tsx";
|
|
7
7
|
import { FeatureSection } from "./FeaturesSection.tsx";
|
|
8
|
+
import { FleetSection } from "./FleetSection.tsx";
|
|
8
9
|
import { IconSection } from "./IconSection.tsx";
|
|
9
10
|
import { Box } from "@mui/material";
|
|
10
11
|
import ContactForm from "./ContactForm.tsx";
|
|
@@ -21,6 +22,8 @@ function blockRenderer(block) {
|
|
|
21
22
|
return <TextImageSection key={block.id} data={block} />;
|
|
22
23
|
case "layout.icon-section":
|
|
23
24
|
return <IconSection key={block.id} data={block} />;
|
|
25
|
+
case "layout.fleet-section":
|
|
26
|
+
return <FleetSection key={block.id} data={block} />;
|
|
24
27
|
|
|
25
28
|
default:
|
|
26
29
|
return null;
|
|
@@ -9,6 +9,18 @@ import { StrapiImage } from "./StrapiImage.tsx";
|
|
|
9
9
|
|
|
10
10
|
type maxWidth = "xs" | "sm" | "md" | "lg" | "xl" | false | string;
|
|
11
11
|
|
|
12
|
+
/*
|
|
13
|
+
TODO intregrate this interface into StrapiImage.tsx
|
|
14
|
+
|
|
15
|
+
interface ImageProps {
|
|
16
|
+
id: number;
|
|
17
|
+
url: string;
|
|
18
|
+
alternativeText: string;
|
|
19
|
+
style: React.CSSProperties;
|
|
20
|
+
width: number;
|
|
21
|
+
height: number;
|
|
22
|
+
} */
|
|
23
|
+
|
|
12
24
|
interface TextImageSectionProps {
|
|
13
25
|
data: {
|
|
14
26
|
title: string;
|
|
@@ -224,6 +224,52 @@ AMH.args = {
|
|
|
224
224
|
},
|
|
225
225
|
],
|
|
226
226
|
},
|
|
227
|
+
{
|
|
228
|
+
id: 1,
|
|
229
|
+
__component: "layout.fleet-section",
|
|
230
|
+
title: "Fleet",
|
|
231
|
+
description: "Description of our fleet",
|
|
232
|
+
airplane: [
|
|
233
|
+
{
|
|
234
|
+
id: 1,
|
|
235
|
+
name: "CHALLENGER 604",
|
|
236
|
+
description:
|
|
237
|
+
"Bombardier Challenger 604. Is our best long-range jet and can be equipped with an intensive care unit for one critical care patient or the option to carry 2 stable patients. ",
|
|
238
|
+
range: "7408",
|
|
239
|
+
speed: "854",
|
|
240
|
+
ceiling: "41000",
|
|
241
|
+
cabinHeight: 1.83,
|
|
242
|
+
cabinWidth: 2.11,
|
|
243
|
+
cabinLength: 8.66,
|
|
244
|
+
floorplan: {
|
|
245
|
+
url: "/uploads/CHALLENGER_604_efe6e0309f.png",
|
|
246
|
+
alt: "Challenger 604 Floor Plan",
|
|
247
|
+
width: 1000,
|
|
248
|
+
height: 282,
|
|
249
|
+
style: {},
|
|
250
|
+
},
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
id: 2,
|
|
254
|
+
name: "BEECHCRAFT KING AIR 200",
|
|
255
|
+
description:
|
|
256
|
+
"A twin turboprop aircraft with pressurized cabin. Is our best air ambulance for Europe and North Africa. It is equipped with a single stretcher for one stable ICU patient.",
|
|
257
|
+
range: "2200",
|
|
258
|
+
speed: "500",
|
|
259
|
+
ceiling: "35000",
|
|
260
|
+
cabinHeight: 1.46,
|
|
261
|
+
cabinWidth: 1.37,
|
|
262
|
+
cabinLength: 5.08,
|
|
263
|
+
floorplan: {
|
|
264
|
+
url: "/uploads/BEECHCRAFT_KING_AIR_200_828251b91c.png",
|
|
265
|
+
alt: "Challenger 604 Floor Plan",
|
|
266
|
+
width: 1000,
|
|
267
|
+
height: 233,
|
|
268
|
+
style: {},
|
|
269
|
+
},
|
|
270
|
+
},
|
|
271
|
+
],
|
|
272
|
+
},
|
|
227
273
|
{
|
|
228
274
|
id: 1,
|
|
229
275
|
__component: "layout.text-image-section",
|