@mindful-web/marko-web-theme-monorail 1.79.8 → 1.79.9

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.
Files changed (154) hide show
  1. package/components/ads/fixed-ad-bottom.marko.js +2 -2
  2. package/components/ads/reveal-ad-handler.marko.js +2 -2
  3. package/components/blocks/author-bios.marko.js +2 -2
  4. package/components/blocks/callout-cards.marko.js +2 -2
  5. package/components/blocks/company-inquiry-form.marko.js +2 -2
  6. package/components/blocks/company-search.marko.js +2 -2
  7. package/components/blocks/content-card-deck.marko.js +2 -2
  8. package/components/blocks/content-meter.marko.js +2 -2
  9. package/components/blocks/full-width-native-ad.marko.js +2 -2
  10. package/components/blocks/geo-summary.marko +37 -14
  11. package/components/blocks/geo-summary.marko.js +70 -29
  12. package/components/blocks/header-announcement.marko.js +2 -2
  13. package/components/blocks/hero-card.marko.js +2 -2
  14. package/components/blocks/latest-content-list.marko.js +2 -2
  15. package/components/blocks/latest-podcast.marko.js +2 -2
  16. package/components/blocks/latest-products-feed.marko.js +2 -2
  17. package/components/blocks/marko.json +3 -1
  18. package/components/blocks/more-products.marko.js +2 -2
  19. package/components/blocks/most-popular-list.marko.js +2 -2
  20. package/components/blocks/most-popular.marko.js +2 -2
  21. package/components/blocks/native-x-card-deck.marko.js +2 -2
  22. package/components/blocks/native-x-promo-card.marko.js +2 -2
  23. package/components/blocks/newsletter-signup-banner-external.marko.js +2 -2
  24. package/components/blocks/newsletter-signup-banner-large.marko.js +2 -2
  25. package/components/blocks/newsletter-signup-banner.marko.js +2 -2
  26. package/components/blocks/opinion.marko.js +2 -2
  27. package/components/blocks/primary-image.marko.js +2 -2
  28. package/components/blocks/products.marko.js +2 -2
  29. package/components/blocks/read-next.marko.js +2 -2
  30. package/components/blocks/related-stories.marko.js +2 -2
  31. package/components/blocks/resource-library.marko.js +2 -2
  32. package/components/blocks/section-body-feed.marko.js +2 -2
  33. package/components/blocks/section-card-deck-featured.marko.js +2 -2
  34. package/components/blocks/section-card-deck.marko.js +2 -2
  35. package/components/blocks/section-card-list.marko.js +2 -2
  36. package/components/blocks/section-feed.marko.js +2 -2
  37. package/components/blocks/section-forbes.marko.js +2 -2
  38. package/components/blocks/section-list-deck.marko.js +2 -2
  39. package/components/blocks/section-list.marko.js +2 -2
  40. package/components/blocks/section-search.marko.js +2 -2
  41. package/components/blocks/section-title-feed.marko.js +2 -2
  42. package/components/blocks/top-stories-menu.marko.js +2 -2
  43. package/components/blocks/top-stories.marko.js +2 -2
  44. package/components/blocks/white-papers.marko.js +2 -2
  45. package/components/breadcrumbs/content-page.marko.js +2 -2
  46. package/components/breadcrumbs/index.marko.js +2 -2
  47. package/components/breadcrumbs/website-section.marko.js +2 -2
  48. package/components/breadcrumbs/with-home.marko.js +2 -2
  49. package/components/client-side-block-loader.marko.js +2 -2
  50. package/components/client-side-blocks/most-popular-list.marko.js +2 -2
  51. package/components/client-side-blocks/most-popular.marko.js +2 -2
  52. package/components/content/body-with-injection.marko.js +2 -2
  53. package/components/content/contact-details/index.marko.js +2 -2
  54. package/components/content/contact-details/section.marko.js +2 -2
  55. package/components/content/download/form-dot-com.marko.js +2 -2
  56. package/components/content/download/identity-x.marko.js +2 -2
  57. package/components/content/download/index.marko.js +2 -2
  58. package/components/content/download/link.marko.js +2 -2
  59. package/components/content/download/wufoo.marko.js +2 -2
  60. package/components/content/link-url/index.marko.js +2 -2
  61. package/components/content/sections-listed-in.marko.js +2 -2
  62. package/components/content-attribution/attribution.marko.js +2 -2
  63. package/components/content-attribution/components/authors.marko.js +2 -2
  64. package/components/content-attribution/components/byline.marko.js +2 -2
  65. package/components/content-attribution/components/company.marko.js +2 -2
  66. package/components/content-attribution/components/contributors.marko.js +2 -2
  67. package/components/content-attribution/components/photographers.marko.js +2 -2
  68. package/components/content-attribution/components/source.marko.js +2 -2
  69. package/components/content-attribution/components/speakers.marko.js +2 -2
  70. package/components/content-attribution/components/sponsors.marko.js +2 -2
  71. package/components/content-attribution/index.marko.js +2 -2
  72. package/components/directory-facets/facet-container/facet-container.marko.js +2 -2
  73. package/components/directory-facets/facet-list/facet-list.marko.js +2 -2
  74. package/components/directory-facets/facet.marko.js +2 -2
  75. package/components/directory-facets/index.marko.js +2 -2
  76. package/components/facebook-connect.marko.js +2 -2
  77. package/components/flows/card-deck.marko.js +2 -2
  78. package/components/flows/content/card-deck-col.marko.js +2 -2
  79. package/components/flows/content/directory-section.marko.js +2 -2
  80. package/components/flows/content/list.marko.js +2 -2
  81. package/components/flows/section-feed.marko.js +2 -2
  82. package/components/gam/components/define-display-ad.marko.js +2 -2
  83. package/components/gam/define-display-ad.marko.js +2 -2
  84. package/components/gam/inject-ads.marko.js +2 -2
  85. package/components/gam/wallpaper-ad.marko.js +2 -2
  86. package/components/identity-x/comment-stream.marko.js +2 -2
  87. package/components/identity-x/content-page-gate.marko.js +2 -2
  88. package/components/identity-x/newsletter-footer.marko.js +2 -2
  89. package/components/identity-x/newsletter-inline.marko.js +2 -2
  90. package/components/identity-x/newsletter-modal.marko.js +2 -2
  91. package/components/identity-x/newsletter-pushdown.marko.js +2 -2
  92. package/components/layouts/ad-preview.marko.js +2 -2
  93. package/components/menu-toggle-button.marko.js +2 -2
  94. package/components/native-x/render.marko.js +2 -2
  95. package/components/nodes/author-bio.marko.js +2 -2
  96. package/components/nodes/author-card.marko.js +2 -2
  97. package/components/nodes/author-published.marko.js +2 -2
  98. package/components/nodes/author.marko.js +2 -2
  99. package/components/nodes/components/attribution.marko.js +2 -2
  100. package/components/nodes/components/authors.marko.js +2 -2
  101. package/components/nodes/components/company-name.marko.js +2 -2
  102. package/components/nodes/components/dates.marko.js +2 -2
  103. package/components/nodes/components/section-sponsor.marko.js +2 -2
  104. package/components/nodes/content-published.marko.js +2 -2
  105. package/components/nodes/content.marko.js +2 -2
  106. package/components/nodes/directory-section-feed-content.marko.js +2 -2
  107. package/components/nodes/featured-products-card.marko.js +2 -2
  108. package/components/nodes/product-feed-content.marko.js +2 -2
  109. package/components/nodes/section-feed-content.marko.js +2 -2
  110. package/components/nodes/standard-promo.marko.js +2 -2
  111. package/components/nodes/youtube-card.marko.js +2 -2
  112. package/components/page/attribution.marko.js +2 -2
  113. package/components/page/contact-details.marko.js +2 -2
  114. package/components/page/content.marko.js +2 -2
  115. package/components/page/contents.marko.js +2 -2
  116. package/components/page/dates.marko.js +2 -2
  117. package/components/page/default.marko.js +2 -2
  118. package/components/page/website-section.marko.js +2 -2
  119. package/components/pagination-controls.marko.js +2 -2
  120. package/components/query-total-count.marko.js +2 -2
  121. package/components/reveal-ad-handler.marko.js +2 -2
  122. package/components/site-footer/container.marko.js +2 -2
  123. package/components/site-footer/copyright.marko.js +2 -2
  124. package/components/site-footer/index.marko.js +2 -2
  125. package/components/site-footer/social-icons.marko.js +2 -2
  126. package/components/site-header.marko.js +2 -2
  127. package/components/site-menu/components/search.marko.js +2 -2
  128. package/components/site-menu/components/social-icons.marko.js +2 -2
  129. package/components/site-menu/header.marko.js +2 -2
  130. package/components/site-menu/index.marko.js +2 -2
  131. package/components/site-menu/section.marko.js +2 -2
  132. package/components/site-navbar/brand.marko.js +2 -2
  133. package/components/site-navbar/index.marko.js +2 -2
  134. package/components/site-navbar/item.marko.js +2 -2
  135. package/components/site-navbar/items.marko.js +2 -2
  136. package/components/site-navbar/logo.marko.js +2 -2
  137. package/components/site-navbar/search.marko.js +2 -2
  138. package/components/site-newsletter-menu.marko.js +2 -2
  139. package/components/social/icon-link.marko.js +2 -2
  140. package/components/social/icons.marko.js +2 -2
  141. package/components/social-follow.marko.js +2 -2
  142. package/components/sponsored-label-logo.marko.js +2 -2
  143. package/components/sponsored-section-logo.marko.js +2 -2
  144. package/components/sponsored-section-name-logo.marko.js +2 -2
  145. package/components/ssr-html-inject.marko.js +2 -2
  146. package/package.json +4 -4
  147. package/scss/components/blocks/_geo-summary.scss +63 -0
  148. package/templates/ad-preview.marko.js +2 -2
  149. package/templates/content/components/presented-by.marko.js +2 -2
  150. package/templates/content/native-x-story.marko.js +2 -2
  151. package/templates/content/print.marko.js +2 -2
  152. package/templates/email-preview.marko.js +2 -2
  153. package/templates/search.marko.js +2 -2
  154. package/templates/taxonomy.marko.js +2 -2
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var marko_template = module.exports = require("marko/dist/html").t(__filename),
5
- marko_componentType = "/@mindful-web/marko-web-theme-monorail$1.79.8/components/ads/fixed-ad-bottom.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-theme-monorail$1.79.9/components/ads/fixed-ad-bottom.marko",
6
6
  marko_renderer = require("marko/dist/runtime/components/renderer"),
