@parameter1/base-cms-marko-web 4.0.0-alpha.0 → 4.0.0-beta.0
Sign up to get free protection for your applications and to get access to all the features.
- package/LICENSE +1 -1
- package/browser/.eslintrc.js +1 -21
- package/browser/components/element-id.js +1 -1
- package/browser/components/image-slider.vue +1 -1
- package/browser/index.js +1 -1
- package/components/browser-component.marko.js +2 -2
- package/components/document/components/body-wrapper.marko.js +2 -2
- package/components/document/components/error.marko.js +2 -2
- package/components/document/components/live-reload.marko.js +2 -2
- package/components/document/components/polyfill.marko.js +2 -2
- package/components/document/container.marko.js +2 -2
- package/components/document/index.marko.js +2 -2
- package/components/element/array.marko.js +2 -2
- package/components/element/audio.marko.js +2 -2
- package/components/element/block.marko.js +2 -2
- package/components/element/clear.marko.js +2 -2
- package/components/element/components/image.marko.js +2 -2
- package/components/element/components/text.marko.js +2 -2
- package/components/element/content/address1.marko.js +2 -2
- package/components/element/content/address2.marko.js +2 -2
- package/components/element/content/audio.marko.js +3 -4
- package/components/element/content/authors.marko.js +2 -2
- package/components/element/content/body.marko.js +2 -2
- package/components/element/content/byline.marko.js +2 -2
- package/components/element/content/city-state-zip.marko.js +2 -2
- package/components/element/content/contributors.marko.js +2 -2
- package/components/element/content/country.marko.js +2 -2
- package/components/element/content/embed-code.marko.js +2 -2
- package/components/element/content/end-date.marko.js +2 -2
- package/components/element/content/ends.marko.js +3 -4
- package/components/element/content/fax.marko.js +2 -2
- package/components/element/content/images.marko.js +3 -4
- package/components/element/content/mobile.marko.js +2 -2
- package/components/element/content/name.marko.js +2 -2
- package/components/element/content/phone.marko.js +2 -2
- package/components/element/content/photographers.marko.js +2 -2
- package/components/element/content/public-email.marko.js +2 -2
- package/components/element/content/published.marko.js +2 -2
- package/components/element/content/short-name.marko.js +2 -2
- package/components/element/content/sidebar-stubs.marko.js +63 -0
- package/components/element/content/sidebars.marko.js +2 -2
- package/components/element/content/source.marko.js +2 -2
- package/components/element/content/sponsors.marko.js +2 -2
- package/components/element/content/start-date.marko.js +2 -2
- package/components/element/content/starts.marko.js +3 -4
- package/components/element/content/teaser.marko.js +2 -2
- package/components/element/content/title.marko.js +2 -2
- package/components/element/content/tollfree.marko.js +2 -2
- package/components/element/content/transcript.marko.js +53 -0
- package/components/element/content/website.marko.js +2 -2
- package/components/element/date.marko.js +2 -2
- package/components/element/extract-render.js +1 -1
- package/components/element/image/caption.marko.js +2 -2
- package/components/element/image/credit.marko.js +2 -2
- package/components/element/image/display-name.marko.js +2 -2
- package/components/element/image/slider.marko.js +50 -0
- package/components/element/img.marko.js +2 -2
- package/components/element/index.marko.js +2 -2
- package/components/element/link.marko.js +2 -2
- package/components/element/magazine-issue/description.marko.js +3 -4
- package/components/element/magazine-issue/digital-edition-url.marko.js +3 -4
- package/components/element/magazine-issue/name.marko.js +3 -4
- package/components/element/magazine-issue/pdf-url.marko.js +51 -0
- package/components/element/magazine-publication/cancel-url.marko.js +51 -0
- package/components/element/magazine-publication/change-address-url.marko.js +51 -0
- package/components/element/magazine-publication/description.marko.js +3 -4
- package/components/element/magazine-publication/einquiry-url.marko.js +3 -4
- package/components/element/magazine-publication/name.marko.js +3 -4
- package/components/element/magazine-publication/renewal-url.marko.js +3 -4
- package/components/element/magazine-publication/reprints-url.marko.js +3 -4
- package/components/element/magazine-publication/subscribe-url.marko.js +3 -4
- package/components/element/obj-array.marko.js +2 -2
- package/components/element/obj-audio.marko.js +4 -5
- package/components/element/obj-date.marko.js +2 -2
- package/components/element/obj-nodes.marko.js +2 -2
- package/components/element/obj-text.marko.js +2 -2
- package/components/element/obj.marko.js +2 -2
- package/components/element/object-link.js +1 -1
- package/components/element/picture.marko.js +2 -2
- package/components/element/text.marko.js +2 -2
- package/components/element/website-section/description.marko.js +3 -4
- package/components/element/website-section/hierarchy.marko.js +4 -5
- package/components/element/website-section/name.marko.js +2 -2
- package/components/load-more/index.marko.js +3 -3
- package/components/load-more/trigger.marko.js +2 -2
- package/components/node/body.marko.js +2 -2
- package/components/node/element.marko.js +4 -4
- package/components/node/footer.marko.js +2 -2
- package/components/node/header.marko.js +2 -2
- package/components/node/image-inner-wrapper.marko.js +2 -2
- package/components/node/image-wrapper.marko.js +2 -2
- package/components/node/image.marko.js +2 -2
- package/components/node/index.marko.js +2 -2
- package/components/node-list/body.marko.js +2 -2
- package/components/node-list/element.marko.js +4 -4
- package/components/node-list/footer.marko.js +2 -2
- package/components/node-list/header.marko.js +2 -2
- package/components/node-list/index.marko.js +2 -2
- package/components/node-list/node.marko.js +2 -2
- package/components/node-list/nodes.marko.js +2 -2
- package/components/page/container.marko.js +2 -2
- package/components/page/description.marko.js +2 -2
- package/components/page/image.marko.js +2 -2
- package/components/page/layouts/content.marko.js +2 -2
- package/components/page/layouts/default.marko.js +2 -2
- package/components/page/layouts/dynamic-page.marko.js +4 -4
- package/components/page/layouts/magazine-issue.marko.js +4 -4
- package/components/page/layouts/magazine-publication.marko.js +4 -4
- package/components/page/layouts/website-section.marko.js +2 -2
- package/components/page/metadata/components/common.marko.js +2 -2
- package/components/page/metadata/content.marko.js +2 -2
- package/components/page/metadata/default.marko.js +2 -2
- package/components/page/metadata/dynamic-page.marko.js +6 -5
- package/components/page/metadata/google-structured-data/content.js +2 -2
- package/components/page/metadata/magazine-issue.marko.js +4 -5
- package/components/page/metadata/magazine-publication.marko.js +4 -5
- package/components/page/metadata/website-section.marko.js +2 -2
- package/components/page/rel-canonical.marko.js +2 -2
- package/components/page/title.marko.js +2 -2
- package/components/page/wrapper.marko.js +4 -4
- package/components/resolve/page.marko.js +2 -2
- package/components/rss/website-section.marko.js +2 -2
- package/config/asset-manifest.js +1 -1
- package/express/index.js +2 -3
- package/express/load-document.js +1 -1
- package/express/load-object.js +1 -1
- package/express/marko.js +36 -0
- package/express/website-context.js +1 -1
- package/index.js +5 -0
- package/middleware/page-node/index.js +1 -1
- package/middleware/page-node/resolved.js +1 -1
- package/package.json +30 -21
- package/start-server.js +5 -3
- package/utils/embedded-media/facebook-oembed.js +1 -2
- package/utils/embedded-media/image.js +3 -3
- package/utils/embedded-media/instagram-oembed.js +1 -1
- package/utils/hierarchy-aliases.js +1 -1
- package/utils/hierarchy-ids.js +1 -1
- package/utils/render-ssr-component.js +1 -1
- package/components/document/components/lazysizes.marko.js +0 -21
- package/node-require.js +0 -6
- package/refactor-notes.md +0 -80
@@ -15,12 +15,12 @@ const get = (o, path) => {
|
|
15
15
|
};
|
16
16
|
|
17
17
|
const getAuthor = (node) => {
|
18
|
-
const authors = getAsArray(node, 'authors.edges').map(e => get(e, 'node.name'));
|
18
|
+
const authors = getAsArray(node, 'authors.edges').map((e) => get(e, 'node.name'));
|
19
19
|
return authors.length ? { '@type': 'Person', name: authors.join(', ') } : undefined;
|
20
20
|
};
|
21
21
|
|
22
22
|
const getImages = (node) => {
|
23
|
-
const images = getAsArray(node, 'images.edges').map(e => get(e, 'node.src'));
|
23
|
+
const images = getAsArray(node, 'images.edges').map((e) => get(e, 'node.src'));
|
24
24
|
return images.length ? images : undefined;
|
25
25
|
};
|
26
26
|
|
@@ -2,7 +2,7 @@
|
|
2
2
|
"use strict";
|
3
3
|
|
4
4
|
var marko_template = module.exports = require("marko/src/html").t(__filename),
|
5
|
-
marko_componentType = "/@parameter1/base-cms-marko-web$
|
5
|
+
marko_componentType = "/@parameter1/base-cms-marko-web$4.0.0-beta.0/components/page/metadata/magazine-issue.marko",
|
6
6
|
marko_component = require("./magazine-issue.marko"),
|
7
7
|
marko_renderer = require("marko/src/runtime/components/renderer"),
|
8
8
|
module_gql = require("graphql-tag"),
|
@@ -13,11 +13,10 @@ var marko_template = module.exports = require("marko/src/html").t(__filename),
|
|
13
13
|
module_baseCmsUtils_module = require("@parameter1/base-cms-utils"),
|
14
14
|
baseCmsUtils_module = module_baseCmsUtils_module.default || module_baseCmsUtils_module,
|
15
15
|
warn = module_baseCmsUtils_module.warn,
|
16
|
-
|
17
|
-
common_template = marko_loadTemplate(require.resolve("./components/common.marko")),
|
16
|
+
common_template = require("./components/common.marko"),
|
18
17
|
marko_loadTag = require("marko/src/runtime/helpers/load-tag"),
|
19
18
|
common_tag = marko_loadTag(common_template),
|
20
|
-
marko_web_query_template =
|
19
|
+
marko_web_query_template = require("@parameter1/base-cms-marko-core/components/queries/index.marko"),
|
21
20
|
marko_web_query_tag = marko_loadTag(marko_web_query_template);
|
22
21
|
|
23
22
|
function render(input, out, __component, component, state) {
|
@@ -75,7 +74,7 @@ marko_template._ = marko_renderer(render, {
|
|
75
74
|
}, marko_component);
|
76
75
|
|
77
76
|
marko_template.meta = {
|
78
|
-
id: "/@parameter1/base-cms-marko-web$
|
77
|
+
id: "/@parameter1/base-cms-marko-web$4.0.0-beta.0/components/page/metadata/magazine-issue.marko",
|
79
78
|
component: "./magazine-issue.marko",
|
80
79
|
tags: [
|
81
80
|
"./components/common.marko",
|
@@ -2,7 +2,7 @@
|
|
2
2
|
"use strict";
|
3
3
|
|
4
4
|
var marko_template = module.exports = require("marko/src/html").t(__filename),
|
5
|
-
marko_componentType = "/@parameter1/base-cms-marko-web$
|
5
|
+
marko_componentType = "/@parameter1/base-cms-marko-web$4.0.0-beta.0/components/page/metadata/magazine-publication.marko",
|
6
6
|
marko_component = require("./magazine-publication.marko"),
|
7
7
|
marko_renderer = require("marko/src/runtime/components/renderer"),
|
8
8
|
module_gql = require("graphql-tag"),
|
@@ -13,11 +13,10 @@ var marko_template = module.exports = require("marko/src/html").t(__filename),
|
|
13
13
|
module_baseCmsUtils_module = require("@parameter1/base-cms-utils"),
|
14
14
|
baseCmsUtils_module = module_baseCmsUtils_module.default || module_baseCmsUtils_module,
|
15
15
|
warn = module_baseCmsUtils_module.warn,
|
16
|
-
|
17
|
-
common_template = marko_loadTemplate(require.resolve("./components/common.marko")),
|
16
|
+
common_template = require("./components/common.marko"),
|
18
17
|
marko_loadTag = require("marko/src/runtime/helpers/load-tag"),
|
19
18
|
common_tag = marko_loadTag(common_template),
|
20
|
-
marko_web_query_template =
|
19
|
+
marko_web_query_template = require("@parameter1/base-cms-marko-core/components/queries/index.marko"),
|
21
20
|
marko_web_query_tag = marko_loadTag(marko_web_query_template);
|
22
21
|
|
23
22
|
function render(input, out, __component, component, state) {
|
@@ -71,7 +70,7 @@ marko_template._ = marko_renderer(render, {
|
|
71
70
|
}, marko_component);
|
72
71
|
|
73
72
|
marko_template.meta = {
|
74
|
-
id: "/@parameter1/base-cms-marko-web$
|
73
|
+
id: "/@parameter1/base-cms-marko-web$4.0.0-beta.0/components/page/metadata/magazine-publication.marko",
|
75
74
|
component: "./magazine-publication.marko",
|
76
75
|
tags: [
|
77
76
|
"./components/common.marko",
|
@@ -2,7 +2,7 @@
|
|
2
2
|
"use strict";
|
3
3
|
|
4
4
|
var marko_template = module.exports = require("marko/src/html").t(__filename),
|
5
|
-
marko_componentType = "/@parameter1/base-cms-marko-web$
|
5
|
+
marko_componentType = "/@parameter1/base-cms-marko-web$4.0.0-beta.0/components/page/metadata/website-section.marko",
|
6
6
|
marko_component = require("./website-section.marko"),
|
7
7
|
marko_renderer = require("marko/src/runtime/components/renderer"),
|
8
8
|
module_gql = require("graphql-tag"),
|
@@ -70,7 +70,7 @@ marko_template._ = marko_renderer(render, {
|
|
70
70
|
}, marko_component);
|
71
71
|
|
72
72
|
marko_template.meta = {
|
73
|
-
id: "/@parameter1/base-cms-marko-web$
|
73
|
+
id: "/@parameter1/base-cms-marko-web$4.0.0-beta.0/components/page/metadata/website-section.marko",
|
74
74
|
component: "./website-section.marko",
|
75
75
|
tags: [
|
76
76
|
"./components/common.marko",
|
@@ -2,7 +2,7 @@
|
|
2
2
|
"use strict";
|
3
3
|
|
4
4
|
var marko_template = module.exports = require("marko/src/html").t(__filename),
|
5
|
-
marko_componentType = "/@parameter1/base-cms-marko-web$
|
5
|
+
marko_componentType = "/@parameter1/base-cms-marko-web$4.0.0-beta.0/components/page/rel-canonical.marko",
|
6
6
|
marko_renderer = require("marko/src/runtime/components/renderer"),
|
7
7
|
module_baseCmsUtils_module = require("@parameter1/base-cms-utils"),
|
8
8
|
baseCmsUtils_module = module_baseCmsUtils_module.default || module_baseCmsUtils_module,
|
@@ -38,5 +38,5 @@ marko_template._ = marko_renderer(render, {
|
|
38
38
|
});
|
39
39
|
|
40
40
|
marko_template.meta = {
|
41
|
-
id: "/@parameter1/base-cms-marko-web$
|
41
|
+
id: "/@parameter1/base-cms-marko-web$4.0.0-beta.0/components/page/rel-canonical.marko"
|
42
42
|
};
|
@@ -2,7 +2,7 @@
|
|
2
2
|
"use strict";
|
3
3
|
|
4
4
|
var marko_template = module.exports = require("marko/src/html").t(__filename),
|
5
|
-
marko_componentType = "/@parameter1/base-cms-marko-web$
|
5
|
+
marko_componentType = "/@parameter1/base-cms-marko-web$4.0.0-beta.0/components/page/title.marko",
|
6
6
|
marko_renderer = require("marko/src/runtime/components/renderer"),
|
7
7
|
module_baseCmsUtils_module = require("@parameter1/base-cms-utils"),
|
8
8
|
baseCmsUtils_module = module_baseCmsUtils_module.default || module_baseCmsUtils_module,
|
@@ -42,5 +42,5 @@ marko_template._ = marko_renderer(render, {
|
|
42
42
|
});
|
43
43
|
|
44
44
|
marko_template.meta = {
|
45
|
-
id: "/@parameter1/base-cms-marko-web$
|
45
|
+
id: "/@parameter1/base-cms-marko-web$4.0.0-beta.0/components/page/title.marko"
|
46
46
|
};
|
@@ -2,14 +2,14 @@
|
|
2
2
|
"use strict";
|
3
3
|
|
4
4
|
var marko_template = module.exports = require("marko/src/html").t(__filename),
|
5
|
-
marko_componentType = "/@parameter1/base-cms-marko-web$
|
5
|
+
marko_componentType = "/@parameter1/base-cms-marko-web$4.0.0-beta.0/components/page/wrapper.marko",
|
6
6
|
marko_renderer = require("marko/src/runtime/components/renderer"),
|
7
7
|
module_baseCmsObjectPath_module = require("@parameter1/base-cms-object-path"),
|
8
8
|
baseCmsObjectPath_module = module_baseCmsObjectPath_module.default || module_baseCmsObjectPath_module,
|
9
9
|
getAsArray = module_baseCmsObjectPath_module.getAsArray,
|
10
10
|
marko_forOf = require("marko/src/runtime/helpers/for-of"),
|
11
11
|
marko_assign = require("marko/src/runtime/helpers/assign"),
|
12
|
-
marko_web_element_template = require("../element"),
|
12
|
+
marko_web_element_template = require("../element/index.marko"),
|
13
13
|
marko_loadTag = require("marko/src/runtime/helpers/load-tag"),
|
14
14
|
marko_web_element_tag = marko_loadTag(marko_web_element_template),
|
15
15
|
marko_dynamicTag = require("marko/src/runtime/helpers/dynamic-tag");
|
@@ -56,8 +56,8 @@ marko_template._ = marko_renderer(render, {
|
|
56
56
|
});
|
57
57
|
|
58
58
|
marko_template.meta = {
|
59
|
-
id: "/@parameter1/base-cms-marko-web$
|
59
|
+
id: "/@parameter1/base-cms-marko-web$4.0.0-beta.0/components/page/wrapper.marko",
|
60
60
|
tags: [
|
61
|
-
"../element"
|
61
|
+
"../element/index.marko"
|
62
62
|
]
|
63
63
|
};
|
@@ -2,7 +2,7 @@
|
|
2
2
|
"use strict";
|
3
3
|
|
4
4
|
var marko_template = module.exports = require("marko/src/html").t(__filename),
|
5
|
-
marko_componentType = "/@parameter1/base-cms-marko-web$
|
5
|
+
marko_componentType = "/@parameter1/base-cms-marko-web$4.0.0-beta.0/components/resolve/page.marko",
|
6
6
|
marko_component = require("./page.marko"),
|
7
7
|
marko_renderer = require("marko/src/runtime/components/renderer"),
|
8
8
|
module_baseCmsUtils_module = require("@parameter1/base-cms-utils"),
|
@@ -41,7 +41,7 @@ marko_template._ = marko_renderer(render, {
|
|
41
41
|
}, marko_component);
|
42
42
|
|
43
43
|
marko_template.meta = {
|
44
|
-
id: "/@parameter1/base-cms-marko-web$
|
44
|
+
id: "/@parameter1/base-cms-marko-web$4.0.0-beta.0/components/resolve/page.marko",
|
45
45
|
component: "./page.marko",
|
46
46
|
tags: [
|
47
47
|
"@parameter1/base-cms-marko-core/components/resolve.marko"
|
@@ -2,7 +2,7 @@
|
|
2
2
|
"use strict";
|
3
3
|
|
4
4
|
var marko_template = module.exports = require("marko/src/html").t(__filename),
|
5
|
-
marko_componentType = "/@parameter1/base-cms-marko-web$
|
5
|
+
marko_componentType = "/@parameter1/base-cms-marko-web$4.0.0-beta.0/components/rss/website-section.marko",
|
6
6
|
marko_renderer = require("marko/src/runtime/components/renderer"),
|
7
7
|
module_url_module = require("url"),
|
8
8
|
url_module = module_url_module.default || module_url_module,
|
@@ -42,5 +42,5 @@ marko_template._ = marko_renderer(render, {
|
|
42
42
|
});
|
43
43
|
|
44
44
|
marko_template.meta = {
|
45
|
-
id: "/@parameter1/base-cms-marko-web$
|
45
|
+
id: "/@parameter1/base-cms-marko-web$4.0.0-beta.0/components/rss/website-section.marko"
|
46
46
|
};
|
package/config/asset-manifest.js
CHANGED
package/express/index.js
CHANGED
@@ -1,11 +1,10 @@
|
|
1
1
|
const { buildRequestHeaders } = require('@parameter1/base-cms-tenant-context');
|
2
2
|
const createApolloClient = require('@parameter1/base-cms-apollo-ssr');
|
3
|
+
const { cleanMarkoResponse, markoMiddleware } = require('@parameter1/base-cms-marko-express/middleware');
|
3
4
|
const cookieParser = require('cookie-parser');
|
4
5
|
const express = require('express');
|
5
|
-
const marko = require('marko/express');
|
6
6
|
const path = require('path');
|
7
7
|
const helmet = require('helmet');
|
8
|
-
const cleanMarkoResponse = require('@parameter1/base-cms-marko-core/middleware/clean-marko-response');
|
9
8
|
const apollo = require('./apollo');
|
10
9
|
const graphqlProxy = require('./graphql-proxy');
|
11
10
|
const embeddedMedia = require('./embedded-media');
|
@@ -111,7 +110,7 @@ module.exports = (config = {}) => {
|
|
111
110
|
app.use(websiteContext(app.locals.config));
|
112
111
|
|
113
112
|
// Register the Marko middleware.
|
114
|
-
app.use(
|
113
|
+
app.use(markoMiddleware());
|
115
114
|
app.use(cleanMarkoResponse());
|
116
115
|
|
117
116
|
// Serve static assets
|
package/express/load-document.js
CHANGED
package/express/load-object.js
CHANGED
@@ -6,5 +6,5 @@ const { keys } = Object;
|
|
6
6
|
module.exports = (value) => {
|
7
7
|
const v = getAsObject(value);
|
8
8
|
const obj = keys(v).reduce((o, k) => ({ ...o, [dasherize(k)]: v[k] }), {});
|
9
|
-
return { get: name => get(obj, dasherize(name)) };
|
9
|
+
return { get: (name) => get(obj, dasherize(name)) };
|
10
10
|
};
|
package/express/marko.js
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
/* eslint-disable no-underscore-dangle */
|
2
|
+
require('marko');
|
3
|
+
const buildGlobal = require('@parameter1/base-cms-marko-core/utils/build-marko-global');
|
4
|
+
|
5
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
6
|
+
const express = module.main ? module.main.require('express') : require('express');
|
7
|
+
|
8
|
+
if (!express) throw new Error('Unable to load Express.');
|
9
|
+
|
10
|
+
const patch = (response) => {
|
11
|
+
response.marko = response.marko || function markoResponse(template, data) {
|
12
|
+
if (typeof template === 'string') throw new Error('res.marko does not accept a string or path as a template.');
|
13
|
+
|
14
|
+
const res = this;
|
15
|
+
const { req } = res;
|
16
|
+
res.set({ 'content-type': 'text/html; charset=utf-8' });
|
17
|
+
const $global = buildGlobal(res, data);
|
18
|
+
return template.render({ ...(data || {}), $global }, res).on('error', req.next);
|
19
|
+
};
|
20
|
+
};
|
21
|
+
|
22
|
+
patch(express.response);
|
23
|
+
delete require.cache[__filename];
|
24
|
+
|
25
|
+
module.exports = () => {
|
26
|
+
const app = express();
|
27
|
+
app.once('mount', (parent) => {
|
28
|
+
patch(parent.response);
|
29
|
+
if (parent._router) {
|
30
|
+
parent._router.stack.pop(); // express <= 4.x
|
31
|
+
} else {
|
32
|
+
parent.router.stack.pop(); // express 5.x
|
33
|
+
}
|
34
|
+
});
|
35
|
+
return app;
|
36
|
+
};
|
@@ -2,7 +2,7 @@ const loadWebsite = require('@parameter1/base-cms-web-common/website-context');
|
|
2
2
|
const { asyncRoute } = require('@parameter1/base-cms-utils');
|
3
3
|
const { setDayjsLocale } = require('@parameter1/base-cms-dayjs/utils');
|
4
4
|
|
5
|
-
module.exports = coreConfig => asyncRoute(async (req, res, next) => {
|
5
|
+
module.exports = (coreConfig) => asyncRoute(async (req, res, next) => {
|
6
6
|
const { apollo } = res.locals;
|
7
7
|
const websiteContext = await loadWebsite(apollo);
|
8
8
|
coreConfig.setWebsiteContext(websiteContext);
|
package/index.js
CHANGED
@@ -2,7 +2,7 @@ const { isFunction: isFn } = require('@parameter1/base-cms-utils');
|
|
2
2
|
const { getAsObject } = require('@parameter1/base-cms-object-path');
|
3
3
|
const ResolvedNode = require('./resolved');
|
4
4
|
|
5
|
-
const createNode = data => new ResolvedNode(data);
|
5
|
+
const createNode = (data) => new ResolvedNode(data);
|
6
6
|
|
7
7
|
class PageNode {
|
8
8
|
constructor(apolloClient, {
|
package/package.json
CHANGED
@@ -1,33 +1,42 @@
|
|
1
1
|
{
|
2
2
|
"name": "@parameter1/base-cms-marko-web",
|
3
|
-
"version": "4.0.0-
|
3
|
+
"version": "4.0.0-beta.0",
|
4
4
|
"description": "Core Marko+Express components for BaseCMS websites",
|
5
5
|
"author": "Jacob Bare <jacob@parameter1.com>",
|
6
6
|
"main": "index.js",
|
7
7
|
"license": "MIT",
|
8
8
|
"repository": "https://github.com/parameter1/base-cms/tree/master/packages/marko-web",
|
9
|
+
"engines": {
|
10
|
+
"node": ">=14.15"
|
11
|
+
},
|
12
|
+
"os": [
|
13
|
+
"darwin",
|
14
|
+
"linux",
|
15
|
+
"win32"
|
16
|
+
],
|
9
17
|
"scripts": {
|
10
|
-
"lint": "yarn lint
|
11
|
-
"lint
|
12
|
-
"
|
13
|
-
"
|
14
|
-
"test": "yarn compile && yarn lint"
|
18
|
+
"lint:fix": "yarn lint --fix",
|
19
|
+
"lint": "eslint --ext .js --ext .vue --max-warnings 5 ./",
|
20
|
+
"compile": "basecms-marko-compile compile",
|
21
|
+
"prepublish": "yarn compile --silent",
|
22
|
+
"test": "yarn compile --no-clean && yarn lint"
|
15
23
|
},
|
16
24
|
"dependencies": {
|
17
25
|
"@godaddy/terminus": "^4.11.2",
|
18
|
-
"@parameter1/base-cms-apollo-ssr": "^4.0.0-
|
19
|
-
"@parameter1/base-cms-dayjs": "^
|
20
|
-
"@parameter1/base-cms-embedded-media": "^4.0.0-
|
21
|
-
"@parameter1/base-cms-express-apollo": "^4.0.0-
|
22
|
-
"@parameter1/base-cms-graphql-fragment-types": "^4.0.0-
|
23
|
-
"@parameter1/base-cms-image": "^4.0.0-
|
24
|
-
"@parameter1/base-cms-inflector": "^
|
25
|
-
"@parameter1/base-cms-marko-
|
26
|
-
"@parameter1/base-cms-marko-
|
27
|
-
"@parameter1/base-cms-
|
28
|
-
"@parameter1/base-cms-
|
29
|
-
"@parameter1/base-cms-
|
30
|
-
"@parameter1/base-cms-
|
26
|
+
"@parameter1/base-cms-apollo-ssr": "^4.0.0-beta.0",
|
27
|
+
"@parameter1/base-cms-dayjs": "^4.0.0-beta.0",
|
28
|
+
"@parameter1/base-cms-embedded-media": "^4.0.0-beta.0",
|
29
|
+
"@parameter1/base-cms-express-apollo": "^4.0.0-beta.0",
|
30
|
+
"@parameter1/base-cms-graphql-fragment-types": "^4.0.0-beta.0",
|
31
|
+
"@parameter1/base-cms-image": "^4.0.0-beta.0",
|
32
|
+
"@parameter1/base-cms-inflector": "^4.0.0-beta.0",
|
33
|
+
"@parameter1/base-cms-marko-express": "^4.0.0-beta.0",
|
34
|
+
"@parameter1/base-cms-marko-node-require": "^4.0.0-beta.0",
|
35
|
+
"@parameter1/base-cms-marko-web-deferred-script-loader": "^4.0.0-beta.0",
|
36
|
+
"@parameter1/base-cms-object-path": "^4.0.0-beta.0",
|
37
|
+
"@parameter1/base-cms-tenant-context": "^4.0.0-beta.0",
|
38
|
+
"@parameter1/base-cms-utils": "^4.0.0-beta.0",
|
39
|
+
"@parameter1/base-cms-web-common": "^4.0.0-beta.0",
|
31
40
|
"cheerio": "^1.0.0-rc.12",
|
32
41
|
"cookie-parser": "^1.4.6",
|
33
42
|
"express": "^4.18.2",
|
@@ -42,10 +51,10 @@
|
|
42
51
|
"vue-server-renderer": "^2.7.14"
|
43
52
|
},
|
44
53
|
"peerDependencies": {
|
45
|
-
"@parameter1/base-cms-marko-core": "^
|
54
|
+
"@parameter1/base-cms-marko-core": "^4.0.0"
|
46
55
|
},
|
47
56
|
"publishConfig": {
|
48
57
|
"access": "public"
|
49
58
|
},
|
50
|
-
"gitHead": "
|
59
|
+
"gitHead": "6b1c5270b9b3031b27d36ec109348efbd80f7933"
|
51
60
|
}
|
package/start-server.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require('
|
1
|
+
require('@parameter1/base-cms-marko-node-require');
|
2
2
|
const http = require('http');
|
3
3
|
const path = require('path');
|
4
4
|
const { createTerminus } = require('@godaddy/terminus');
|
@@ -14,7 +14,9 @@ if (!process.env.EXPOSED_HOST) process.env.EXPOSED_HOST = env.HOST || 'localhost
|
|
14
14
|
|
15
15
|
process.on('unhandledRejection', (e) => { throw e; });
|
16
16
|
|
17
|
-
const wait = ms => new Promise(resolve =>
|
17
|
+
const wait = (ms) => new Promise((resolve) => {
|
18
|
+
setTimeout(resolve, ms);
|
19
|
+
});
|
18
20
|
|
19
21
|
module.exports = async ({
|
20
22
|
rootDir,
|
@@ -148,5 +150,5 @@ module.exports = async ({
|
|
148
150
|
}
|
149
151
|
}
|
150
152
|
});
|
151
|
-
}).catch(e => setImmediate(() => { throw e; }));
|
153
|
+
}).catch((e) => setImmediate(() => { throw e; }));
|
152
154
|
};
|
@@ -12,7 +12,7 @@ const buildFacebookElement = ({
|
|
12
12
|
...(width && { width }),
|
13
13
|
...(showText && { 'show-text': true }),
|
14
14
|
};
|
15
|
-
const data = Object.keys(params).map(key => `data-${key}="${params[key]}"`);
|
15
|
+
const data = Object.keys(params).map((key) => `data-${key}="${params[key]}"`);
|
16
16
|
return `<div class="fb-post" ${data.join(' ')}></div><script async defer src="https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v3.2"></script>`;
|
17
17
|
};
|
18
18
|
|
@@ -39,7 +39,6 @@ const facebook = (url) => {
|
|
39
39
|
return buildFacebookElement({ href, showText: true });
|
40
40
|
};
|
41
41
|
|
42
|
-
|
43
42
|
/**
|
44
43
|
*
|
45
44
|
*/
|
@@ -1,6 +1,6 @@
|
|
1
1
|
const { buildImgixUrl } = require('@parameter1/base-cms-image');
|
2
2
|
|
3
|
-
const stringifyAttrs = attrs => Object.keys(attrs).reduce((arr, key) => {
|
3
|
+
const stringifyAttrs = (attrs) => Object.keys(attrs).reduce((arr, key) => {
|
4
4
|
const value = attrs[key];
|
5
5
|
if (value) arr.push(`${key}="${value}"`);
|
6
6
|
return arr;
|
@@ -44,7 +44,7 @@ module.exports = (tag, { config } = {}, { lazyloadImages } = {}) => {
|
|
44
44
|
'data-srcset': lazyload ? maxSrcset : null,
|
45
45
|
media: '(min-width: 576px)',
|
46
46
|
},
|
47
|
-
].map(source => `<source ${stringifyAttrs(source)}>`).join('');
|
47
|
+
].map((source) => `<source ${stringifyAttrs(source)}>`).join('');
|
48
48
|
|
49
49
|
const minSrc = buildImgixUrl(src, { w: minWidth });
|
50
50
|
const minSrcset = `${buildImgixUrl(src, { w: minWidth, dpr: 2 })} 2x`;
|
@@ -59,7 +59,7 @@ module.exports = (tag, { config } = {}, { lazyloadImages } = {}) => {
|
|
59
59
|
'data-image-id': tag.id,
|
60
60
|
alt,
|
61
61
|
width: (width && height) ? minWidth : null,
|
62
|
-
height: (height && height) ? Math.round(height / width * minWidth) : null,
|
62
|
+
height: (height && height) ? Math.round((height / width) * minWidth) : null,
|
63
63
|
};
|
64
64
|
|
65
65
|
const captionElement = caption ? `<span class="caption">${caption}</span>` : '';
|
@@ -11,7 +11,7 @@ const buildInstagramElement = ({
|
|
11
11
|
...(lazy && { lazy: true }),
|
12
12
|
...(width && { width }),
|
13
13
|
};
|
14
|
-
const data = Object.keys(params).map(key => `${key}="${params[key]}"`);
|
14
|
+
const data = Object.keys(params).map((key) => `${key}="${params[key]}"`);
|
15
15
|
if (data.lazy) {
|
16
16
|
data.loading = 'lazy';
|
17
17
|
}
|
package/utils/hierarchy-ids.js
CHANGED
@@ -9,7 +9,7 @@ module.exports = async (Component, { id, props } = {}) => {
|
|
9
9
|
if (get(Component, 'props.id')) throw new Error('The provided component has an `id` prop which is incompatible with SSR rendering.');
|
10
10
|
const app = new Vue({
|
11
11
|
provide: { EventBus },
|
12
|
-
render: h => h(Component, { attrs: { id }, props }),
|
12
|
+
render: (h) => h(Component, { attrs: { id }, props }),
|
13
13
|
});
|
14
14
|
return renderer.renderToString(app);
|
15
15
|
};
|
@@ -1,21 +0,0 @@
|
|
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$2.13.0/components/document/components/lazysizes.marko",
|
6
|
-
marko_renderer = require("marko/src/runtime/components/renderer");
|
7
|
-
|
8
|
-
function render(input, out, __component, component, state) {
|
9
|
-
var data = input;
|
10
|
-
|
11
|
-
out.w("<script>\n/*! lazysizes - v5.3.2 */\n!function(e){var t=function(u,D,f){\"use strict\";var k,H;if(function(){var e;var t={lazyClass:\"lazyload\",loadedClass:\"lazyloaded\",loadingClass:\"lazyloading\",preloadClass:\"lazypreload\",errorClass:\"lazyerror\",autosizesClass:\"lazyautosizes\",fastLoadedClass:\"ls-is-cached\",iframeLoadMode:0,srcAttr:\"data-src\",srcsetAttr:\"data-srcset\",sizesAttr:\"data-sizes\",minSize:40,customMedia:{},init:true,expFactor:1.5,hFac:.8,loadMode:2,loadHidden:true,ricTimeout:0,throttleDelay:125};H=u.lazySizesConfig||u.lazysizesConfig||{};for(e in t){if(!(e in H)){H[e]=t[e]}}}(),!D||!D.getElementsByClassName){return{init:function(){},cfg:H,noSupport:true}}var O=D.documentElement,i=u.HTMLPictureElement,P=\"addEventListener\",$=\"getAttribute\",q=u[P].bind(u),I=u.setTimeout,U=u.requestAnimationFrame||I,o=u.requestIdleCallback,j=/^picture$/i,r=[\"load\",\"error\",\"lazyincluded\",\"_lazyloaded\"],a={},G=Array.prototype.forEach,J=function(e,t){if(!a[t]){a[t]=new RegExp(\"(\\\\s|^)\"+t+\"(\\\\s|$)\")}return a[t].test(e[$](\"class\")||\"\")&&a[t]},K=function(e,t){if(!J(e,t)){e.setAttribute(\"class\",(e[$](\"class\")||\"\").trim()+\" \"+t)}},Q=function(e,t){var a;if(a=J(e,t)){e.setAttribute(\"class\",(e[$](\"class\")||\"\").replace(a,\" \"))}},V=function(t,a,e){var i=e?P:\"removeEventListener\";if(e){V(t,a)}r.forEach(function(e){t[i](e,a)})},X=function(e,t,a,i,r){var n=D.createEvent(\"Event\");if(!a){a={}}a.instance=k;n.initEvent(t,!i,!r);n.detail=a;e.dispatchEvent(n);return n},Y=function(e,t){var a;if(!i&&(a=u.picturefill||H.pf)){if(t&&t.src&&!e[$](\"srcset\")){e.setAttribute(\"srcset\",t.src)}a({reevaluate:true,elements:[e]})}else if(t&&t.src){e.src=t.src}},Z=function(e,t){return(getComputedStyle(e,null)||{})[t]},s=function(e,t,a){a=a||e.offsetWidth;while(a<H.minSize&&t&&!e._lazysizesWidth){a=t.offsetWidth;t=t.parentNode}return a},ee=function(){var a,i;var t=[];var r=[];var n=t;var s=function(){var e=n;n=t.length?r:t;a=true;i=false;while(e.length){e.shift()()}a=false};var e=function(e,t){if(a&&!t){e.apply(this,arguments)}else{n.push(e);if(!i){i=true;(D.hidden?I:U)(s)}}};e._lsFlush=s;return e}(),te=function(a,e){return e?function(){ee(a)}:function(){var e=this;var t=arguments;ee(function(){a.apply(e,t)})}},ae=function(e){var a;var i=0;var r=H.throttleDelay;var n=H.ricTimeout;var t=function(){a=false;i=f.now();e()};var s=o&&n>49?function(){o(t,{timeout:n});if(n!==H.ricTimeout){n=H.ricTimeout}}:te(function(){I(t)},true);return function(e){var t;if(e=e===true){n=33}if(a){return}a=true;t=r-(f.now()-i);if(t<0){t=0}if(e||t<9){s()}else{I(s,t)}}},ie=function(e){var t,a;var i=99;var r=function(){t=null;e()};var n=function(){var e=f.now()-a;if(e<i){I(n,i-e)}else{(o||r)(r)}};return function(){a=f.now();if(!t){t=I(n,i)}}},e=function(){var v,m,c,h,e;var y,z,g,p,C,b,A;var n=/^img$/i;var d=/^iframe$/i;var E=\"onscroll\"in u&&!/(gle|ing)bot/.test(navigator.userAgent);var _=0;var w=0;var M=0;var N=-1;var L=function(e){M--;if(!e||M<0||!e.target){M=0}};var x=function(e){if(A==null){A=Z(D.body,\"visibility\")==\"hidden\"}return A||!(Z(e.parentNode,\"visibility\")==\"hidden\"&&Z(e,\"visibility\")==\"hidden\")};var W=function(e,t){var a;var i=e;var r=x(e);g-=t;b+=t;p-=t;C+=t;while(r&&(i=i.offsetParent)&&i!=D.body&&i!=O){r=(Z(i,\"opacity\")||1)>0;if(r&&Z(i,\"overflow\")!=\"visible\"){a=i.getBoundingClientRect();r=C>a.left&&p<a.right&&b>a.top-1&&g<a.bottom+1}}return r};var t=function(){var e,t,a,i,r,n,s,o,l,u,f,c;var d=k.elements;if((h=H.loadMode)&&M<8&&(e=d.length)){t=0;N++;for(;t<e;t++){if(!d[t]||d[t]._lazyRace){continue}if(!E||k.prematureUnveil&&k.prematureUnveil(d[t])){R(d[t]);continue}if(!(o=d[t][$](\"data-expand\"))||!(n=o*1)){n=w}if(!u){u=!H.expand||H.expand<1?O.clientHeight>500&&O.clientWidth>500?500:370:H.expand;k._defEx=u;f=u*H.expFactor;c=H.hFac;A=null;if(w<f&&M<1&&N>2&&h>2&&!D.hidden){w=f;N=0}else if(h>1&&N>1&&M<6){w=u}else{w=_}}if(l!==n){y=innerWidth+n*c;z=innerHeight+n;s=n*-1;l=n}a=d[t].getBoundingClientRect();if((b=a.bottom)>=s&&(g=a.top)<=z&&(C=a.right)>=s*c&&(p=a.left)<=y&&(b||C||p||g)&&(H.loadHidden||x(d[t]))&&(m&&M<3&&!o&&(h<3||N<4)||W(d[t],n))){R(d[t]);r=true;if(M>9){break}}else if(!r&&m&&!i&&M<4&&N<4&&h>2&&(v[0]||H.preloadAfterLoad)&&(v[0]||!o&&(b||C||p||g||d[t][$](H.sizesAttr)!=\"auto\"))){i=v[0]||d[t]}}if(i&&!r){R(i)}}};var a=ae(t);var S=function(e){var t=e.target;if(t._lazyCache){delete t._lazyCache;return}L(e);K(t,H.loadedClass);Q(t,H.loadingClass);V(t,B);X(t,\"lazyloaded\")};var i=te(S);var B=function(e){i({target:e.target})};var T=function(e,t){var a=e.getAttribute(\"data-load-mode\")||H.iframeLoadMode;if(a==0){e.contentWindow.location.replace(t)}else if(a==1){e.src=t}};var F=function(e){var t;var a=e[$](H.srcsetAttr);if(t=H.customMedia[e[$](\"data-media\")||e[$](\"media\")]){e.setAttribute(\"media\",t)}if(a){e.setAttribute(\"srcset\",a)}};var s=te(function(t,e,a,i,r){var n,s,o,l,u,f;if(!(u=X(t,\"lazybeforeunveil\",e)).defaultPrevented){if(i){if(a){K(t,H.autosizesClass)}else{t.setAttribute(\"sizes\",i)}}s=t[$](H.srcsetAttr);n=t[$](H.srcAttr);if(r){o=t.parentNode;l=o&&j.test(o.nodeName||\"\")}f=e.firesLoad||\"src\"in t&&(s||n||l);u={target:t};K(t,H.loadingClass);if(f){clearTimeout(c);c=I(L,2500);V(t,B,true)}if(l){G.call(o.getElementsByTagName(\"source\"),F)}if(s){t.setAttribute(\"srcset\",s)}else if(n&&!l){if(d.test(t.nodeName)){T(t,n)}else{t.src=n}}if(r&&(s||l)){Y(t,{src:n})}}if(t._lazyRace){delete t._lazyRace}Q(t,H.lazyClass);ee(function(){var e=t.complete&&t.naturalWidth>1;if(!f||e){if(e){K(t,H.fastLoadedClass)}S(u);t._lazyCache=true;I(function(){if(\"_lazyCache\"in t){delete t._lazyCache}},9)}if(t.loading==\"lazy\"){M--}},true)});var R=function(e){if(e._lazyRace){return}var t;var a=n.test(e.nodeName);var i=a&&(e[$](H.sizesAttr)||e[$](\"sizes\"));var r=i==\"auto\";if((r||!m)&&a&&(e[$](\"src\")||e.srcset)&&!e.complete&&!J(e,H.errorClass)&&J(e,H.lazyClass)){return}t=X(e,\"lazyunveilread\").detail;if(r){re.updateElem(e,true,e.offsetWidth)}e._lazyRace=true;M++;s(e,t,r,i,a)};var r=ie(function(){H.loadMode=3;a()});var o=function(){if(H.loadMode==3){H.loadMode=2}r()};var l=function(){if(m){return}if(f.now()-e<999){I(l,999);return}m=true;H.loadMode=3;a();q(\"scroll\",o,true)};return{_:function(){e=f.now();k.elements=D.getElementsByClassName(H.lazyClass);v=D.getElementsByClassName(H.lazyClass+\" \"+H.preloadClass);q(\"scroll\",a,true);q(\"resize\",a,true);q(\"pageshow\",function(e){if(e.persisted){var t=D.querySelectorAll(\".\"+H.loadingClass);if(t.length&&t.forEach){U(function(){t.forEach(function(e){if(e.complete){R(e)}})})}}});if(u.MutationObserver){new MutationObserver(a).observe(O,{childList:true,subtree:true,attributes:true})}else{O[P](\"DOMNodeInserted\",a,true);O[P](\"DOMAttrModified\",a,true);setInterval(a,999)}q(\"hashchange\",a,true);[\"focus\",\"mouseover\",\"click\",\"load\",\"transitionend\",\"animationend\"].forEach(function(e){D[P](e,a,true)});if(/d$|^c/.test(D.readyState)){l()}else{q(\"load\",l);D[P](\"DOMContentLoaded\",a);I(l,2e4)}if(k.elements.length){t();ee._lsFlush()}else{a()}},checkElems:a,unveil:R,_aLSL:o}}(),re=function(){var a;var n=te(function(e,t,a,i){var r,n,s;e._lazysizesWidth=i;i+=\"px\";e.setAttribute(\"sizes\",i);if(j.test(t.nodeName||\"\")){r=t.getElementsByTagName(\"source\");for(n=0,s=r.length;n<s;n++){r[n].setAttribute(\"sizes\",i)}}if(!a.detail.dataAttr){Y(e,a.detail)}});var i=function(e,t,a){var i;var r=e.parentNode;if(r){a=s(e,r,a);i=X(e,\"lazybeforesizes\",{width:a,dataAttr:!!t});if(!i.defaultPrevented){a=i.detail.width;if(a&&a!==e._lazysizesWidth){n(e,r,i,a)}}}};var e=function(){var e;var t=a.length;if(t){e=0;for(;e<t;e++){i(a[e])}}};var t=ie(e);return{_:function(){a=D.getElementsByClassName(H.autosizesClass);q(\"resize\",t)},checkElems:t,updateElem:i}}(),t=function(){if(!t.i&&D.getElementsByClassName){t.i=true;re._();e._()}};return I(function(){H.init&&t()}),k={cfg:H,autoSizer:re,loader:e,init:t,uP:Y,aC:K,rC:Q,hC:J,fire:X,gW:s,rAF:ee}}(e,e.document,Date);e.lazySizes=t,\"object\"==typeof module&&module.exports&&(module.exports=t)}(\"undefined\"!=typeof window?window:{});\n</script>");
|
12
|
-
}
|
13
|
-
|
14
|
-
marko_template._ = marko_renderer(render, {
|
15
|
-
___implicit: true,
|
16
|
-
___type: marko_componentType
|
17
|
-
});
|
18
|
-
|
19
|
-
marko_template.meta = {
|
20
|
-
id: "/@parameter1/base-cms-marko-web$2.13.0/components/document/components/lazysizes.marko"
|
21
|
-
};
|
package/node-require.js
DELETED
package/refactor-notes.md
DELETED
@@ -1,80 +0,0 @@
|
|
1
|
-
# Marko Web Refactor
|
2
|
-
|
3
|
-
## Punch List
|
4
|
-
- [x] Content: Whitepapers (forms, downloads, etc)
|
5
|
-
- [x] Contact Us Page
|
6
|
-
- [x] Search: Google
|
7
|
-
- [x] Subscribe
|
8
|
-
- [x] Reveal Ad
|
9
|
-
- [x] Video Play Overlay
|
10
|
-
- [x] NativeX Plugin
|
11
|
-
- [ ] Content: Media Galleries (really only Bizbash)
|
12
|
-
- [ ] Search: Bing (EE and Bizbash only)
|
13
|
-
- [ ] IdentityX Plugin (OGJ only)
|
14
|
-
- [ ] Inquiry Plugin (Bizbash only)
|
15
|
-
- [ ] Contact Us Submissions - move to site package for now
|
16
|
-
- [ ] Mailer Service for Contact Us and Inquiry
|
17
|
-
- [x] Review unused theme CSS
|
18
|
-
- [ ] Verify page model resolver speed once converted
|
19
|
-
|
20
|
-
## Core
|
21
|
-
- Page loaders should not use routes
|
22
|
-
- Document / page wrappers should support all types
|
23
|
-
- Decouple page context components
|
24
|
-
- Investigate CMS element components
|
25
|
-
- Decouple BEM classes?
|
26
|
-
- Decouple Imigix?
|
27
|
-
|
28
|
-
## Common
|
29
|
-
- Remove direct, third-party dependencies
|
30
|
-
- NativeX
|
31
|
-
- GTM
|
32
|
-
- GAM
|
33
|
-
- Reskin
|
34
|
-
- Re-factor items
|
35
|
-
- Make `item` vs `node` vars consistent
|
36
|
-
- Create generic query loaders
|
37
|
-
- Create generic layouts (with customizable items)
|
38
|
-
- Create generic load more handlers
|
39
|
-
|
40
|
-
|
41
|
-
## To do
|
42
|
-
- All instances of `<cms-browser-component>` need to be replaced with `<marko-web-browser-component>`
|
43
|
-
- Rename `<cms-document>` to `<marko-web-document>`
|
44
|
-
- Placeholder ads were removed.
|
45
|
-
- The basecmsrc file will need to update to include additional browser packages
|
46
|
-
- All instances of `<cms-query-*>` need to be changed to `<marko-web-query-*>`
|
47
|
-
- Add `images.fallback` to core config on all sites
|
48
|
-
- Change `<cms-page-container>` to `<marko-web-page-container>`
|
49
|
-
- Change `<cms-page-rel-canonical>` to `<marko-web-page-rel-canonical>`, `pathname` became `path`
|
50
|
-
- Change `<cms-page-metadata>` to `<mark-web-page-metadata>`
|
51
|
-
```marko
|
52
|
-
<marko-web-page-metadata-content
|
53
|
-
for="content"
|
54
|
-
type=content.type
|
55
|
-
title=get(content, "metadata.title")
|
56
|
-
description=get(content, "metadata.description")
|
57
|
-
canonical-path=content.canonicalPath
|
58
|
-
image-src=get(content, "metadata.image.src")
|
59
|
-
published-date=get(content, "metadata.publishedDate")
|
60
|
-
updated-date=get(content, "metadata.updatedDate")
|
61
|
-
expires-date=get(content, "metadata.expiresDate")
|
62
|
-
/>
|
63
|
-
|
64
|
-
<marko-web-page-metadata
|
65
|
-
title=get(section, "metadata.title")
|
66
|
-
description=get(section, "metadata.description")
|
67
|
-
canonical-path=section.canonicalPath
|
68
|
-
/>
|
69
|
-
```
|
70
|
-
- Change `<cms-page-title>` to `<marko-web-page-title>`
|
71
|
-
- Change `<cms-page-description>` to `<marko-web-page-description>`, `content` is now `value`
|
72
|
-
- Sticky Leaderbaord
|
73
|
-
- the `refreshable` prop was removed. anything that should not refresh so set `refresh-interval` to 0
|
74
|
-
- name changed to `<marko-web-gam-fixed-ad-bottom>`
|
75
|
-
- update sass vars to match theme
|
76
|
-
- Update `<endeavor-item>` and `<endeavor-item-list>` to `<marko-web-node>` and `<marko-web-node-list>`
|
77
|
-
- Update `&__contents` to `&__nodes` for `<marko-web-node-list>`, `&__item` to `&__node`
|
78
|
-
- Need to add `/__load-more` to no-follow
|
79
|
-
- Remove `load-more` routes from sites
|
80
|
-
- Remove the `routing-utils` package from endeavor and use the `json-error-handler` from `@parameter1/base-cms-marko-web/express/json-error-handler`
|