@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,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"<marko-web-font-link>": {
|
|
3
|
+
"template": "./link.marko",
|
|
4
|
+
"@preconnects <preconnect>[]": {
|
|
5
|
+
"@href": "string",
|
|
6
|
+
"@crossorigin": "boolean"
|
|
7
|
+
},
|
|
8
|
+
"@href": "string",
|
|
9
|
+
"@preconnect-only": "boolean"
|
|
10
|
+
},
|
|
11
|
+
"<marko-web-google-font>": {
|
|
12
|
+
"template": "./google.marko",
|
|
13
|
+
"@family": "string",
|
|
14
|
+
"@preconnect-only": "boolean"
|
|
15
|
+
},
|
|
16
|
+
"<marko-web-typekit-font>": {
|
|
17
|
+
"template": "./typekit.marko",
|
|
18
|
+
"@id": "string",
|
|
19
|
+
"@preconnect-only": "boolean"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
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/font/typekit.marko",
|
|
6
|
+
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
7
|
+
marko_web_font_link_template = require("./link.marko"),
|
|
8
|
+
marko_loadTag = require("marko/dist/runtime/helpers/load-tag"),
|
|
9
|
+
marko_web_font_link_tag = marko_loadTag(marko_web_font_link_template);
|
|
10
|
+
|
|
11
|
+
function render(input, out, __component, component, state) {
|
|
12
|
+
var data = input;
|
|
13
|
+
|
|
14
|
+
const href = `https://use.typekit.net/${input.id}.css`;
|
|
15
|
+
|
|
16
|
+
marko_web_font_link_tag({
|
|
17
|
+
href: href,
|
|
18
|
+
preconnectOnly: input.preconnectOnly,
|
|
19
|
+
preconnects: [
|
|
20
|
+
{
|
|
21
|
+
href: "https://use.typekit.net",
|
|
22
|
+
crossorigin: true
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}, out, __component, "0");
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
marko_template._ = marko_renderer(render, {
|
|
29
|
+
d_: true,
|
|
30
|
+
e_: marko_componentType
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
marko_template.meta = {
|
|
34
|
+
id: "/@mindful-web/marko-web$1.0.0/components/font/typekit.marko",
|
|
35
|
+
tags: [
|
|
36
|
+
"./link.marko"
|
|
37
|
+
]
|
|
38
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { getAsObject, getAsArray } from "@mindful-web/object-path";
|
|
2
|
+
|
|
3
|
+
$ const { components, fragments } = out.global;
|
|
4
|
+
|
|
5
|
+
$ const Component = components.get(input.componentName);
|
|
6
|
+
$ const pageNumber = input.pageNumber || 1;
|
|
7
|
+
|
|
8
|
+
$ const queryParams = {
|
|
9
|
+
...getAsObject(input, "queryParams"),
|
|
10
|
+
queryName: "LoadMore",
|
|
11
|
+
queryFragment: fragments.get(input.fragmentName),
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
<if(Component)>
|
|
15
|
+
<marko-web-query|{ nodes, pageInfo }| name=input.queryName params=queryParams>
|
|
16
|
+
<if(nodes.length)>
|
|
17
|
+
<marko-web-page-container
|
|
18
|
+
tag="section"
|
|
19
|
+
...input.pageInput
|
|
20
|
+
modifiers=["load-more", `page-${pageNumber}`, ...getAsArray(input, "pageInput.modifiers")]
|
|
21
|
+
attrs=input.attrs
|
|
22
|
+
>
|
|
23
|
+
<!-- Fire generic `load-more-in-view` event (other services can attach to this, e.g. GTM) -->
|
|
24
|
+
<marko-web-browser-component name="TriggerInViewEvent" props={ eventName: "load-more-in-view", data: { page_number: pageNumber + 1 } } />
|
|
25
|
+
<if(pageNumber === 1 && input.header)>
|
|
26
|
+
<div class="load-more-header">
|
|
27
|
+
$!{input.header}
|
|
28
|
+
</div>
|
|
29
|
+
</if>
|
|
30
|
+
<${Component} ...input.componentInput nodes=nodes page-info=pageInfo page-number=pageNumber />
|
|
31
|
+
|
|
32
|
+
$ const { endCursor, hasNextPage } = pageInfo;
|
|
33
|
+
$ delete queryParams.skip;
|
|
34
|
+
$ delete queryParams.queryFragment;
|
|
35
|
+
$ delete queryParams.renderBody;
|
|
36
|
+
$ const provide = {
|
|
37
|
+
...input,
|
|
38
|
+
queryParams: { ...queryParams, after: endCursor },
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
<marko-web-load-more-trigger
|
|
42
|
+
...input.triggerInput
|
|
43
|
+
append-to=input.appendTo
|
|
44
|
+
max-pages=input.maxPages
|
|
45
|
+
expand=input.expand
|
|
46
|
+
page-number=pageNumber
|
|
47
|
+
provide=provide
|
|
48
|
+
show=hasNextPage
|
|
49
|
+
/>
|
|
50
|
+
</marko-web-page-container>
|
|
51
|
+
</if>
|
|
52
|
+
</marko-web-query>
|
|
53
|
+
</if>
|
|
@@ -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/dist/html").t(__filename),
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web$1.0.0/components/load-more/index.marko",
|
|
6
|
+
marko_component = require("./index.marko"),
|
|
7
|
+
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
8
|
+
module_objectPath_module = require("@mindful-web/object-path"),
|
|
9
|
+
objectPath_module = module_objectPath_module.default || module_objectPath_module,
|
|
10
|
+
getAsObject = module_objectPath_module.getAsObject,
|
|
11
|
+
getAsArray = module_objectPath_module.getAsArray,
|
|
12
|
+
marko_web_browser_component_template = require("../browser-component.marko"),
|
|
13
|
+
marko_loadTag = require("marko/dist/runtime/helpers/load-tag"),
|
|
14
|
+
marko_web_browser_component_tag = marko_loadTag(marko_web_browser_component_template),
|
|
15
|
+
marko_str = require("marko/dist/runtime/helpers/to-string"),
|
|
16
|
+
marko_assign = require("marko/dist/runtime/helpers/assign"),
|
|
17
|
+
marko_dynamicTag = require("marko/dist/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("@mindful-web/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
|
+
e_: marko_componentType
|
|
108
|
+
}, marko_component);
|
|
109
|
+
|
|
110
|
+
marko_template.meta = {
|
|
111
|
+
id: "/@mindful-web/marko-web$1.0.0/components/load-more/index.marko",
|
|
112
|
+
component: "./index.marko",
|
|
113
|
+
tags: [
|
|
114
|
+
"../browser-component.marko",
|
|
115
|
+
"./trigger.marko",
|
|
116
|
+
"../page/container.marko",
|
|
117
|
+
"@mindful-web/marko-core/components/queries/index.marko"
|
|
118
|
+
]
|
|
119
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"<marko-web-load-more>": {
|
|
3
|
+
"template": "./index.marko",
|
|
4
|
+
"@page-number": "number",
|
|
5
|
+
"@append-to": "string",
|
|
6
|
+
"@max-pages": "number",
|
|
7
|
+
"@expand": "number",
|
|
8
|
+
"@component-name": "string",
|
|
9
|
+
"@component-input": "object",
|
|
10
|
+
"@query-name": "string",
|
|
11
|
+
"@query-params": "object",
|
|
12
|
+
"@fragment-name": "string",
|
|
13
|
+
"@page-input": "object",
|
|
14
|
+
"@header": "string",
|
|
15
|
+
"@trigger-input": "object",
|
|
16
|
+
"@attrs": "object"
|
|
17
|
+
},
|
|
18
|
+
"<marko-web-load-more-trigger>": {
|
|
19
|
+
"template": "./trigger.marko",
|
|
20
|
+
"@show": "number",
|
|
21
|
+
"@page-number": "number",
|
|
22
|
+
"@provide": "object",
|
|
23
|
+
"@append-to": "string",
|
|
24
|
+
"@max-pages": "number",
|
|
25
|
+
"@expand": "number",
|
|
26
|
+
"@class-name": "string",
|
|
27
|
+
"@button-class": "string",
|
|
28
|
+
"@button-label": "string"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
$ const { config } = out.global;
|
|
2
|
+
|
|
3
|
+
$ const props = {
|
|
4
|
+
...input,
|
|
5
|
+
mountPoint: config.loadMoreMountPoint(),
|
|
6
|
+
appendTo: input.appendTo || ".document-container",
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
<if(input.show)>
|
|
10
|
+
<marko-web-browser-component name="LoadMoreTrigger" props=props/>
|
|
11
|
+
</if>
|
|
@@ -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/dist/html").t(__filename),
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web$1.0.0/components/load-more/trigger.marko",
|
|
6
|
+
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
7
|
+
marko_web_browser_component_template = require("../browser-component.marko"),
|
|
8
|
+
marko_loadTag = require("marko/dist/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
|
+
d_: true,
|
|
32
|
+
e_: marko_componentType
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
marko_template.meta = {
|
|
36
|
+
id: "/@mindful-web/marko-web$1.0.0/components/load-more/trigger.marko",
|
|
37
|
+
tags: [
|
|
38
|
+
"../browser-component.marko"
|
|
39
|
+
]
|
|
40
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"taglib-imports": [
|
|
3
|
+
"./document/marko.json",
|
|
4
|
+
"./element/marko.json",
|
|
5
|
+
"./font/marko.json",
|
|
6
|
+
"./load-more/marko.json",
|
|
7
|
+
"./node/marko.json",
|
|
8
|
+
"./node-list/marko.json",
|
|
9
|
+
"./page/marko.json",
|
|
10
|
+
"./resolve/marko.json",
|
|
11
|
+
"./rss/marko.json"
|
|
12
|
+
],
|
|
13
|
+
"<marko-web-browser-component>": {
|
|
14
|
+
"template": "./browser-component.marko",
|
|
15
|
+
"@name": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"required": true
|
|
18
|
+
},
|
|
19
|
+
"@hydrate": "boolean",
|
|
20
|
+
"@ssr": "boolean",
|
|
21
|
+
"@skip-when-exists": "boolean",
|
|
22
|
+
"@tag": "string",
|
|
23
|
+
"@class": "string",
|
|
24
|
+
"@attrs": "object",
|
|
25
|
+
"@props": "object"
|
|
26
|
+
},
|
|
27
|
+
"<marko-web-browser-component-script>": {
|
|
28
|
+
"template": "./browser-component/script.marko"
|
|
29
|
+
},
|
|
30
|
+
"<marko-web-deferred-stylesheet>": {
|
|
31
|
+
"template": "./deferred-stylesheet.marko",
|
|
32
|
+
"@href": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"required": true
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { getAsArray, get } from "@mindful-web/object-path";
|
|
2
|
+
import showElement from "../element/show-element";
|
|
3
|
+
|
|
4
|
+
$ const showHeader = showElement(get(input.header, "left")) || showElement(get(input.header, "right"));
|
|
5
|
+
$ const showTitle = showElement(input.title);
|
|
6
|
+
$ const showText = getAsArray(input.text).some(t => showElement(t));
|
|
7
|
+
$ const showFooter = showElement(get(input.footer, "left")) || showElement(get(input.footer, "right"));
|
|
8
|
+
|
|
9
|
+
$ const showBody = showHeader || showTitle || showText || showFooter;
|
|
10
|
+
|
|
11
|
+
<if(showBody)>
|
|
12
|
+
<marko-web-node-element
|
|
13
|
+
block-name=input.blockName
|
|
14
|
+
name="body"
|
|
15
|
+
tag=input.tag
|
|
16
|
+
modifiers=input.modifiers
|
|
17
|
+
attrs=input.attrs
|
|
18
|
+
>
|
|
19
|
+
<if(showHeader)>
|
|
20
|
+
<marko-web-node-header ...input.header modifiers=["body", ...getAsArray(input, "header.modifiers")] />
|
|
21
|
+
</if>
|
|
22
|
+
<if(showTitle || showText)>
|
|
23
|
+
<marko-web-node-element name="contents" modifiers=["body"]>
|
|
24
|
+
<if(showTitle)>
|
|
25
|
+
<marko-web-node-element name="title" ...input.title />
|
|
26
|
+
</if>
|
|
27
|
+
<if(showText)>
|
|
28
|
+
<for|text| of=input.text>
|
|
29
|
+
<if(showElement(text))>
|
|
30
|
+
<marko-web-node-element name="text" ...text />
|
|
31
|
+
</if>
|
|
32
|
+
</for>
|
|
33
|
+
</if>
|
|
34
|
+
</marko-web-node-element>
|
|
35
|
+
</if>
|
|
36
|
+
<if(showFooter)>
|
|
37
|
+
<marko-web-node-footer ...input.footer modifiers=["body", ...getAsArray(input, "footer.modifiers")] />
|
|
38
|
+
</if>
|
|
39
|
+
</marko-web-node-element>
|
|
40
|
+
</if>
|
|
@@ -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/dist/html").t(__filename),
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web$1.0.0/components/node/body.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
|
+
get = module_objectPath_module.get,
|
|
11
|
+
module_showElement = require("../element/show-element"),
|
|
12
|
+
showElement = module_showElement.default || module_showElement,
|
|
13
|
+
marko_assign = require("marko/dist/runtime/helpers/assign"),
|
|
14
|
+
marko_web_node_header_template = require("./header.marko"),
|
|
15
|
+
marko_loadTag = require("marko/dist/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/dist/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
|
+
d_: true,
|
|
102
|
+
e_: marko_componentType
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
marko_template.meta = {
|
|
106
|
+
id: "/@mindful-web/marko-web$1.0.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/dist/html").t(__filename),
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web$1.0.0/components/node/element.marko",
|
|
6
|
+
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
7
|
+
marko_assign = require("marko/dist/runtime/helpers/assign"),
|
|
8
|
+
marko_web_element_template = require("../element/index.marko"),
|
|
9
|
+
marko_loadTag = require("marko/dist/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
|
+
d_: true,
|
|
31
|
+
e_: marko_componentType
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
marko_template.meta = {
|
|
35
|
+
id: "/@mindful-web/marko-web$1.0.0/components/node/element.marko",
|
|
36
|
+
tags: [
|
|
37
|
+
"../element/index.marko"
|
|
38
|
+
]
|
|
39
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { getAsObject } from "@mindful-web/object-path";
|
|
2
|
+
|
|
3
|
+
$ const left = getAsObject(input, "left");
|
|
4
|
+
$ const right = getAsObject(input, "right");
|
|
5
|
+
|
|
6
|
+
<marko-web-node-element
|
|
7
|
+
block-name=input.blockName
|
|
8
|
+
name="footer"
|
|
9
|
+
tag=input.tag
|
|
10
|
+
modifiers=input.modifiers
|
|
11
|
+
attrs=input.attrs
|
|
12
|
+
>
|
|
13
|
+
<if(left.renderBody)>
|
|
14
|
+
<marko-web-node-element ...left name="footer-left" />
|
|
15
|
+
</if>
|
|
16
|
+
<if(right.renderBody)>
|
|
17
|
+
<marko-web-node-element ...right name="footer-right" />
|
|
18
|
+
</if>
|
|
19
|
+
</marko-web-node-element>
|
|
@@ -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/dist/html").t(__filename),
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web$1.0.0/components/node/footer.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
|
+
getAsObject = module_objectPath_module.getAsObject,
|
|
10
|
+
marko_assign = require("marko/dist/runtime/helpers/assign"),
|
|
11
|
+
marko_web_node_element_template = require("./element.marko"),
|
|
12
|
+
marko_loadTag = require("marko/dist/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
|
+
d_: true,
|
|
55
|
+
e_: marko_componentType
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
marko_template.meta = {
|
|
59
|
+
id: "/@mindful-web/marko-web$1.0.0/components/node/footer.marko",
|
|
60
|
+
tags: [
|
|
61
|
+
"./element.marko"
|
|
62
|
+
]
|
|
63
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { getAsObject } from "@mindful-web/object-path";
|
|
2
|
+
|
|
3
|
+
$ const left = getAsObject(input, "left");
|
|
4
|
+
$ const right = getAsObject(input, "right");
|
|
5
|
+
|
|
6
|
+
<marko-web-node-element
|
|
7
|
+
block-name=input.blockName
|
|
8
|
+
name="header"
|
|
9
|
+
tag=input.tag
|
|
10
|
+
modifiers=input.modifiers
|
|
11
|
+
attrs=input.attrs
|
|
12
|
+
>
|
|
13
|
+
<if(left.renderBody)>
|
|
14
|
+
<marko-web-node-element ...left name="header-left" />
|
|
15
|
+
</if>
|
|
16
|
+
<if(right.renderBody)>
|
|
17
|
+
<marko-web-node-element ...right name="header-right" />
|
|
18
|
+
</if>
|
|
19
|
+
</marko-web-node-element>
|