7
7
  marko_assign = require("marko/dist/runtime/helpers/assign"),
8
8
  marko_web_gam_fixed_ad_bottom_template = require("@mindful-web/marko-web-gam/components/fixed-ad-bottom.marko"),
@@ -29,7 +29,7 @@ marko_template._ = marko_renderer(render, {
29
29
  });
30
30
 
31
31
  marko_template.meta = {
32
- id: "/@mindful-web/marko-web-theme-monorail$1.79.8/components/ads/fixed-ad-bottom.marko",
32
+ id: "/@mindful-web/marko-web-theme-monorail$1.79.9/components/ads/fixed-ad-bottom.marko",
33
33
  tags: [
34
34
  "@mindful-web/marko-web-gam/components/fixed-ad-bottom.marko"
35
35
  ]
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var marko_template = module.exports = require("marko/dist/html").t(__filename),
5
- marko_componentType = "/@mindful-web/marko-web-theme-monorail$1.79.8/components/ads/reveal-ad-handler.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-theme-monorail$1.79.9/components/ads/reveal-ad-handler.marko",
6
6
  marko_renderer = require("marko/dist/runtime/components/renderer"),
7
7
  marko_web_browser_component_template = require("@mindful-web/marko-web/components/browser-component.marko"),
8
8
  marko_loadTag = require("marko/dist/runtime/helpers/load-tag"),
@@ -31,7 +31,7 @@ marko_template._ = marko_renderer(render, {
31
31
  });
32
32
 
33
33
  marko_template.meta = {
34
- id: "/@mindful-web/marko-web-theme-monorail$1.79.8/components/ads/reveal-ad-handler.marko",
34
+ id: "/@mindful-web/marko-web-theme-monorail$1.79.9/components/ads/reveal-ad-handler.marko",
35
35
  tags: [
36
36
  "@mindful-web/marko-web/components/browser-component.marko"
37
37
  ]
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var marko_template = module.exports = require("marko/dist/html").t(__filename),
5
- marko_componentType = "/@mindful-web/marko-web-theme-monorail$1.79.8/components/blocks/author-bios.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-theme-monorail$1.79.9/components/blocks/author-bios.marko",
6
6
  marko_component = require("./author-bios.marko"),
7
7
  marko_renderer = require("marko/dist/runtime/components/renderer"),
8
8
  module_defaultValue = require("@mindful-web/marko-core/utils/default-value"),
@@ -67,7 +67,7 @@ marko_template._ = marko_renderer(render, {
67
67
  }, marko_component);
68
68
 
69
69
  marko_template.meta = {
70
- id: "/@mindful-web/marko-web-theme-monorail$1.79.8/components/blocks/author-bios.marko",
70
+ id: "/@mindful-web/marko-web-theme-monorail$1.79.9/components/blocks/author-bios.marko",
71
71
  component: "./author-bios.marko",
72
72
  tags: [
73
73
  "../nodes/author-bio.marko",
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var marko_template = module.exports = require("marko/dist/html").t(__filename),
5
- marko_componentType = "/@mindful-web/marko-web-theme-monorail$1.79.8/components/blocks/callout-cards.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-theme-monorail$1.79.9/components/blocks/callout-cards.marko",
6
6
  marko_renderer = require("marko/dist/runtime/components/renderer"),
7
7
  module_objectPath_module = require("@mindful-web/object-path"),
8
8
  objectPath_module = module_objectPath_module.default || module_objectPath_module,
@@ -66,7 +66,7 @@ marko_template._ = marko_renderer(render, {
66
66
  });
67
67
 
68
68
  marko_template.meta = {
69
- id: "/@mindful-web/marko-web-theme-monorail$1.79.8/components/blocks/callout-cards.marko",
69
+ id: "/@mindful-web/marko-web-theme-monorail$1.79.9/components/blocks/callout-cards.marko",
70
70
  tags: [
71
71
  "@mindful-web/marko-web/components/element/index.marko",
72
72
  "@mindful-web/marko-web/components/element/block.marko"
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var marko_template = module.exports = require("marko/dist/html").t(__filename),
5
- marko_componentType = "/@mindful-web/marko-web-theme-monorail$1.79.8/components/blocks/company-inquiry-form.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-theme-monorail$1.79.9/components/blocks/company-inquiry-form.marko",
6
6
  marko_renderer = require("marko/dist/runtime/components/renderer"),
7
7
  module_defaultValue = require("@mindful-web/marko-core/utils/default-value"),
8
8
  defaultValue = module_defaultValue.default || module_defaultValue,
@@ -83,7 +83,7 @@ marko_template._ = marko_renderer(render, {
83
83
  });
84
84
 
85
85
  marko_template.meta = {
86
- id: "/@mindful-web/marko-web-theme-monorail$1.79.8/components/blocks/company-inquiry-form.marko",
86
+ id: "/@mindful-web/marko-web-theme-monorail$1.79.9/components/blocks/company-inquiry-form.marko",
87
87
  tags: [
88
88
  "@mindful-web/marko-web/components/browser-component.marko",
89
89
  "@mindful-web/marko-web-p1-events/components/track-inquiry-submission.marko",
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var marko_template = module.exports = require("marko/dist/html").t(__filename),
5
- marko_componentType = "/@mindful-web/marko-web-theme-monorail$1.79.8/components/blocks/company-search.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-theme-monorail$1.79.9/components/blocks/company-search.marko",
6
6
  marko_renderer = require("marko/dist/runtime/components/renderer"),
7
7
  marko_web_browser_component_template = require("@mindful-web/marko-web/components/browser-component.marko"),
8
8
  marko_loadTag = require("marko/dist/runtime/helpers/load-tag"),
@@ -22,7 +22,7 @@ marko_template._ = marko_renderer(render, {
22
22
  });
23
23
 
24
24
  marko_template.meta = {
25
- id: "/@mindful-web/marko-web-theme-monorail$1.79.8/components/blocks/company-search.marko",
25
+ id: "/@mindful-web/marko-web-theme-monorail$1.79.9/components/blocks/company-search.marko",
26
26
  tags: [
27
27
  "@mindful-web/marko-web/components/browser-component.marko"
28
28
  ]
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var marko_template = module.exports = require("marko/dist/html").t(__filename),
5
- marko_componentType = "/@mindful-web/marko-web-theme-monorail$1.79.8/components/blocks/content-card-deck.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-theme-monorail$1.79.9/components/blocks/content-card-deck.marko",
6
6
  marko_component = require("./content-card-deck.marko"),
7
7
  marko_renderer = require("marko/dist/runtime/components/renderer"),
8
8
  module_utils_module = require("@mindful-web/marko-web/utils"),
@@ -317,7 +317,7 @@ marko_template._ = marko_renderer(render, {
317
317
  }, marko_component);
318
318
 
319
319
  marko_template.meta = {
320
- id: "/@mindful-web/marko-web-theme-monorail$1.79.8/components/blocks/content-card-deck.marko",
320
+ id: "/@mindful-web/marko-web-theme-monorail$1.79.9/components/blocks/content-card-deck.marko",
321
321
  component: "./content-card-deck.marko",
322
322
  tags: [
323
323
  "@mindful-web/marko-web/components/element/link.marko",
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var marko_template = module.exports = require("marko/dist/html").t(__filename),
5
- marko_componentType = "/@mindful-web/marko-web-theme-monorail$1.79.8/components/blocks/content-meter.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-theme-monorail$1.79.9/components/blocks/content-meter.marko",
6
6
  marko_renderer = require("marko/dist/runtime/components/renderer"),
7
7
  module_defaultValue = require("@mindful-web/marko-core/utils/default-value"),
8
8
  defaultValue = module_defaultValue.default || module_defaultValue,
@@ -135,7 +135,7 @@ marko_template._ = marko_renderer(render, {
135
135
  });
136
136
 
137
137
  marko_template.meta = {
138
- id: "/@mindful-web/marko-web-theme-monorail$1.79.8/components/blocks/content-meter.marko",
138
+ id: "/@mindful-web/marko-web-theme-monorail$1.79.9/components/blocks/content-meter.marko",
139
139
  tags: [
140
140
  "@mindful-web/marko-web/components/browser-component.marko",
141
141
  "../menu-toggle-button.marko",
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var marko_template = module.exports = require("marko/dist/html").t(__filename),
5
- marko_componentType = "/@mindful-web/marko-web-theme-monorail$1.79.8/components/blocks/full-width-native-ad.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-theme-monorail$1.79.9/components/blocks/full-width-native-ad.marko",
6
6
  marko_component = require("./full-width-native-ad.marko"),
7
7
  marko_renderer = require("marko/dist/runtime/components/renderer"),
8
8
  module_objectPath_module = require("@mindful-web/object-path"),
@@ -52,7 +52,7 @@ marko_template._ = marko_renderer(render, {
52
52
  }, marko_component);
53
53
 
54
54
  marko_template.meta = {
55
- id: "/@mindful-web/marko-web-theme-monorail$1.79.8/components/blocks/full-width-native-ad.marko",
55
+ id: "/@mindful-web/marko-web-theme-monorail$1.79.9/components/blocks/full-width-native-ad.marko",
56
56
  component: "./full-width-native-ad.marko",
57
57
  tags: [
58
58
  "../nodes/section-feed-content.marko",
@@ -7,6 +7,11 @@ $ const { content } = input;
7
7
  $ const blockName = defaultValue(input.blockName, "content-geo-summary");
8
8
  $ const title = defaultValue(input.title, "Article Summary");
9
9
  $ const includeContentTypes = defaultValue(input.includeContentTypes, ["article", "news"]);
10
+ $ const minBodyWordCount = defaultValue(input.minBodyWordCount, 300);
11
+ $ // Collapse the summary + key facts behind a toggle on single-column (mobile) viewports,
12
+ $ // where the card would otherwise push the article body well down the page. Desktop is
13
+ $ // unaffected: the CSS forces the body open and hides the chevron above the breakpoint.
14
+ $ const collapseOnMobile = defaultValue(input.collapseOnMobile, true);
10
15
  $ const summary = get(content, "geoSummary");
11
16
  $ const keyFacts = get(content, "geoKeyFacts");
12
17
  $ // `geoSummaryDisplay` governs the whole visible GEO block (summary + key facts):
@@ -16,26 +21,44 @@ $ // and body-length restrictions; DEFAULT shows it for the allowed content type
16
21
  $ const display = get(content, "geoSummaryDisplay");
17
22
  $ // VISIBLE bypasses the content-type allow-list; otherwise restrict to allowed types.
18
23
  $ const typeAllowed = display === "VISIBLE" || includeContentTypes.includes(get(content, "type"));
19
- $ // Only surface the summary on long-form content: require more than 300 words of
20
- $ // body prose once all HTML and embeds are stripped (stripHtml -> plain text).
24
+ $ // Only surface the summary on long-form content: require more than `minBodyWordCount`
25
+ $ // words of body prose once all HTML and embeds are stripped (stripHtml -> plain text).
21
26
  $ // VISIBLE bypasses this floor too, since the editor has explicitly forced the card on.
22
27
  $ const bodyText = stripHtml(get(content, "body") || "");
23
28
  $ const bodyWordCount = bodyText ? bodyText.split(/\s+/).filter((w) => /\w/.test(w)).length : 0;
24
- $ const lengthAllowed = display === "VISIBLE" || bodyWordCount > 300;
29
+ $ const lengthAllowed = display === "VISIBLE" || bodyWordCount > minBodyWordCount;
25
30
  $ const showSummary = Boolean(summary) && display !== "HIDDEN" && typeAllowed && lengthAllowed;
31
+ $ const modifiers = collapseOnMobile ? ["collapsible"] : [];
26
32
 
27
33
  <if(showSummary)>
28
- <marko-web-block name=blockName>
29
- <marko-web-element block-name=blockName name="title" tag="h2">
30
- ${i18n(title)}
31
- </marko-web-element>
32
- <marko-web-element block-name=blockName name="summary" tag="p">
33
- ${summary}
34
- </marko-web-element>
35
- <if(keyFacts)>
36
- <marko-web-element block-name=blockName name="key-facts">
37
- $!{keyFacts}
38
- </marko-web-element>
34
+ <marko-web-block name=blockName modifiers=modifiers>
35
+ <if(collapseOnMobile)>
36
+ $ // `initially-expanded` must stay false to match the server-rendered class list:
37
+ $ // the toggle button flips `toggleClass` with a blind `classList.toggle`.
38
+ <theme-menu-toggle-button
39
+ class=`${blockName}__toggler`
40
+ targets=[`.${blockName}`]
41
+ before=`${i18n(title)}`
42
+ toggle-class=`${blockName}--open`
43
+ initially-expanded=false
44
+ icon-name="chevron-down"
45
+ expanded-icon-name="chevron-up"
46
+ />
39
47
  </if>
48
+ <else>
49
+ <marko-web-element block-name=blockName name="title" tag="h2">
50
+ ${i18n(title)}
51
+ </marko-web-element>
52
+ </else>
53
+ <marko-web-element block-name=blockName name="body">
54
+ <marko-web-element block-name=blockName name="summary" tag="p">
55
+ ${summary}
56
+ </marko-web-element>
57
+ <if(keyFacts)>
58
+ <marko-web-element block-name=blockName name="key-facts">
59
+ $!{keyFacts}
60
+ </marko-web-element>
61
+ </if>
62
+ </marko-web-element>
40
63
  </marko-web-block>
41
64
  </if>
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var marko_template = module.exports = require("marko/dist/html").t(__filename),
5
- marko_componentType = "/@mindful-web/marko-web-theme-monorail$1.79.8/components/blocks/geo-summary.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-theme-monorail$1.79.9/components/blocks/geo-summary.marko",
6
6
  marko_renderer = require("marko/dist/runtime/components/renderer"),
7
7
  module_objectPath_module = require("@mindful-web/object-path"),
8
8
  objectPath_module = module_objectPath_module.default || module_objectPath_module,
@@ -12,10 +12,12 @@ var marko_template = module.exports = require("marko/dist/html").t(__filename),
12
12
  module_html_module = require("@mindful-web/html"),
13
13
  html_module = module_html_module.default || module_html_module,
14
14
  stripHtml = module_html_module.stripHtml,
15
+ theme_menu_toggle_button_template = require("../menu-toggle-button.marko"),
16
+ marko_loadTag = require("marko/dist/runtime/helpers/load-tag"),
17
+ theme_menu_toggle_button_tag = marko_loadTag(theme_menu_toggle_button_template),
15
18
  helpers_escape_xml = require("marko/dist/runtime/html/helpers/escape-xml"),
16
19
  marko_escapeXml = helpers_escape_xml.x,
17
20
  marko_web_element_template = require("@mindful-web/marko-web/components/element/index.marko"),
18
- marko_loadTag = require("marko/dist/runtime/helpers/load-tag"),
19
21
  marko_web_element_tag = marko_loadTag(marko_web_element_template),
20
22
  marko_str = require("marko/dist/runtime/helpers/to-string"),
21
23
  marko_web_block_template = require("@mindful-web/marko-web/components/element/block.marko"),
@@ -34,6 +36,16 @@ function render(input, out, __component, component, state) {
34
36
 
35
37
  const includeContentTypes = defaultValue(input.includeContentTypes, ["article", "news"]);
36
38
 
39
+ const minBodyWordCount = defaultValue(input.minBodyWordCount, 300);
40
+
41
+ // Collapse the summary + key facts behind a toggle on single-column (mobile) viewports,
42
+
43
+ // where the card would otherwise push the article body well down the page. Desktop is
44
+
45
+ // unaffected: the CSS forces the body open and hides the chevron above the breakpoint.
46
+
47
+ const collapseOnMobile = defaultValue(input.collapseOnMobile, true);
48
+
37
49
  const summary = get(content, "geoSummary");
38
50
 
39
51
  const keyFacts = get(content, "geoKeyFacts");
@@ -52,9 +64,9 @@ function render(input, out, __component, component, state) {
52
64
 
53
65
  const typeAllowed = display === "VISIBLE" || includeContentTypes.includes(get(content, "type"));
54
66
 
55
- // Only surface the summary on long-form content: require more than 300 words of
67
+ // Only surface the summary on long-form content: require more than `minBodyWordCount`
56
68
 
57
- // body prose once all HTML and embeds are stripped (stripHtml -> plain text).
69
+ // words of body prose once all HTML and embeds are stripped (stripHtml -> plain text).
58
70
 
59
71
  // VISIBLE bypasses this floor too, since the editor has explicitly forced the card on.
60
72
 
@@ -62,43 +74,71 @@ function render(input, out, __component, component, state) {
62
74
 
63
75
  const bodyWordCount = bodyText ? bodyText.split(/\s+/).filter((w) => /\w/.test(w)).length : 0;
64
76
 
65
- const lengthAllowed = display === "VISIBLE" || bodyWordCount > 300;
77
+ const lengthAllowed = display === "VISIBLE" || bodyWordCount > minBodyWordCount;
66
78
 
67
79
  const showSummary = Boolean(summary) && display !== "HIDDEN" && typeAllowed && lengthAllowed;
68
80
 
81
+ const modifiers = collapseOnMobile ? ["collapsible"] : [];
82
+
69
83
  if (showSummary) {
70
84
  marko_web_block_tag({
71
85
  name: blockName,
72
86
  tag: "div",
87
+ modifiers: modifiers,
73
88
  renderBody: function(out) {
74
- marko_web_element_tag({
75
- name: "title",
76
- tag: "h2",
77
- blockName: blockName,
78
- renderBody: function(out) {
79
- out.w(marko_escapeXml(i18n(title)));
80
- }
81
- }, out, __component, "1");
82
-
83
- marko_web_element_tag({
84
- name: "summary",
85
- tag: "p",
86
- blockName: blockName,
87
- renderBody: function(out) {
88
- out.w(marko_escapeXml(summary));
89
- }
90
- }, out, __component, "2");
91
-
92
- if (keyFacts) {
89
+ if (collapseOnMobile) {
90
+ // `initially-expanded` must stay false to match the server-rendered class list:
91
+
92
+ // the toggle button flips `toggleClass` with a blind `classList.toggle`.
93
+
94
+ theme_menu_toggle_button_tag({
95
+ class: blockName + "__toggler",
96
+ targets: [
97
+ "." + blockName
98
+ ],
99
+ before: "" + i18n(title),
100
+ toggleClass: blockName + "--open",
101
+ initiallyExpanded: false,
102
+ iconName: "chevron-down",
103
+ expandedIconName: "chevron-up"
104
+ }, out, __component, "1");
105
+ } else {
93
106
  marko_web_element_tag({
94
- name: "key-facts",
95
- tag: "div",
107
+ name: "title",
108
+ tag: "h2",
96
109
  blockName: blockName,
97
110
  renderBody: function(out) {
98
- out.w(marko_str(keyFacts));
111
+ out.w(marko_escapeXml(i18n(title)));
99
112
  }
100
- }, out, __component, "3");
113
+ }, out, __component, "2");
101
114
  }
115
+
116
+ marko_web_element_tag({
117
+ name: "body",
118
+ tag: "div",
119
+ blockName: blockName,
120
+ renderBody: function(out) {
121
+ marko_web_element_tag({
122
+ name: "summary",
123
+ tag: "p",
124
+ blockName: blockName,
125
+ renderBody: function(out) {
126
+ out.w(marko_escapeXml(summary));
127
+ }
128
+ }, out, __component, "4");
129
+
130
+ if (keyFacts) {
131
+ marko_web_element_tag({
132
+ name: "key-facts",
133
+ tag: "div",
134
+ blockName: blockName,
135
+ renderBody: function(out) {
136
+ out.w(marko_str(keyFacts));
137
+ }
138
+ }, out, __component, "5");
139
+ }
140
+ }
141
+ }, out, __component, "3");
102
142
  }
103
143
  }, out, __component, "0");
104
144
  }
@@ -110,8 +150,9 @@ marko_template._ = marko_renderer(render, {
110
150
  });
111
151
 
112
152
  marko_template.meta = {
113
- id: "/@mindful-web/marko-web-theme-monorail$1.79.8/components/blocks/geo-summary.marko",
153
+ id: "/@mindful-web/marko-web-theme-monorail$1.79.9/components/blocks/geo-summary.marko",
114
154
  tags: [
155
+ "../menu-toggle-button.marko",
115
156
  "@mindful-web/marko-web/components/element/index.marko",
116
157
  "@mindful-web/marko-web/components/element/block.marko"
117
158
  ]
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var marko_template = module.exports = require("marko/dist/html").t(__filename),
5
- marko_componentType = "/@mindful-web/marko-web-theme-monorail$1.79.8/components/blocks/header-announcement.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-theme-monorail$1.79.9/components/blocks/header-announcement.marko",
6
6
  marko_component = require("./header-announcement.marko"),
7
7
  marko_renderer = require("marko/dist/runtime/components/renderer"),
8
8
  marko_str = require("marko/dist/runtime/helpers/to-string"),
@@ -107,7 +107,7 @@ marko_template._ = marko_renderer(render, {
107
107
  }, marko_component);
108
108
 
109
109
  marko_template.meta = {
110
- id: "/@mindful-web/marko-web-theme-monorail$1.79.8/components/blocks/header-announcement.marko",
110
+ id: "/@mindful-web/marko-web-theme-monorail$1.79.9/components/blocks/header-announcement.marko",
111
111
  component: "./header-announcement.marko",
112
112
  tags: [
113
113
  "@mindful-web/marko-web/components/element/index.marko",
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var marko_template = module.exports = require("marko/dist/html").t(__filename),
5
- marko_componentType = "/@mindful-web/marko-web-theme-monorail$1.79.8/components/blocks/hero-card.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-theme-monorail$1.79.9/components/blocks/hero-card.marko",
6
6
  marko_component = require("./hero-card.marko"),
7
7
  marko_renderer = require("marko/dist/runtime/components/renderer"),
8
8
  module_defaultValue = require("@mindful-web/marko-core/utils/default-value"),
@@ -194,7 +194,7 @@ marko_template._ = marko_renderer(render, {
194
194
  }, marko_component);
195
195
 
196
196
  marko_template.meta = {
197
- id: "/@mindful-web/marko-web-theme-monorail$1.79.8/components/blocks/hero-card.marko",
197
+ id: "/@mindful-web/marko-web-theme-monorail$1.79.9/components/blocks/hero-card.marko",
198
198
  component: "./hero-card.marko",
199
199
  tags: [
200
200
  "@mindful-web/marko-web/components/element/index.marko",
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var marko_template = module.exports = require("marko/dist/html").t(__filename),
5
- marko_componentType = "/@mindful-web/marko-web-theme-monorail$1.79.8/components/blocks/latest-content-list.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-theme-monorail$1.79.9/components/blocks/latest-content-list.marko",
6
6
  marko_component = require("./latest-content-list.marko"),
7
7
  marko_renderer = require("marko/dist/runtime/components/renderer"),
8
8
  module_objectPath_module = require("@mindful-web/object-path"),
@@ -144,7 +144,7 @@ marko_template._ = marko_renderer(render, {
144
144
  }, marko_component);
145
145
 
146
146
  marko_template.meta = {
147
- id: "/@mindful-web/marko-web-theme-monorail$1.79.8/components/blocks/latest-content-list.marko",
147
+ id: "/@mindful-web/marko-web-theme-monorail$1.79.9/components/blocks/latest-content-list.marko",
148
148
  component: "./latest-content-list.marko",
149
149
  tags: [
150
150
  "@mindful-web/marko-web/components/element/link.marko",
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var marko_template = module.exports = require("marko/dist/html").t(__filename),
5
- marko_componentType = "/@mindful-web/marko-web-theme-monorail$1.79.8/components/blocks/latest-podcast.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-theme-monorail$1.79.9/components/blocks/latest-podcast.marko",
6
6
  marko_component = require("./latest-podcast.marko"),
7
7
  marko_renderer = require("marko/dist/runtime/components/renderer"),
8
8
  module_queryFragment = require("../../graphql/fragments/latest-podcast-block"),
@@ -157,7 +157,7 @@ marko_template._ = marko_renderer(render, {
157
157
  }, marko_component);
158
158
 
159
159
  marko_template.meta = {
160
- id: "/@mindful-web/marko-web-theme-monorail$1.79.8/components/blocks/latest-podcast.marko",
160
+ id: "/@mindful-web/marko-web-theme-monorail$1.79.9/components/blocks/latest-podcast.marko",
161
161
  component: "./latest-podcast.marko",
162
162
  tags: [
163
163
  "@mindful-web/marko-web-icons/components/icon.marko",
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var marko_template = module.exports = require("marko/dist/html").t(__filename),
5
- marko_componentType = "/@mindful-web/marko-web-theme-monorail$1.79.8/components/blocks/latest-products-feed.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-theme-monorail$1.79.9/components/blocks/latest-products-feed.marko",
6
6
  marko_component = require("./latest-products-feed.marko"),
7
7
  marko_renderer = require("marko/dist/runtime/components/renderer"),
8
8
  module_defaultValue = require("@mindful-web/marko-core/utils/default-value"),
@@ -154,7 +154,7 @@ marko_template._ = marko_renderer(render, {
154
154
  }, marko_component);
155
155
 
156
156
  marko_template.meta = {
157
- id: "/@mindful-web/marko-web-theme-monorail$1.79.8/components/blocks/latest-products-feed.marko",
157
+ id: "/@mindful-web/marko-web-theme-monorail$1.79.9/components/blocks/latest-products-feed.marko",
158
158
  component: "./latest-products-feed.marko",
159
159
  tags: [
160
160
  "../query-total-count.marko",
@@ -11,7 +11,9 @@
11
11
  },
12
12
  "@block-name": "string",
13
13
  "@title": "string",
14
- "@include-content-types": "array"
14
+ "@include-content-types": "array",
15
+ "@min-body-word-count": "number",
16
+ "@collapse-on-mobile": "boolean"
15
17
  },
16
18
  "<theme-callout-cards-block>": {
17
19
  "template": "./callout-cards.marko",
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var marko_template = module.exports = require("marko/dist/html").t(__filename),
5
- marko_componentType = "/@mindful-web/marko-web-theme-monorail$1.79.8/components/blocks/more-products.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-theme-monorail$1.79.9/components/blocks/more-products.marko",
6
6
  marko_component = require("./more-products.marko"),
7
7
  marko_renderer = require("marko/dist/runtime/components/renderer"),
8
8
  module_queryFragment = require("../../graphql/fragments/products-block"),
@@ -122,7 +122,7 @@ marko_template._ = marko_renderer(render, {
122
122
  }, marko_component);
123
123
 
124
124
  marko_template.meta = {
125
- id: "/@mindful-web/marko-web-theme-monorail$1.79.8/components/blocks/more-products.marko",
125
+ id: "/@mindful-web/marko-web-theme-monorail$1.79.9/components/blocks/more-products.marko",
126
126
  component: "./more-products.marko",
127
127
  tags: [
128
128
  "@mindful-web/marko-web/components/element/index.marko",
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var marko_template = module.exports = require("marko/dist/html").t(__filename),
5
- marko_componentType = "/@mindful-web/marko-web-theme-monorail$1.79.8/components/blocks/most-popular-list.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-theme-monorail$1.79.9/components/blocks/most-popular-list.marko",
6
6
  marko_component = require("./most-popular-list.marko"),
7
7
  marko_renderer = require("marko/dist/runtime/components/renderer"),
8
8
  module_objectPath_module = require("@mindful-web/object-path"),
@@ -137,7 +137,7 @@ marko_template._ = marko_renderer(render, {
137
137
  }, marko_component);
138
138
 
139
139
  marko_template.meta = {
140
- id: "/@mindful-web/marko-web-theme-monorail$1.79.8/components/blocks/most-popular-list.marko",
140
+ id: "/@mindful-web/marko-web-theme-monorail$1.79.9/components/blocks/most-popular-list.marko",
141
141
  component: "./most-popular-list.marko",
142
142
  tags: [
143
143
  "./latest-content-list.marko",
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var marko_template = module.exports = require("marko/dist/html").t(__filename),
5
- marko_componentType = "/@mindful-web/marko-web-theme-monorail$1.79.8/components/blocks/most-popular.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-theme-monorail$1.79.9/components/blocks/most-popular.marko",
6
6
  marko_component = require("./most-popular.marko"),
7
7
  marko_renderer = require("marko/dist/runtime/components/renderer"),
8
8
  module_objectPath_module = require("@mindful-web/object-path"),
@@ -180,7 +180,7 @@ marko_template._ = marko_renderer(render, {
180
180
  }, marko_component);
181
181
 
182
182
  marko_template.meta = {
183
- id: "/@mindful-web/marko-web-theme-monorail$1.79.8/components/blocks/most-popular.marko",
183
+ id: "/@mindful-web/marko-web-theme-monorail$1.79.9/components/blocks/most-popular.marko",
184
184
  component: "./most-popular.marko",
185
185
  tags: [
186
186
  "@mindful-web/marko-web/components/element/index.marko",
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var marko_template = module.exports = require("marko/dist/html").t(__filename),
5
- marko_componentType = "/@mindful-web/marko-web-theme-monorail$1.79.8/components/blocks/native-x-card-deck.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-theme-monorail$1.79.9/components/blocks/native-x-card-deck.marko",
6
6
  marko_component = require("./native-x-card-deck.marko"),
7
7
  marko_renderer = require("marko/dist/runtime/components/renderer"),
8
8
  module_utils_module = require("@mindful-web/marko-web/utils"),
@@ -217,7 +217,7 @@ marko_template._ = marko_renderer(render, {
217
217
  }, marko_component);
218
218
 
219
219
  marko_template.meta = {
220
- id: "/@mindful-web/marko-web-theme-monorail$1.79.8/components/blocks/native-x-card-deck.marko",
220
+ id: "/@mindful-web/marko-web-theme-monorail$1.79.9/components/blocks/native-x-card-deck.marko",
221
221
  component: "./native-x-card-deck.marko",
222
222
  tags: [
223
223
  "@mindful-web/marko-web/components/element/index.marko",
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var marko_template = module.exports = require("marko/dist/html").t(__filename),
5
- marko_componentType = "/@mindful-web/marko-web-theme-monorail$1.79.8/components/blocks/native-x-promo-card.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-theme-monorail$1.79.9/components/blocks/native-x-promo-card.marko",
6
6
  marko_component = require("./native-x-promo-card.marko"),
7
7
  marko_renderer = require("marko/dist/runtime/components/renderer"),
8
8
  module_utils_module = require("@mindful-web/marko-web/utils"),
@@ -124,7 +124,7 @@ marko_template._ = marko_renderer(render, {
124
124
  }, marko_component);
125
125
 
126
126
  marko_template.meta = {
127
- id: "/@mindful-web/marko-web-theme-monorail$1.79.8/components/blocks/native-x-promo-card.marko",
127
+ id: "/@mindful-web/marko-web-theme-monorail$1.79.9/components/blocks/native-x-promo-card.marko",
128
128
  component: "./native-x-promo-card.marko",
129
129
  tags: [
130
130
  "../nodes/standard-promo.marko",
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var marko_template = module.exports = require("marko/dist/html").t(__filename),
5
- marko_componentType = "/@mindful-web/marko-web-theme-monorail$1.79.8/components/blocks/newsletter-signup-banner-external.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-theme-monorail$1.79.9/components/blocks/newsletter-signup-banner-external.marko",
6
6
  marko_renderer = require("marko/dist/runtime/components/renderer"),
7
7
  module_defaultValue = require("@mindful-web/marko-core/utils/default-value"),
8
8
  defaultValue = module_defaultValue.default || module_defaultValue,
@@ -95,7 +95,7 @@ marko_template._ = marko_renderer(render, {
95
95
  });
96
96
 
97
97
  marko_template.meta = {
98
- id: "/@mindful-web/marko-web-theme-monorail$1.79.8/components/blocks/newsletter-signup-banner-external.marko",
98
+ id: "/@mindful-web/marko-web-theme-monorail$1.79.9/components/blocks/newsletter-signup-banner-external.marko",
99
99
  tags: [
100
100
  "@mindful-web/marko-web/components/element/index.marko",
101
101
  "@mindful-web/marko-web/components/element/block.marko"