@mindful-web/marko-web-theme-monorail 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 +1 -0
- package/LICENSE +21 -0
- package/README.md +103 -0
- package/browser/.eslintrc.js +1 -0
- package/browser/block-loader.vue +64 -0
- package/browser/comment-toggle-button.vue +89 -0
- package/browser/company-search.vue +78 -0
- package/browser/content-meter-track.vue +90 -0
- package/browser/i18n-vue.js +11 -0
- package/browser/idx-newsletter-form/index.js +61 -0
- package/browser/idx-newsletter-form/inline.vue +243 -0
- package/browser/idx-newsletter-form/pushdown.vue +249 -0
- package/browser/idx-newsletter-form/toggle-button.vue +65 -0
- package/browser/index.js +170 -0
- package/browser/inline-newsletter-form/step1.vue +159 -0
- package/browser/inline-newsletter-form.vue +129 -0
- package/browser/menu-toggle-button.vue +150 -0
- package/browser/newsletter-close-button.vue +44 -0
- package/browser/newsletter-signup-form/check-icon.vue +13 -0
- package/browser/newsletter-signup-form/form-group.vue +50 -0
- package/browser/newsletter-signup-form/input-form-group.vue +57 -0
- package/browser/newsletter-signup-form/newsletter-checkbox.vue +63 -0
- package/browser/newsletter-signup-form/privacy-policy.vue +38 -0
- package/browser/newsletter-signup-form/select-form-group.vue +59 -0
- package/browser/newsletter-signup-form/sign-up-button.vue +49 -0
- package/browser/newsletter-signup-form/step2.vue +284 -0
- package/browser/newsletter-signup-modal-listener.vue +59 -0
- package/browser/newsletter-toggle-button.vue +42 -0
- package/browser/reveal-ad-handler.vue +195 -0
- package/browser/section-search.vue +89 -0
- package/browser/site-newsletter-menu/step1.vue +189 -0
- package/browser/site-newsletter-menu.vue +176 -0
- package/browser/ssr.js +15 -0
- package/browser/top-stories-menu.vue +58 -0
- package/browser/translations-vue.js +50 -0
- package/browser/wufoo-form.vue +62 -0
- package/components/ads/fixed-ad-bottom.marko +7 -0
- package/components/ads/fixed-ad-bottom.marko.js +36 -0
- package/components/ads/marko.json +20 -0
- package/components/ads/reveal-ad-handler.marko +9 -0
- package/components/ads/reveal-ad-handler.marko.js +38 -0
- package/components/blocks/author-bios.marko +28 -0
- package/components/blocks/author-bios.marko.js +76 -0
- package/components/blocks/callout-cards.marko +15 -0
- package/components/blocks/callout-cards.marko.js +74 -0
- package/components/blocks/company-inquiry-form.marko +30 -0
- package/components/blocks/company-inquiry-form.marko.js +93 -0
- package/components/blocks/company-search.marko +1 -0
- package/components/blocks/company-search.marko.js +29 -0
- package/components/blocks/content-card-deck.marko +142 -0
- package/components/blocks/content-card-deck.marko.js +325 -0
- package/components/blocks/content-meter.marko +85 -0
- package/components/blocks/content-meter.marko.js +132 -0
- package/components/blocks/full-width-native-ad.marko +21 -0
- package/components/blocks/full-width-native-ad.marko.js +62 -0
- package/components/blocks/hero-card.marko +91 -0
- package/components/blocks/hero-card.marko.js +207 -0
- package/components/blocks/latest-content-list.marko +89 -0
- package/components/blocks/latest-content-list.marko.js +146 -0
- package/components/blocks/latest-podcast.marko +64 -0
- package/components/blocks/latest-podcast.marko.js +172 -0
- package/components/blocks/latest-products-feed.marko +58 -0
- package/components/blocks/latest-products-feed.marko.js +166 -0
- package/components/blocks/marko.json +204 -0
- package/components/blocks/more-products.marko +49 -0
- package/components/blocks/more-products.marko.js +135 -0
- package/components/blocks/most-popular-list.marko +75 -0
- package/components/blocks/most-popular-list.marko.js +146 -0
- package/components/blocks/most-popular.marko +97 -0
- package/components/blocks/most-popular.marko.js +190 -0
- package/components/blocks/native-x-card-deck.marko +85 -0
- package/components/blocks/native-x-card-deck.marko.js +221 -0
- package/components/blocks/native-x-promo-card.marko +55 -0
- package/components/blocks/native-x-promo-card.marko.js +135 -0
- package/components/blocks/newsletter-signup-banner-external.marko +33 -0
- package/components/blocks/newsletter-signup-banner-external.marko.js +103 -0
- package/components/blocks/newsletter-signup-banner-large.marko +36 -0
- package/components/blocks/newsletter-signup-banner-large.marko.js +93 -0
- package/components/blocks/newsletter-signup-banner.marko +39 -0
- package/components/blocks/newsletter-signup-banner.marko.js +69 -0
- package/components/blocks/opinion.marko +34 -0
- package/components/blocks/opinion.marko.js +95 -0
- package/components/blocks/primary-image.marko +125 -0
- package/components/blocks/primary-image.marko.js +228 -0
- package/components/blocks/products.marko +57 -0
- package/components/blocks/products.marko.js +157 -0
- package/components/blocks/read-next.marko +42 -0
- package/components/blocks/read-next.marko.js +113 -0
- package/components/blocks/related-stories.marko +74 -0
- package/components/blocks/related-stories.marko.js +165 -0
- package/components/blocks/resource-library.marko +77 -0
- package/components/blocks/resource-library.marko.js +194 -0
- package/components/blocks/section-body-feed.marko +39 -0
- package/components/blocks/section-body-feed.marko.js +99 -0
- package/components/blocks/section-card-deck-featured.marko +37 -0
- package/components/blocks/section-card-deck-featured.marko.js +105 -0
- package/components/blocks/section-card-deck.marko +13 -0
- package/components/blocks/section-card-deck.marko.js +44 -0
- package/components/blocks/section-card-list.marko +102 -0
- package/components/blocks/section-card-list.marko.js +236 -0
- package/components/blocks/section-feed.marko +46 -0
- package/components/blocks/section-feed.marko.js +94 -0
- package/components/blocks/section-forbes.marko +102 -0
- package/components/blocks/section-forbes.marko.js +221 -0
- package/components/blocks/section-list-deck.marko +38 -0
- package/components/blocks/section-list-deck.marko.js +109 -0
- package/components/blocks/section-list.marko +89 -0
- package/components/blocks/section-list.marko.js +179 -0
- package/components/blocks/section-search.marko +14 -0
- package/components/blocks/section-search.marko.js +57 -0
- package/components/blocks/section-title-feed.marko +40 -0
- package/components/blocks/section-title-feed.marko.js +100 -0
- package/components/blocks/top-stories-menu.marko +40 -0
- package/components/blocks/top-stories-menu.marko.js +98 -0
- package/components/blocks/top-stories.marko +76 -0
- package/components/blocks/top-stories.marko.js +186 -0
- package/components/blocks/white-papers.marko +80 -0
- package/components/blocks/white-papers.marko.js +205 -0
- package/components/breadcrumbs/content-page.marko +7 -0
- package/components/breadcrumbs/content-page.marko.js +35 -0
- package/components/breadcrumbs/index.marko +21 -0
- package/components/breadcrumbs/index.marko.js +59 -0
- package/components/breadcrumbs/marko.json +32 -0
- package/components/breadcrumbs/scss/_breadcrumbs.scss +35 -0
- package/components/breadcrumbs/website-section.marko +31 -0
- package/components/breadcrumbs/website-section.marko.js +107 -0
- package/components/breadcrumbs/with-home.marko +13 -0
- package/components/breadcrumbs/with-home.marko.js +65 -0
- package/components/client-side-block-loader.marko +6 -0
- package/components/client-side-block-loader.marko.js +36 -0
- package/components/client-side-blocks/marko.json +8 -0
- package/components/client-side-blocks/most-popular-list.marko +1 -0
- package/components/client-side-blocks/most-popular-list.marko.js +31 -0
- package/components/client-side-blocks/most-popular.marko +1 -0
- package/components/client-side-blocks/most-popular.marko.js +31 -0
- package/components/content/body-with-injection.marko +116 -0
- package/components/content/body-with-injection.marko.js +190 -0
- package/components/content/contact-details/index.marko +95 -0
- package/components/content/contact-details/index.marko.js +274 -0
- package/components/content/contact-details/marko.json +27 -0
- package/components/content/contact-details/section.marko +9 -0
- package/components/content/contact-details/section.marko.js +37 -0
- package/components/content/download/form-dot-com.marko +23 -0
- package/components/content/download/form-dot-com.marko.js +59 -0
- package/components/content/download/identity-x.marko +73 -0
- package/components/content/download/identity-x.marko.js +149 -0
- package/components/content/download/index.marko +43 -0
- package/components/content/download/index.marko.js +113 -0
- package/components/content/download/link.marko +12 -0
- package/components/content/download/link.marko.js +45 -0
- package/components/content/download/marko.json +26 -0
- package/components/content/download/wufoo.marko +23 -0
- package/components/content/download/wufoo.marko.js +59 -0
- package/components/content/link-url/index.marko +16 -0
- package/components/content/link-url/index.marko.js +48 -0
- package/components/content/link-url/marko.json +9 -0
- package/components/content/marko.json +18 -0
- package/components/content/sections-listed-in.marko +26 -0
- package/components/content/sections-listed-in.marko.js +89 -0
- package/components/content-attribution/attribution.marko +1 -0
- package/components/content-attribution/attribution.marko.js +33 -0
- package/components/content-attribution/components/authors.marko +3 -0
- package/components/content-attribution/components/authors.marko.js +42 -0
- package/components/content-attribution/components/byline.marko +1 -0
- package/components/content-attribution/components/byline.marko.js +30 -0
- package/components/content-attribution/components/company.marko +7 -0
- package/components/content-attribution/components/company.marko.js +43 -0
- package/components/content-attribution/components/contributors.marko +3 -0
- package/components/content-attribution/components/contributors.marko.js +42 -0
- package/components/content-attribution/components/photographers.marko +3 -0
- package/components/content-attribution/components/photographers.marko.js +42 -0
- package/components/content-attribution/components/source.marko +1 -0
- package/components/content-attribution/components/source.marko.js +30 -0
- package/components/content-attribution/components/sponsors.marko +3 -0
- package/components/content-attribution/components/sponsors.marko.js +42 -0
- package/components/content-attribution/index.marko +34 -0
- package/components/content-attribution/index.marko.js +81 -0
- package/components/content-attribution/marko.json +27 -0
- package/components/directory-facets/facet-container/facet-container.marko +32 -0
- package/components/directory-facets/facet-container/facet-container.marko.js +65 -0
- package/components/directory-facets/facet-container/marko.json +26 -0
- package/components/directory-facets/facet-list/facet-list.marko +66 -0
- package/components/directory-facets/facet-list/facet-list.marko.js +140 -0
- package/components/directory-facets/facet-list/marko.json +23 -0
- package/components/directory-facets/facet.marko +15 -0
- package/components/directory-facets/facet.marko.js +44 -0
- package/components/directory-facets/find-active-facet.js +22 -0
- package/components/directory-facets/index.marko +29 -0
- package/components/directory-facets/index.marko.js +77 -0
- package/components/directory-facets/marko.json +40 -0
- package/components/facebook-connect.marko +52 -0
- package/components/facebook-connect.marko.js +59 -0
- package/components/flows/card-deck.marko +63 -0
- package/components/flows/card-deck.marko.js +159 -0
- package/components/flows/content/card-deck-col.marko +49 -0
- package/components/flows/content/card-deck-col.marko.js +98 -0
- package/components/flows/content/directory-section.marko +41 -0
- package/components/flows/content/directory-section.marko.js +107 -0
- package/components/flows/content/list.marko +51 -0
- package/components/flows/content/list.marko.js +98 -0
- package/components/flows/content/marko.json +39 -0
- package/components/flows/marko.json +42 -0
- package/components/flows/section-feed.marko +66 -0
- package/components/flows/section-feed.marko.js +118 -0
- package/components/gam/components/define-display-ad.marko +106 -0
- package/components/gam/components/define-display-ad.marko.js +171 -0
- package/components/gam/define-display-ad.marko +27 -0
- package/components/gam/define-display-ad.marko.js +60 -0
- package/components/gam/inject-ads.marko +28 -0
- package/components/gam/inject-ads.marko.js +56 -0
- package/components/gam/marko.json +17 -0
- package/components/gam/utils/increment-pos.js +13 -0
- package/components/gam/wallpaper-ad.marko +18 -0
- package/components/gam/wallpaper-ad.marko.js +75 -0
- package/components/identity-x/comment-stream.marko +33 -0
- package/components/identity-x/comment-stream.marko.js +71 -0
- package/components/identity-x/content-page-gate.marko +85 -0
- package/components/identity-x/content-page-gate.marko.js +171 -0
- package/components/identity-x/marko.json +38 -0
- package/components/identity-x/newsletter-footer.marko +56 -0
- package/components/identity-x/newsletter-footer.marko.js +100 -0
- package/components/identity-x/newsletter-inline.marko +22 -0
- package/components/identity-x/newsletter-inline.marko.js +55 -0
- package/components/identity-x/newsletter-modal.marko +42 -0
- package/components/identity-x/newsletter-modal.marko.js +88 -0
- package/components/identity-x/newsletter-pushdown.marko +66 -0
- package/components/identity-x/newsletter-pushdown.marko.js +113 -0
- package/components/layouts/ad-preview.marko +84 -0
- package/components/layouts/ad-preview.marko.js +166 -0
- package/components/layouts/marko.json +15 -0
- package/components/marko.json +58 -0
- package/components/menu-toggle-button.marko +19 -0
- package/components/menu-toggle-button.marko.js +45 -0
- package/components/native-x/marko.json +5 -0
- package/components/native-x/render.marko +13 -0
- package/components/native-x/render.marko.js +45 -0
- package/components/nodes/author-bio.marko +39 -0
- package/components/nodes/author-bio.marko.js +121 -0
- package/components/nodes/author-card.marko +42 -0
- package/components/nodes/author-card.marko.js +115 -0
- package/components/nodes/author-published.marko +41 -0
- package/components/nodes/author-published.marko.js +105 -0
- package/components/nodes/author.marko +28 -0
- package/components/nodes/author.marko.js +92 -0
- package/components/nodes/components/attribution.marko +13 -0
- package/components/nodes/components/attribution.marko.js +49 -0
- package/components/nodes/components/authors.marko +7 -0
- package/components/nodes/components/authors.marko.js +43 -0
- package/components/nodes/components/company-name.marko +1 -0
- package/components/nodes/components/company-name.marko.js +33 -0
- package/components/nodes/components/dates.marko +11 -0
- package/components/nodes/components/dates.marko.js +58 -0
- package/components/nodes/components/section-sponsor.marko +14 -0
- package/components/nodes/components/section-sponsor.marko.js +56 -0
- package/components/nodes/content-published.marko +46 -0
- package/components/nodes/content-published.marko.js +89 -0
- package/components/nodes/content.marko +175 -0
- package/components/nodes/content.marko.js +327 -0
- package/components/nodes/directory-section-feed-content.marko +161 -0
- package/components/nodes/directory-section-feed-content.marko.js +387 -0
- package/components/nodes/featured-products-card.marko +52 -0
- package/components/nodes/featured-products-card.marko.js +110 -0
- package/components/nodes/marko.json +83 -0
- package/components/nodes/product-feed-content.marko +52 -0
- package/components/nodes/product-feed-content.marko.js +137 -0
- package/components/nodes/section-feed-content.marko +256 -0
- package/components/nodes/section-feed-content.marko.js +624 -0
- package/components/nodes/standard-promo.marko +39 -0
- package/components/nodes/standard-promo.marko.js +111 -0
- package/components/nodes/youtube-card.marko +53 -0
- package/components/nodes/youtube-card.marko.js +120 -0
- package/components/page/attribution.marko +1 -0
- package/components/page/attribution.marko.js +33 -0
- package/components/page/contact-details.marko +1 -0
- package/components/page/contact-details.marko.js +33 -0
- package/components/page/content.marko +27 -0
- package/components/page/content.marko.js +68 -0
- package/components/page/contents.marko +1 -0
- package/components/page/contents.marko.js +33 -0
- package/components/page/dates.marko +1 -0
- package/components/page/dates.marko.js +33 -0
- package/components/page/default.marko +25 -0
- package/components/page/default.marko.js +67 -0
- package/components/page/marko.json +51 -0
- package/components/page/website-section.marko +30 -0
- package/components/page/website-section.marko.js +83 -0
- package/components/pagination-controls.marko +53 -0
- package/components/pagination-controls.marko.js +122 -0
- package/components/query-total-count.marko +8 -0
- package/components/query-total-count.marko.js +45 -0
- package/components/reveal-ad-handler.marko +9 -0
- package/components/reveal-ad-handler.marko.js +38 -0
- package/components/site-footer/container.marko +11 -0
- package/components/site-footer/container.marko.js +39 -0
- package/components/site-footer/copyright.marko +21 -0
- package/components/site-footer/copyright.marko.js +66 -0
- package/components/site-footer/index.marko +130 -0
- package/components/site-footer/index.marko.js +338 -0
- package/components/site-footer/marko.json +14 -0
- package/components/site-footer/social-icons.marko +24 -0
- package/components/site-footer/social-icons.marko.js +64 -0
- package/components/site-header.marko +104 -0
- package/components/site-header.marko.js +221 -0
- package/components/site-menu/components/search.marko +27 -0
- package/components/site-menu/components/search.marko.js +80 -0
- package/components/site-menu/components/social-icons.marko +1 -0
- package/components/site-menu/components/social-icons.marko.js +32 -0
- package/components/site-menu/header.marko +10 -0
- package/components/site-menu/header.marko.js +38 -0
- package/components/site-menu/index.marko +117 -0
- package/components/site-menu/index.marko.js +201 -0
- package/components/site-menu/marko.json +11 -0
- package/components/site-menu/section.marko +26 -0
- package/components/site-menu/section.marko.js +67 -0
- package/components/site-navbar/brand.marko +8 -0
- package/components/site-navbar/brand.marko.js +43 -0
- package/components/site-navbar/index.marko +13 -0
- package/components/site-navbar/index.marko.js +49 -0
- package/components/site-navbar/item.marko +96 -0
- package/components/site-navbar/item.marko.js +182 -0
- package/components/site-navbar/items.marko +27 -0
- package/components/site-navbar/items.marko.js +80 -0
- package/components/site-navbar/logo.marko +15 -0
- package/components/site-navbar/logo.marko.js +41 -0
- package/components/site-navbar/marko.json +20 -0
- package/components/site-navbar/search.marko +20 -0
- package/components/site-navbar/search.marko.js +73 -0
- package/components/site-navbar/utils/get-nav-items.js +21 -0
- package/components/site-navbar/utils/is-active-link.js +1 -0
- package/components/site-newsletter-menu.marko +11 -0
- package/components/site-newsletter-menu.marko.js +37 -0
- package/components/social/get-provider.js +5 -0
- package/components/social/icon-link.marko +22 -0
- package/components/social/icon-link.marko.js +63 -0
- package/components/social/icons.marko +22 -0
- package/components/social/icons.marko.js +62 -0
- package/components/social/marko.json +15 -0
- package/components/social-follow.marko +32 -0
- package/components/social-follow.marko.js +95 -0
- package/components/ssr-html-inject.marko +102 -0
- package/components/ssr-html-inject.marko.js +133 -0
- package/graphql/fragments/category-sections.js +25 -0
- package/graphql/fragments/company-search.js +13 -0
- package/graphql/fragments/content-card-deck-block.js +27 -0
- package/graphql/fragments/content-list.js +45 -0
- package/graphql/fragments/content-meter.js +20 -0
- package/graphql/fragments/content-page.js +192 -0
- package/graphql/fragments/dynamic-page.js +15 -0
- package/graphql/fragments/featured-companies.js +16 -0
- package/graphql/fragments/latest-podcast-block.js +14 -0
- package/graphql/fragments/latest-products-feed-block.js +28 -0
- package/graphql/fragments/mindful-advertising-post-by-id.js +55 -0
- package/graphql/fragments/most-popular-block.js +21 -0
- package/graphql/fragments/native-x-image.js +12 -0
- package/graphql/fragments/native-x-story.js +28 -0
- package/graphql/fragments/opinion-block.js +41 -0
- package/graphql/fragments/products-block.js +27 -0
- package/graphql/fragments/read-next-block.js +28 -0
- package/graphql/fragments/related-stories-block.js +27 -0
- package/graphql/fragments/resource-library-block.js +20 -0
- package/graphql/fragments/section-body-feed-block.js +30 -0
- package/graphql/fragments/section-card-deck-featured-block.js +21 -0
- package/graphql/fragments/section-card-list-block.js +22 -0
- package/graphql/fragments/section-feed-block.js +86 -0
- package/graphql/fragments/section-info.js +13 -0
- package/graphql/fragments/section-list-block.js +21 -0
- package/graphql/fragments/section-list-card-block.js +27 -0
- package/graphql/fragments/sections-search.js +46 -0
- package/graphql/fragments/top-stories-block.js +34 -0
- package/graphql/fragments/top-stories-menu-block.js +21 -0
- package/graphql/fragments/website-section-page.js +16 -0
- package/graphql/fragments/white-papers-block.js +27 -0
- package/i18n.js +11 -0
- package/marko.json +5 -0
- package/middleware/content-gating.js +13 -0
- package/middleware/content-metering.js +156 -0
- package/middleware/i18n.js +12 -0
- package/middleware/newsletter-modal-state.js +11 -0
- package/middleware/newsletter-state.js +22 -0
- package/middleware/pagination.js +24 -0
- package/package.json +56 -0
- package/routes/ad-preview.js +11 -0
- package/routes/advertising-post.js +25 -0
- package/routes/company-search.js +27 -0
- package/routes/native-x.js +9 -0
- package/routes/print.js +11 -0
- package/routes/render-block.js +32 -0
- package/routes/search.js +28 -0
- package/routes/taxonomy.js +29 -0
- package/scss/_functions.scss +164 -0
- package/scss/_mixins.scss +503 -0
- package/scss/_variables.scss +328 -0
- package/scss/components/_ad-container.scss +237 -0
- package/scss/components/_author-bio-node.scss +47 -0
- package/scss/components/_author-node.scss +23 -0
- package/scss/components/_author-published-node.scss +43 -0
- package/scss/components/_bootstrap.scss +19 -0
- package/scss/components/_breadcrumbs.scss +1 -0
- package/scss/components/_comments.scss +275 -0
- package/scss/components/_content-meter.scss +147 -0
- package/scss/components/_content-page-gate.scss +37 -0
- package/scss/components/_content-page.scss +351 -0
- package/scss/components/_default-theme.scss +1 -0
- package/scss/components/_embedded-media.scss +100 -0
- package/scss/components/_identity-x.scss +71 -0
- package/scss/components/_lazyload.scss +15 -0
- package/scss/components/_load-more.scss +65 -0
- package/scss/components/_magazine-publication-buttons.scss +65 -0
- package/scss/components/_newsletter-signup-modal.scss +133 -0
- package/scss/components/_node-list.scss +26 -0
- package/scss/components/_node.scss +173 -0
- package/scss/components/_page-attribution.scss +102 -0
- package/scss/components/_page-contact-details.scss +23 -0
- package/scss/components/_page-dates.scss +24 -0
- package/scss/components/_page-image.scss +92 -0
- package/scss/components/_page-rail.scss +7 -0
- package/scss/components/_page-wrapper.scss +146 -0
- package/scss/components/_page.scss +3 -0
- package/scss/components/_pagination-controls.scss +38 -0
- package/scss/components/_reveal-ad.scss +28 -0
- package/scss/components/_search-page.scss +188 -0
- package/scss/components/_site-footer.scss +247 -0
- package/scss/components/_site-header.scss +9 -0
- package/scss/components/_site-menu.scss +327 -0
- package/scss/components/_site-navbar-b.scss +128 -0
- package/scss/components/_site-navbar.scss +107 -0
- package/scss/components/_site-newsletter-menu.scss +561 -0
- package/scss/components/_social-icons.scss +12 -0
- package/scss/components/_spec-guide.scss +79 -0
- package/scss/components/_sponsor-logo.scss +31 -0
- package/scss/components/_sticky-top.scss +8 -0
- package/scss/components/_wallpaper-ad.scss +36 -0
- package/scss/components/blocks/_callout-cards.scss +19 -0
- package/scss/components/blocks/_company-inquiry-form.scss +41 -0
- package/scss/components/blocks/_company-search.scss +57 -0
- package/scss/components/blocks/_content-card-deck.scss +143 -0
- package/scss/components/blocks/_directory-facets.scss +112 -0
- package/scss/components/blocks/_hero-card.scss +59 -0
- package/scss/components/blocks/_latest-content-list.scss +13 -0
- package/scss/components/blocks/_latest-podcast.scss +69 -0
- package/scss/components/blocks/_latest-products-feed.scss +97 -0
- package/scss/components/blocks/_magazine-publication-card.scss +30 -0
- package/scss/components/blocks/_more-products.scss +35 -0
- package/scss/components/blocks/_most-popular.scss +70 -0
- package/scss/components/blocks/_newsletter-signup-banner-large.scss +51 -0
- package/scss/components/blocks/_newsletter-signup-banner.scss +99 -0
- package/scss/components/blocks/_newsletter-signup-site-footer.scss +11 -0
- package/scss/components/blocks/_node-author.scss +27 -0
- package/scss/components/blocks/_opinion.scss +76 -0
- package/scss/components/blocks/_primary-image.scss +98 -0
- package/scss/components/blocks/_products.scss +71 -0
- package/scss/components/blocks/_promo-card.scss +67 -0
- package/scss/components/blocks/_read-next.scss +53 -0
- package/scss/components/blocks/_related-native-x-stories.scss +14 -0
- package/scss/components/blocks/_related-stories.scss +102 -0
- package/scss/components/blocks/_resource-library.scss +79 -0
- package/scss/components/blocks/_section-card-deck-featured.scss +22 -0
- package/scss/components/blocks/_section-card-list.scss +81 -0
- package/scss/components/blocks/_section-feed.scss +253 -0
- package/scss/components/blocks/_section-forbes.scss +32 -0
- package/scss/components/blocks/_section-list.scss +80 -0
- package/scss/components/blocks/_section-search.scss +40 -0
- package/scss/components/blocks/_social-follow.scss +28 -0
- package/scss/components/blocks/_top-stories-menu.scss +38 -0
- package/scss/components/blocks/_top-stories.scss +179 -0
- package/scss/components/blocks/_white-papers.scss +60 -0
- package/scss/components/default-theme/site-navbar.scss +187 -0
- package/scss/components/flows/_card-deck.scss +47 -0
- package/scss/components/flows/_column-list.scss +28 -0
- package/scss/components/flows/_featured.scss +29 -0
- package/scss/components/flows/_hero.scss +44 -0
- package/scss/components/flows/_incremented-nodes.scss +21 -0
- package/scss/core.scss +125 -0
- package/scss/critical/_bootstrap.scss +15 -0
- package/scss/critical/_core.scss +27 -0
- package/scss/critical/_theme.scss +23 -0
- package/scss/variables/_buttons.scss +66 -0
- package/scss/variables/_default-theme.scss +715 -0
- package/scss/variables/_inputs.scss +24 -0
- package/scss/variables/_typography.scss +525 -0
- package/templates/ad-preview.marko +79 -0
- package/templates/ad-preview.marko.js +151 -0
- package/templates/content/components/presented-by.marko +22 -0
- package/templates/content/components/presented-by.marko.js +72 -0
- package/templates/content/native-x-story.marko +82 -0
- package/templates/content/native-x-story.marko.js +248 -0
- package/templates/content/print.marko +188 -0
- package/templates/content/print.marko.js +434 -0
- package/templates/search.marko +136 -0
- package/templates/search.marko.js +335 -0
- package/templates/taxonomy.marko +71 -0
- package/templates/taxonomy.marko.js +194 -0
- package/translations.js +14 -0
- package/utils/content-iframe.js +34 -0
- package/utils/content-meter-helpers.js +58 -0
- package/utils/convert-mindful-ad-preview.js +34 -0
- package/utils/get-child-sections-by-id.js +11 -0
- package/utils/get-content-preview.js +7 -0
- package/utils/get-sections-from-schedules.js +10 -0
- package/utils/has-omeda-id.js +11 -0
- package/utils/query-total-count.js +90 -0
- package/utils/render-site-idx-newsletter-menu.js +26 -0
- package/utils/render-site-newsletter-menu.js +16 -0
- package/utils/set-section-name-from-label.js +14 -0
- package/utils/shuffle-array.js +9 -0
- package/utils/site-idx-newsletter-menu-props.js +61 -0
- package/utils/site-newsletter-menu-props.js +41 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div :class="classes">
|
|
3
|
+
<label
|
|
4
|
+
:class="`${blockName}__form-label`"
|
|
5
|
+
:for="id"
|
|
6
|
+
>
|
|
7
|
+
{{ displayLabel }}
|
|
8
|
+
</label>
|
|
9
|
+
<slot :id="id" :required="required" />
|
|
10
|
+
</div>
|
|
11
|
+
</template>
|
|
12
|
+
|
|
13
|
+
<script>
|
|
14
|
+
export default {
|
|
15
|
+
props: {
|
|
16
|
+
field: {
|
|
17
|
+
type: String,
|
|
18
|
+
required: true,
|
|
19
|
+
},
|
|
20
|
+
blockName: {
|
|
21
|
+
type: String,
|
|
22
|
+
required: true,
|
|
23
|
+
},
|
|
24
|
+
label: {
|
|
25
|
+
type: String,
|
|
26
|
+
required: true,
|
|
27
|
+
},
|
|
28
|
+
required: {
|
|
29
|
+
type: Boolean,
|
|
30
|
+
default: false,
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
|
|
34
|
+
computed: {
|
|
35
|
+
id() {
|
|
36
|
+
return `nl-complete-signup-${this.field}`;
|
|
37
|
+
},
|
|
38
|
+
|
|
39
|
+
classes() {
|
|
40
|
+
const element = `${this.blockName}__form-group`;
|
|
41
|
+
return [element, `${element}--${this.field}`];
|
|
42
|
+
},
|
|
43
|
+
displayLabel() {
|
|
44
|
+
const parts = [this.label];
|
|
45
|
+
if (this.required) parts.push('*');
|
|
46
|
+
return parts.join(' ');
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
};
|
|
50
|
+
</script>
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<form-group
|
|
3
|
+
:field="field"
|
|
4
|
+
:block-name="blockName"
|
|
5
|
+
:label="label"
|
|
6
|
+
:required="required"
|
|
7
|
+
>
|
|
8
|
+
<template #default="{ id }">
|
|
9
|
+
<input
|
|
10
|
+
:id="id"
|
|
11
|
+
:value="value"
|
|
12
|
+
class="form-control form-control--bg-white"
|
|
13
|
+
:required="required"
|
|
14
|
+
:disabled="disabled"
|
|
15
|
+
@input="$emit('input', $event.target.value)"
|
|
16
|
+
@focus="$emit('focus')"
|
|
17
|
+
>
|
|
18
|
+
</template>
|
|
19
|
+
</form-group>
|
|
20
|
+
</template>
|
|
21
|
+
|
|
22
|
+
<script>
|
|
23
|
+
import FormGroup from './form-group.vue';
|
|
24
|
+
|
|
25
|
+
export default {
|
|
26
|
+
components: {
|
|
27
|
+
FormGroup,
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
props: {
|
|
31
|
+
value: {
|
|
32
|
+
type: String,
|
|
33
|
+
default: null,
|
|
34
|
+
},
|
|
35
|
+
field: {
|
|
36
|
+
type: String,
|
|
37
|
+
required: true,
|
|
38
|
+
},
|
|
39
|
+
blockName: {
|
|
40
|
+
type: String,
|
|
41
|
+
required: true,
|
|
42
|
+
},
|
|
43
|
+
label: {
|
|
44
|
+
type: String,
|
|
45
|
+
required: true,
|
|
46
|
+
},
|
|
47
|
+
required: {
|
|
48
|
+
type: Boolean,
|
|
49
|
+
default: false,
|
|
50
|
+
},
|
|
51
|
+
disabled: {
|
|
52
|
+
type: Boolean,
|
|
53
|
+
default: false,
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
</script>
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="newsletter-checkbox-group custom-control custom-checkbox">
|
|
3
|
+
<input
|
|
4
|
+
:id="id"
|
|
5
|
+
type="checkbox"
|
|
6
|
+
class="custom-control-input"
|
|
7
|
+
:value="deploymentTypeId"
|
|
8
|
+
:disabled="disabled"
|
|
9
|
+
@change="$emit('change', { newsletter, checked: $event.target.checked })"
|
|
10
|
+
@focus="$emit('focus')"
|
|
11
|
+
>
|
|
12
|
+
<label
|
|
13
|
+
class="d-flex flex-column custom-control-label custom-control-label--bg-white"
|
|
14
|
+
:for="id"
|
|
15
|
+
>
|
|
16
|
+
<span class="newsletter-checkbox-group__name">
|
|
17
|
+
{{ name }}
|
|
18
|
+
</span>
|
|
19
|
+
<span class="newsletter-checkbox-group__description">
|
|
20
|
+
{{ description }}
|
|
21
|
+
</span>
|
|
22
|
+
</label>
|
|
23
|
+
</div>
|
|
24
|
+
</template>
|
|
25
|
+
|
|
26
|
+
<script>
|
|
27
|
+
export default {
|
|
28
|
+
props: {
|
|
29
|
+
newsletter: {
|
|
30
|
+
type: Object,
|
|
31
|
+
required: true,
|
|
32
|
+
validate: (o) => (o && o.name && o.deploymentTypeId),
|
|
33
|
+
},
|
|
34
|
+
disabled: {
|
|
35
|
+
type: Boolean,
|
|
36
|
+
default: false,
|
|
37
|
+
},
|
|
38
|
+
inPushdown: {
|
|
39
|
+
type: Boolean,
|
|
40
|
+
default: false,
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
|
|
44
|
+
computed: {
|
|
45
|
+
deploymentTypeId() {
|
|
46
|
+
return this.newsletter.deploymentTypeId;
|
|
47
|
+
},
|
|
48
|
+
|
|
49
|
+
id() {
|
|
50
|
+
const id = `deployment-type-id-${this.deploymentTypeId}`;
|
|
51
|
+
return this.inPushdown ? `pushdown-${id}` : id;
|
|
52
|
+
},
|
|
53
|
+
|
|
54
|
+
name() {
|
|
55
|
+
return this.newsletter.name;
|
|
56
|
+
},
|
|
57
|
+
|
|
58
|
+
description() {
|
|
59
|
+
return this.newsletter.description;
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
</script>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div :class="`${blockName}__privacy-policy`">
|
|
3
|
+
{{ translate("emailProviding") }}
|
|
4
|
+
<a :href="privacyPolicyLink.href" :target="privacyPolicyLink.target" rel="noopener">
|
|
5
|
+
{{ privacyPolicyLink.label }}</a>.
|
|
6
|
+
{{ translate("protectedBy") }}
|
|
7
|
+
<a href="https://policies.google.com/privacy">{{ translate("privacyPolicy") }}</a>
|
|
8
|
+
{{ translate("and") }}
|
|
9
|
+
<a href="https://policies.google.com/terms">{{ translate("termsOfService") }}</a>
|
|
10
|
+
{{ translate("apply") }}
|
|
11
|
+
</div>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script>
|
|
15
|
+
import i18n from '../i18n-vue';
|
|
16
|
+
|
|
17
|
+
export default {
|
|
18
|
+
props: {
|
|
19
|
+
blockName: {
|
|
20
|
+
type: String,
|
|
21
|
+
required: true,
|
|
22
|
+
},
|
|
23
|
+
privacyPolicyLink: {
|
|
24
|
+
type: Object,
|
|
25
|
+
required: true,
|
|
26
|
+
},
|
|
27
|
+
lang: {
|
|
28
|
+
type: String,
|
|
29
|
+
default: 'en',
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
methods: {
|
|
33
|
+
translate(key) {
|
|
34
|
+
return i18n(this.lang, key);
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
</script>
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<form-group
|
|
3
|
+
:field="field"
|
|
4
|
+
:block-name="blockName"
|
|
5
|
+
:label="label"
|
|
6
|
+
:required="required"
|
|
7
|
+
>
|
|
8
|
+
<template #default="{ id }">
|
|
9
|
+
<select
|
|
10
|
+
:id="id"
|
|
11
|
+
:value="value"
|
|
12
|
+
class="custom-select custom-select--bg-white form-control"
|
|
13
|
+
:required="required"
|
|
14
|
+
:disabled="disabled"
|
|
15
|
+
@change="$emit('input', $event.target.value)"
|
|
16
|
+
@focus="$emit('focus')"
|
|
17
|
+
>
|
|
18
|
+
<slot />
|
|
19
|
+
</select>
|
|
20
|
+
</template>
|
|
21
|
+
</form-group>
|
|
22
|
+
</template>
|
|
23
|
+
|
|
24
|
+
<script>
|
|
25
|
+
import FormGroup from './form-group.vue';
|
|
26
|
+
|
|
27
|
+
export default {
|
|
28
|
+
components: {
|
|
29
|
+
FormGroup,
|
|
30
|
+
},
|
|
31
|
+
|
|
32
|
+
props: {
|
|
33
|
+
value: {
|
|
34
|
+
type: String,
|
|
35
|
+
default: null,
|
|
36
|
+
},
|
|
37
|
+
field: {
|
|
38
|
+
type: String,
|
|
39
|
+
required: true,
|
|
40
|
+
},
|
|
41
|
+
blockName: {
|
|
42
|
+
type: String,
|
|
43
|
+
required: true,
|
|
44
|
+
},
|
|
45
|
+
label: {
|
|
46
|
+
type: String,
|
|
47
|
+
required: true,
|
|
48
|
+
},
|
|
49
|
+
required: {
|
|
50
|
+
type: Boolean,
|
|
51
|
+
default: false,
|
|
52
|
+
},
|
|
53
|
+
disabled: {
|
|
54
|
+
type: Boolean,
|
|
55
|
+
default: false,
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
};
|
|
59
|
+
</script>
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<button
|
|
3
|
+
class="text-nowrap"
|
|
4
|
+
type="submit"
|
|
5
|
+
:disabled="isLoading || disabled"
|
|
6
|
+
>
|
|
7
|
+
<div class="d-flex align-items-center">
|
|
8
|
+
<div
|
|
9
|
+
v-show="isLoading"
|
|
10
|
+
class="spinner-border spinner-border-sm text-light mr-1"
|
|
11
|
+
role="status"
|
|
12
|
+
>
|
|
13
|
+
<span class="sr-only">Loading...</span>
|
|
14
|
+
</div>
|
|
15
|
+
<span v-if="label">{{ label }}</span>
|
|
16
|
+
<span v-else>{{ translate("signUp") }}</span>
|
|
17
|
+
</div>
|
|
18
|
+
</button>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<script>
|
|
22
|
+
import i18n from '../i18n-vue';
|
|
23
|
+
|
|
24
|
+
export default {
|
|
25
|
+
props: {
|
|
26
|
+
isLoading: {
|
|
27
|
+
type: Boolean,
|
|
28
|
+
default: false,
|
|
29
|
+
},
|
|
30
|
+
label: {
|
|
31
|
+
type: String,
|
|
32
|
+
default: '',
|
|
33
|
+
},
|
|
34
|
+
disabled: {
|
|
35
|
+
type: Boolean,
|
|
36
|
+
default: false,
|
|
37
|
+
},
|
|
38
|
+
lang: {
|
|
39
|
+
type: String,
|
|
40
|
+
default: 'en',
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
methods: {
|
|
44
|
+
translate(key) {
|
|
45
|
+
return i18n(this.lang, key);
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
</script>
|
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div :class="classNames">
|
|
3
|
+
<div :class="`${blockName}__card-header`">
|
|
4
|
+
<check-icon :class="`${blockName}__check-icon`" />
|
|
5
|
+
{{ translate("signedUpFor") }} {{ defaultNewsletter.name }}
|
|
6
|
+
</div>
|
|
7
|
+
<form
|
|
8
|
+
:class="`${blockName}__card-body`"
|
|
9
|
+
@submit.prevent="submit"
|
|
10
|
+
>
|
|
11
|
+
<transition
|
|
12
|
+
:leave-active-class="`${blockName}__slide-out`"
|
|
13
|
+
@after-leave="formHidden = true"
|
|
14
|
+
>
|
|
15
|
+
<div v-show="!isComplete">
|
|
16
|
+
<div :class="`${blockName}__header`">
|
|
17
|
+
{{ translate("completeSignUp") }}
|
|
18
|
+
</div>
|
|
19
|
+
<div :class="`${blockName}__about-you`">
|
|
20
|
+
{{ translate("aboutYou") }}
|
|
21
|
+
</div>
|
|
22
|
+
<div :class="`${blockName}__form`">
|
|
23
|
+
<input-form-group
|
|
24
|
+
v-model="companyName"
|
|
25
|
+
:block-name="blockName"
|
|
26
|
+
:disabled="isLoading"
|
|
27
|
+
field="company-name"
|
|
28
|
+
:label="translate('companyName')"
|
|
29
|
+
required
|
|
30
|
+
@focus="didFocus = true"
|
|
31
|
+
/>
|
|
32
|
+
|
|
33
|
+
<select-form-group
|
|
34
|
+
v-model="demographicValue"
|
|
35
|
+
:block-name="blockName"
|
|
36
|
+
:disabled="isLoading"
|
|
37
|
+
field="primary-role"
|
|
38
|
+
:label="demographic.label"
|
|
39
|
+
required
|
|
40
|
+
@focus="didFocus = true"
|
|
41
|
+
>
|
|
42
|
+
<option value="">
|
|
43
|
+
{{ translate("select") }}
|
|
44
|
+
</option>
|
|
45
|
+
<option
|
|
46
|
+
v-for="value in demographic.values"
|
|
47
|
+
:key="value.id"
|
|
48
|
+
:value="value.id"
|
|
49
|
+
>
|
|
50
|
+
{{ value.label }}
|
|
51
|
+
</option>
|
|
52
|
+
</select-form-group>
|
|
53
|
+
|
|
54
|
+
<input-form-group
|
|
55
|
+
v-model="postalCode"
|
|
56
|
+
:block-name="blockName"
|
|
57
|
+
:disabled="isLoading"
|
|
58
|
+
field="postal-code"
|
|
59
|
+
label="Zip/Postal"
|
|
60
|
+
required
|
|
61
|
+
@focus="didFocus = true"
|
|
62
|
+
/>
|
|
63
|
+
</div>
|
|
64
|
+
|
|
65
|
+
<div v-if="newsletters.length">
|
|
66
|
+
<div :class="`${blockName}__subscriptions-header`">
|
|
67
|
+
{{ translate("chooseSubscriptions") }}
|
|
68
|
+
</div>
|
|
69
|
+
|
|
70
|
+
<div :class="`${blockName}__subscriptions row`">
|
|
71
|
+
<div
|
|
72
|
+
v-for="newsletter in newsletters"
|
|
73
|
+
:key="newsletter.deploymentTypeId"
|
|
74
|
+
class="col-12 col-md-6"
|
|
75
|
+
>
|
|
76
|
+
<newsletter-checkbox
|
|
77
|
+
:newsletter="newsletter"
|
|
78
|
+
:disabled="isLoading"
|
|
79
|
+
:in-pushdown="inPushdown"
|
|
80
|
+
@change="selectNewsletter"
|
|
81
|
+
@focus="didFocus = true"
|
|
82
|
+
/>
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
|
|
87
|
+
<div :class="`${blockName}__signup`">
|
|
88
|
+
<div>
|
|
89
|
+
<sign-up-button
|
|
90
|
+
:class="`${blockName}__form-button`"
|
|
91
|
+
:is-loading="isLoading"
|
|
92
|
+
:disabled="isComplete"
|
|
93
|
+
:label="ctaLabel"
|
|
94
|
+
:lang="lang"
|
|
95
|
+
/>
|
|
96
|
+
</div>
|
|
97
|
+
<privacy-policy
|
|
98
|
+
:block-name="blockName"
|
|
99
|
+
:privacy-policy-link="privacyPolicyLink"
|
|
100
|
+
:lang="lang"
|
|
101
|
+
/>
|
|
102
|
+
</div>
|
|
103
|
+
</div>
|
|
104
|
+
</transition>
|
|
105
|
+
|
|
106
|
+
<transition
|
|
107
|
+
:enter-active-class="`${blockName}__slide-in`"
|
|
108
|
+
>
|
|
109
|
+
<div v-show="formHidden">
|
|
110
|
+
<div :class="`${blockName}__thank-you-header`">
|
|
111
|
+
{{ translate("thankYou") }}
|
|
112
|
+
</div>
|
|
113
|
+
<p class="mb-0">
|
|
114
|
+
{{ translate("startReceiving") }} <em>{{ siteName }}</em>.
|
|
115
|
+
</p>
|
|
116
|
+
</div>
|
|
117
|
+
</transition>
|
|
118
|
+
|
|
119
|
+
<div v-if="error" class="alert alert-danger mt-3 mb-0" role="alert">
|
|
120
|
+
<strong>An error ocurred.</strong>
|
|
121
|
+
{{ error.message }}
|
|
122
|
+
</div>
|
|
123
|
+
</form>
|
|
124
|
+
</div>
|
|
125
|
+
</template>
|
|
126
|
+
|
|
127
|
+
<script>
|
|
128
|
+
import recaptchaGetToken from '@mindful-web/marko-web-recaptcha/browser/get-token';
|
|
129
|
+
|
|
130
|
+
import CheckIcon from './check-icon.vue';
|
|
131
|
+
import InputFormGroup from './input-form-group.vue';
|
|
132
|
+
import NewsletterCheckbox from './newsletter-checkbox.vue';
|
|
133
|
+
import PrivacyPolicy from './privacy-policy.vue';
|
|
134
|
+
import SelectFormGroup from './select-form-group.vue';
|
|
135
|
+
import SignUpButton from './sign-up-button.vue';
|
|
136
|
+
|
|
137
|
+
import i18n from '../i18n-vue';
|
|
138
|
+
|
|
139
|
+
export default {
|
|
140
|
+
components: {
|
|
141
|
+
CheckIcon,
|
|
142
|
+
InputFormGroup,
|
|
143
|
+
NewsletterCheckbox,
|
|
144
|
+
PrivacyPolicy,
|
|
145
|
+
SelectFormGroup,
|
|
146
|
+
SignUpButton,
|
|
147
|
+
},
|
|
148
|
+
|
|
149
|
+
props: {
|
|
150
|
+
siteName: {
|
|
151
|
+
type: String,
|
|
152
|
+
required: true,
|
|
153
|
+
},
|
|
154
|
+
recaptchaSiteKey: {
|
|
155
|
+
type: String,
|
|
156
|
+
required: true,
|
|
157
|
+
},
|
|
158
|
+
email: {
|
|
159
|
+
type: String,
|
|
160
|
+
default: null,
|
|
161
|
+
},
|
|
162
|
+
defaultNewsletter: {
|
|
163
|
+
type: Object,
|
|
164
|
+
required: true,
|
|
165
|
+
validate: (o) => (o && o.name && o.deploymentTypeId),
|
|
166
|
+
},
|
|
167
|
+
newsletters: {
|
|
168
|
+
type: Array,
|
|
169
|
+
default: () => [],
|
|
170
|
+
},
|
|
171
|
+
demographic: {
|
|
172
|
+
type: Object,
|
|
173
|
+
required: true,
|
|
174
|
+
validate: (demo) => (demo && demo.id && demo.label && demo.values),
|
|
175
|
+
},
|
|
176
|
+
asCard: {
|
|
177
|
+
type: Boolean,
|
|
178
|
+
default: false,
|
|
179
|
+
},
|
|
180
|
+
inPushdown: {
|
|
181
|
+
type: Boolean,
|
|
182
|
+
default: false,
|
|
183
|
+
},
|
|
184
|
+
ctaLabel: {
|
|
185
|
+
type: String,
|
|
186
|
+
default: null,
|
|
187
|
+
},
|
|
188
|
+
privacyPolicyLink: {
|
|
189
|
+
type: Object,
|
|
190
|
+
required: true,
|
|
191
|
+
},
|
|
192
|
+
lang: {
|
|
193
|
+
type: String,
|
|
194
|
+
default: 'en',
|
|
195
|
+
},
|
|
196
|
+
},
|
|
197
|
+
|
|
198
|
+
data: () => ({
|
|
199
|
+
blockName: 'complete-newsletter-signup',
|
|
200
|
+
didFocus: false,
|
|
201
|
+
error: null,
|
|
202
|
+
formHidden: false,
|
|
203
|
+
isComplete: false,
|
|
204
|
+
isLoading: false,
|
|
205
|
+
|
|
206
|
+
companyName: null,
|
|
207
|
+
demographicValue: null,
|
|
208
|
+
postalCode: null,
|
|
209
|
+
selectedNewsletters: [],
|
|
210
|
+
}),
|
|
211
|
+
|
|
212
|
+
computed: {
|
|
213
|
+
classNames() {
|
|
214
|
+
const { blockName } = this;
|
|
215
|
+
const classNames = [blockName];
|
|
216
|
+
if (this.asCard) classNames.push(`${blockName}--as-card`);
|
|
217
|
+
if (this.inPushdown) classNames.push(`${blockName}--in-pushdown`);
|
|
218
|
+
return classNames;
|
|
219
|
+
},
|
|
220
|
+
},
|
|
221
|
+
|
|
222
|
+
watch: {
|
|
223
|
+
didFocus(value) {
|
|
224
|
+
if (value) this.$emit('focus');
|
|
225
|
+
},
|
|
226
|
+
},
|
|
227
|
+
|
|
228
|
+
mounted() {
|
|
229
|
+
this.$emit('load');
|
|
230
|
+
},
|
|
231
|
+
|
|
232
|
+
methods: {
|
|
233
|
+
selectNewsletter({ newsletter, checked }) {
|
|
234
|
+
if (checked) {
|
|
235
|
+
this.selectedNewsletters.push(newsletter);
|
|
236
|
+
} else {
|
|
237
|
+
this.selectedNewsletters = this.selectedNewsletters
|
|
238
|
+
.filter((nl) => nl.deploymentTypeId !== newsletter.deploymentTypeId);
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
|
|
242
|
+
async submit() {
|
|
243
|
+
try {
|
|
244
|
+
this.error = null;
|
|
245
|
+
this.isLoading = true;
|
|
246
|
+
const { email, selectedNewsletters } = this;
|
|
247
|
+
if (!email) throw new Error('Unable to submit: no email address found.');
|
|
248
|
+
const token = await recaptchaGetToken({ siteKey: this.recaptchaSiteKey, action: 'newsletterSignup' });
|
|
249
|
+
const payload = {
|
|
250
|
+
token,
|
|
251
|
+
email,
|
|
252
|
+
companyName: this.companyName,
|
|
253
|
+
postalCode: this.postalCode,
|
|
254
|
+
deploymentTypeIds: selectedNewsletters.map((nl) => nl.deploymentTypeId),
|
|
255
|
+
demographics: [
|
|
256
|
+
{ id: this.demographic.id, values: [this.demographicValue] },
|
|
257
|
+
],
|
|
258
|
+
};
|
|
259
|
+
const res = await fetch('/__omeda/newsletter-signup', {
|
|
260
|
+
method: 'POST',
|
|
261
|
+
headers: { 'content-type': 'application/json' },
|
|
262
|
+
body: JSON.stringify(payload),
|
|
263
|
+
});
|
|
264
|
+
const json = await res.json();
|
|
265
|
+
if (!res.ok) throw new Error(json.message);
|
|
266
|
+
this.$emit('submit');
|
|
267
|
+
selectedNewsletters.forEach((newsletter) => {
|
|
268
|
+
this.$emit('subscribe', { newsletter });
|
|
269
|
+
});
|
|
270
|
+
this.isComplete = true;
|
|
271
|
+
} catch (e) {
|
|
272
|
+
this.error = e;
|
|
273
|
+
this.$emit('error', e);
|
|
274
|
+
} finally {
|
|
275
|
+
this.isLoading = false;
|
|
276
|
+
}
|
|
277
|
+
},
|
|
278
|
+
|
|
279
|
+
translate(key) {
|
|
280
|
+
return i18n(this.lang, key);
|
|
281
|
+
},
|
|
282
|
+
},
|
|
283
|
+
};
|
|
284
|
+
</script>
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div style="display: none;" />
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script>
|
|
6
|
+
import cookies from 'js-cookie';
|
|
7
|
+
|
|
8
|
+
export default {
|
|
9
|
+
props: {
|
|
10
|
+
cookieName: {
|
|
11
|
+
type: String,
|
|
12
|
+
required: true,
|
|
13
|
+
},
|
|
14
|
+
cookieValue: {
|
|
15
|
+
type: Number,
|
|
16
|
+
default: 1,
|
|
17
|
+
},
|
|
18
|
+
cookieValueToMatch: {
|
|
19
|
+
type: Number,
|
|
20
|
+
default: 1,
|
|
21
|
+
},
|
|
22
|
+
hasCookie: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
required: true,
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
created() {
|
|
28
|
+
const initialValue = 1;
|
|
29
|
+
setTimeout(() => {
|
|
30
|
+
const newsletterSignupModalElement = document.getElementById('newsletter-signup-modal');
|
|
31
|
+
if (!window.location.pathname.match(/^\/user|\/page/)) {
|
|
32
|
+
if (
|
|
33
|
+
(!this.hasCookie && Number(this.cookieValueToMatch) === 0)
|
|
34
|
+
|| (
|
|
35
|
+
this.hasCookie
|
|
36
|
+
&& Number(this.cookieValue) === Number(this.cookieValueToMatch)
|
|
37
|
+
&& window.dataLayer.find((dataEvent) => dataEvent['identity-x']
|
|
38
|
+
&& dataEvent['identity-x'].newsletterSignupType === 'modal')
|
|
39
|
+
)
|
|
40
|
+
) {
|
|
41
|
+
newsletterSignupModalElement.classList.add('newsletter-signup-modal-fade-in');
|
|
42
|
+
const value = !this.hasCookie ? initialValue : (Number(this.cookieValue) + 1);
|
|
43
|
+
// Set cookie, expires is in days so we have to divide by 24 for hours
|
|
44
|
+
cookies.set(this.cookieName, value, { expires: 1 / 24 });
|
|
45
|
+
} else if (
|
|
46
|
+
this.hasCookie
|
|
47
|
+
&& Number(this.cookieValue) < Number(this.cookieValueToMatch)
|
|
48
|
+
) {
|
|
49
|
+
cookies.set(this.cookieName, (Number(this.cookieValue) + 1), { expires: 1 });
|
|
50
|
+
} else if (
|
|
51
|
+
!this.hasCookie
|
|
52
|
+
) {
|
|
53
|
+
cookies.set(this.cookieName, initialValue, { expires: 1 });
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}, 2500);
|
|
57
|
+
},
|
|
58
|
+
};
|
|
59
|
+
</script>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<button
|
|
3
|
+
class="site-navbar__newsletter-toggler"
|
|
4
|
+
type="button"
|
|
5
|
+
aria-label="Newsletter Menu Toggle"
|
|
6
|
+
@click="toggle"
|
|
7
|
+
>
|
|
8
|
+
<icon-mail :modifiers="['lg']" />
|
|
9
|
+
</button>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script>
|
|
13
|
+
import IconMail from '@mindful-web/marko-web-icons/browser/mail.vue';
|
|
14
|
+
|
|
15
|
+
export default {
|
|
16
|
+
components: {
|
|
17
|
+
IconMail,
|
|
18
|
+
},
|
|
19
|
+
inject: ['EventBus'],
|
|
20
|
+
props: {
|
|
21
|
+
initiallyExpanded: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
default: false,
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
|
|
27
|
+
data: () => ({
|
|
28
|
+
expanded: false,
|
|
29
|
+
}),
|
|
30
|
+
|
|
31
|
+
mounted() {
|
|
32
|
+
this.expanded = this.initiallyExpanded;
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
methods: {
|
|
36
|
+
toggle() {
|
|
37
|
+
this.expanded = !this.expanded;
|
|
38
|
+
this.EventBus.$emit('newsletter-menu-expanded', this.expanded);
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
</script>
|