@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,49 @@
|
|
|
1
|
+
const { isObject } = require('@mindful-web/utils');
|
|
2
|
+
const { get } = require('@mindful-web/object-path');
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Use `siteContext.path` first and then fallback to `canonicalPath`.
|
|
6
|
+
* Content uses the former, other models use the latter.
|
|
7
|
+
* This should be made consistent across all types at some point.
|
|
8
|
+
*/
|
|
9
|
+
const defaultHref = (obj) => get(obj, 'siteContext.path', get(obj, 'canonicalPath'));
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Converts `marko-web-obj` link input into "standard" `marko-web-link` input.
|
|
13
|
+
*/
|
|
14
|
+
module.exports = (linkInput, obj) => {
|
|
15
|
+
// Generate default link when link input is true.
|
|
16
|
+
if (linkInput === true) return { href: defaultHref(obj) };
|
|
17
|
+
// If no link input was provided, return null.
|
|
18
|
+
if (!isObject(linkInput)) return null;
|
|
19
|
+
|
|
20
|
+
const {
|
|
21
|
+
field,
|
|
22
|
+
href,
|
|
23
|
+
target,
|
|
24
|
+
rel,
|
|
25
|
+
title,
|
|
26
|
+
class: className,
|
|
27
|
+
attrs,
|
|
28
|
+
} = linkInput;
|
|
29
|
+
if (href) {
|
|
30
|
+
// When `href` is specifically set, do not convert the input.
|
|
31
|
+
return {
|
|
32
|
+
href,
|
|
33
|
+
target,
|
|
34
|
+
rel,
|
|
35
|
+
title,
|
|
36
|
+
class: className,
|
|
37
|
+
attrs,
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
// Return the customized input
|
|
41
|
+
return {
|
|
42
|
+
href: field && get(obj, field) ? get(obj, field) : defaultHref(obj),
|
|
43
|
+
target,
|
|
44
|
+
rel,
|
|
45
|
+
title,
|
|
46
|
+
class: className,
|
|
47
|
+
attrs,
|
|
48
|
+
};
|
|
49
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const { dasherize } = require('@mindful-web/inflector');
|
|
2
|
+
|
|
3
|
+
module.exports = (type, def = 'obj') => {
|
|
4
|
+
if (!type) return def;
|
|
5
|
+
const inflected = dasherize(type);
|
|
6
|
+
if (inflected === 'content-page') return 'dynamic-page';
|
|
7
|
+
if (/^content-/.test(inflected)) return inflected.replace(/^content-.*/, 'content');
|
|
8
|
+
return inflected;
|
|
9
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { getAsArray } from "@mindful-web/object-path";
|
|
2
|
+
|
|
3
|
+
$ const { link, sources = [], image } = input;
|
|
4
|
+
|
|
5
|
+
$ const hasImage = Boolean(image.src);
|
|
6
|
+
|
|
7
|
+
<if(hasImage)>
|
|
8
|
+
<if(link)>
|
|
9
|
+
<marko-core-link
|
|
10
|
+
before=link.before
|
|
11
|
+
after=link.after
|
|
12
|
+
href=link.href
|
|
13
|
+
target=link.target
|
|
14
|
+
title=link.title
|
|
15
|
+
rel=link.rel
|
|
16
|
+
class=link.class
|
|
17
|
+
attrs=link.attrs
|
|
18
|
+
>
|
|
19
|
+
<marko-web-picture image=image sources=sources />
|
|
20
|
+
</marko-core-link>
|
|
21
|
+
</if>
|
|
22
|
+
<else>
|
|
23
|
+
<picture>
|
|
24
|
+
<for|s| of=sources>
|
|
25
|
+
$ const srcset = image.lazyload ? null : s.srcset.join(", ");
|
|
26
|
+
$ const dataSrcset = image.lazyload ? s.srcset.join(", ") : null;
|
|
27
|
+
<source
|
|
28
|
+
srcset=srcset
|
|
29
|
+
data-srcset=dataSrcset
|
|
30
|
+
media=s.media
|
|
31
|
+
width=s.width
|
|
32
|
+
height=s.height
|
|
33
|
+
>
|
|
34
|
+
</for>
|
|
35
|
+
<image ...image />
|
|
36
|
+
</picture>
|
|
37
|
+
</else>
|
|
38
|
+
</if>
|
|
@@ -0,0 +1,85 @@
|
|
|
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/element/picture.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_web_picture_template = require("./picture.marko"),
|
|
11
|
+
marko_loadTag = require("marko/dist/runtime/helpers/load-tag"),
|
|
12
|
+
marko_web_picture_tag = marko_loadTag(marko_web_picture_template),
|
|
13
|
+
marko_core_link_template = require("@mindful-web/marko-core/components/elements/link.marko"),
|
|
14
|
+
marko_core_link_tag = marko_loadTag(marko_core_link_template),
|
|
15
|
+
marko_forOf = require("marko/dist/runtime/helpers/for-of"),
|
|
16
|
+
marko_attr = require("marko/dist/runtime/html/helpers/attr"),
|
|
17
|
+
image_template = require("./components/image.marko"),
|
|
18
|
+
image_tag = marko_loadTag(image_template);
|
|
19
|
+
|
|
20
|
+
function render(input, out, __component, component, state) {
|
|
21
|
+
var data = input;
|
|
22
|
+
|
|
23
|
+
const { link, sources = [], image } = input;
|
|
24
|
+
|
|
25
|
+
const hasImage = Boolean(image.src);
|
|
26
|
+
|
|
27
|
+
if (hasImage) {
|
|
28
|
+
if (link) {
|
|
29
|
+
marko_core_link_tag({
|
|
30
|
+
before: link.before,
|
|
31
|
+
after: link.after,
|
|
32
|
+
href: link.href,
|
|
33
|
+
target: link.target,
|
|
34
|
+
title: link.title,
|
|
35
|
+
rel: link.rel,
|
|
36
|
+
class: link.class,
|
|
37
|
+
attrs: link.attrs,
|
|
38
|
+
renderBody: function(out) {
|
|
39
|
+
marko_web_picture_tag({
|
|
40
|
+
image: image,
|
|
41
|
+
sources: sources
|
|
42
|
+
}, out, __component, "1");
|
|
43
|
+
}
|
|
44
|
+
}, out, __component, "0");
|
|
45
|
+
} else {
|
|
46
|
+
out.w("<picture>");
|
|
47
|
+
|
|
48
|
+
var $for$0 = 0;
|
|
49
|
+
|
|
50
|
+
marko_forOf(sources, function(s) {
|
|
51
|
+
const srcset = image.lazyload ? null : s.srcset.join(", ");
|
|
52
|
+
|
|
53
|
+
const dataSrcset = image.lazyload ? s.srcset.join(", ") : null;
|
|
54
|
+
|
|
55
|
+
var $keyScope$0 = "[" + (($for$0++) + "]");
|
|
56
|
+
|
|
57
|
+
out.w("<source" +
|
|
58
|
+
marko_attr("srcset", srcset) +
|
|
59
|
+
marko_attr("data-srcset", dataSrcset) +
|
|
60
|
+
marko_attr("media", s.media) +
|
|
61
|
+
marko_attr("width", s.width) +
|
|
62
|
+
marko_attr("height", s.height) +
|
|
63
|
+
">");
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
image_tag(image, out, __component, "4");
|
|
67
|
+
|
|
68
|
+
out.w("</picture>");
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
marko_template._ = marko_renderer(render, {
|
|
74
|
+
d_: true,
|
|
75
|
+
e_: marko_componentType
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
marko_template.meta = {
|
|
79
|
+
id: "/@mindful-web/marko-web$1.0.0/components/element/picture.marko",
|
|
80
|
+
tags: [
|
|
81
|
+
"./picture.marko",
|
|
82
|
+
"@mindful-web/marko-core/components/elements/link.marko",
|
|
83
|
+
"./components/image.marko"
|
|
84
|
+
]
|
|
85
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
$ const tag = input.tag === undefined ? "div" : input.tag;
|
|
2
|
+
$ const value = input.value != null ? `${input.value}`.trim() : null;
|
|
3
|
+
|
|
4
|
+
$ const textInput = {
|
|
5
|
+
html: input.html,
|
|
6
|
+
renderBody: input.renderBody,
|
|
7
|
+
value,
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
<!-- @deprecated This should be replaced with <marko-core-text> -->
|
|
11
|
+
|
|
12
|
+
<if(value)>
|
|
13
|
+
<if(input.link)>
|
|
14
|
+
<if(tag)>
|
|
15
|
+
<${tag} ...input.attrs class=input.class>
|
|
16
|
+
<marko-web-link ...input.link>
|
|
17
|
+
<text ...textInput />
|
|
18
|
+
</marko-web-link>
|
|
19
|
+
</>
|
|
20
|
+
</if>
|
|
21
|
+
<else>
|
|
22
|
+
<marko-web-link ...input.link>
|
|
23
|
+
<text ...textInput />
|
|
24
|
+
</marko-web-link>
|
|
25
|
+
</else>
|
|
26
|
+
</if>
|
|
27
|
+
<else>
|
|
28
|
+
<if(tag)>
|
|
29
|
+
<${tag} ...input.attrs class=input.class>
|
|
30
|
+
<text ...textInput />
|
|
31
|
+
</>
|
|
32
|
+
</if>
|
|
33
|
+
<else>
|
|
34
|
+
<text ...textInput />
|
|
35
|
+
</else>
|
|
36
|
+
</else>
|
|
37
|
+
</if>
|
|
@@ -0,0 +1,76 @@
|
|
|
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/element/text.marko",
|
|
6
|
+
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
7
|
+
text_template = require("./components/text.marko"),
|
|
8
|
+
marko_loadTag = require("marko/dist/runtime/helpers/load-tag"),
|
|
9
|
+
text_tag = marko_loadTag(text_template),
|
|
10
|
+
marko_assign = require("marko/dist/runtime/helpers/assign"),
|
|
11
|
+
marko_web_link_template = require("./link.marko"),
|
|
12
|
+
marko_web_link_tag = marko_loadTag(marko_web_link_template),
|
|
13
|
+
marko_dynamicTag = require("marko/dist/runtime/helpers/dynamic-tag");
|
|
14
|
+
|
|
15
|
+
function render(input, out, __component, component, state) {
|
|
16
|
+
var data = input;
|
|
17
|
+
|
|
18
|
+
const tag = input.tag === undefined ? "div" : input.tag;
|
|
19
|
+
|
|
20
|
+
const value = input.value != null ? `${input.value}`.trim() : null;
|
|
21
|
+
|
|
22
|
+
const textInput = {
|
|
23
|
+
html: input.html,
|
|
24
|
+
renderBody: input.renderBody,
|
|
25
|
+
value,
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
if (value) {
|
|
29
|
+
if (input.link) {
|
|
30
|
+
if (tag) {
|
|
31
|
+
marko_dynamicTag(out, tag, function() {
|
|
32
|
+
return marko_assign({}, input.attrs, {
|
|
33
|
+
class: input.class
|
|
34
|
+
});
|
|
35
|
+
}, function(out) {
|
|
36
|
+
marko_web_link_tag(marko_assign({}, input.link, {
|
|
37
|
+
renderBody: function(out) {
|
|
38
|
+
text_tag(textInput, out, __component, "2");
|
|
39
|
+
}
|
|
40
|
+
}), out, __component, "1");
|
|
41
|
+
}, null, null, __component, "0");
|
|
42
|
+
} else {
|
|
43
|
+
marko_web_link_tag(marko_assign({}, input.link, {
|
|
44
|
+
renderBody: function(out) {
|
|
45
|
+
text_tag(textInput, out, __component, "4");
|
|
46
|
+
}
|
|
47
|
+
}), out, __component, "3");
|
|
48
|
+
}
|
|
49
|
+
} else {
|
|
50
|
+
if (tag) {
|
|
51
|
+
marko_dynamicTag(out, tag, function() {
|
|
52
|
+
return marko_assign({}, input.attrs, {
|
|
53
|
+
class: input.class
|
|
54
|
+
});
|
|
55
|
+
}, function(out) {
|
|
56
|
+
text_tag(textInput, out, __component, "6");
|
|
57
|
+
}, null, null, __component, "5");
|
|
58
|
+
} else {
|
|
59
|
+
text_tag(textInput, out, __component, "7");
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
marko_template._ = marko_renderer(render, {
|
|
66
|
+
d_: true,
|
|
67
|
+
e_: marko_componentType
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
marko_template.meta = {
|
|
71
|
+
id: "/@mindful-web/marko-web$1.0.0/components/element/text.marko",
|
|
72
|
+
tags: [
|
|
73
|
+
"./components/text.marko",
|
|
74
|
+
"./link.marko"
|
|
75
|
+
]
|
|
76
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { get } from "@mindful-web/object-path";
|
|
2
|
+
import extractRender from "../extract-render";
|
|
3
|
+
|
|
4
|
+
<marko-web-obj-text
|
|
5
|
+
type="website-section"
|
|
6
|
+
block-name=input.blockName
|
|
7
|
+
obj=input.obj
|
|
8
|
+
field="description"
|
|
9
|
+
html=true
|
|
10
|
+
tag=input.tag
|
|
11
|
+
class=input.class
|
|
12
|
+
modifiers=input.modifiers
|
|
13
|
+
attrs=input.attrs
|
|
14
|
+
link=input.link
|
|
15
|
+
...extractRender(input)
|
|
16
|
+
/>
|
|
@@ -0,0 +1,44 @@
|
|
|
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/element/website-section/description.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
|
+
get = module_objectPath_module.get,
|
|
10
|
+
module_extractRender = require("../extract-render"),
|
|
11
|
+
extractRender = module_extractRender.default || module_extractRender,
|
|
12
|
+
marko_assign = require("marko/dist/runtime/helpers/assign"),
|
|
13
|
+
marko_web_obj_text_template = require("../obj-text.marko"),
|
|
14
|
+
marko_loadTag = require("marko/dist/runtime/helpers/load-tag"),
|
|
15
|
+
marko_web_obj_text_tag = marko_loadTag(marko_web_obj_text_template);
|
|
16
|
+
|
|
17
|
+
function render(input, out, __component, component, state) {
|
|
18
|
+
var data = input;
|
|
19
|
+
|
|
20
|
+
marko_web_obj_text_tag(marko_assign({
|
|
21
|
+
type: "website-section",
|
|
22
|
+
blockName: input.blockName,
|
|
23
|
+
obj: input.obj,
|
|
24
|
+
field: "description",
|
|
25
|
+
html: true,
|
|
26
|
+
tag: input.tag,
|
|
27
|
+
class: input.class,
|
|
28
|
+
modifiers: input.modifiers,
|
|
29
|
+
attrs: input.attrs,
|
|
30
|
+
link: input.link
|
|
31
|
+
}, extractRender(input)), out, __component, "0");
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
marko_template._ = marko_renderer(render, {
|
|
35
|
+
d_: true,
|
|
36
|
+
e_: marko_componentType
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
marko_template.meta = {
|
|
40
|
+
id: "/@mindful-web/marko-web$1.0.0/components/element/website-section/description.marko",
|
|
41
|
+
tags: [
|
|
42
|
+
"../obj-text.marko"
|
|
43
|
+
]
|
|
44
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { getAsArray, getAsObject } from "@mindful-web/object-path";
|
|
2
|
+
|
|
3
|
+
<marko-web-obj|{ value, classNames }|
|
|
4
|
+
type="website-section"
|
|
5
|
+
block-name=input.blockName
|
|
6
|
+
obj=input.obj
|
|
7
|
+
field="hierarchy"
|
|
8
|
+
class=input.class
|
|
9
|
+
modifiers=input.modifiers
|
|
10
|
+
>
|
|
11
|
+
<marko-web-array|{ value: node, index, length }|
|
|
12
|
+
attrs=input.attrs
|
|
13
|
+
tag=input.tag
|
|
14
|
+
value=value
|
|
15
|
+
class=classNames
|
|
16
|
+
>
|
|
17
|
+
<${input.renderBody} node=node index=index length=length />
|
|
18
|
+
</marko-web-array>
|
|
19
|
+
</marko-web-obj>
|
|
@@ -0,0 +1,60 @@
|
|
|
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/element/website-section/hierarchy.marko",
|
|
6
|
+
marko_component = require("./hierarchy.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
|
+
getAsArray = module_objectPath_module.getAsArray,
|
|
11
|
+
getAsObject = module_objectPath_module.getAsObject,
|
|
12
|
+
marko_dynamicTag = require("marko/dist/runtime/helpers/dynamic-tag"),
|
|
13
|
+
marko_web_array_template = require("../array.marko"),
|
|
14
|
+
marko_loadTag = require("marko/dist/runtime/helpers/load-tag"),
|
|
15
|
+
marko_web_array_tag = marko_loadTag(marko_web_array_template),
|
|
16
|
+
marko_web_obj_template = require("../obj.marko"),
|
|
17
|
+
marko_web_obj_tag = marko_loadTag(marko_web_obj_template);
|
|
18
|
+
|
|
19
|
+
function render(input, out, __component, component, state) {
|
|
20
|
+
var data = input;
|
|
21
|
+
|
|
22
|
+
marko_web_obj_tag({
|
|
23
|
+
type: "website-section",
|
|
24
|
+
blockName: input.blockName,
|
|
25
|
+
obj: input.obj,
|
|
26
|
+
field: "hierarchy",
|
|
27
|
+
class: input.class,
|
|
28
|
+
modifiers: input.modifiers,
|
|
29
|
+
renderBody: function(out, { value, classNames }) {
|
|
30
|
+
marko_web_array_tag({
|
|
31
|
+
attrs: input.attrs,
|
|
32
|
+
tag: input.tag,
|
|
33
|
+
value: value,
|
|
34
|
+
class: classNames,
|
|
35
|
+
renderBody: function(out, { value: node, index, length }) {
|
|
36
|
+
marko_dynamicTag(out, input.renderBody, function() {
|
|
37
|
+
return {
|
|
38
|
+
node: node,
|
|
39
|
+
index: index,
|
|
40
|
+
length: length
|
|
41
|
+
};
|
|
42
|
+
}, null, null, null, __component, "2");
|
|
43
|
+
}
|
|
44
|
+
}, out, __component, "1");
|
|
45
|
+
}
|
|
46
|
+
}, out, __component, "0");
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
marko_template._ = marko_renderer(render, {
|
|
50
|
+
e_: marko_componentType
|
|
51
|
+
}, marko_component);
|
|
52
|
+
|
|
53
|
+
marko_template.meta = {
|
|
54
|
+
id: "/@mindful-web/marko-web$1.0.0/components/element/website-section/hierarchy.marko",
|
|
55
|
+
component: "./hierarchy.marko",
|
|
56
|
+
tags: [
|
|
57
|
+
"../array.marko",
|
|
58
|
+
"../obj.marko"
|
|
59
|
+
]
|
|
60
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"<marko-web-website-section-name>": {
|
|
3
|
+
"template": "./name.marko",
|
|
4
|
+
"@block-name": "string",
|
|
5
|
+
"@obj": "object",
|
|
6
|
+
"@tag": "string",
|
|
7
|
+
"@class": "string",
|
|
8
|
+
"@modifiers": "string",
|
|
9
|
+
"@attrs": "object",
|
|
10
|
+
"@link": "expression"
|
|
11
|
+
},
|
|
12
|
+
"<marko-web-website-section-description>": {
|
|
13
|
+
"template": "./description.marko",
|
|
14
|
+
"@block-name": "string",
|
|
15
|
+
"@obj": "object",
|
|
16
|
+
"@tag": "string",
|
|
17
|
+
"@class": "string",
|
|
18
|
+
"@modifiers": "string",
|
|
19
|
+
"@attrs": "object",
|
|
20
|
+
"@link": "expression"
|
|
21
|
+
},
|
|
22
|
+
"<marko-web-website-section-hierarchy>": {
|
|
23
|
+
"template": "./hierarchy.marko",
|
|
24
|
+
"@block-name": "string",
|
|
25
|
+
"@obj": "object",
|
|
26
|
+
"@tag": "string",
|
|
27
|
+
"@class": "string",
|
|
28
|
+
"@modifiers": "string",
|
|
29
|
+
"@attrs": "object"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { get } from "@mindful-web/object-path";
|
|
2
|
+
import extractRender from "../extract-render";
|
|
3
|
+
|
|
4
|
+
$ const attrs = { title: get(input.obj, "fullName"), ...input.attrs };
|
|
5
|
+
|
|
6
|
+
<marko-web-obj-text
|
|
7
|
+
type="website-section"
|
|
8
|
+
block-name=input.blockName
|
|
9
|
+
obj=input.obj
|
|
10
|
+
field="name"
|
|
11
|
+
tag=input.tag
|
|
12
|
+
class=input.class
|
|
13
|
+
modifiers=input.modifiers
|
|
14
|
+
attrs=attrs
|
|
15
|
+
link=input.link
|
|
16
|
+
html=true
|
|
17
|
+
...extractRender(input)
|
|
18
|
+
/>
|
|
@@ -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/element/website-section/name.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
|
+
get = module_objectPath_module.get,
|
|
10
|
+
module_extractRender = require("../extract-render"),
|
|
11
|
+
extractRender = module_extractRender.default || module_extractRender,
|
|
12
|
+
marko_assign = require("marko/dist/runtime/helpers/assign"),
|
|
13
|
+
marko_web_obj_text_template = require("../obj-text.marko"),
|
|
14
|
+
marko_loadTag = require("marko/dist/runtime/helpers/load-tag"),
|
|
15
|
+
marko_web_obj_text_tag = marko_loadTag(marko_web_obj_text_template);
|
|
16
|
+
|
|
17
|
+
function render(input, out, __component, component, state) {
|
|
18
|
+
var data = input;
|
|
19
|
+
|
|
20
|
+
const attrs = { title: get(input.obj, "fullName"), ...input.attrs };
|
|
21
|
+
|
|
22
|
+
marko_web_obj_text_tag(marko_assign({
|
|
23
|
+
type: "website-section",
|
|
24
|
+
blockName: input.blockName,
|
|
25
|
+
obj: input.obj,
|
|
26
|
+
field: "name",
|
|
27
|
+
tag: input.tag,
|
|
28
|
+
class: input.class,
|
|
29
|
+
modifiers: input.modifiers,
|
|
30
|
+
attrs: attrs,
|
|
31
|
+
link: input.link,
|
|
32
|
+
html: true
|
|
33
|
+
}, extractRender(input)), out, __component, "0");
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
marko_template._ = marko_renderer(render, {
|
|
37
|
+
d_: true,
|
|
38
|
+
e_: marko_componentType
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
marko_template.meta = {
|
|
42
|
+
id: "/@mindful-web/marko-web$1.0.0/components/element/website-section/name.marko",
|
|
43
|
+
tags: [
|
|
44
|
+
"../obj-text.marko"
|
|
45
|
+
]
|
|
46
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
$ const href = `https://fonts.googleapis.com/css2?family=${input.family}&display=swap`;
|
|
2
|
+
|
|
3
|
+
<marko-web-font-link href=href preconnect-only=input.preconnectOnly>
|
|
4
|
+
<@preconnect href="https://fonts.googleapis.com" />
|
|
5
|
+
<@preconnect href="https://fonts.gstatic.com" crossorigin />
|
|
6
|
+
</marko-web-font-link>
|
|
@@ -0,0 +1,41 @@
|
|
|
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/google.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://fonts.googleapis.com/css2?family=${input.family}&display=swap`;
|
|
15
|
+
|
|
16
|
+
marko_web_font_link_tag({
|
|
17
|
+
href: href,
|
|
18
|
+
preconnectOnly: input.preconnectOnly,
|
|
19
|
+
preconnects: [
|
|
20
|
+
{
|
|
21
|
+
href: "https://fonts.googleapis.com"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
href: "https://fonts.gstatic.com",
|
|
25
|
+
crossorigin: true
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
}, out, __component, "0");
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
marko_template._ = marko_renderer(render, {
|
|
32
|
+
d_: true,
|
|
33
|
+
e_: marko_componentType
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
marko_template.meta = {
|
|
37
|
+
id: "/@mindful-web/marko-web$1.0.0/components/font/google.marko",
|
|
38
|
+
tags: [
|
|
39
|
+
"./link.marko"
|
|
40
|
+
]
|
|
41
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { getAsArray } from "@mindful-web/object-path";
|
|
2
|
+
|
|
3
|
+
$ const preconnects = getAsArray(input, "preconnects");
|
|
4
|
+
|
|
5
|
+
<for|preconnect| of=preconnects>
|
|
6
|
+
<link rel="preconnect" href=preconnect.href crossorigin=preconnect.crossorigin>
|
|
7
|
+
</for>
|
|
8
|
+
|
|
9
|
+
<if(!input.preconnectOnly)>
|
|
10
|
+
<link href=input.href rel="stylesheet" media="print" onload='this.onload=null,this.removeAttribute("media")'>
|
|
11
|
+
<noscript>
|
|
12
|
+
<link href=input.href rel="stylesheet">
|
|
13
|
+
</noscript>
|
|
14
|
+
</if>
|
|
@@ -0,0 +1,45 @@
|
|
|
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/link.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_forOf = require("marko/dist/runtime/helpers/for-of"),
|
|
11
|
+
marko_attr = require("marko/dist/runtime/html/helpers/attr");
|
|
12
|
+
|
|
13
|
+
function render(input, out, __component, component, state) {
|
|
14
|
+
var data = input;
|
|
15
|
+
|
|
16
|
+
const preconnects = getAsArray(input, "preconnects");
|
|
17
|
+
|
|
18
|
+
var $for$0 = 0;
|
|
19
|
+
|
|
20
|
+
marko_forOf(preconnects, function(preconnect) {
|
|
21
|
+
var $keyScope$0 = "[" + (($for$0++) + "]");
|
|
22
|
+
|
|
23
|
+
out.w("<link rel=\"preconnect\"" +
|
|
24
|
+
marko_attr("href", preconnect.href) +
|
|
25
|
+
marko_attr("crossorigin", preconnect.crossorigin) +
|
|
26
|
+
">");
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
if (!input.preconnectOnly) {
|
|
30
|
+
out.w("<link" +
|
|
31
|
+
marko_attr("href", input.href) +
|
|
32
|
+
" rel=\"stylesheet\" media=\"print\" onload=\"this.onload=null,this.removeAttribute("media")\"><noscript><link" +
|
|
33
|
+
marko_attr("href", input.href) +
|
|
34
|
+
" rel=\"stylesheet\"></noscript>");
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
marko_template._ = marko_renderer(render, {
|
|
39
|
+
d_: true,
|
|
40
|
+
e_: marko_componentType
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
marko_template.meta = {
|
|
44
|
+
id: "/@mindful-web/marko-web$1.0.0/components/font/link.marko"
|
|
45
|
+
};
|