@mindful-web/marko-web 1.0.0
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/.eslintignore +3 -0
- package/LICENSE +21 -0
- package/browser/.eslintrc.js +1 -0
- package/browser/components/element-id.js +1 -0
- package/browser/components/gated-download/wufoo.vue +97 -0
- package/browser/components/image-slide.vue +54 -0
- package/browser/components/image-slider.vue +87 -0
- package/browser/components/index.js +15 -0
- package/browser/components/load-more-trigger.vue +129 -0
- package/browser/components/oembed.vue +133 -0
- package/browser/components/trigger-in-view-event.vue +41 -0
- package/browser/components/trigger-screen-change-event.vue +94 -0
- package/browser/event-bus.js +5 -0
- package/browser/index.js +83 -0
- package/browser/jquery-full.js +3 -0
- package/browser/jquery.js +3 -0
- package/browser/utils/clean-path.js +4 -0
- package/browser/vue.js +3 -0
- package/components/browser-component/script.marko +10 -0
- package/components/browser-component/script.marko.js +39 -0
- package/components/browser-component.marko +25 -0
- package/components/browser-component.marko.js +75 -0
- package/components/deferred-stylesheet.marko +6 -0
- package/components/deferred-stylesheet.marko.js +28 -0
- package/components/document/components/body-wrapper.marko +8 -0
- package/components/document/components/body-wrapper.marko.js +33 -0
- package/components/document/components/error.marko +26 -0
- package/components/document/components/error.marko.js +88 -0
- package/components/document/components/live-reload.marko +7 -0
- package/components/document/components/live-reload.marko.js +30 -0
- package/components/document/components/polyfill.marko +8 -0
- package/components/document/components/polyfill.marko.js +33 -0
- package/components/document/components/styles.marko +20 -0
- package/components/document/components/styles.marko.js +61 -0
- package/components/document/container.marko +15 -0
- package/components/document/container.marko.js +54 -0
- package/components/document/index.marko +63 -0
- package/components/document/index.marko.js +139 -0
- package/components/document/marko.json +46 -0
- package/components/element/array.marko +19 -0
- package/components/element/array.marko.js +67 -0
- package/components/element/audio.marko +5 -0
- package/components/element/audio.marko.js +33 -0
- package/components/element/block.marko +11 -0
- package/components/element/block.marko.js +44 -0
- package/components/element/clear.marko +4 -0
- package/components/element/clear.marko.js +32 -0
- package/components/element/components/image.marko +32 -0
- package/components/element/components/image.marko.js +62 -0
- package/components/element/components/text.marko +11 -0
- package/components/element/components/text.marko.js +37 -0
- package/components/element/content/address1.marko +14 -0
- package/components/element/content/address1.marko.js +40 -0
- package/components/element/content/address2.marko +14 -0
- package/components/element/content/address2.marko.js +40 -0
- package/components/element/content/audio.marko +13 -0
- package/components/element/content/audio.marko.js +39 -0
- package/components/element/content/authors.marko +12 -0
- package/components/element/content/authors.marko.js +43 -0
- package/components/element/content/body.marko +28 -0
- package/components/element/content/body.marko.js +66 -0
- package/components/element/content/byline.marko +15 -0
- package/components/element/content/byline.marko.js +41 -0
- package/components/element/content/city-state-zip.marko +14 -0
- package/components/element/content/city-state-zip.marko.js +40 -0
- package/components/element/content/contributors.marko +12 -0
- package/components/element/content/contributors.marko.js +43 -0
- package/components/element/content/country.marko +14 -0
- package/components/element/content/country.marko.js +40 -0
- package/components/element/content/embed-code.marko +15 -0
- package/components/element/content/embed-code.marko.js +41 -0
- package/components/element/content/end-date.marko +17 -0
- package/components/element/content/end-date.marko.js +43 -0
- package/components/element/content/ends.marko +14 -0
- package/components/element/content/ends.marko.js +40 -0
- package/components/element/content/fax.marko +14 -0
- package/components/element/content/fax.marko.js +40 -0
- package/components/element/content/images.marko +12 -0
- package/components/element/content/images.marko.js +43 -0
- package/components/element/content/marko.json +328 -0
- package/components/element/content/mobile.marko +14 -0
- package/components/element/content/mobile.marko.js +40 -0
- package/components/element/content/name.marko +15 -0
- package/components/element/content/name.marko.js +41 -0
- package/components/element/content/phone.marko +14 -0
- package/components/element/content/phone.marko.js +40 -0
- package/components/element/content/photographers.marko +12 -0
- package/components/element/content/photographers.marko.js +43 -0
- package/components/element/content/public-email.marko +19 -0
- package/components/element/content/public-email.marko.js +47 -0
- package/components/element/content/published.marko +17 -0
- package/components/element/content/published.marko.js +43 -0
- package/components/element/content/short-name.marko +15 -0
- package/components/element/content/short-name.marko.js +41 -0
- package/components/element/content/sidebar-stubs.marko +24 -0
- package/components/element/content/sidebar-stubs.marko.js +63 -0
- package/components/element/content/sidebars.marko +27 -0
- package/components/element/content/sidebars.marko.js +63 -0
- package/components/element/content/source.marko +14 -0
- package/components/element/content/source.marko.js +40 -0
- package/components/element/content/sponsors.marko +12 -0
- package/components/element/content/sponsors.marko.js +43 -0
- package/components/element/content/start-date.marko +17 -0
- package/components/element/content/start-date.marko.js +43 -0
- package/components/element/content/starts.marko +14 -0
- package/components/element/content/starts.marko.js +40 -0
- package/components/element/content/teaser.marko +15 -0
- package/components/element/content/teaser.marko.js +41 -0
- package/components/element/content/title.marko +14 -0
- package/components/element/content/title.marko.js +40 -0
- package/components/element/content/tollfree.marko +14 -0
- package/components/element/content/tollfree.marko.js +40 -0
- package/components/element/content/transcript.marko +22 -0
- package/components/element/content/transcript.marko.js +53 -0
- package/components/element/content/website.marko +22 -0
- package/components/element/content/website.marko.js +51 -0
- package/components/element/date.marko +2 -0
- package/components/element/date.marko.js +27 -0
- package/components/element/extract-render.js +1 -0
- package/components/element/image/caption.marko +15 -0
- package/components/element/image/caption.marko.js +41 -0
- package/components/element/image/credit.marko +15 -0
- package/components/element/image/credit.marko.js +41 -0
- package/components/element/image/display-name.marko +14 -0
- package/components/element/image/display-name.marko.js +40 -0
- package/components/element/image/marko.json +38 -0
- package/components/element/image/slider.marko +18 -0
- package/components/element/image/slider.marko.js +50 -0
- package/components/element/img.marko +12 -0
- package/components/element/img.marko.js +43 -0
- package/components/element/index.marko +12 -0
- package/components/element/index.marko.js +47 -0
- package/components/element/link.marko +25 -0
- package/components/element/link.marko.js +54 -0
- package/components/element/magazine-issue/description.marko +14 -0
- package/components/element/magazine-issue/description.marko.js +40 -0
- package/components/element/magazine-issue/digital-edition-url.marko +22 -0
- package/components/element/magazine-issue/digital-edition-url.marko.js +51 -0
- package/components/element/magazine-issue/marko.json +42 -0
- package/components/element/magazine-issue/name.marko +14 -0
- package/components/element/magazine-issue/name.marko.js +40 -0
- package/components/element/magazine-issue/pdf-url.marko +22 -0
- package/components/element/magazine-issue/pdf-url.marko.js +51 -0
- package/components/element/magazine-publication/cancel-url.marko +22 -0
- package/components/element/magazine-publication/cancel-url.marko.js +51 -0
- package/components/element/magazine-publication/change-address-url.marko +22 -0
- package/components/element/magazine-publication/change-address-url.marko.js +51 -0
- package/components/element/magazine-publication/description.marko +14 -0
- package/components/element/magazine-publication/description.marko.js +40 -0
- package/components/element/magazine-publication/einquiry-url.marko +22 -0
- package/components/element/magazine-publication/einquiry-url.marko.js +51 -0
- package/components/element/magazine-publication/marko.json +82 -0
- package/components/element/magazine-publication/name.marko +14 -0
- package/components/element/magazine-publication/name.marko.js +40 -0
- package/components/element/magazine-publication/renewal-url.marko +22 -0
- package/components/element/magazine-publication/renewal-url.marko.js +51 -0
- package/components/element/magazine-publication/reprints-url.marko +22 -0
- package/components/element/magazine-publication/reprints-url.marko.js +51 -0
- package/components/element/magazine-publication/subscribe-url.marko +22 -0
- package/components/element/magazine-publication/subscribe-url.marko.js +51 -0
- package/components/element/marko.json +211 -0
- package/components/element/obj-array.marko +17 -0
- package/components/element/obj-array.marko.js +56 -0
- package/components/element/obj-audio.marko +20 -0
- package/components/element/obj-audio.marko.js +50 -0
- package/components/element/obj-date.marko +25 -0
- package/components/element/obj-date.marko.js +55 -0
- package/components/element/obj-nodes.marko +20 -0
- package/components/element/obj-nodes.marko.js +62 -0
- package/components/element/obj-text.marko +23 -0
- package/components/element/obj-text.marko.js +53 -0
- package/components/element/obj.marko +23 -0
- package/components/element/obj.marko.js +61 -0
- package/components/element/object-link.js +49 -0
- package/components/element/object-type.js +9 -0
- package/components/element/picture.marko +38 -0
- package/components/element/picture.marko.js +85 -0
- package/components/element/show-element.js +8 -0
- package/components/element/text.marko +37 -0
- package/components/element/text.marko.js +76 -0
- package/components/element/website-section/description.marko +16 -0
- package/components/element/website-section/description.marko.js +44 -0
- package/components/element/website-section/hierarchy.marko +19 -0
- package/components/element/website-section/hierarchy.marko.js +60 -0
- package/components/element/website-section/marko.json +31 -0
- package/components/element/website-section/name.marko +18 -0
- package/components/element/website-section/name.marko.js +46 -0
- package/components/font/google.marko +6 -0
- package/components/font/google.marko.js +41 -0
- package/components/font/link.marko +14 -0
- package/components/font/link.marko.js +45 -0
- package/components/font/marko.json +21 -0
- package/components/font/typekit.marko +5 -0
- package/components/font/typekit.marko.js +38 -0
- package/components/load-more/index.marko +53 -0
- package/components/load-more/index.marko.js +119 -0
- package/components/load-more/marko.json +30 -0
- package/components/load-more/trigger.marko +11 -0
- package/components/load-more/trigger.marko.js +40 -0
- package/components/marko.json +37 -0
- package/components/node/body.marko +40 -0
- package/components/node/body.marko.js +112 -0
- package/components/node/element.marko +6 -0
- package/components/node/element.marko.js +39 -0
- package/components/node/footer.marko +19 -0
- package/components/node/footer.marko.js +63 -0
- package/components/node/header.marko +19 -0
- package/components/node/header.marko.js +63 -0
- package/components/node/image-inner-wrapper.marko +61 -0
- package/components/node/image-inner-wrapper.marko.js +116 -0
- package/components/node/image-wrapper.marko +34 -0
- package/components/node/image-wrapper.marko.js +98 -0
- package/components/node/image.marko +51 -0
- package/components/node/image.marko.js +93 -0
- package/components/node/index.marko +35 -0
- package/components/node/index.marko.js +100 -0
- package/components/node/marko.json +189 -0
- package/components/node/utils/image-height.js +3 -0
- package/components/node/utils/image-values.js +17 -0
- package/components/node-list/body.marko +19 -0
- package/components/node-list/body.marko.js +50 -0
- package/components/node-list/element.marko +3 -0
- package/components/node-list/element.marko.js +35 -0
- package/components/node-list/footer.marko +19 -0
- package/components/node-list/footer.marko.js +50 -0
- package/components/node-list/header.marko +19 -0
- package/components/node-list/header.marko.js +50 -0
- package/components/node-list/index.marko +36 -0
- package/components/node-list/index.marko.js +93 -0
- package/components/node-list/marko.json +121 -0
- package/components/node-list/node.marko +15 -0
- package/components/node-list/node.marko.js +49 -0
- package/components/node-list/nodes.marko +82 -0
- package/components/node-list/nodes.marko.js +126 -0
- package/components/page/container.marko +13 -0
- package/components/page/container.marko.js +46 -0
- package/components/page/description.marko +4 -0
- package/components/page/description.marko.js +26 -0
- package/components/page/image.marko +50 -0
- package/components/page/image.marko.js +122 -0
- package/components/page/layouts/content.marko +23 -0
- package/components/page/layouts/content.marko.js +63 -0
- package/components/page/layouts/default.marko +20 -0
- package/components/page/layouts/default.marko.js +61 -0
- package/components/page/layouts/dynamic-page.marko +19 -0
- package/components/page/layouts/dynamic-page.marko.js +59 -0
- package/components/page/layouts/magazine-issue.marko +19 -0
- package/components/page/layouts/magazine-issue.marko.js +59 -0
- package/components/page/layouts/magazine-publication.marko +19 -0
- package/components/page/layouts/magazine-publication.marko.js +59 -0
- package/components/page/layouts/marko.json +86 -0
- package/components/page/layouts/website-section.marko +25 -0
- package/components/page/layouts/website-section.marko.js +78 -0
- package/components/page/marko.json +93 -0
- package/components/page/metadata/components/common.marko +54 -0
- package/components/page/metadata/components/common.marko.js +117 -0
- package/components/page/metadata/content.marko +147 -0
- package/components/page/metadata/content.marko.js +216 -0
- package/components/page/metadata/default.marko +2 -0
- package/components/page/metadata/default.marko.js +29 -0
- package/components/page/metadata/dynamic-page.marko +40 -0
- package/components/page/metadata/dynamic-page.marko.js +84 -0
- package/components/page/metadata/google-structured-data/content.js +138 -0
- package/components/page/metadata/magazine-issue.marko +39 -0
- package/components/page/metadata/magazine-issue.marko.js +83 -0
- package/components/page/metadata/magazine-publication.marko +35 -0
- package/components/page/metadata/magazine-publication.marko.js +79 -0
- package/components/page/metadata/marko.json +32 -0
- package/components/page/metadata/website-section.marko +48 -0
- package/components/page/metadata/website-section.marko.js +92 -0
- package/components/page/rel-canonical.marko +13 -0
- package/components/page/rel-canonical.marko.js +42 -0
- package/components/page/title.marko +18 -0
- package/components/page/title.marko.js +46 -0
- package/components/page/wrapper.marko +16 -0
- package/components/page/wrapper.marko.js +63 -0
- package/components/resolve/marko.json +6 -0
- package/components/resolve/page.marko +10 -0
- package/components/resolve/page.marko.js +49 -0
- package/components/rss/marko.json +10 -0
- package/components/rss/website-section.marko +17 -0
- package/components/rss/website-section.marko.js +46 -0
- package/config/abstract-config.js +42 -0
- package/config/core.js +48 -0
- package/config/site.js +6 -0
- package/express/apollo.js +34 -0
- package/express/asset-loader.js +55 -0
- package/express/cdn.js +27 -0
- package/express/css-loader.js +117 -0
- package/express/embedded-media.js +31 -0
- package/express/error-handlers.js +113 -0
- package/express/find-content-alias.js +30 -0
- package/express/get-redirect.js +44 -0
- package/express/graphql-proxy.js +17 -0
- package/express/index.js +153 -0
- package/express/json-error-handler.js +30 -0
- package/express/load-document.js +3 -0
- package/express/load-more.js +6 -0
- package/express/load-object.js +10 -0
- package/express/oembed.js +18 -0
- package/express/rss.js +19 -0
- package/express/sitemaps.js +16 -0
- package/express/website-context.js +19 -0
- package/index.js +8 -0
- package/integration/test-website-boot.js +198 -0
- package/marko.json +6 -0
- package/middleware/disabled-features.js +15 -0
- package/middleware/index.js +15 -0
- package/middleware/page-node/index.js +45 -0
- package/middleware/page-node/resolved.js +26 -0
- package/middleware/with-content.js +54 -0
- package/middleware/with-dynamic-page.js +37 -0
- package/middleware/with-load-more.js +9 -0
- package/middleware/with-magazine-issue.js +24 -0
- package/middleware/with-magazine-publication.js +24 -0
- package/middleware/with-website-section.js +47 -0
- package/package.json +64 -0
- package/scss/carousel.scss +42 -0
- package/scss/document.scss +55 -0
- package/scss/fonts/alata-fallback.scss +7 -0
- package/scss/fonts/alegreya-fallback.scss +6 -0
- package/scss/fonts/arimo-fallback.scss +7 -0
- package/scss/fonts/fira-sans-fallback.scss +7 -0
- package/scss/fonts/ibm-plex-sans-fallback.scss +7 -0
- package/scss/fonts/informapro-fallback.scss +6 -0
- package/scss/fonts/lato-fallback.scss +7 -0
- package/scss/fonts/manrope-fallback.scss +6 -0
- package/scss/fonts/merriweather-fallback.scss +7 -0
- package/scss/fonts/montserrat-fallback.scss +7 -0
- package/scss/fonts/open-sans-condensed-fallback.scss +6 -0
- package/scss/fonts/open-sans-fallback.scss +7 -0
- package/scss/fonts/oswald-fallback.scss +7 -0
- package/scss/fonts/poppins-fallback.scss +6 -0
- package/scss/fonts/pt-sans-fallback.scss +6 -0
- package/scss/fonts/pt-serif-fallback.scss +6 -0
- package/scss/fonts/public-sans-fallback.scss +7 -0
- package/scss/fonts/raleway-fallback.scss +6 -0
- package/scss/fonts/roboto-condensed-fallback.scss +7 -0
- package/scss/fonts/roboto-fallback.scss +7 -0
- package/scss/fonts/roboto-slab-fallback.scss +7 -0
- package/scss/fonts/solitaire-mvb-pro-fallback.scss +6 -0
- package/scss/fonts/source-sans-4-fallback.scss +7 -0
- package/scss/fonts/source-serif-pro-fallback.scss +7 -0
- package/scss/fonts/synthese-fallback.scss +6 -0
- package/scss/fonts/zilla-slab-fallback.scss +6 -0
- package/scss/load-more.scss +3 -0
- package/scss/node-list.scss +144 -0
- package/scss/node.scss +371 -0
- package/scss/page-image.scss +15 -0
- package/start-server.js +169 -0
- package/utils/apply-query-params.js +16 -0
- package/utils/build-content-input.js +9 -0
- package/utils/build-marko-global.js +1 -0
- package/utils/default-value.js +1 -0
- package/utils/embedded-media/facebook-oembed.js +50 -0
- package/utils/embedded-media/image.js +71 -0
- package/utils/embedded-media/index.js +8 -0
- package/utils/embedded-media/instagram-oembed.js +57 -0
- package/utils/embedded-media/oembed.js +18 -0
- package/utils/hierarchy-aliases.js +3 -0
- package/utils/hierarchy-ids.js +3 -0
- package/utils/index.js +11 -0
- package/utils/is-dev.js +1 -0
- package/utils/published-content/description.js +1 -0
- package/utils/render-ssr-component-from-marko.js +18 -0
- package/utils/render-ssr-component.js +15 -0
- package/utils/should-collapse.js +1 -0
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
{
|
|
2
|
+
"<marko-web-node-list>": {
|
|
3
|
+
"template": "./index.marko",
|
|
4
|
+
"<header>": {},
|
|
5
|
+
"<footer>": {},
|
|
6
|
+
"<body>": {},
|
|
7
|
+
"<nodes>": {
|
|
8
|
+
"@slots <slot>[]": {},
|
|
9
|
+
"@nodes": "array",
|
|
10
|
+
"@block-name": "string",
|
|
11
|
+
"@tag": "string",
|
|
12
|
+
"@modifiers": "array",
|
|
13
|
+
"@attrs": "object",
|
|
14
|
+
"@flush-x": "boolean",
|
|
15
|
+
"@flush-y": "boolean"
|
|
16
|
+
},
|
|
17
|
+
"<render>": {},
|
|
18
|
+
"@block-name": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"default-value": "node-list"
|
|
21
|
+
},
|
|
22
|
+
"@tag": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"default-value": "div"
|
|
25
|
+
},
|
|
26
|
+
"@justified": {
|
|
27
|
+
"type": "boolean",
|
|
28
|
+
"default-value": false
|
|
29
|
+
},
|
|
30
|
+
"@inner-justified": {
|
|
31
|
+
"type": "boolean",
|
|
32
|
+
"default-value": false
|
|
33
|
+
},
|
|
34
|
+
"@flush-x": {
|
|
35
|
+
"type": "boolean",
|
|
36
|
+
"default-value": false
|
|
37
|
+
},
|
|
38
|
+
"@flush-y": {
|
|
39
|
+
"type": "boolean",
|
|
40
|
+
"default-value": false
|
|
41
|
+
},
|
|
42
|
+
"@full-height": {
|
|
43
|
+
"type": "boolean",
|
|
44
|
+
"default-value": false
|
|
45
|
+
},
|
|
46
|
+
"@collapsible": {
|
|
47
|
+
"type": "boolean",
|
|
48
|
+
"default-value": true
|
|
49
|
+
},
|
|
50
|
+
"@class": "string",
|
|
51
|
+
"@modifiers": "array",
|
|
52
|
+
"@attrs": "object"
|
|
53
|
+
},
|
|
54
|
+
"<marko-web-node-list-header>": {
|
|
55
|
+
"template": "./header.marko",
|
|
56
|
+
"@block-name": "string",
|
|
57
|
+
"@tag": "string",
|
|
58
|
+
"@flush-x": "boolean",
|
|
59
|
+
"@flush-y": "boolean",
|
|
60
|
+
"@modifiers": "array",
|
|
61
|
+
"@attrs": "object"
|
|
62
|
+
},
|
|
63
|
+
"<marko-web-node-list-footer>": {
|
|
64
|
+
"template": "./footer.marko",
|
|
65
|
+
"@block-name": "string",
|
|
66
|
+
"@tag": "string",
|
|
67
|
+
"@flush-x": "boolean",
|
|
68
|
+
"@flush-y": "boolean",
|
|
69
|
+
"@modifiers": "array",
|
|
70
|
+
"@attrs": "object"
|
|
71
|
+
},
|
|
72
|
+
"<marko-web-node-list-body>": {
|
|
73
|
+
"template": "./body.marko",
|
|
74
|
+
"@block-name": "string",
|
|
75
|
+
"@tag": "string",
|
|
76
|
+
"@flush-x": "boolean",
|
|
77
|
+
"@flush-y": "boolean",
|
|
78
|
+
"@modifiers": "array",
|
|
79
|
+
"@attrs": "object"
|
|
80
|
+
},
|
|
81
|
+
"<marko-web-node-list-nodes>": {
|
|
82
|
+
"template": "./nodes.marko",
|
|
83
|
+
"@nodes": "array",
|
|
84
|
+
"@block-name": "string",
|
|
85
|
+
"@tag": "string",
|
|
86
|
+
"@modifiers": "array",
|
|
87
|
+
"@attrs": "object",
|
|
88
|
+
"@flush-x": "boolean",
|
|
89
|
+
"@flush-y": "boolean",
|
|
90
|
+
"@slots <slot>[]": {
|
|
91
|
+
"@position": "number",
|
|
92
|
+
"@index": "number",
|
|
93
|
+
"@tag": "string",
|
|
94
|
+
"@modifiers": "array",
|
|
95
|
+
"@attrs": "object"
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
"<marko-web-node-list-node>": {
|
|
99
|
+
"template": "./node.marko",
|
|
100
|
+
"@node": "object",
|
|
101
|
+
"@index": "number",
|
|
102
|
+
"@block-name": "string",
|
|
103
|
+
"@tag": "string",
|
|
104
|
+
"@modifiers": "array",
|
|
105
|
+
"@attrs": "object"
|
|
106
|
+
},
|
|
107
|
+
"<marko-web-node-list-element>": {
|
|
108
|
+
"template": "./element.marko",
|
|
109
|
+
"@name": "string",
|
|
110
|
+
"@tag": {
|
|
111
|
+
"type": "string",
|
|
112
|
+
"default-value": "div"
|
|
113
|
+
},
|
|
114
|
+
"@block-name": {
|
|
115
|
+
"type": "string",
|
|
116
|
+
"default-value": "node-list"
|
|
117
|
+
},
|
|
118
|
+
"@modifiers": "array",
|
|
119
|
+
"@attrs": "object"
|
|
120
|
+
}
|
|
121
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { getAsArray } from "@mindful-web/object-path";
|
|
2
|
+
|
|
3
|
+
$ const blockName = input.blockName || "node-list";
|
|
4
|
+
|
|
5
|
+
<if(input.renderBody)>
|
|
6
|
+
<marko-web-node-list-element
|
|
7
|
+
block-name=blockName
|
|
8
|
+
name="node"
|
|
9
|
+
tag=input.tag
|
|
10
|
+
modifiers=input.modifiers
|
|
11
|
+
attrs=input.attrs
|
|
12
|
+
>
|
|
13
|
+
<${input.renderBody} node=input.node index=input.index />
|
|
14
|
+
</marko-web-node-list-element>
|
|
15
|
+
</if>
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
// Compiled using marko@4.20.2 - DO NOT EDIT
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var marko_template = module.exports = require("marko/dist/html").t(__filename),
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web$1.0.0/components/node-list/node.marko",
|
|
6
|
+
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
7
|
+
module_objectPath_module = require("@mindful-web/object-path"),
|
|
8
|
+
objectPath_module = module_objectPath_module.default || module_objectPath_module,
|
|
9
|
+
getAsArray = module_objectPath_module.getAsArray,
|
|
10
|
+
marko_dynamicTag = require("marko/dist/runtime/helpers/dynamic-tag"),
|
|
11
|
+
marko_web_node_list_element_template = require("./element.marko"),
|
|
12
|
+
marko_loadTag = require("marko/dist/runtime/helpers/load-tag"),
|
|
13
|
+
marko_web_node_list_element_tag = marko_loadTag(marko_web_node_list_element_template);
|
|
14
|
+
|
|
15
|
+
function render(input, out, __component, component, state) {
|
|
16
|
+
var data = input;
|
|
17
|
+
|
|
18
|
+
const blockName = input.blockName || "node-list";
|
|
19
|
+
|
|
20
|
+
if (input.renderBody) {
|
|
21
|
+
marko_web_node_list_element_tag({
|
|
22
|
+
tag: input.tag,
|
|
23
|
+
blockName: blockName,
|
|
24
|
+
name: "node",
|
|
25
|
+
modifiers: input.modifiers,
|
|
26
|
+
attrs: input.attrs,
|
|
27
|
+
renderBody: function(out) {
|
|
28
|
+
marko_dynamicTag(out, input.renderBody, function() {
|
|
29
|
+
return {
|
|
30
|
+
node: input.node,
|
|
31
|
+
index: input.index
|
|
32
|
+
};
|
|
33
|
+
}, null, null, null, __component, "1");
|
|
34
|
+
}
|
|
35
|
+
}, out, __component, "0");
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
marko_template._ = marko_renderer(render, {
|
|
40
|
+
d_: true,
|
|
41
|
+
e_: marko_componentType
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
marko_template.meta = {
|
|
45
|
+
id: "/@mindful-web/marko-web$1.0.0/components/node-list/node.marko",
|
|
46
|
+
tags: [
|
|
47
|
+
"./element.marko"
|
|
48
|
+
]
|
|
49
|
+
};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { getAsArray } from "@mindful-web/object-path";
|
|
2
|
+
|
|
3
|
+
$ const nodes = getAsArray(input, "nodes");
|
|
4
|
+
$ const blockName = input.blockName || "node-list";
|
|
5
|
+
|
|
6
|
+
$ const slots = getAsArray(input, "slots");
|
|
7
|
+
$ const slotMap = getAsArray(input, "slots").reduce((map, slot) => {
|
|
8
|
+
const { index, position } = slot;
|
|
9
|
+
if (index == null && !position) {
|
|
10
|
+
map.set("default", slot);
|
|
11
|
+
return map;
|
|
12
|
+
}
|
|
13
|
+
if (!position) return map;
|
|
14
|
+
map.set(`${position}_${index}`, slot)
|
|
15
|
+
return map;
|
|
16
|
+
}, new Map());
|
|
17
|
+
|
|
18
|
+
$ const getSlot = (position, index) => (slotMap.get(`${position}_${index}`) || {});
|
|
19
|
+
$ const defaultSlot = slotMap.get("default") || {};
|
|
20
|
+
|
|
21
|
+
$ const modifiers = [...getAsArray(input, "modifiers")];
|
|
22
|
+
$ if (input.flushX) modifiers.push("flush-x");
|
|
23
|
+
$ if (input.flushY) modifiers.push("flush-y");
|
|
24
|
+
|
|
25
|
+
<if(nodes.length)>
|
|
26
|
+
<marko-web-node-list-element
|
|
27
|
+
block-name=blockName
|
|
28
|
+
name="nodes"
|
|
29
|
+
tag=input.tag
|
|
30
|
+
modifiers=modifiers
|
|
31
|
+
attrs=input.attrs
|
|
32
|
+
>
|
|
33
|
+
<if(input.renderBody)>
|
|
34
|
+
<${input.renderBody} nodes=nodes block-name=blockName />
|
|
35
|
+
</if>
|
|
36
|
+
<else>
|
|
37
|
+
<for|node, index| of=nodes>
|
|
38
|
+
$ const at = getSlot("at", index);
|
|
39
|
+
$ const before = getSlot("before", index);
|
|
40
|
+
$ const after = getSlot("after", index);
|
|
41
|
+
|
|
42
|
+
<if(before.renderBody)>
|
|
43
|
+
<marko-web-node-list-node
|
|
44
|
+
...before
|
|
45
|
+
block-name=blockName
|
|
46
|
+
node=node
|
|
47
|
+
index=index
|
|
48
|
+
modifiers=["position-before", ...getAsArray(before.modifiers)]
|
|
49
|
+
/>
|
|
50
|
+
</if>
|
|
51
|
+
|
|
52
|
+
<if(at.renderBody)>
|
|
53
|
+
<marko-web-node-list-node
|
|
54
|
+
...at
|
|
55
|
+
block-name=blockName
|
|
56
|
+
node=node
|
|
57
|
+
index=index
|
|
58
|
+
modifiers=["position-at", ...getAsArray(at.modifiers)]
|
|
59
|
+
/>
|
|
60
|
+
</if>
|
|
61
|
+
<else-if(defaultSlot.renderBody)>
|
|
62
|
+
<marko-web-node-list-node
|
|
63
|
+
...defaultSlot
|
|
64
|
+
block-name=blockName
|
|
65
|
+
node=node
|
|
66
|
+
index=index
|
|
67
|
+
/>
|
|
68
|
+
</else-if>
|
|
69
|
+
|
|
70
|
+
<if(after.renderBody)>
|
|
71
|
+
<marko-web-node-list-node
|
|
72
|
+
...after
|
|
73
|
+
block-name=blockName
|
|
74
|
+
node=node
|
|
75
|
+
index=index
|
|
76
|
+
modifiers=["position-after", ...getAsArray(after.modifiers)]
|
|
77
|
+
/>
|
|
78
|
+
</if>
|
|
79
|
+
</for>
|
|
80
|
+
</else>
|
|
81
|
+
</marko-web-node-list-element>
|
|
82
|
+
</if>
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
// Compiled using marko@4.20.2 - DO NOT EDIT
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var marko_template = module.exports = require("marko/dist/html").t(__filename),
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web$1.0.0/components/node-list/nodes.marko",
|
|
6
|
+
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
7
|
+
module_objectPath_module = require("@mindful-web/object-path"),
|
|
8
|
+
objectPath_module = module_objectPath_module.default || module_objectPath_module,
|
|
9
|
+
getAsArray = module_objectPath_module.getAsArray,
|
|
10
|
+
marko_dynamicTag = require("marko/dist/runtime/helpers/dynamic-tag"),
|
|
11
|
+
marko_forOf = require("marko/dist/runtime/helpers/for-of"),
|
|
12
|
+
marko_assign = require("marko/dist/runtime/helpers/assign"),
|
|
13
|
+
marko_web_node_list_node_template = require("./node.marko"),
|
|
14
|
+
marko_loadTag = require("marko/dist/runtime/helpers/load-tag"),
|
|
15
|
+
marko_web_node_list_node_tag = marko_loadTag(marko_web_node_list_node_template),
|
|
16
|
+
marko_web_node_list_element_template = require("./element.marko"),
|
|
17
|
+
marko_web_node_list_element_tag = marko_loadTag(marko_web_node_list_element_template);
|
|
18
|
+
|
|
19
|
+
function render(input, out, __component, component, state) {
|
|
20
|
+
var data = input;
|
|
21
|
+
|
|
22
|
+
const nodes = getAsArray(input, "nodes");
|
|
23
|
+
|
|
24
|
+
const blockName = input.blockName || "node-list";
|
|
25
|
+
|
|
26
|
+
const slots = getAsArray(input, "slots");
|
|
27
|
+
|
|
28
|
+
const slotMap = getAsArray(input, "slots").reduce((map, slot) => {
|
|
29
|
+
const { index, position } = slot;
|
|
30
|
+
if (index == null && !position) {
|
|
31
|
+
map.set("default", slot);
|
|
32
|
+
return map;
|
|
33
|
+
}
|
|
34
|
+
if (!position) return map;
|
|
35
|
+
map.set(`${position}_${index}`, slot)
|
|
36
|
+
return map;
|
|
37
|
+
}, new Map());
|
|
38
|
+
|
|
39
|
+
const getSlot = (position, index) => (slotMap.get(`${position}_${index}`) || {});
|
|
40
|
+
|
|
41
|
+
const defaultSlot = slotMap.get("default") || {};
|
|
42
|
+
|
|
43
|
+
const modifiers = [...getAsArray(input, "modifiers")];
|
|
44
|
+
|
|
45
|
+
if (input.flushX) modifiers.push("flush-x");
|
|
46
|
+
|
|
47
|
+
if (input.flushY) modifiers.push("flush-y");
|
|
48
|
+
|
|
49
|
+
if (nodes.length) {
|
|
50
|
+
marko_web_node_list_element_tag({
|
|
51
|
+
tag: input.tag,
|
|
52
|
+
blockName: blockName,
|
|
53
|
+
name: "nodes",
|
|
54
|
+
modifiers: modifiers,
|
|
55
|
+
attrs: input.attrs,
|
|
56
|
+
renderBody: function(out) {
|
|
57
|
+
if (input.renderBody) {
|
|
58
|
+
marko_dynamicTag(out, input.renderBody, function() {
|
|
59
|
+
return {
|
|
60
|
+
nodes: nodes,
|
|
61
|
+
"block-name": blockName
|
|
62
|
+
};
|
|
63
|
+
}, null, null, null, __component, "1");
|
|
64
|
+
} else {
|
|
65
|
+
var $for$0 = 0;
|
|
66
|
+
|
|
67
|
+
marko_forOf(nodes, function(node, index) {
|
|
68
|
+
var $keyScope$0 = "[" + (($for$0++) + "]");
|
|
69
|
+
|
|
70
|
+
const at = getSlot("at", index);
|
|
71
|
+
|
|
72
|
+
const before = getSlot("before", index);
|
|
73
|
+
|
|
74
|
+
const after = getSlot("after", index);
|
|
75
|
+
|
|
76
|
+
if (before.renderBody) {
|
|
77
|
+
marko_web_node_list_node_tag(marko_assign({}, before, {
|
|
78
|
+
blockName: blockName,
|
|
79
|
+
node: node,
|
|
80
|
+
index: index,
|
|
81
|
+
modifiers: ["position-before", ...getAsArray(before.modifiers)]
|
|
82
|
+
}), out, __component, "2" + $keyScope$0);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
if (at.renderBody) {
|
|
86
|
+
marko_web_node_list_node_tag(marko_assign({}, at, {
|
|
87
|
+
blockName: blockName,
|
|
88
|
+
node: node,
|
|
89
|
+
index: index,
|
|
90
|
+
modifiers: ["position-at", ...getAsArray(at.modifiers)]
|
|
91
|
+
}), out, __component, "3" + $keyScope$0);
|
|
92
|
+
} else if (defaultSlot.renderBody) {
|
|
93
|
+
marko_web_node_list_node_tag(marko_assign({}, defaultSlot, {
|
|
94
|
+
blockName: blockName,
|
|
95
|
+
node: node,
|
|
96
|
+
index: index
|
|
97
|
+
}), out, __component, "4" + $keyScope$0);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
if (after.renderBody) {
|
|
101
|
+
marko_web_node_list_node_tag(marko_assign({}, after, {
|
|
102
|
+
blockName: blockName,
|
|
103
|
+
node: node,
|
|
104
|
+
index: index,
|
|
105
|
+
modifiers: ["position-after", ...getAsArray(after.modifiers)]
|
|
106
|
+
}), out, __component, "5" + $keyScope$0);
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}, out, __component, "0");
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
marko_template._ = marko_renderer(render, {
|
|
116
|
+
d_: true,
|
|
117
|
+
e_: marko_componentType
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
marko_template.meta = {
|
|
121
|
+
id: "/@mindful-web/marko-web$1.0.0/components/node-list/nodes.marko",
|
|
122
|
+
tags: [
|
|
123
|
+
"./node.marko",
|
|
124
|
+
"./element.marko"
|
|
125
|
+
]
|
|
126
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { getAsArray } from "@mindful-web/object-path";
|
|
2
|
+
|
|
3
|
+
$ const tag = input.tag || "main";
|
|
4
|
+
$ const blockName = "page";
|
|
5
|
+
$ const classes = [blockName, ...getAsArray(input.modifiers).map(mod => `${blockName}--${mod}`)];
|
|
6
|
+
$ if (input.for) classes.push(`${blockName}--${input.for}`);
|
|
7
|
+
$ if (input.for && input.id) classes.push(`${blockName}--${input.for}-${input.id}`);
|
|
8
|
+
$ if (input.for && input.type) classes.push(`${blockName}--${input.for}-${input.type}`);
|
|
9
|
+
$ if (input.class) classes.push(input.class);
|
|
10
|
+
|
|
11
|
+
<${tag} ...input.attrs class=classes>
|
|
12
|
+
<${input.renderBody} />
|
|
13
|
+
</>
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// Compiled using marko@4.20.2 - DO NOT EDIT
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var marko_template = module.exports = require("marko/dist/html").t(__filename),
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web$1.0.0/components/page/container.marko",
|
|
6
|
+
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
7
|
+
module_objectPath_module = require("@mindful-web/object-path"),
|
|
8
|
+
objectPath_module = module_objectPath_module.default || module_objectPath_module,
|
|
9
|
+
getAsArray = module_objectPath_module.getAsArray,
|
|
10
|
+
marko_dynamicTag = require("marko/dist/runtime/helpers/dynamic-tag"),
|
|
11
|
+
marko_assign = require("marko/dist/runtime/helpers/assign");
|
|
12
|
+
|
|
13
|
+
function render(input, out, __component, component, state) {
|
|
14
|
+
var data = input;
|
|
15
|
+
|
|
16
|
+
const tag = input.tag || "main";
|
|
17
|
+
|
|
18
|
+
const blockName = "page";
|
|
19
|
+
|
|
20
|
+
const classes = [blockName, ...getAsArray(input.modifiers).map(mod => `${blockName}--${mod}`)];
|
|
21
|
+
|
|
22
|
+
if (input.for) classes.push(`${blockName}--${input.for}`);
|
|
23
|
+
|
|
24
|
+
if (input.for && input.id) classes.push(`${blockName}--${input.for}-${input.id}`);
|
|
25
|
+
|
|
26
|
+
if (input.for && input.type) classes.push(`${blockName}--${input.for}-${input.type}`);
|
|
27
|
+
|
|
28
|
+
if (input.class) classes.push(input.class);
|
|
29
|
+
|
|
30
|
+
marko_dynamicTag(out, tag, function() {
|
|
31
|
+
return marko_assign({}, input.attrs, {
|
|
32
|
+
class: classes
|
|
33
|
+
});
|
|
34
|
+
}, function(out) {
|
|
35
|
+
marko_dynamicTag(out, input.renderBody, null, null, null, null, __component, "1");
|
|
36
|
+
}, null, null, __component, "0");
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
marko_template._ = marko_renderer(render, {
|
|
40
|
+
d_: true,
|
|
41
|
+
e_: marko_componentType
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
marko_template.meta = {
|
|
45
|
+
id: "/@mindful-web/marko-web$1.0.0/components/page/container.marko"
|
|
46
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// Compiled using marko@4.20.2 - DO NOT EDIT
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var marko_template = module.exports = require("marko/dist/html").t(__filename),
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web$1.0.0/components/page/description.marko",
|
|
6
|
+
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
7
|
+
marko_attr = require("marko/dist/runtime/html/helpers/attr");
|
|
8
|
+
|
|
9
|
+
function render(input, out, __component, component, state) {
|
|
10
|
+
var data = input;
|
|
11
|
+
|
|
12
|
+
if (input.value) {
|
|
13
|
+
out.w("<meta name=\"description\" property=\"og:description\" item-prop=\"description\"" +
|
|
14
|
+
marko_attr("content", input.value) +
|
|
15
|
+
">");
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
marko_template._ = marko_renderer(render, {
|
|
20
|
+
d_: true,
|
|
21
|
+
e_: marko_componentType
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
marko_template.meta = {
|
|
25
|
+
id: "/@mindful-web/marko-web$1.0.0/components/page/description.marko"
|
|
26
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { buildImgixUrl } from "@mindful-web/image";
|
|
2
|
+
import { getAsObject, getAsArray } from "@mindful-web/object-path";
|
|
3
|
+
|
|
4
|
+
$ const blockName = input.blockName || "page-image";
|
|
5
|
+
$ const image = getAsObject(input, "obj");
|
|
6
|
+
$ const withCaption = input.withCaption != null ? input.withCaption : true;
|
|
7
|
+
$ const withCredit = input.withCredit != null ? input.withCredit : true;
|
|
8
|
+
$ const withDisplayName = input.withDisplayName != null ? input.withDisplayName : false;
|
|
9
|
+
$ const lazyload = input.lazyload != null ? input.lazyload : true;
|
|
10
|
+
$ const width = input.width != null ? input.width : 320;
|
|
11
|
+
|
|
12
|
+
$ const modifiers = [...getAsArray(input, "modifiers")];
|
|
13
|
+
$ const fluid = input.fluid != null ? input.fluid : true;
|
|
14
|
+
$ if (fluid) modifiers.push("fluid");
|
|
15
|
+
|
|
16
|
+
$ const hasImage = Boolean(image.src);
|
|
17
|
+
$ const imageOptions = { w: width, ...input.options };
|
|
18
|
+
|
|
19
|
+
$ const imageAttrs = {};
|
|
20
|
+
$ if (image.id) imageAttrs["data-image-id"] = image.id;
|
|
21
|
+
|
|
22
|
+
<if(hasImage)>
|
|
23
|
+
$ const src = buildImgixUrl(image.src, imageOptions);
|
|
24
|
+
$ const srcset = [`${buildImgixUrl(src, { dpr: 2 })} 2x`];
|
|
25
|
+
|
|
26
|
+
<marko-web-block
|
|
27
|
+
name=blockName
|
|
28
|
+
modifiers=modifiers
|
|
29
|
+
>
|
|
30
|
+
<if(withDisplayName)>
|
|
31
|
+
<marko-web-image-display-name block-name=blockName obj=image />
|
|
32
|
+
</if>
|
|
33
|
+
<div class=`${blockName}__wrapper`>
|
|
34
|
+
<marko-web-img
|
|
35
|
+
src=src
|
|
36
|
+
srcset=srcset
|
|
37
|
+
alt=image.alt
|
|
38
|
+
class=`${blockName}__image`
|
|
39
|
+
lazyload=lazyload
|
|
40
|
+
attrs=imageAttrs
|
|
41
|
+
/>
|
|
42
|
+
</div>
|
|
43
|
+
<if(withCaption)>
|
|
44
|
+
<marko-web-image-caption block-name=blockName obj=image />
|
|
45
|
+
</if>
|
|
46
|
+
<if(withCredit)>
|
|
47
|
+
<marko-web-image-credit block-name=blockName obj=image />
|
|
48
|
+
</if>
|
|
49
|
+
</marko-web-block>
|
|
50
|
+
</if>
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
// Compiled using marko@4.20.2 - DO NOT EDIT
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var marko_template = module.exports = require("marko/dist/html").t(__filename),
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web$1.0.0/components/page/image.marko",
|
|
6
|
+
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
7
|
+
module_image_module = require("@mindful-web/image"),
|
|
8
|
+
image_module = module_image_module.default || module_image_module,
|
|
9
|
+
buildImgixUrl = module_image_module.buildImgixUrl,
|
|
10
|
+
module_objectPath_module = require("@mindful-web/object-path"),
|
|
11
|
+
objectPath_module = module_objectPath_module.default || module_objectPath_module,
|
|
12
|
+
getAsObject = module_objectPath_module.getAsObject,
|
|
13
|
+
getAsArray = module_objectPath_module.getAsArray,
|
|
14
|
+
marko_web_image_display_name_template = require("../element/image/display-name.marko"),
|
|
15
|
+
marko_loadTag = require("marko/dist/runtime/helpers/load-tag"),
|
|
16
|
+
marko_web_image_display_name_tag = marko_loadTag(marko_web_image_display_name_template),
|
|
17
|
+
marko_web_img_template = require("../element/img.marko"),
|
|
18
|
+
marko_web_img_tag = marko_loadTag(marko_web_img_template),
|
|
19
|
+
marko_classAttr = require("marko/dist/runtime/html/helpers/class-attr"),
|
|
20
|
+
marko_web_image_caption_template = require("../element/image/caption.marko"),
|
|
21
|
+
marko_web_image_caption_tag = marko_loadTag(marko_web_image_caption_template),
|
|
22
|
+
marko_web_image_credit_template = require("../element/image/credit.marko"),
|
|
23
|
+
marko_web_image_credit_tag = marko_loadTag(marko_web_image_credit_template),
|
|
24
|
+
marko_web_block_template = require("../element/block.marko"),
|
|
25
|
+
marko_web_block_tag = marko_loadTag(marko_web_block_template);
|
|
26
|
+
|
|
27
|
+
function render(input, out, __component, component, state) {
|
|
28
|
+
var data = input;
|
|
29
|
+
|
|
30
|
+
const blockName = input.blockName || "page-image";
|
|
31
|
+
|
|
32
|
+
const image = getAsObject(input, "obj");
|
|
33
|
+
|
|
34
|
+
const withCaption = input.withCaption != null ? input.withCaption : true;
|
|
35
|
+
|
|
36
|
+
const withCredit = input.withCredit != null ? input.withCredit : true;
|
|
37
|
+
|
|
38
|
+
const withDisplayName = input.withDisplayName != null ? input.withDisplayName : false;
|
|
39
|
+
|
|
40
|
+
const lazyload = input.lazyload != null ? input.lazyload : true;
|
|
41
|
+
|
|
42
|
+
const width = input.width != null ? input.width : 320;
|
|
43
|
+
|
|
44
|
+
const modifiers = [...getAsArray(input, "modifiers")];
|
|
45
|
+
|
|
46
|
+
const fluid = input.fluid != null ? input.fluid : true;
|
|
47
|
+
|
|
48
|
+
if (fluid) modifiers.push("fluid");
|
|
49
|
+
|
|
50
|
+
const hasImage = Boolean(image.src);
|
|
51
|
+
|
|
52
|
+
const imageOptions = { w: width, ...input.options };
|
|
53
|
+
|
|
54
|
+
const imageAttrs = {};
|
|
55
|
+
|
|
56
|
+
if (image.id) imageAttrs["data-image-id"] = image.id;
|
|
57
|
+
|
|
58
|
+
if (hasImage) {
|
|
59
|
+
const src = buildImgixUrl(image.src, imageOptions);
|
|
60
|
+
|
|
61
|
+
const srcset = [`${buildImgixUrl(src, { dpr: 2 })} 2x`];
|
|
62
|
+
|
|
63
|
+
marko_web_block_tag({
|
|
64
|
+
name: blockName,
|
|
65
|
+
tag: "div",
|
|
66
|
+
modifiers: modifiers,
|
|
67
|
+
renderBody: function(out) {
|
|
68
|
+
if (withDisplayName) {
|
|
69
|
+
marko_web_image_display_name_tag({
|
|
70
|
+
blockName: blockName,
|
|
71
|
+
obj: image
|
|
72
|
+
}, out, __component, "1");
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
out.w("<div" +
|
|
76
|
+
marko_classAttr(blockName + "__wrapper") +
|
|
77
|
+
">");
|
|
78
|
+
|
|
79
|
+
marko_web_img_tag({
|
|
80
|
+
lazyload: lazyload,
|
|
81
|
+
src: src,
|
|
82
|
+
srcset: srcset,
|
|
83
|
+
alt: image.alt,
|
|
84
|
+
class: blockName + "__image",
|
|
85
|
+
attrs: imageAttrs
|
|
86
|
+
}, out, __component, "3");
|
|
87
|
+
|
|
88
|
+
out.w("</div>");
|
|
89
|
+
|
|
90
|
+
if (withCaption) {
|
|
91
|
+
marko_web_image_caption_tag({
|
|
92
|
+
blockName: blockName,
|
|
93
|
+
obj: image
|
|
94
|
+
}, out, __component, "4");
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
if (withCredit) {
|
|
98
|
+
marko_web_image_credit_tag({
|
|
99
|
+
blockName: blockName,
|
|
100
|
+
obj: image
|
|
101
|
+
}, out, __component, "5");
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}, out, __component, "0");
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
marko_template._ = marko_renderer(render, {
|
|
109
|
+
d_: true,
|
|
110
|
+
e_: marko_componentType
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
marko_template.meta = {
|
|
114
|
+
id: "/@mindful-web/marko-web$1.0.0/components/page/image.marko",
|
|
115
|
+
tags: [
|
|
116
|
+
"../element/image/display-name.marko",
|
|
117
|
+
"../element/img.marko",
|
|
118
|
+
"../element/image/caption.marko",
|
|
119
|
+
"../element/image/credit.marko",
|
|
120
|
+
"../element/block.marko"
|
|
121
|
+
]
|
|
122
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
$ const { structuredDataQueryFragment, buildStructuredData, id, type } = input;
|
|
2
|
+
$ const { document } = out.global;
|
|
3
|
+
|
|
4
|
+
<${document}
|
|
5
|
+
above-container=input.aboveContainer
|
|
6
|
+
below-container=input.belowContainer
|
|
7
|
+
foot=input.foot
|
|
8
|
+
>
|
|
9
|
+
<@head>
|
|
10
|
+
<marko-web-content-page-metadata
|
|
11
|
+
id=id
|
|
12
|
+
structured-data-query-fragment=structuredDataQueryFragment
|
|
13
|
+
build-structured-data=buildStructuredData
|
|
14
|
+
/>
|
|
15
|
+
<${input.head} />
|
|
16
|
+
</@head>
|
|
17
|
+
<!-- Note: camelcased vars due to nest input of dynamic document. perhaps a marko bug -->
|
|
18
|
+
<@container abovePage=input.abovePage belowPage=input.belowPage>
|
|
19
|
+
<@page for="content" tag="article" id=id type=type attrs=input.attrs>
|
|
20
|
+
<${input.page} />
|
|
21
|
+
</@page>
|
|
22
|
+
</@container>
|
|
23
|
+
</>
|