@parameter1/base-cms-marko-web 3.8.0 → 3.13.0
Sign up to get free protection for your applications and to get access to all the features.
- package/components/browser-component.marko.js +86 -0
- package/components/document/components/body-wrapper.marko.js +33 -0
- package/components/document/components/error.marko.js +85 -0
- package/components/document/components/live-reload.marko.js +30 -0
- package/components/document/container.marko.js +54 -0
- package/components/document/index.marko.js +118 -0
- package/components/element/array.marko.js +67 -0
- package/components/element/block.marko.js +44 -0
- package/components/element/clear.marko.js +32 -0
- package/components/element/components/image.marko.js +62 -0
- package/components/element/components/text.marko.js +37 -0
- package/components/element/content/address1.marko.js +40 -0
- package/components/element/content/address2.marko.js +40 -0
- package/components/element/content/authors.marko.js +43 -0
- package/components/element/content/body.marko.js +62 -0
- package/components/element/content/byline.marko.js +41 -0
- package/components/element/content/city-state-zip.marko.js +40 -0
- package/components/element/content/contributors.marko.js +43 -0
- package/components/element/content/country.marko.js +40 -0
- package/components/element/content/embed-code.marko.js +41 -0
- package/components/element/content/end-date.marko.js +42 -0
- package/components/element/content/fax.marko.js +40 -0
- package/components/element/content/mobile.marko.js +40 -0
- package/components/element/content/name.marko.js +41 -0
- package/components/element/content/phone.marko.js +40 -0
- package/components/element/content/photographers.marko.js +43 -0
- package/components/element/content/public-email.marko.js +47 -0
- package/components/element/content/published.marko.js +42 -0
- package/components/element/content/short-name.marko.js +41 -0
- package/components/element/content/sidebars.marko.js +63 -0
- package/components/element/content/source.marko.js +40 -0
- package/components/element/content/sponsors.marko.js +43 -0
- package/components/element/content/start-date.marko.js +42 -0
- package/components/element/content/teaser.marko.js +41 -0
- package/components/element/content/title.marko.js +40 -0
- package/components/element/content/tollfree.marko.js +40 -0
- package/components/element/content/website.marko.js +51 -0
- package/components/element/date.marko.js +27 -0
- package/components/element/image/caption.marko.js +41 -0
- package/components/element/image/credit.marko.js +41 -0
- package/components/element/image/display-name.marko.js +40 -0
- package/components/element/img.marko.js +43 -0
- package/components/element/index.marko.js +47 -0
- package/components/element/link.marko.js +54 -0
- package/components/element/obj-array.marko.js +56 -0
- package/components/element/obj-date.marko.js +54 -0
- package/components/element/obj-nodes.marko.js +62 -0
- package/components/element/obj-text.marko.js +53 -0
- package/components/element/obj.marko.js +61 -0
- package/components/element/picture.marko.js +85 -0
- package/components/element/text.marko.js +76 -0
- package/components/element/website-section/name.marko.js +46 -0
- package/components/load-more/index.marko.js +119 -0
- package/components/load-more/trigger.marko.js +40 -0
- package/components/node/body.marko.js +112 -0
- package/components/node/element.marko.js +39 -0
- package/components/node/footer.marko.js +63 -0
- package/components/node/header.marko.js +63 -0
- package/components/node/image-inner-wrapper.marko.js +116 -0
- package/components/node/image-wrapper.marko.js +98 -0
- package/components/node/image.marko.js +93 -0
- package/components/node/index.marko.js +100 -0
- package/components/node-list/body.marko.js +50 -0
- package/components/node-list/element.marko.js +35 -0
- package/components/node-list/footer.marko.js +50 -0
- package/components/node-list/header.marko.js +50 -0
- package/components/node-list/index.marko.js +93 -0
- package/components/node-list/node.marko.js +49 -0
- package/components/node-list/nodes.marko.js +126 -0
- package/components/page/container.marko.js +46 -0
- package/components/page/description.marko.js +26 -0
- package/components/page/image.marko.js +122 -0
- package/components/page/layouts/content.marko.js +63 -0
- package/components/page/layouts/default.marko.js +61 -0
- package/components/page/layouts/website-section.marko.js +78 -0
- package/components/page/metadata/components/common.marko.js +108 -0
- package/components/page/metadata/content.marko.js +201 -0
- package/components/page/metadata/default.marko.js +29 -0
- package/components/page/metadata/website-section.marko.js +79 -0
- package/components/page/rel-canonical.marko.js +42 -0
- package/components/page/title.marko.js +46 -0
- package/components/page/wrapper.marko.js +63 -0
- package/components/resolve/page.marko.js +49 -0
- package/components/rss/website-section.marko.js +46 -0
- package/middleware/page-node/index.js +15 -2
- package/middleware/with-content.js +2 -0
- package/package.json +4 -4
@@ -0,0 +1,119 @@
|
|
1
|
+
// Compiled using marko@4.20.2 - DO NOT EDIT
|
2
|
+
"use strict";
|
3
|
+
|
4
|
+
var marko_template = module.exports = require("marko/src/html").t(__filename),
|
5
|
+
marko_componentType = "/@parameter1/base-cms-marko-web$3.11.0/components/load-more/index.marko",
|
6
|
+
marko_component = require("./index.marko"),
|
7
|
+
marko_renderer = require("marko/src/runtime/components/renderer"),
|
8
|
+
module_baseCmsObjectPath_module = require("@parameter1/base-cms-object-path"),
|
9
|
+
baseCmsObjectPath_module = module_baseCmsObjectPath_module.default || module_baseCmsObjectPath_module,
|
10
|
+
getAsObject = module_baseCmsObjectPath_module.getAsObject,
|
11
|
+
getAsArray = module_baseCmsObjectPath_module.getAsArray,
|
12
|
+
marko_web_browser_component_template = require("../browser-component.marko"),
|
13
|
+
marko_loadTag = require("marko/src/runtime/helpers/load-tag"),
|
14
|
+
marko_web_browser_component_tag = marko_loadTag(marko_web_browser_component_template),
|
15
|
+
marko_str = require("marko/src/runtime/helpers/to-string"),
|
16
|
+
marko_assign = require("marko/src/runtime/helpers/assign"),
|
17
|
+
marko_dynamicTag = require("marko/src/runtime/helpers/dynamic-tag"),
|
18
|
+
marko_web_load_more_trigger_template = require("./trigger.marko"),
|
19
|
+
marko_web_load_more_trigger_tag = marko_loadTag(marko_web_load_more_trigger_template),
|
20
|
+
marko_web_page_container_template = require("../page/container.marko"),
|
21
|
+
marko_web_page_container_tag = marko_loadTag(marko_web_page_container_template),
|
22
|
+
marko_web_query_template = require("@parameter1/base-cms-marko-core/components/queries/index.marko"),
|
23
|
+
marko_web_query_tag = marko_loadTag(marko_web_query_template);
|
24
|
+
|
25
|
+
function render(input, out, __component, component, state) {
|
26
|
+
var data = input;
|
27
|
+
|
28
|
+
const { components, fragments } = out.global;
|
29
|
+
|
30
|
+
const Component = components.get(input.componentName);
|
31
|
+
|
32
|
+
const pageNumber = input.pageNumber || 1;
|
33
|
+
|
34
|
+
const queryParams = {
|
35
|
+
...getAsObject(input, "queryParams"),
|
36
|
+
queryName: "LoadMore",
|
37
|
+
queryFragment: fragments.get(input.fragmentName),
|
38
|
+
};
|
39
|
+
|
40
|
+
if (Component) {
|
41
|
+
marko_web_query_tag({
|
42
|
+
collapsible: true,
|
43
|
+
name: input.queryName,
|
44
|
+
params: queryParams,
|
45
|
+
renderBody: function(out, { nodes, pageInfo }) {
|
46
|
+
if (nodes.length) {
|
47
|
+
marko_web_page_container_tag(marko_assign({
|
48
|
+
tag: "section"
|
49
|
+
}, input.pageInput, {
|
50
|
+
modifiers: ["load-more", `page-${pageNumber}`, ...getAsArray(input, "pageInput.modifiers")],
|
51
|
+
attrs: input.attrs,
|
52
|
+
renderBody: function(out) {
|
53
|
+
marko_web_browser_component_tag({
|
54
|
+
name: "TriggerInViewEvent",
|
55
|
+
props: {
|
56
|
+
eventName: "load-more-in-view",
|
57
|
+
data: {
|
58
|
+
page_number: pageNumber + 1
|
59
|
+
}
|
60
|
+
}
|
61
|
+
}, out, __component, "2");
|
62
|
+
|
63
|
+
if ((pageNumber === 1) && input.header) {
|
64
|
+
out.w("<div class=\"load-more-header\">" +
|
65
|
+
marko_str(input.header) +
|
66
|
+
"</div>");
|
67
|
+
}
|
68
|
+
|
69
|
+
marko_dynamicTag(out, Component, function() {
|
70
|
+
return marko_assign({}, input.componentInput, {
|
71
|
+
nodes: nodes,
|
72
|
+
"page-info": pageInfo,
|
73
|
+
"page-number": pageNumber
|
74
|
+
});
|
75
|
+
}, null, null, null, __component, "4");
|
76
|
+
|
77
|
+
const { endCursor, hasNextPage } = pageInfo;
|
78
|
+
|
79
|
+
delete queryParams.skip;
|
80
|
+
|
81
|
+
delete queryParams.queryFragment;
|
82
|
+
|
83
|
+
delete queryParams.renderBody;
|
84
|
+
|
85
|
+
const provide = {
|
86
|
+
...input,
|
87
|
+
queryParams: { ...queryParams, after: endCursor },
|
88
|
+
};
|
89
|
+
|
90
|
+
marko_web_load_more_trigger_tag(marko_assign({}, input.triggerInput, {
|
91
|
+
appendTo: input.appendTo,
|
92
|
+
maxPages: input.maxPages,
|
93
|
+
expand: input.expand,
|
94
|
+
pageNumber: pageNumber,
|
95
|
+
provide: provide,
|
96
|
+
show: hasNextPage
|
97
|
+
}), out, __component, "5");
|
98
|
+
}
|
99
|
+
}), out, __component, "1");
|
100
|
+
}
|
101
|
+
}
|
102
|
+
}, out, __component, "0");
|
103
|
+
}
|
104
|
+
}
|
105
|
+
|
106
|
+
marko_template._ = marko_renderer(render, {
|
107
|
+
___type: marko_componentType
|
108
|
+
}, marko_component);
|
109
|
+
|
110
|
+
marko_template.meta = {
|
111
|
+
id: "/@parameter1/base-cms-marko-web$3.11.0/components/load-more/index.marko",
|
112
|
+
component: "./",
|
113
|
+
tags: [
|
114
|
+
"../browser-component.marko",
|
115
|
+
"./trigger.marko",
|
116
|
+
"../page/container.marko",
|
117
|
+
"@parameter1/base-cms-marko-core/components/queries/index.marko"
|
118
|
+
]
|
119
|
+
};
|
@@ -0,0 +1,40 @@
|
|
1
|
+
// Compiled using marko@4.20.2 - DO NOT EDIT
|
2
|
+
"use strict";
|
3
|
+
|
4
|
+
var marko_template = module.exports = require("marko/src/html").t(__filename),
|
5
|
+
marko_componentType = "/@parameter1/base-cms-marko-web$3.11.0/components/load-more/trigger.marko",
|
6
|
+
marko_renderer = require("marko/src/runtime/components/renderer"),
|
7
|
+
marko_web_browser_component_template = require("../browser-component.marko"),
|
8
|
+
marko_loadTag = require("marko/src/runtime/helpers/load-tag"),
|
9
|
+
marko_web_browser_component_tag = marko_loadTag(marko_web_browser_component_template);
|
10
|
+
|
11
|
+
function render(input, out, __component, component, state) {
|
12
|
+
var data = input;
|
13
|
+
|
14
|
+
const { config } = out.global;
|
15
|
+
|
16
|
+
const props = {
|
17
|
+
...input,
|
18
|
+
mountPoint: config.loadMoreMountPoint(),
|
19
|
+
appendTo: input.appendTo || ".document-container",
|
20
|
+
};
|
21
|
+
|
22
|
+
if (input.show) {
|
23
|
+
marko_web_browser_component_tag({
|
24
|
+
name: "LoadMoreTrigger",
|
25
|
+
props: props
|
26
|
+
}, out, __component, "0");
|
27
|
+
}
|
28
|
+
}
|
29
|
+
|
30
|
+
marko_template._ = marko_renderer(render, {
|
31
|
+
___implicit: true,
|
32
|
+
___type: marko_componentType
|
33
|
+
});
|
34
|
+
|
35
|
+
marko_template.meta = {
|
36
|
+
id: "/@parameter1/base-cms-marko-web$3.11.0/components/load-more/trigger.marko",
|
37
|
+
tags: [
|
38
|
+
"../browser-component.marko"
|
39
|
+
]
|
40
|
+
};
|
@@ -0,0 +1,112 @@
|
|
1
|
+
// Compiled using marko@4.20.2 - DO NOT EDIT
|
2
|
+
"use strict";
|
3
|
+
|
4
|
+
var marko_template = module.exports = require("marko/src/html").t(__filename),
|
5
|
+
marko_componentType = "/@parameter1/base-cms-marko-web$3.11.0/components/node/body.marko",
|
6
|
+
marko_renderer = require("marko/src/runtime/components/renderer"),
|
7
|
+
module_baseCmsObjectPath_module = require("@parameter1/base-cms-object-path"),
|
8
|
+
baseCmsObjectPath_module = module_baseCmsObjectPath_module.default || module_baseCmsObjectPath_module,
|
9
|
+
getAsArray = module_baseCmsObjectPath_module.getAsArray,
|
10
|
+
get = module_baseCmsObjectPath_module.get,
|
11
|
+
module_showElement = require("../element/show-element"),
|
12
|
+
showElement = module_showElement.default || module_showElement,
|
13
|
+
marko_assign = require("marko/src/runtime/helpers/assign"),
|
14
|
+
marko_web_node_header_template = require("./header.marko"),
|
15
|
+
marko_loadTag = require("marko/src/runtime/helpers/load-tag"),
|
16
|
+
marko_web_node_header_tag = marko_loadTag(marko_web_node_header_template),
|
17
|
+
marko_web_node_element_template = require("./element.marko"),
|
18
|
+
marko_web_node_element_tag = marko_loadTag(marko_web_node_element_template),
|
19
|
+
marko_forOf = require("marko/src/runtime/helpers/for-of"),
|
20
|
+
marko_web_node_footer_template = require("./footer.marko"),
|
21
|
+
marko_web_node_footer_tag = marko_loadTag(marko_web_node_footer_template);
|
22
|
+
|
23
|
+
function render(input, out, __component, component, state) {
|
24
|
+
var data = input;
|
25
|
+
|
26
|
+
const showHeader = showElement(get(input.header, "left")) || showElement(get(input.header, "right"));
|
27
|
+
|
28
|
+
const showTitle = showElement(input.title);
|
29
|
+
|
30
|
+
const showText = getAsArray(input.text).some(t => showElement(t));
|
31
|
+
|
32
|
+
const showFooter = showElement(get(input.footer, "left")) || showElement(get(input.footer, "right"));
|
33
|
+
|
34
|
+
const showBody = showHeader || showTitle || showText || showFooter;
|
35
|
+
|
36
|
+
if (showBody) {
|
37
|
+
marko_web_node_element_tag({
|
38
|
+
show: true,
|
39
|
+
tag: input.tag,
|
40
|
+
blockName: input.blockName,
|
41
|
+
name: "body",
|
42
|
+
modifiers: input.modifiers,
|
43
|
+
attrs: input.attrs,
|
44
|
+
renderBody: function(out) {
|
45
|
+
if (showHeader) {
|
46
|
+
marko_web_node_header_tag(marko_assign({}, input.header, {
|
47
|
+
modifiers: ["body", ...getAsArray(input, "header.modifiers")]
|
48
|
+
}), out, __component, "1");
|
49
|
+
}
|
50
|
+
|
51
|
+
if (showTitle || showText) {
|
52
|
+
marko_web_node_element_tag({
|
53
|
+
show: true,
|
54
|
+
tag: "div",
|
55
|
+
blockName: "node",
|
56
|
+
name: "contents",
|
57
|
+
modifiers: [
|
58
|
+
"body"
|
59
|
+
],
|
60
|
+
renderBody: function(out) {
|
61
|
+
if (showTitle) {
|
62
|
+
marko_web_node_element_tag(marko_assign({
|
63
|
+
show: true,
|
64
|
+
tag: "div",
|
65
|
+
blockName: "node",
|
66
|
+
name: "title"
|
67
|
+
}, input.title), out, __component, "3");
|
68
|
+
}
|
69
|
+
|
70
|
+
if (showText) {
|
71
|
+
var $for$0 = 0;
|
72
|
+
|
73
|
+
marko_forOf(input.text, function(text) {
|
74
|
+
var $keyScope$0 = "[" + (($for$0++) + "]");
|
75
|
+
|
76
|
+
if (showElement(text)) {
|
77
|
+
marko_web_node_element_tag(marko_assign({
|
78
|
+
show: true,
|
79
|
+
tag: "div",
|
80
|
+
blockName: "node",
|
81
|
+
name: "text"
|
82
|
+
}, text), out, __component, "4" + $keyScope$0);
|
83
|
+
}
|
84
|
+
});
|
85
|
+
}
|
86
|
+
}
|
87
|
+
}, out, __component, "2");
|
88
|
+
}
|
89
|
+
|
90
|
+
if (showFooter) {
|
91
|
+
marko_web_node_footer_tag(marko_assign({}, input.footer, {
|
92
|
+
modifiers: ["body", ...getAsArray(input, "footer.modifiers")]
|
93
|
+
}), out, __component, "5");
|
94
|
+
}
|
95
|
+
}
|
96
|
+
}, out, __component, "0");
|
97
|
+
}
|
98
|
+
}
|
99
|
+
|
100
|
+
marko_template._ = marko_renderer(render, {
|
101
|
+
___implicit: true,
|
102
|
+
___type: marko_componentType
|
103
|
+
});
|
104
|
+
|
105
|
+
marko_template.meta = {
|
106
|
+
id: "/@parameter1/base-cms-marko-web$3.11.0/components/node/body.marko",
|
107
|
+
tags: [
|
108
|
+
"./header.marko",
|
109
|
+
"./element.marko",
|
110
|
+
"./footer.marko"
|
111
|
+
]
|
112
|
+
};
|
@@ -0,0 +1,39 @@
|
|
1
|
+
// Compiled using marko@4.20.2 - DO NOT EDIT
|
2
|
+
"use strict";
|
3
|
+
|
4
|
+
var marko_template = module.exports = require("marko/src/html").t(__filename),
|
5
|
+
marko_componentType = "/@parameter1/base-cms-marko-web$3.11.0/components/node/element.marko",
|
6
|
+
marko_renderer = require("marko/src/runtime/components/renderer"),
|
7
|
+
marko_assign = require("marko/src/runtime/helpers/assign"),
|
8
|
+
marko_web_element_template = require("../element"),
|
9
|
+
marko_loadTag = require("marko/src/runtime/helpers/load-tag"),
|
10
|
+
marko_web_element_tag = marko_loadTag(marko_web_element_template);
|
11
|
+
|
12
|
+
function render(input, out, __component, component, state) {
|
13
|
+
var data = input;
|
14
|
+
|
15
|
+
const block = input.blockName || "node";
|
16
|
+
|
17
|
+
const show = input.show != null ? input.show : true;
|
18
|
+
|
19
|
+
if (show) {
|
20
|
+
marko_web_element_tag(marko_assign({
|
21
|
+
name: "default",
|
22
|
+
tag: "div"
|
23
|
+
}, input, {
|
24
|
+
blockName: block
|
25
|
+
}), out, __component, "0");
|
26
|
+
}
|
27
|
+
}
|
28
|
+
|
29
|
+
marko_template._ = marko_renderer(render, {
|
30
|
+
___implicit: true,
|
31
|
+
___type: marko_componentType
|
32
|
+
});
|
33
|
+
|
34
|
+
marko_template.meta = {
|
35
|
+
id: "/@parameter1/base-cms-marko-web$3.11.0/components/node/element.marko",
|
36
|
+
tags: [
|
37
|
+
"../element"
|
38
|
+
]
|
39
|
+
};
|
@@ -0,0 +1,63 @@
|
|
1
|
+
// Compiled using marko@4.20.2 - DO NOT EDIT
|
2
|
+
"use strict";
|
3
|
+
|
4
|
+
var marko_template = module.exports = require("marko/src/html").t(__filename),
|
5
|
+
marko_componentType = "/@parameter1/base-cms-marko-web$3.11.0/components/node/footer.marko",
|
6
|
+
marko_renderer = require("marko/src/runtime/components/renderer"),
|
7
|
+
module_baseCmsObjectPath_module = require("@parameter1/base-cms-object-path"),
|
8
|
+
baseCmsObjectPath_module = module_baseCmsObjectPath_module.default || module_baseCmsObjectPath_module,
|
9
|
+
getAsObject = module_baseCmsObjectPath_module.getAsObject,
|
10
|
+
marko_assign = require("marko/src/runtime/helpers/assign"),
|
11
|
+
marko_web_node_element_template = require("./element.marko"),
|
12
|
+
marko_loadTag = require("marko/src/runtime/helpers/load-tag"),
|
13
|
+
marko_web_node_element_tag = marko_loadTag(marko_web_node_element_template);
|
14
|
+
|
15
|
+
function render(input, out, __component, component, state) {
|
16
|
+
var data = input;
|
17
|
+
|
18
|
+
const left = getAsObject(input, "left");
|
19
|
+
|
20
|
+
const right = getAsObject(input, "right");
|
21
|
+
|
22
|
+
marko_web_node_element_tag({
|
23
|
+
show: true,
|
24
|
+
tag: input.tag,
|
25
|
+
blockName: input.blockName,
|
26
|
+
name: "footer",
|
27
|
+
modifiers: input.modifiers,
|
28
|
+
attrs: input.attrs,
|
29
|
+
renderBody: function(out) {
|
30
|
+
if (left.renderBody) {
|
31
|
+
marko_web_node_element_tag(marko_assign({
|
32
|
+
show: true,
|
33
|
+
tag: "div",
|
34
|
+
blockName: "node"
|
35
|
+
}, left, {
|
36
|
+
name: "footer-left"
|
37
|
+
}), out, __component, "1");
|
38
|
+
}
|
39
|
+
|
40
|
+
if (right.renderBody) {
|
41
|
+
marko_web_node_element_tag(marko_assign({
|
42
|
+
show: true,
|
43
|
+
tag: "div",
|
44
|
+
blockName: "node"
|
45
|
+
}, right, {
|
46
|
+
name: "footer-right"
|
47
|
+
}), out, __component, "2");
|
48
|
+
}
|
49
|
+
}
|
50
|
+
}, out, __component, "0");
|
51
|
+
}
|
52
|
+
|
53
|
+
marko_template._ = marko_renderer(render, {
|
54
|
+
___implicit: true,
|
55
|
+
___type: marko_componentType
|
56
|
+
});
|
57
|
+
|
58
|
+
marko_template.meta = {
|
59
|
+
id: "/@parameter1/base-cms-marko-web$3.11.0/components/node/footer.marko",
|
60
|
+
tags: [
|
61
|
+
"./element.marko"
|
62
|
+
]
|
63
|
+
};
|
@@ -0,0 +1,63 @@
|
|
1
|
+
// Compiled using marko@4.20.2 - DO NOT EDIT
|
2
|
+
"use strict";
|
3
|
+
|
4
|
+
var marko_template = module.exports = require("marko/src/html").t(__filename),
|
5
|
+
marko_componentType = "/@parameter1/base-cms-marko-web$3.11.0/components/node/header.marko",
|
6
|
+
marko_renderer = require("marko/src/runtime/components/renderer"),
|
7
|
+
module_baseCmsObjectPath_module = require("@parameter1/base-cms-object-path"),
|
8
|
+
baseCmsObjectPath_module = module_baseCmsObjectPath_module.default || module_baseCmsObjectPath_module,
|
9
|
+
getAsObject = module_baseCmsObjectPath_module.getAsObject,
|
10
|
+
marko_assign = require("marko/src/runtime/helpers/assign"),
|
11
|
+
marko_web_node_element_template = require("./element.marko"),
|
12
|
+
marko_loadTag = require("marko/src/runtime/helpers/load-tag"),
|
13
|
+
marko_web_node_element_tag = marko_loadTag(marko_web_node_element_template);
|
14
|
+
|
15
|
+
function render(input, out, __component, component, state) {
|
16
|
+
var data = input;
|
17
|
+
|
18
|
+
const left = getAsObject(input, "left");
|
19
|
+
|
20
|
+
const right = getAsObject(input, "right");
|
21
|
+
|
22
|
+
marko_web_node_element_tag({
|
23
|
+
show: true,
|
24
|
+
tag: input.tag,
|
25
|
+
blockName: input.blockName,
|
26
|
+
name: "header",
|
27
|
+
modifiers: input.modifiers,
|
28
|
+
attrs: input.attrs,
|
29
|
+
renderBody: function(out) {
|
30
|
+
if (left.renderBody) {
|
31
|
+
marko_web_node_element_tag(marko_assign({
|
32
|
+
show: true,
|
33
|
+
tag: "div",
|
34
|
+
blockName: "node"
|
35
|
+
}, left, {
|
36
|
+
name: "header-left"
|
37
|
+
}), out, __component, "1");
|
38
|
+
}
|
39
|
+
|
40
|
+
if (right.renderBody) {
|
41
|
+
marko_web_node_element_tag(marko_assign({
|
42
|
+
show: true,
|
43
|
+
tag: "div",
|
44
|
+
blockName: "node"
|
45
|
+
}, right, {
|
46
|
+
name: "header-right"
|
47
|
+
}), out, __component, "2");
|
48
|
+
}
|
49
|
+
}
|
50
|
+
}, out, __component, "0");
|
51
|
+
}
|
52
|
+
|
53
|
+
marko_template._ = marko_renderer(render, {
|
54
|
+
___implicit: true,
|
55
|
+
___type: marko_componentType
|
56
|
+
});
|
57
|
+
|
58
|
+
marko_template.meta = {
|
59
|
+
id: "/@parameter1/base-cms-marko-web$3.11.0/components/node/header.marko",
|
60
|
+
tags: [
|
61
|
+
"./element.marko"
|
62
|
+
]
|
63
|
+
};
|
@@ -0,0 +1,116 @@
|
|
1
|
+
// Compiled using marko@4.20.2 - DO NOT EDIT
|
2
|
+
"use strict";
|
3
|
+
|
4
|
+
var marko_template = module.exports = require("marko/src/html").t(__filename),
|
5
|
+
marko_componentType = "/@parameter1/base-cms-marko-web$3.11.0/components/node/image-inner-wrapper.marko",
|
6
|
+
marko_renderer = require("marko/src/runtime/components/renderer"),
|
7
|
+
module_baseCmsObjectPath_module = require("@parameter1/base-cms-object-path"),
|
8
|
+
baseCmsObjectPath_module = module_baseCmsObjectPath_module.default || module_baseCmsObjectPath_module,
|
9
|
+
get = module_baseCmsObjectPath_module.get,
|
10
|
+
getAsObject = module_baseCmsObjectPath_module.getAsObject,
|
11
|
+
module_imageValues = require("./utils/image-values"),
|
12
|
+
imageValues = module_imageValues.default || module_imageValues,
|
13
|
+
module_imageHeight = require("./utils/image-height"),
|
14
|
+
imageHeight = module_imageHeight.default || module_imageHeight,
|
15
|
+
marko_assign = require("marko/src/runtime/helpers/assign"),
|
16
|
+
marko_web_node_image_template = require("./image.marko"),
|
17
|
+
marko_loadTag = require("marko/src/runtime/helpers/load-tag"),
|
18
|
+
marko_web_node_image_tag = marko_loadTag(marko_web_node_image_template),
|
19
|
+
marko_web_link_template = require("../element/link.marko"),
|
20
|
+
marko_web_link_tag = marko_loadTag(marko_web_link_template),
|
21
|
+
marko_mergeAttrs = require("marko/src/runtime/html/helpers/merge-attrs");
|
22
|
+
|
23
|
+
function render(input, out, __component, component, state) {
|
24
|
+
var data = input;
|
25
|
+
|
26
|
+
const blockName = input.blockName || "node";
|
27
|
+
|
28
|
+
const element = `${blockName}__image-inner-wrapper`;
|
29
|
+
|
30
|
+
const {
|
31
|
+
src,
|
32
|
+
alt,
|
33
|
+
isLogo,
|
34
|
+
lazyload,
|
35
|
+
imageAttrs,
|
36
|
+
} = input;
|
37
|
+
|
38
|
+
const usePlaceholder = input.usePlaceholder == null ? true : input.usePlaceholder;
|
39
|
+
|
40
|
+
const hasImage = Boolean(src);
|
41
|
+
|
42
|
+
const hasLink = Boolean(get(input, "link.href"));
|
43
|
+
|
44
|
+
const isPlaceholder = !hasImage && usePlaceholder;
|
45
|
+
|
46
|
+
const { width, height, modifier } = imageValues(input);
|
47
|
+
|
48
|
+
const modifiers = [];
|
49
|
+
|
50
|
+
if (modifier) modifiers.push(modifier);
|
51
|
+
|
52
|
+
if (input.gradient) modifiers.push("gradient");
|
53
|
+
|
54
|
+
if (isPlaceholder) modifiers.push("placeholder");
|
55
|
+
|
56
|
+
const classNames = [element, ...modifiers.map(mod => `${element}--${mod}`), input.class];
|
57
|
+
|
58
|
+
const options = {
|
59
|
+
...input.options,
|
60
|
+
w: input.width,
|
61
|
+
h: input.ar ? imageHeight(input.width, input.ar) : undefined,
|
62
|
+
};
|
63
|
+
|
64
|
+
const imageInput = {
|
65
|
+
src,
|
66
|
+
alt,
|
67
|
+
width,
|
68
|
+
height,
|
69
|
+
options,
|
70
|
+
isLogo,
|
71
|
+
usePlaceholder,
|
72
|
+
lazyload,
|
73
|
+
attrs: imageAttrs,
|
74
|
+
};
|
75
|
+
|
76
|
+
if (hasImage || usePlaceholder) {
|
77
|
+
if (hasLink) {
|
78
|
+
const linkAttrs = { ...input.attrs, ...getAsObject(input, "link.attrs") };
|
79
|
+
|
80
|
+
marko_web_link_tag(marko_assign({}, input.link, {
|
81
|
+
attrs: linkAttrs,
|
82
|
+
class: classNames,
|
83
|
+
renderBody: function(out) {
|
84
|
+
marko_web_node_image_tag(marko_assign({
|
85
|
+
lazyload: true
|
86
|
+
}, imageInput), out, __component, "1");
|
87
|
+
}
|
88
|
+
}), out, __component, "0");
|
89
|
+
} else {
|
90
|
+
out.w("<div" +
|
91
|
+
marko_mergeAttrs(input.attrs, {
|
92
|
+
class: classNames
|
93
|
+
}) +
|
94
|
+
">");
|
95
|
+
|
96
|
+
marko_web_node_image_tag(marko_assign({
|
97
|
+
lazyload: true
|
98
|
+
}, imageInput), out, __component, "3");
|
99
|
+
|
100
|
+
out.w("</div>");
|
101
|
+
}
|
102
|
+
}
|
103
|
+
}
|
104
|
+
|
105
|
+
marko_template._ = marko_renderer(render, {
|
106
|
+
___implicit: true,
|
107
|
+
___type: marko_componentType
|
108
|
+
});
|
109
|
+
|
110
|
+
marko_template.meta = {
|
111
|
+
id: "/@parameter1/base-cms-marko-web$3.11.0/components/node/image-inner-wrapper.marko",
|
112
|
+
tags: [
|
113
|
+
"./image.marko",
|
114
|
+
"../element/link.marko"
|
115
|
+
]
|
116
|
+
};
|
@@ -0,0 +1,98 @@
|
|
1
|
+
// Compiled using marko@4.20.2 - DO NOT EDIT
|
2
|
+
"use strict";
|
3
|
+
|
4
|
+
var marko_template = module.exports = require("marko/src/html").t(__filename),
|
5
|
+
marko_componentType = "/@parameter1/base-cms-marko-web$3.11.0/components/node/image-wrapper.marko",
|
6
|
+
marko_renderer = require("marko/src/runtime/components/renderer"),
|
7
|
+
module_baseCmsObjectPath_module = require("@parameter1/base-cms-object-path"),
|
8
|
+
baseCmsObjectPath_module = module_baseCmsObjectPath_module.default || module_baseCmsObjectPath_module,
|
9
|
+
getAsArray = module_baseCmsObjectPath_module.getAsArray,
|
10
|
+
module_imageValues = require("./utils/image-values"),
|
11
|
+
imageValues = module_imageValues.default || module_imageValues,
|
12
|
+
marko_assign = require("marko/src/runtime/helpers/assign"),
|
13
|
+
marko_web_node_image_inner_wrapper_template = require("./image-inner-wrapper.marko"),
|
14
|
+
marko_loadTag = require("marko/src/runtime/helpers/load-tag"),
|
15
|
+
marko_web_node_image_inner_wrapper_tag = marko_loadTag(marko_web_node_image_inner_wrapper_template),
|
16
|
+
marko_web_node_header_template = require("./header.marko"),
|
17
|
+
marko_web_node_header_tag = marko_loadTag(marko_web_node_header_template),
|
18
|
+
marko_web_node_body_template = require("./body.marko"),
|
19
|
+
marko_web_node_body_tag = marko_loadTag(marko_web_node_body_template),
|
20
|
+
marko_web_node_element_template = require("./element.marko"),
|
21
|
+
marko_web_node_element_tag = marko_loadTag(marko_web_node_element_template);
|
22
|
+
|
23
|
+
function render(input, out, __component, component, state) {
|
24
|
+
var data = input;
|
25
|
+
|
26
|
+
const usePlaceholder = input.usePlaceholder == null ? true : input.usePlaceholder;
|
27
|
+
|
28
|
+
const hasImage = Boolean(input.src);
|
29
|
+
|
30
|
+
const { width, height } = imageValues(input);
|
31
|
+
|
32
|
+
const style = [];
|
33
|
+
|
34
|
+
if (width) {
|
35
|
+
style.push(`width: ${input.width}px;`);
|
36
|
+
// Add min-width for IE11
|
37
|
+
style.push(`min-width: ${input.width}px;`);
|
38
|
+
}
|
39
|
+
|
40
|
+
if (height) style.push(`height: ${height}px;`);
|
41
|
+
|
42
|
+
const { header, body, align } = input;
|
43
|
+
|
44
|
+
delete input.header;
|
45
|
+
|
46
|
+
delete input.body;
|
47
|
+
|
48
|
+
delete input.align;
|
49
|
+
|
50
|
+
const modifiers = [];
|
51
|
+
|
52
|
+
if (align) modifiers.push(`align-${align}`);
|
53
|
+
|
54
|
+
if (hasImage || usePlaceholder) {
|
55
|
+
marko_web_node_element_tag({
|
56
|
+
show: true,
|
57
|
+
tag: "div",
|
58
|
+
blockName: input.blockName,
|
59
|
+
name: "image-wrapper",
|
60
|
+
attrs: {
|
61
|
+
style: style
|
62
|
+
},
|
63
|
+
modifiers: modifiers,
|
64
|
+
renderBody: function(out) {
|
65
|
+
marko_web_node_image_inner_wrapper_tag(marko_assign({
|
66
|
+
lazyload: true
|
67
|
+
}, input), out, __component, "1");
|
68
|
+
|
69
|
+
if (header) {
|
70
|
+
marko_web_node_header_tag(marko_assign({}, header, {
|
71
|
+
modifiers: ["overlay", ...getAsArray(header, "modifiers")]
|
72
|
+
}), out, __component, "2");
|
73
|
+
}
|
74
|
+
|
75
|
+
if (body) {
|
76
|
+
marko_web_node_body_tag(marko_assign({}, body, {
|
77
|
+
modifiers: ["overlay", ...getAsArray(header, "modifiers")]
|
78
|
+
}), out, __component, "3");
|
79
|
+
}
|
80
|
+
}
|
81
|
+
}, out, __component, "0");
|
82
|
+
}
|
83
|
+
}
|
84
|
+
|
85
|
+
marko_template._ = marko_renderer(render, {
|
86
|
+
___implicit: true,
|
87
|
+
___type: marko_componentType
|
88
|
+
});
|
89
|
+
|
90
|
+
marko_template.meta = {
|
91
|
+
id: "/@parameter1/base-cms-marko-web$3.11.0/components/node/image-wrapper.marko",
|
92
|
+
tags: [
|
93
|
+
"./image-inner-wrapper.marko",
|
94
|
+
"./header.marko",
|
95
|
+
"./body.marko",
|
96
|
+
"./element.marko"
|
97
|
+
]
|
98
|
+
};
|