umwd-components 0.1.16 → 0.1.18
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/NavBar.js +3 -4
- package/dist/cjs/components/TextImageBlock.js +99 -0
- package/dist/cjs/index.js +2 -0
- package/dist/esm/components/NavBar.js +3 -4
- package/dist/esm/components/TextImageBlock.js +95 -0
- package/dist/esm/index.js +1 -0
- package/package.json +4 -1
- package/src/components/NavBar.js +2 -2
- package/src/components/TextImageBlock.js +122 -0
- package/src/index.js +2 -1
- package/src/stories/TextImageBlock.stories.js +55 -64
- package/src/components/TextImageBlock/index.js +0 -108
|
@@ -86,8 +86,8 @@ function NavBar({
|
|
|
86
86
|
}
|
|
87
87
|
}, pages.map(page => {
|
|
88
88
|
return /*#__PURE__*/React.createElement(material.Button, {
|
|
89
|
-
key: page.name
|
|
90
|
-
onClick
|
|
89
|
+
key: page.name
|
|
90
|
+
/* onClick={() => page.action()} */,
|
|
91
91
|
sx: {
|
|
92
92
|
my: 2,
|
|
93
93
|
color: "primary.contrastText",
|
|
@@ -229,8 +229,7 @@ function NavBar({
|
|
|
229
229
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(material.ListItem, {
|
|
230
230
|
key: page.name,
|
|
231
231
|
onClick: () => {
|
|
232
|
-
page.action();
|
|
233
|
-
handleCloseMobileMenu();
|
|
232
|
+
/* page.action(); */handleCloseMobileMenu();
|
|
234
233
|
}
|
|
235
234
|
}, /*#__PURE__*/React.createElement(material.ListItemText, {
|
|
236
235
|
primary: page.name
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* UMWD-Components
|
|
3
|
+
* @copyright Jelle Paulus
|
|
4
|
+
* @license MIT
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
'use strict';
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
10
|
+
|
|
11
|
+
var material = require('@mui/material');
|
|
12
|
+
var muiMarkdown = require('mui-markdown');
|
|
13
|
+
var PropTypes = require('prop-types');
|
|
14
|
+
|
|
15
|
+
function TextImageBlock({
|
|
16
|
+
block_title,
|
|
17
|
+
text_content,
|
|
18
|
+
image_content,
|
|
19
|
+
reverse
|
|
20
|
+
}) {
|
|
21
|
+
reverse = Boolean(reverse);
|
|
22
|
+
return /*#__PURE__*/React.createElement(material.Grid, {
|
|
23
|
+
container: true,
|
|
24
|
+
sx: [text_content === undefined && {
|
|
25
|
+
display: "grid",
|
|
26
|
+
alignItems: "center",
|
|
27
|
+
justifyItems: "center"
|
|
28
|
+
}]
|
|
29
|
+
}, block_title && /*#__PURE__*/React.createElement(material.Grid, {
|
|
30
|
+
item: true,
|
|
31
|
+
xs: 12,
|
|
32
|
+
sx: {
|
|
33
|
+
display: "grid",
|
|
34
|
+
alignItems: "center",
|
|
35
|
+
justifyItems: "center"
|
|
36
|
+
}
|
|
37
|
+
}, /*#__PURE__*/React.createElement(material.Typography, {
|
|
38
|
+
variant: "h1"
|
|
39
|
+
}, block_title)), reverse ? /*#__PURE__*/React.createElement(React.Fragment, null, image_content?.url !== undefined && /*#__PURE__*/React.createElement(material.Grid, {
|
|
40
|
+
item: true,
|
|
41
|
+
xs: 6,
|
|
42
|
+
sx: {
|
|
43
|
+
minHeight: "100vh",
|
|
44
|
+
display: "grid",
|
|
45
|
+
alignItems: "center",
|
|
46
|
+
justifyItems: "center"
|
|
47
|
+
}
|
|
48
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
49
|
+
src: image_content.url,
|
|
50
|
+
width: image_content.width,
|
|
51
|
+
height: image_content.height,
|
|
52
|
+
alt: image_content.name
|
|
53
|
+
})), text_content && /*#__PURE__*/React.createElement(material.Grid, {
|
|
54
|
+
item: true,
|
|
55
|
+
xs: image_content?.url !== undefined ? 6 : 12,
|
|
56
|
+
sx: {
|
|
57
|
+
minHeight: "100vh",
|
|
58
|
+
display: "grid",
|
|
59
|
+
alignItems: "center",
|
|
60
|
+
justifyItems: "center"
|
|
61
|
+
}
|
|
62
|
+
}, /*#__PURE__*/React.createElement(muiMarkdown.MuiMarkdown, null, text_content))) : /*#__PURE__*/React.createElement(React.Fragment, null, text_content && /*#__PURE__*/React.createElement(material.Grid, {
|
|
63
|
+
item: true,
|
|
64
|
+
xs: image_content?.url !== undefined ? 6 : 12,
|
|
65
|
+
sx: {
|
|
66
|
+
minHeight: "100vh",
|
|
67
|
+
display: "grid",
|
|
68
|
+
alignItems: "center",
|
|
69
|
+
justifyItems: "center"
|
|
70
|
+
}
|
|
71
|
+
}, /*#__PURE__*/React.createElement(muiMarkdown.MuiMarkdown, null, text_content)), image_content?.url !== undefined && /*#__PURE__*/React.createElement(material.Grid, {
|
|
72
|
+
item: true,
|
|
73
|
+
xs: 6,
|
|
74
|
+
sx: {
|
|
75
|
+
minHeight: "100vh",
|
|
76
|
+
display: "grid",
|
|
77
|
+
alignItems: "center",
|
|
78
|
+
justifyItems: "center"
|
|
79
|
+
}
|
|
80
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
81
|
+
src: image_content.url,
|
|
82
|
+
width: image_content.width,
|
|
83
|
+
height: image_content.height,
|
|
84
|
+
alt: image_content.alt
|
|
85
|
+
}))));
|
|
86
|
+
}
|
|
87
|
+
TextImageBlock.propTypes = {
|
|
88
|
+
block_title: PropTypes.string,
|
|
89
|
+
text_content: PropTypes.string,
|
|
90
|
+
image_content: PropTypes.shape({
|
|
91
|
+
url: PropTypes.string,
|
|
92
|
+
width: PropTypes.number,
|
|
93
|
+
height: PropTypes.number,
|
|
94
|
+
alt: PropTypes.string
|
|
95
|
+
}),
|
|
96
|
+
reverse: PropTypes.bool
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
exports.default = TextImageBlock;
|
package/dist/cjs/index.js
CHANGED
|
@@ -11,6 +11,7 @@ var NoteTextField = require('./components/NoteTextField/NoteTextField.js');
|
|
|
11
11
|
var Button = require('./components/Button.js');
|
|
12
12
|
var Stack = require('./components/Stack.js');
|
|
13
13
|
var NavBar = require('./components/NavBar.js');
|
|
14
|
+
var TextImageBlock = require('./components/TextImageBlock.js');
|
|
14
15
|
|
|
15
16
|
|
|
16
17
|
|
|
@@ -19,3 +20,4 @@ exports.NoteTextField = NoteTextField.NoteTextField;
|
|
|
19
20
|
exports.Button = Button.default;
|
|
20
21
|
exports.Stack = Stack.default;
|
|
21
22
|
exports.NavBar = NavBar.default;
|
|
23
|
+
exports.TextImageBlock = TextImageBlock.default;
|
|
@@ -82,8 +82,8 @@ function NavBar({
|
|
|
82
82
|
}
|
|
83
83
|
}, pages.map(page => {
|
|
84
84
|
return /*#__PURE__*/React.createElement(Button, {
|
|
85
|
-
key: page.name
|
|
86
|
-
onClick
|
|
85
|
+
key: page.name
|
|
86
|
+
/* onClick={() => page.action()} */,
|
|
87
87
|
sx: {
|
|
88
88
|
my: 2,
|
|
89
89
|
color: "primary.contrastText",
|
|
@@ -225,8 +225,7 @@ function NavBar({
|
|
|
225
225
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ListItem, {
|
|
226
226
|
key: page.name,
|
|
227
227
|
onClick: () => {
|
|
228
|
-
page.action();
|
|
229
|
-
handleCloseMobileMenu();
|
|
228
|
+
/* page.action(); */handleCloseMobileMenu();
|
|
230
229
|
}
|
|
231
230
|
}, /*#__PURE__*/React.createElement(ListItemText, {
|
|
232
231
|
primary: page.name
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* UMWD-Components
|
|
3
|
+
* @copyright Jelle Paulus
|
|
4
|
+
* @license MIT
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { Grid, Typography } from '@mui/material';
|
|
8
|
+
import { MuiMarkdown } from 'mui-markdown';
|
|
9
|
+
import PropTypes from 'prop-types';
|
|
10
|
+
|
|
11
|
+
function TextImageBlock({
|
|
12
|
+
block_title,
|
|
13
|
+
text_content,
|
|
14
|
+
image_content,
|
|
15
|
+
reverse
|
|
16
|
+
}) {
|
|
17
|
+
reverse = Boolean(reverse);
|
|
18
|
+
return /*#__PURE__*/React.createElement(Grid, {
|
|
19
|
+
container: true,
|
|
20
|
+
sx: [text_content === undefined && {
|
|
21
|
+
display: "grid",
|
|
22
|
+
alignItems: "center",
|
|
23
|
+
justifyItems: "center"
|
|
24
|
+
}]
|
|
25
|
+
}, block_title && /*#__PURE__*/React.createElement(Grid, {
|
|
26
|
+
item: true,
|
|
27
|
+
xs: 12,
|
|
28
|
+
sx: {
|
|
29
|
+
display: "grid",
|
|
30
|
+
alignItems: "center",
|
|
31
|
+
justifyItems: "center"
|
|
32
|
+
}
|
|
33
|
+
}, /*#__PURE__*/React.createElement(Typography, {
|
|
34
|
+
variant: "h1"
|
|
35
|
+
}, block_title)), reverse ? /*#__PURE__*/React.createElement(React.Fragment, null, image_content?.url !== undefined && /*#__PURE__*/React.createElement(Grid, {
|
|
36
|
+
item: true,
|
|
37
|
+
xs: 6,
|
|
38
|
+
sx: {
|
|
39
|
+
minHeight: "100vh",
|
|
40
|
+
display: "grid",
|
|
41
|
+
alignItems: "center",
|
|
42
|
+
justifyItems: "center"
|
|
43
|
+
}
|
|
44
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
45
|
+
src: image_content.url,
|
|
46
|
+
width: image_content.width,
|
|
47
|
+
height: image_content.height,
|
|
48
|
+
alt: image_content.name
|
|
49
|
+
})), text_content && /*#__PURE__*/React.createElement(Grid, {
|
|
50
|
+
item: true,
|
|
51
|
+
xs: image_content?.url !== undefined ? 6 : 12,
|
|
52
|
+
sx: {
|
|
53
|
+
minHeight: "100vh",
|
|
54
|
+
display: "grid",
|
|
55
|
+
alignItems: "center",
|
|
56
|
+
justifyItems: "center"
|
|
57
|
+
}
|
|
58
|
+
}, /*#__PURE__*/React.createElement(MuiMarkdown, null, text_content))) : /*#__PURE__*/React.createElement(React.Fragment, null, text_content && /*#__PURE__*/React.createElement(Grid, {
|
|
59
|
+
item: true,
|
|
60
|
+
xs: image_content?.url !== undefined ? 6 : 12,
|
|
61
|
+
sx: {
|
|
62
|
+
minHeight: "100vh",
|
|
63
|
+
display: "grid",
|
|
64
|
+
alignItems: "center",
|
|
65
|
+
justifyItems: "center"
|
|
66
|
+
}
|
|
67
|
+
}, /*#__PURE__*/React.createElement(MuiMarkdown, null, text_content)), image_content?.url !== undefined && /*#__PURE__*/React.createElement(Grid, {
|
|
68
|
+
item: true,
|
|
69
|
+
xs: 6,
|
|
70
|
+
sx: {
|
|
71
|
+
minHeight: "100vh",
|
|
72
|
+
display: "grid",
|
|
73
|
+
alignItems: "center",
|
|
74
|
+
justifyItems: "center"
|
|
75
|
+
}
|
|
76
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
77
|
+
src: image_content.url,
|
|
78
|
+
width: image_content.width,
|
|
79
|
+
height: image_content.height,
|
|
80
|
+
alt: image_content.alt
|
|
81
|
+
}))));
|
|
82
|
+
}
|
|
83
|
+
TextImageBlock.propTypes = {
|
|
84
|
+
block_title: PropTypes.string,
|
|
85
|
+
text_content: PropTypes.string,
|
|
86
|
+
image_content: PropTypes.shape({
|
|
87
|
+
url: PropTypes.string,
|
|
88
|
+
width: PropTypes.number,
|
|
89
|
+
height: PropTypes.number,
|
|
90
|
+
alt: PropTypes.string
|
|
91
|
+
}),
|
|
92
|
+
reverse: PropTypes.bool
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
export { TextImageBlock as default };
|
package/dist/esm/index.js
CHANGED
|
@@ -9,3 +9,4 @@ export { NoteTextField } from './components/NoteTextField/NoteTextField.js';
|
|
|
9
9
|
export { default as Button } from './components/Button.js';
|
|
10
10
|
export { default as Stack } from './components/Stack.js';
|
|
11
11
|
export { default as NavBar } from './components/NavBar.js';
|
|
12
|
+
export { default as TextImageBlock } from './components/TextImageBlock.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "umwd-components",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.18",
|
|
4
4
|
"description": "UMWD Component library",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -78,5 +78,8 @@
|
|
|
78
78
|
"react": "^18.2.0",
|
|
79
79
|
"react-dnd": "^16.0.1",
|
|
80
80
|
"react-dnd-html5-backend": "^16.0.1"
|
|
81
|
+
},
|
|
82
|
+
"prettier": {
|
|
83
|
+
"proseWrap": "always"
|
|
81
84
|
}
|
|
82
85
|
}
|
package/src/components/NavBar.js
CHANGED
|
@@ -81,7 +81,7 @@ function NavBar({site_title, logo, pages}){
|
|
|
81
81
|
return (
|
|
82
82
|
<Button
|
|
83
83
|
key={page.name}
|
|
84
|
-
onClick={() => page.action()}
|
|
84
|
+
/* onClick={() => page.action()} */
|
|
85
85
|
sx={{ my: 2, color: "primary.contrastText", display: "block" }}
|
|
86
86
|
>
|
|
87
87
|
{page.name}
|
|
@@ -198,7 +198,7 @@ function NavBar({site_title, logo, pages}){
|
|
|
198
198
|
<>
|
|
199
199
|
<ListItem
|
|
200
200
|
key={page.name}
|
|
201
|
-
onClick={() => {page.action();
|
|
201
|
+
onClick={() => {/* page.action(); */handleCloseMobileMenu();}}
|
|
202
202
|
>
|
|
203
203
|
<ListItemText primary={page.name} />
|
|
204
204
|
</ListItem>
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { Grid, Typography } from "@mui/material";
|
|
2
|
+
// import Image from "next/image";
|
|
3
|
+
import { MuiMarkdown } from "mui-markdown";
|
|
4
|
+
import PropTypes from "prop-types";
|
|
5
|
+
|
|
6
|
+
function TextImageBlock({ block_title, text_content, image_content, reverse }) {
|
|
7
|
+
reverse = Boolean(reverse);
|
|
8
|
+
|
|
9
|
+
return (
|
|
10
|
+
<Grid
|
|
11
|
+
container
|
|
12
|
+
sx={[
|
|
13
|
+
text_content === undefined && {
|
|
14
|
+
display: "grid",
|
|
15
|
+
alignItems: "center",
|
|
16
|
+
justifyItems: "center",
|
|
17
|
+
},
|
|
18
|
+
]}
|
|
19
|
+
>
|
|
20
|
+
{block_title && (
|
|
21
|
+
<Grid
|
|
22
|
+
item
|
|
23
|
+
xs={12}
|
|
24
|
+
sx={{
|
|
25
|
+
display: "grid",
|
|
26
|
+
alignItems: "center",
|
|
27
|
+
justifyItems: "center",
|
|
28
|
+
}}
|
|
29
|
+
>
|
|
30
|
+
<Typography variant="h1">{block_title}</Typography>
|
|
31
|
+
</Grid>
|
|
32
|
+
)}
|
|
33
|
+
{reverse ? (
|
|
34
|
+
<>
|
|
35
|
+
{image_content?.url !== undefined && (
|
|
36
|
+
<Grid
|
|
37
|
+
item
|
|
38
|
+
xs={6}
|
|
39
|
+
sx={{
|
|
40
|
+
minHeight: "100vh",
|
|
41
|
+
display: "grid",
|
|
42
|
+
alignItems: "center",
|
|
43
|
+
justifyItems: "center",
|
|
44
|
+
}}
|
|
45
|
+
>
|
|
46
|
+
<img
|
|
47
|
+
src={image_content.url}
|
|
48
|
+
width={image_content.width}
|
|
49
|
+
height={image_content.height}
|
|
50
|
+
alt={image_content.name}
|
|
51
|
+
/>
|
|
52
|
+
</Grid>
|
|
53
|
+
)}
|
|
54
|
+
{text_content && (
|
|
55
|
+
<Grid
|
|
56
|
+
item
|
|
57
|
+
xs={image_content?.url !== undefined ? 6 : 12}
|
|
58
|
+
sx={{
|
|
59
|
+
minHeight: "100vh",
|
|
60
|
+
display: "grid",
|
|
61
|
+
alignItems: "center",
|
|
62
|
+
justifyItems: "center",
|
|
63
|
+
}}
|
|
64
|
+
>
|
|
65
|
+
<MuiMarkdown>{text_content}</MuiMarkdown>
|
|
66
|
+
</Grid>
|
|
67
|
+
)}
|
|
68
|
+
</>
|
|
69
|
+
) : (
|
|
70
|
+
<>
|
|
71
|
+
{text_content && (
|
|
72
|
+
<Grid
|
|
73
|
+
item
|
|
74
|
+
xs={image_content?.url !== undefined ? 6 : 12}
|
|
75
|
+
sx={{
|
|
76
|
+
minHeight: "100vh",
|
|
77
|
+
display: "grid",
|
|
78
|
+
alignItems: "center",
|
|
79
|
+
justifyItems: "center",
|
|
80
|
+
}}
|
|
81
|
+
>
|
|
82
|
+
<MuiMarkdown>{text_content}</MuiMarkdown>
|
|
83
|
+
</Grid>
|
|
84
|
+
)}
|
|
85
|
+
{image_content?.url !== undefined && (
|
|
86
|
+
<Grid
|
|
87
|
+
item
|
|
88
|
+
xs={6}
|
|
89
|
+
sx={{
|
|
90
|
+
minHeight: "100vh",
|
|
91
|
+
display: "grid",
|
|
92
|
+
alignItems: "center",
|
|
93
|
+
justifyItems: "center",
|
|
94
|
+
}}
|
|
95
|
+
>
|
|
96
|
+
<img
|
|
97
|
+
src={image_content.url}
|
|
98
|
+
width={image_content.width}
|
|
99
|
+
height={image_content.height}
|
|
100
|
+
alt={image_content.alt}
|
|
101
|
+
/>
|
|
102
|
+
</Grid>
|
|
103
|
+
)}
|
|
104
|
+
</>
|
|
105
|
+
)}
|
|
106
|
+
</Grid>
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
TextImageBlock.propTypes = {
|
|
111
|
+
block_title: PropTypes.string,
|
|
112
|
+
text_content: PropTypes.string,
|
|
113
|
+
image_content: PropTypes.shape({
|
|
114
|
+
url: PropTypes.string,
|
|
115
|
+
width: PropTypes.number,
|
|
116
|
+
height: PropTypes.number,
|
|
117
|
+
alt: PropTypes.string,
|
|
118
|
+
}),
|
|
119
|
+
reverse: PropTypes.bool,
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
export default TextImageBlock;
|
package/src/index.js
CHANGED
|
@@ -3,4 +3,5 @@ export * from "./components/Requirements";
|
|
|
3
3
|
export * from "./components/NoteTextField";
|
|
4
4
|
export { default as Button } from "./components/Button";
|
|
5
5
|
export { default as Stack } from "./components/Stack";
|
|
6
|
-
export {default as NavBar} from "./components/NavBar";
|
|
6
|
+
export { default as NavBar } from "./components/NavBar";
|
|
7
|
+
export { default as TextImageBlock } from "./components/TextImageBlock";
|
|
@@ -7,79 +7,70 @@ export default {
|
|
|
7
7
|
// argTypes: { numberOfChildren: { type: "number" } },
|
|
8
8
|
};
|
|
9
9
|
|
|
10
|
-
const Template = ({ ...args }) =>
|
|
11
|
-
<TextImageBlock {...args} />
|
|
12
|
-
);
|
|
10
|
+
const Template = ({ ...args }) => <TextImageBlock {...args} />;
|
|
13
11
|
|
|
14
12
|
export const HelloWorld = Template.bind({});
|
|
15
13
|
|
|
16
14
|
HelloWorld.args = {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
height: 150,
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
name: "hello world",
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
text_content: "# Hello World \n **Hello world,** a timeless greeting that transcends boundaries and encapsulates the essence of connectivity in the digital age. From the humble beginnings of computer programming to the interconnected web of today, hello world stands as the inaugural utterance in the realm of coding. \n *Hello world,* a phrase that marks the inception of countless software projects, introducing developers to the syntax and structure of a programming language. It symbolizes the first step into a world of algorithms, data structures, and creative problem-solving. Beyond its technical significance, it embodies the spirit of initiation and the commencement of a journey into the vast landscape of software development. \n *Hello world,* a greeting echoed by computer science enthusiasts worldwide, reflecting the universality of technology and the shared experience of navigating the intricacies of code. It bridges the gap between novices and seasoned programmers, serving as a common ground where knowledge is exchanged, challenges are discussed, and innovations are born. \n In a broader context, *hello world* extends beyond the confines of programming. It serves as a metaphor for embracing new beginnings, fostering connections, and acknowledging the vastness of our global community. In a world increasingly shaped by technology, this simple greeting remains a symbol of the interconnectedness that defines our modern existence.",
|
|
34
|
-
},
|
|
15
|
+
block_title: "Hello World",
|
|
16
|
+
image_content: {
|
|
17
|
+
url: "https://via.placeholder.com/150",
|
|
18
|
+
width: 150,
|
|
19
|
+
height: 150,
|
|
20
|
+
alt: "Hello World",
|
|
21
|
+
},
|
|
22
|
+
text_content:
|
|
23
|
+
"## Hello World \n **Hello World,** a timeless greeting that transcends boundaries and encapsulates the essence of connectivity in the digital age. From the humble beginnings of computer programming to the interconnected web of today, Hello World stands as the inaugural utterance in the realm of coding. *Hello World,* a phrase that marks the inception of countless software projects, introducing developers to the syntax and structure of a programming language. It symbolizes the first step into a world of algorithms, data structures, and creative problem-solving. Beyond its technical significance, it embodies the spirit of initiation and the commencement of a journey into the vast landscape of software development. <br /> <br /> *Hello World,* a greeting echoed by computer science enthusiasts worldwide, reflecting the universality of technology and the shared experience of navigating the intricacies of code. It bridges the gap between novices and seasoned programmers, serving as a common ground where knowledge is exchanged, challenges are discussed, and innovations are born. <br /> <br /> In a broader context, *Hello World* extends beyond the confines of programming. It serves as a metaphor for embracing new beginnings, fostering connections, and acknowledging the vastness of our global community. In a world increasingly shaped by technology, this simple greeting remains a symbol of the interconnectedness that defines our modern existence.",
|
|
35
24
|
reverse: false,
|
|
36
25
|
};
|
|
37
26
|
|
|
38
27
|
export const HelloMars = Template.bind({});
|
|
39
28
|
|
|
40
29
|
HelloMars.args = {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}
|
|
30
|
+
block_title: "Hello Mars",
|
|
31
|
+
image_content: {
|
|
32
|
+
url: "https://via.placeholder.com/150",
|
|
33
|
+
width: 150,
|
|
34
|
+
height: 150,
|
|
35
|
+
alt: "Hello Mars",
|
|
36
|
+
},
|
|
37
|
+
text_content:
|
|
38
|
+
"**Hello Mars,** \n a distant red planet that has captured the imagination of humanity for centuries. As we gaze upon your mysterious surface from Earth, we can't help but wonder about the secrets you hold. Hello to the vast landscapes of rust-colored terrain, the towering volcanoes, and the enigmatic canyons that weave across your surface. *Hello Mars,* a planet that has been the focus of numerous space missions, each one aiming to unveil the mysteries of your past and present. From the iconic rovers tirelessly traversing your rocky landscapes to the orbiters capturing breathtaking images from above, we extend our greetings to the scientific endeavors that seek to understand your geology, climate, and potential for life. <br /> <br /> *Hello Mars,* a beacon of human exploration and curiosity. The dreams of setting foot on your soil have fueled the aspirations of generations, and with each technological leap, the possibility of humans visiting you becomes more tangible. The prospect of a human settlement on Mars brings excitement, challenges, and the promise of a new chapter in our interplanetary journey. <br /> <br /> *Hello Mars,* a testament to the indomitable human spirit that constantly seeks to push the boundaries of what is possible. As we continue to study, explore, and dream about the mysteries you hold, we are reminded of the vastness of the cosmos and the endless opportunities for discovery that lie beyond our home planet.",
|
|
39
|
+
reverse: true,
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export const NoTitle = Template.bind({});
|
|
43
|
+
|
|
44
|
+
NoTitle.args = {
|
|
45
|
+
image_content: {
|
|
46
|
+
url: "https://via.placeholder.com/150",
|
|
47
|
+
width: 150,
|
|
48
|
+
height: 150,
|
|
49
|
+
alt: "Hello Mars",
|
|
50
|
+
},
|
|
51
|
+
text_content:
|
|
52
|
+
"**Hello Mars,** \n a distant red planet that has captured the imagination of humanity for centuries. As we gaze upon your mysterious surface from Earth, we can't help but wonder about the secrets you hold. Hello to the vast landscapes of rust-colored terrain, the towering volcanoes, and the enigmatic canyons that weave across your surface. <br /> <br /> *Hello Mars,* a planet that has been the focus of numerous space missions, each one aiming to unveil the mysteries of your past and present. From the iconic rovers tirelessly traversing your rocky landscapes to the orbiters capturing breathtaking images from above, we extend our greetings to the scientific endeavors that seek to understand your geology, climate, and potential for life. <br /> <br /> *Hello Mars,* a beacon of human exploration and curiosity. The dreams of setting foot on your soil have fueled the aspirations of generations, and with each technological leap, the possibility of humans visiting you becomes more tangible. The prospect of a human settlement on Mars brings excitement, challenges, and the promise of a new chapter in our interplanetary journey. <br /> <br /> *Hello Mars,* a testament to the indomitable human spirit that constantly seeks to push the boundaries of what is possible. As we continue to study, explore, and dream about the mysteries you hold, we are reminded of the vastness of the cosmos and the endless opportunities for discovery that lie beyond our home planet.",
|
|
53
|
+
reverse: false,
|
|
54
|
+
};
|
|
62
55
|
|
|
63
|
-
|
|
56
|
+
export const NoImage = Template.bind({});
|
|
64
57
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
reverse: false,
|
|
85
|
-
};
|
|
58
|
+
NoImage.args = {
|
|
59
|
+
block_title: "Hello Mars",
|
|
60
|
+
text_content:
|
|
61
|
+
"## Hello Mars \n **Hello Mars,** a distant red planet that has captured the imagination of humanity for centuries. As we gaze upon your mysterious surface from Earth, we can't help but wonder about the secrets you hold. Hello to the vast landscapes of rust-colored terrain, the towering volcanoes, and the enigmatic canyons that weave across your surface. <br /> <br /> *Hello Mars,* a planet that has been the focus of numerous space missions, each one aiming to unveil the mysteries of your past and present. From the iconic rovers tirelessly traversing your rocky landscapes to the orbiters capturing breathtaking images from above, we extend our greetings to the scientific endeavors that seek to understand your geology, climate, and potential for life. <br /> <br /> *Hello Mars,* a beacon of human exploration and curiosity. The dreams of setting foot on your soil have fueled the aspirations of generations, and with each technological leap, the possibility of humans visiting you becomes more tangible. The prospect of a human settlement on Mars brings excitement, challenges, and the promise of a new chapter in our interplanetary journey. <br /> <br /> *Hello Mars,* a testament to the indomitable human spirit that constantly seeks to push the boundaries of what is possible. As we continue to study, explore, and dream about the mysteries you hold, we are reminded of the vastness of the cosmos and the endless opportunities for discovery that lie beyond our home planet.",
|
|
62
|
+
reverse: false,
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export const NoText = Template.bind({});
|
|
66
|
+
|
|
67
|
+
NoText.args = {
|
|
68
|
+
block_title: "Hello Mars",
|
|
69
|
+
image_content: {
|
|
70
|
+
url: "https://via.placeholder.com/150",
|
|
71
|
+
width: 150,
|
|
72
|
+
height: 150,
|
|
73
|
+
alt: "Hello Mars",
|
|
74
|
+
},
|
|
75
|
+
reverse: true,
|
|
76
|
+
};
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import { Grid, Typography, Stack } from "@mui/material";
|
|
2
|
-
// import Image from "next/image";
|
|
3
|
-
import { MuiMarkdown } from "mui-markdown";
|
|
4
|
-
|
|
5
|
-
export default function TextImageBlock({ content, reverse }) {
|
|
6
|
-
return (
|
|
7
|
-
<Grid container>
|
|
8
|
-
<Grid
|
|
9
|
-
item
|
|
10
|
-
xs={12}
|
|
11
|
-
sx={{
|
|
12
|
-
// width: "100%",
|
|
13
|
-
display: "grid",
|
|
14
|
-
alignItems: "center",
|
|
15
|
-
justifyItems: "center",
|
|
16
|
-
}}
|
|
17
|
-
>
|
|
18
|
-
<Typography variant="h1">{content.block_title}</Typography>
|
|
19
|
-
</Grid>
|
|
20
|
-
{reverse ? (
|
|
21
|
-
<>
|
|
22
|
-
<Grid
|
|
23
|
-
item
|
|
24
|
-
xs={6}
|
|
25
|
-
md={6}
|
|
26
|
-
sx={{
|
|
27
|
-
// width: "100%",
|
|
28
|
-
minHeight: "100vh",
|
|
29
|
-
display: "grid",
|
|
30
|
-
alignItems: "center",
|
|
31
|
-
justifyItems: "center",
|
|
32
|
-
}}
|
|
33
|
-
>
|
|
34
|
-
{content.image_content.data && (
|
|
35
|
-
<img
|
|
36
|
-
src={content.image_content.data.attributes.formats.small.url}
|
|
37
|
-
width={
|
|
38
|
-
content.image_content.data.attributes.formats.small.width
|
|
39
|
-
}
|
|
40
|
-
height={
|
|
41
|
-
content.image_content.data.attributes.formats.small.height
|
|
42
|
-
}
|
|
43
|
-
alt={content.image_content.data.attributes.name}
|
|
44
|
-
/>
|
|
45
|
-
)}
|
|
46
|
-
</Grid>
|
|
47
|
-
<Grid
|
|
48
|
-
item
|
|
49
|
-
xs={6}
|
|
50
|
-
sx={{
|
|
51
|
-
// width: "100%",
|
|
52
|
-
minHeight: "100vh",
|
|
53
|
-
display: "grid",
|
|
54
|
-
alignItems: "center",
|
|
55
|
-
justifyItems: "center",
|
|
56
|
-
}}
|
|
57
|
-
>
|
|
58
|
-
<MuiMarkdown>{`${content.text_content}`}</MuiMarkdown>
|
|
59
|
-
{/* <Typography align="right">{content.text_content}</Typography> */}
|
|
60
|
-
</Grid>
|
|
61
|
-
</>
|
|
62
|
-
) : (
|
|
63
|
-
<>
|
|
64
|
-
<Grid
|
|
65
|
-
item
|
|
66
|
-
xs={6}
|
|
67
|
-
md={6}
|
|
68
|
-
sx={{
|
|
69
|
-
// width: "100%",
|
|
70
|
-
minHeight: "100vh",
|
|
71
|
-
display: "grid",
|
|
72
|
-
alignItems: "center",
|
|
73
|
-
justifyItems: "center",
|
|
74
|
-
}}
|
|
75
|
-
>
|
|
76
|
-
<MuiMarkdown>{`${content.text_content}`}</MuiMarkdown>
|
|
77
|
-
{/* <Typography>{content.text_content}</Typography> */}
|
|
78
|
-
</Grid>
|
|
79
|
-
<Grid
|
|
80
|
-
item
|
|
81
|
-
xs={6}
|
|
82
|
-
md={6}
|
|
83
|
-
sx={{
|
|
84
|
-
// width: "100%",
|
|
85
|
-
minHeight: "100vh",
|
|
86
|
-
display: "grid",
|
|
87
|
-
alignItems: "center",
|
|
88
|
-
justifyItems: "center",
|
|
89
|
-
}}
|
|
90
|
-
>
|
|
91
|
-
{content.image_content.data && (
|
|
92
|
-
<img
|
|
93
|
-
src={content.image_content.data.attributes.formats.small.url}
|
|
94
|
-
width={
|
|
95
|
-
content.image_content.data.attributes.formats.small.width
|
|
96
|
-
}
|
|
97
|
-
height={
|
|
98
|
-
content.image_content.data.attributes.formats.small.height
|
|
99
|
-
}
|
|
100
|
-
alt={content.image_content.data.attributes.name}
|
|
101
|
-
/>
|
|
102
|
-
)}
|
|
103
|
-
</Grid>
|
|
104
|
-
</>
|
|
105
|
-
)}
|
|
106
|
-
</Grid>
|
|
107
|
-
);
|
|
108
|
-
}
|