@penskemediacorp/larva-patterns 1.7.0-alpha.0 → 1.7.2

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 (347) hide show
  1. package/LICENSE +21 -0
  2. package/__tests__/css/css.html +9 -0
  3. package/__tests__/css/css.prototype.js +1 -0
  4. package/__tests__/hub/hub.html +25 -0
  5. package/__tests__/hub/hub.prototype.js +30 -0
  6. package/__tests__/profile/profile.html +29 -0
  7. package/__tests__/profile/profile.prototype.js +17 -0
  8. package/__tests__/profile-index/profile-index.html +9 -0
  9. package/__tests__/profile-index/profile-index.prototype.js +6 -0
  10. package/__tests__/vlanding/vlanding.html +7 -0
  11. package/__tests__/vlanding/vlanding.prototype.js +11 -0
  12. package/_templates/pattern-nav.html +52 -12
  13. package/algorithms/a-carousel-grid/README.md +5 -0
  14. package/algorithms/a-carousel-grid/a-carousel-grid.html +25 -0
  15. package/algorithms/a-carousel-grid/a-carousel-grid.overlay.js +12 -0
  16. package/algorithms/a-carousel-grid/a-carousel-grid.prototype.js +0 -0
  17. package/algorithms/a-icon/a-icon.html +1 -0
  18. package/algorithms/a-icon/a-icon.prototype.js +0 -0
  19. package/base.html +62 -19
  20. package/components/c-button/README.md +3 -0
  21. package/components/c-button/c-button.black.js +7 -0
  22. package/components/c-button/c-button.brand-basic.js +8 -0
  23. package/components/c-button/c-button.ghost.js +10 -0
  24. package/components/c-button/c-button.prototype.js +10 -4
  25. package/components/c-button/c-button.stripped.js +8 -0
  26. package/components/c-button/c-button.twig +13 -7
  27. package/components/c-checkbox-input/c-checkbox-input.prototype.js +6 -0
  28. package/components/c-checkbox-input/c-checkbox-input.twig +4 -0
  29. package/components/c-dek/README.md +3 -0
  30. package/components/c-dek/c-dek.prototype.js +5 -0
  31. package/components/c-dek/c-dek.twig +9 -0
  32. package/components/c-email-field/README.md +0 -0
  33. package/components/c-email-field/c-email-field.ghost.js +10 -0
  34. package/components/c-email-field/c-email-field.prototype.js +8 -0
  35. package/components/c-email-field/c-email-field.twig +4 -0
  36. package/components/c-figcaption/c-figcaption.prototype.js +9 -0
  37. package/components/c-figcaption/c-figcaption.twig +16 -0
  38. package/components/c-heading/README.md +4 -0
  39. package/components/c-heading/c-heading.prototype.js +8 -3
  40. package/components/c-heading/c-heading.twig +11 -2
  41. package/components/c-hidden-field/c-hidden-field.prototype.js +5 -0
  42. package/components/c-hidden-field/c-hidden-field.twig +1 -0
  43. package/components/c-icon/c-icon.full.js +6 -5
  44. package/components/c-icon/c-icon.prototype.js +12 -10
  45. package/components/c-icon/c-icon.twig +22 -2
  46. package/components/c-input/c-input.prototype.js +8 -0
  47. package/components/c-input/c-input.twig +14 -0
  48. package/components/c-label/README.md +12 -0
  49. package/components/c-label/c-label.prototype.js +7 -0
  50. package/components/c-label/c-label.twig +19 -0
  51. package/components/c-lazy-image/README.md +35 -0
  52. package/components/c-lazy-image/c-lazy-image.prototype.js +17 -0
  53. package/components/c-lazy-image/c-lazy-image.twig +31 -0
  54. package/components/c-link/README.md +1 -0
  55. package/components/c-link/c-link.prototype.js +8 -5
  56. package/components/c-link/c-link.twig +11 -1
  57. package/components/c-logo/c-logo.prototype.js +7 -0
  58. package/components/c-logo/c-logo.twig +10 -0
  59. package/components/c-nav-link/c-nav-link.prototype.js +7 -0
  60. package/components/c-nav-link/c-nav-link.twig +10 -0
  61. package/components/c-play-badge/c-play-badge.prototype.js +3 -0
  62. package/components/c-play-badge/c-play-badge.twig +7 -0
  63. package/components/c-select-option/c-select-option.prototype.js +5 -0
  64. package/components/c-select-option/c-select-option.twig +5 -0
  65. package/components/c-span/c-span.prototype.js +6 -7
  66. package/components/c-span/c-span.tag.js +7 -0
  67. package/components/c-svg/c-svg.prototype.js +4 -0
  68. package/components/c-svg/c-svg.twig +3 -0
  69. package/components/c-tagline/README.md +3 -0
  70. package/components/c-tagline/c-tagline.prototype.js +4 -0
  71. package/components/c-tagline/c-tagline.twig +3 -3
  72. package/components/c-timestamp/c-timestamp.prototype.js +5 -4
  73. package/components/c-timestamp/c-timestamp.twig +9 -1
  74. package/components/c-title/README.md +7 -0
  75. package/components/c-title/c-title.prototype.js +7 -3
  76. package/components/c-title/c-title.twig +14 -2
  77. package/css.html +44 -0
  78. package/index.html +7 -25
  79. package/index.js +4 -0
  80. package/modules/age-gate/README.md +3 -0
  81. package/modules/age-gate/age-gate.prototype.js +68 -0
  82. package/modules/age-gate/age-gate.twig +37 -0
  83. package/modules/article-callout/article-callout.prototype.js +5 -0
  84. package/modules/article-callout/article-callout.twig +3 -0
  85. package/modules/article-excerpt/article-excerpt.prototype.js +4 -0
  86. package/modules/article-excerpt/article-excerpt.twig +1 -0
  87. package/modules/article-kicker/article-kicker.prototype.js +6 -0
  88. package/modules/article-kicker/article-kicker.twig +13 -0
  89. package/modules/article-tags/article-tags.prototype.js +9 -10
  90. package/modules/article-tags/article-tags.twig +1 -1
  91. package/modules/article-timestamp/article-timestamp.prototype.js +13 -0
  92. package/modules/article-timestamp/article-timestamp.twig +5 -0
  93. package/modules/article-title/article-title.prototype.js +4 -0
  94. package/modules/article-title/article-title.twig +1 -0
  95. package/modules/author/author.prototype.js +43 -0
  96. package/modules/author/author.twig +38 -0
  97. package/modules/author-blurb/author-blurb.prototype.js +56 -0
  98. package/modules/author-blurb/author-blurb.twig +27 -0
  99. package/modules/author-details/author-details.prototype.js +70 -0
  100. package/modules/author-details/author-details.twig +25 -0
  101. package/modules/back-to-list/back-to-list.prototype.js +11 -0
  102. package/modules/back-to-list/back-to-list.twig +5 -0
  103. package/modules/badge/badge.prototype.js +10 -6
  104. package/modules/badge/badge.twig +1 -1
  105. package/modules/banner/banner.prototype.js +10 -0
  106. package/modules/banner/banner.twig +10 -0
  107. package/modules/brands-most-popular/brands-most-popular.prototype.js +40 -0
  108. package/modules/brands-most-popular/brands-most-popular.twig +11 -0
  109. package/modules/breadcrumbs/breadcrumbs.prototype.js +4 -5
  110. package/modules/breadcrumbs/breadcrumbs.twig +1 -1
  111. package/modules/breaking-news/breaking-news.prototype.js +29 -0
  112. package/modules/breaking-news/breaking-news.twig +18 -0
  113. package/modules/button/button.prototype.js +9 -0
  114. package/modules/button/button.twig +7 -0
  115. package/modules/buy-now/buy-now.prototype.js +36 -0
  116. package/modules/buy-now/buy-now.twig +23 -0
  117. package/modules/carousel-grid/README.md +7 -0
  118. package/modules/carousel-grid/carousel-grid.overlay.js +26 -0
  119. package/modules/carousel-grid/carousel-grid.prototype.js +50 -0
  120. package/modules/carousel-grid/carousel-grid.twig +17 -0
  121. package/modules/carousel-slider/carousel-slider.prototype.js +56 -0
  122. package/modules/carousel-slider/carousel-slider.twig +11 -0
  123. package/modules/container/README.md +3 -0
  124. package/modules/container/container.prototype.js +7 -0
  125. package/modules/container/container.twig +1 -0
  126. package/modules/content-showcase/content-showcase.prototype.js +30 -0
  127. package/modules/content-showcase/content-showcase.the-moth.js +33 -0
  128. package/modules/content-showcase/content-showcase.twig +7 -0
  129. package/modules/expandable-search/expandable-search.prototype.js +19 -0
  130. package/modules/expandable-search/expandable-search.twig +9 -0
  131. package/modules/featured-stories/featured-stories.prototype.js +27 -0
  132. package/modules/featured-stories/featured-stories.twig +18 -0
  133. package/modules/footer/README.md +15 -0
  134. package/modules/footer/footer.prototype.js +14 -0
  135. package/modules/footer/footer.twig +22 -0
  136. package/modules/footer-button-list/footer-button-list.prototype.js +43 -0
  137. package/modules/footer-button-list/footer-button-list.twig +13 -0
  138. package/modules/footer-magazine-image/footer-magazine-image.prototype.js +15 -0
  139. package/modules/footer-magazine-image/footer-magazine-image.twig +3 -0
  140. package/modules/footer-menus/README.md +3 -0
  141. package/modules/footer-menus/footer-menus.prototype.js +9 -9
  142. package/modules/footer-menus/footer-menus.twig +2 -2
  143. package/modules/footer-newsletter/README.md +5 -0
  144. package/modules/footer-newsletter/footer-newsletter.prototype.js +21 -0
  145. package/modules/footer-newsletter/footer-newsletter.twig +5 -0
  146. package/modules/footer-social/README.md +3 -0
  147. package/modules/footer-social/footer-social.prototype.js +27 -20
  148. package/modules/footer-social/footer-social.twig +2 -2
  149. package/modules/footer-tip/footer-tip.prototype.js +21 -13
  150. package/modules/footer-tip/footer-tip.twig +2 -2
  151. package/modules/header/header.article.js +39 -0
  152. package/modules/header/header.prototype.js +90 -0
  153. package/modules/header/header.twig +74 -0
  154. package/modules/header-menu/header-menu.prototype.js +26 -0
  155. package/modules/header-menu/header-menu.twig +3 -0
  156. package/modules/header-sticky/header-sticky.article.js +43 -0
  157. package/modules/header-sticky/header-sticky.prototype.js +39 -0
  158. package/modules/header-sticky/header-sticky.twig +30 -0
  159. package/modules/heading/heading.h1.js +8 -0
  160. package/modules/heading/heading.h2.js +8 -0
  161. package/modules/heading/heading.h3.js +8 -0
  162. package/modules/heading/heading.h4.js +7 -0
  163. package/modules/heading/heading.h5.js +7 -0
  164. package/modules/heading/heading.h6.js +7 -0
  165. package/modules/heading/heading.prototype.js +9 -0
  166. package/modules/heading/heading.twig +3 -0
  167. package/modules/hero-image-story/hero-image-story.prototype.js +41 -0
  168. package/modules/hero-image-story/hero-image-story.twig +8 -0
  169. package/modules/injected-related-content/injected-related-content.prototype.js +61 -0
  170. package/modules/injected-related-content/injected-related-content.twig +23 -0
  171. package/modules/linked-gallery/linked-gallery.prototype.js +53 -0
  172. package/modules/linked-gallery/linked-gallery.twig +22 -0
  173. package/modules/list/list.ordered.js +7 -0
  174. package/modules/list/list.prototype.js +57 -0
  175. package/modules/list/list.twig +11 -0
  176. package/modules/listicle-item/listicle-item.prototype.js +11 -0
  177. package/modules/listicle-item/listicle-item.twig +3 -0
  178. package/modules/mega-menu/mega-menu.prototype.js +16 -0
  179. package/modules/mega-menu/mega-menu.twig +10 -0
  180. package/modules/mega-menu-content/mega-menu-content.prototype.js +10 -0
  181. package/modules/mega-menu-content/mega-menu-content.twig +5 -0
  182. package/modules/mega-menu-footer/mega-menu-footer.prototype.js +41 -0
  183. package/modules/mega-menu-footer/mega-menu-footer.twig +19 -0
  184. package/modules/mega-menu-footer-subscribe/mega-menu-footer-subscribe.prototype.js +20 -0
  185. package/modules/mega-menu-footer-subscribe/mega-menu-footer-subscribe.twig +4 -0
  186. package/modules/mega-menu-item/mega-menu-item.prototype.js +23 -0
  187. package/modules/mega-menu-item/mega-menu-item.twig +13 -0
  188. package/modules/more-stories-button/more-stories-button.profile.js +12 -0
  189. package/modules/more-stories-button/more-stories-button.prototype.js +29 -0
  190. package/modules/more-stories-button/more-stories-button.twig +13 -0
  191. package/modules/newsletter/newsletter.prototype.js +46 -0
  192. package/modules/newsletter/newsletter.twig +21 -0
  193. package/modules/newsletter-cta/newsletter-cta.prototype.js +21 -0
  194. package/modules/newsletter-cta/newsletter-cta.twig +22 -0
  195. package/modules/newswire/newswire.prototype.js +46 -0
  196. package/modules/newswire/newswire.twig +16 -0
  197. package/modules/page-404/page-404.prototype.js +44 -0
  198. package/modules/page-404/page-404.twig +32 -0
  199. package/modules/paragraph/paragraph.narrow.js +8 -0
  200. package/modules/paragraph/paragraph.prototype.js +8 -0
  201. package/modules/paragraph/paragraph.twig +3 -0
  202. package/modules/pmc-footer/pmc-footer.prototype.js +26 -24
  203. package/modules/pmc-footer/pmc-footer.twig +11 -9
  204. package/modules/post-content-image/post-content-image.prototype.js +14 -0
  205. package/modules/post-content-image/post-content-image.twig +3 -0
  206. package/modules/production-credits/production-credits.prototype.js +5 -0
  207. package/modules/production-credits/production-credits.twig +4 -0
  208. package/modules/profile-blurb/profile-blurb.card.js +28 -0
  209. package/modules/profile-blurb/profile-blurb.prototype.js +45 -0
  210. package/modules/profile-blurb/profile-blurb.twig +37 -0
  211. package/modules/profile-body/profile-body.prototype.js +20 -0
  212. package/modules/profile-body/profile-body.twig +15 -0
  213. package/modules/profile-browse-by/profile-browse-by.prototype.js +29 -0
  214. package/modules/profile-browse-by/profile-browse-by.twig +6 -0
  215. package/modules/profile-card-list/profile-card-list.prototype.js +25 -0
  216. package/modules/profile-card-list/profile-card-list.twig +7 -0
  217. package/modules/profile-filter/profile-filter.prototype.js +26 -0
  218. package/modules/profile-filter/profile-filter.twig +15 -0
  219. package/modules/profile-gallery/profile-gallery.prototype.js +28 -0
  220. package/modules/profile-gallery/profile-gallery.twig +13 -0
  221. package/modules/profile-header/profile-header.prototype.js +29 -0
  222. package/modules/profile-header/profile-header.twig +27 -0
  223. package/modules/profile-highlights/profile-highlights.prototype.js +22 -0
  224. package/modules/profile-highlights/profile-highlights.twig +17 -0
  225. package/modules/profile-landing-header/profile-landing-header.prototype.js +17 -0
  226. package/modules/profile-landing-header/profile-landing-header.twig +12 -0
  227. package/modules/profile-landing-river/profile-landing-river.prototype.js +21 -0
  228. package/modules/profile-landing-river/profile-landing-river.twig +13 -0
  229. package/modules/profile-related-stories/profile-related-stories.prototype.js +33 -0
  230. package/modules/profile-related-stories/profile-related-stories.twig +9 -0
  231. package/modules/pullquote/pullquote.prototype.js +8 -0
  232. package/modules/pullquote/pullquote.twig +3 -0
  233. package/modules/read-next/read-next.prototype.js +20 -0
  234. package/modules/read-next/read-next.twig +4 -0
  235. package/modules/search-form/search-form.prototype.js +8 -0
  236. package/modules/search-form/search-form.twig +11 -0
  237. package/modules/secondary-stories/secondary-stories.prototype.js +119 -0
  238. package/modules/secondary-stories/secondary-stories.twig +22 -0
  239. package/modules/separator/separator.prototype.js +4 -0
  240. package/modules/separator/separator.thick.js +7 -0
  241. package/modules/separator/separator.twig +1 -0
  242. package/modules/separator/separator.wide-thick.js +7 -0
  243. package/modules/separator/separator.wide.js +7 -0
  244. package/modules/social-share/social-share.prototype.js +43 -0
  245. package/modules/social-share/social-share.twig +30 -0
  246. package/modules/special-coverage/special-coverage.prototype.js +47 -0
  247. package/modules/special-coverage/special-coverage.twig +29 -0
  248. package/modules/story/story.borders.js +8 -0
  249. package/modules/story/story.center-vertical-borders.js +7 -0
  250. package/modules/story/story.center-vertical.js +11 -0
  251. package/modules/story/story.prototype.js +43 -0
  252. package/modules/story/story.right-borders.js +9 -0
  253. package/modules/story/story.right.js +14 -0
  254. package/modules/story/story.story-arc.js +9 -0
  255. package/modules/story/story.twig +88 -0
  256. package/modules/story/story.vertical-borders.js +7 -0
  257. package/modules/story/story.vertical.js +11 -0
  258. package/modules/story-arc-stories/story-arc-stories.prototype.js +21 -0
  259. package/modules/story-arc-stories/story-arc-stories.twig +14 -0
  260. package/modules/story-featured-quote/story-featured-quote.prototype.js +28 -0
  261. package/modules/story-featured-quote/story-featured-quote.twig +27 -0
  262. package/modules/story-grid/story-grid.prototype.js +24 -0
  263. package/modules/story-grid/story-grid.river.js +15 -0
  264. package/modules/story-grid/story-grid.twig +17 -0
  265. package/modules/sub-header/sub-header.prototype.js +8 -0
  266. package/modules/sub-header/sub-header.twig +7 -0
  267. package/modules/top-stories/top-stories.prototype.js +41 -0
  268. package/modules/top-stories/top-stories.twig +12 -0
  269. package/modules/top-stories/top-stories.xl.js +14 -0
  270. package/modules/vlanding-playlist/README.md +1 -0
  271. package/modules/vlanding-playlist/vlanding-playlist.prototype.js +34 -0
  272. package/modules/vlanding-playlist/vlanding-playlist.twig +20 -0
  273. package/modules/vlanding-video-card/README.md +1 -0
  274. package/modules/vlanding-video-card/vlanding-video-card.prototype.js +25 -0
  275. package/modules/vlanding-video-card/vlanding-video-card.twig +56 -0
  276. package/modules/vlanding-video-showcase/README.md +12 -0
  277. package/modules/vlanding-video-showcase/vlanding-video-showcase.prototype.js +68 -0
  278. package/modules/vlanding-video-showcase/vlanding-video-showcase.twig +46 -0
  279. package/objects/o-account-menu/o-account-menu.prototype.js +35 -0
  280. package/objects/o-account-menu/o-account-menu.twig +25 -0
  281. package/objects/o-author/o-author.prototype.js +13 -0
  282. package/objects/o-author/o-author.twig +13 -0
  283. package/objects/o-card/README.md +1 -0
  284. package/objects/o-card/o-card.prototype.js +25 -0
  285. package/objects/o-card/o-card.twig +75 -0
  286. package/objects/o-card-list/README.md +3 -0
  287. package/objects/o-card-list/o-card-list.prototype.js +13 -0
  288. package/objects/o-card-list/o-card-list.twig +7 -0
  289. package/objects/o-checkbox-input-list/o-checkbox-input-list.prototype.js +16 -0
  290. package/objects/o-checkbox-input-list/o-checkbox-input-list.twig +15 -0
  291. package/objects/o-collection-item/o-collection-item.floated.js +8 -0
  292. package/objects/o-collection-item/o-collection-item.prototype.js +11 -0
  293. package/objects/o-collection-item/o-collection-item.twig +5 -0
  294. package/objects/o-email-capture-form/README.md +11 -0
  295. package/objects/o-email-capture-form/o-email-capture-form.minimal.js +15 -0
  296. package/objects/o-email-capture-form/o-email-capture-form.prototype.js +17 -0
  297. package/objects/o-email-capture-form/o-email-capture-form.twig +16 -0
  298. package/objects/o-figure/README.md +17 -0
  299. package/objects/o-figure/o-figure.prototype.js +15 -7
  300. package/objects/o-figure/o-figure.twig +22 -45
  301. package/objects/o-header/o-header.prototype.js +12 -10
  302. package/objects/o-header/o-header.twig +5 -1
  303. package/objects/o-header-buttons/o-header-buttons.column.js +10 -0
  304. package/objects/o-header-buttons/o-header-buttons.prototype.js +41 -0
  305. package/objects/o-header-buttons/o-header-buttons.twig +42 -0
  306. package/objects/o-icon-button/README.md +5 -0
  307. package/objects/o-icon-button/o-icon-button.prototype.js +21 -0
  308. package/objects/o-icon-button/o-icon-button.search.js +9 -0
  309. package/objects/o-icon-button/o-icon-button.twig +29 -0
  310. package/objects/o-indicator/README.md +1 -0
  311. package/objects/o-indicator/o-indicator.photos.js +12 -0
  312. package/objects/o-indicator/o-indicator.prototype.js +8 -0
  313. package/objects/o-indicator/o-indicator.twig +9 -0
  314. package/objects/o-input-group/o-input-group.prototype.js +11 -0
  315. package/objects/o-input-group/o-input-group.twig +5 -0
  316. package/objects/o-nav/README.md +2 -2
  317. package/objects/o-nav/o-nav.horizontal.js +6 -6
  318. package/objects/o-nav/o-nav.prototype.js +17 -13
  319. package/objects/o-nav/o-nav.twig +29 -3
  320. package/objects/o-select-nav/o-select-nav.prototype.js +17 -0
  321. package/objects/o-select-nav/o-select-nav.twig +9 -0
  322. package/objects/o-social-list/o-social-list.prototype.js +21 -31
  323. package/objects/o-social-list/o-social-list.twig +10 -2
  324. package/objects/o-span-group/README.md +1 -0
  325. package/objects/o-span-group/o-span-group.prototype.js +11 -0
  326. package/objects/o-span-group/o-span-group.twig +5 -0
  327. package/objects/o-sponsored-by/o-sponsored-by.prototype.js +9 -10
  328. package/objects/o-sponsored-by/o-sponsored-by.twig +2 -2
  329. package/objects/o-story-arc-item/o-story-arc-item.prototype.js +29 -0
  330. package/objects/o-story-arc-item/o-story-arc-item.twig +9 -0
  331. package/objects/o-sub-header/o-sub-header.prototype.js +39 -0
  332. package/objects/o-sub-header/o-sub-header.twig +9 -0
  333. package/objects/o-tease/o-tease.prototype.js +24 -20
  334. package/objects/o-tease/o-tease.twig +7 -3
  335. package/objects/o-tease-list/o-tease-list.prototype.js +12 -24
  336. package/objects/o-tease-list/o-tease-list.twig +5 -1
  337. package/package.json +6 -9
  338. package/pattern.html +61 -9
  339. package/style-guide/colors.html +33 -0
  340. package/style-guide/fonts.html +22 -0
  341. package/style-guide/index.html +14 -0
  342. package/components/c-button/c-button.scss +0 -33
  343. package/components/c-tagline/c-tagline.json +0 -4
  344. package/components/c-tagline/c-tagline.scss +0 -19
  345. package/objects/o-figure/o-figure.scss +0 -46
  346. package/objects/o-tease/o-tease.scss +0 -30
  347. package/scratch-pad.css +0 -3
@@ -1,7 +1,11 @@
1
+ {% if c_heading_outer %}
2
+ <div class="c-heading__outer {{ c_heading_outer_classes }}">
3
+ {% endif %}
4
+
1
5
  {% if c_heading_is_primary_heading %}
2
- <h1 class="c-heading {{ modifier_class }} {{ c_heading_classes }}">
6
+ <h1 id="{{ c_heading_id_attr }}" class="c-heading larva {{ modifier_class }} {{ c_heading_classes }}">
3
7
  {% else %}
4
- <h2 class="c-heading {{ modifier_class }} {{ c_heading_classes }}">
8
+ <h2 id="{{ c_heading_id_attr }}" class="c-heading larva {{ modifier_class }} {{ c_heading_classes }}">
5
9
  {% endif %}
6
10
 
7
11
  {% if c_heading_url %}
@@ -13,8 +17,13 @@
13
17
  {% if c_heading_url %}
14
18
  </a>
15
19
  {% endif %}
20
+
16
21
  {% if c_heading_is_primary_heading %}
17
22
  </h1>
18
23
  {% else %}
19
24
  </h2>
20
25
  {% endif %}
26
+
27
+ {% if c_heading_outer %}
28
+ </div>
29
+ {% endif %}
@@ -0,0 +1,5 @@
1
+ module.exports = {
2
+ c_hidden_field_name_attr: '',
3
+ c_hidden_field_value_attr: '',
4
+ c_hidden_field_id_attr: ''
5
+ };
@@ -0,0 +1 @@
1
+ <input type="hidden" name="{{ c_hidden_field_name_attr }}" id="{{ c_hidden_field_id_attr }}" value="{{ c_hidden_field_value_attr }}" />
@@ -1,7 +1,8 @@
1
- const path = require( 'path' );
2
- const clone = require( '../../../larva/lib/utils/clonePatternData' );// This should be in this repo, probably
3
- const c_icon = clone( path.resolve( __dirname, './c-icon.prototype' ) );
1
+ const clonedeep = require( 'lodash.clonedeep' );
4
2
 
5
- c_icon.c_icon_classes = 'pmc-u-height-100p pmc-u-width-100p';
3
+ const c_icon_prototype = require( './c-icon.prototype' );
4
+ const c_icon = clonedeep( c_icon_prototype );
6
5
 
7
- module.exports = c_icon;
6
+ c_icon.c_icon_classes = 'lrv-u-height-100p lrv-u-width-100p';
7
+
8
+ module.exports = c_icon;
@@ -1,10 +1,12 @@
1
- const path = require( 'path' );
2
-
3
- let c_icon = {};
4
-
5
- c_icon.c_icon_link_classes = '';
6
- c_icon.c_icon_name = 'byline-plus';
7
- c_icon.c_icon_url = '#';
8
- c_icon.c_icon_classes = 'pmc-u-display-block pmc-u-width-16 pmc-u-height-16';
9
- c_icon.c_icon_rel_name = 'noopener noreferrer';
10
- module.exports = c_icon;
1
+ module.exports = {
2
+ c_icon_link_classes: '',
3
+ c_icon_name: 'byline-plus',
4
+ c_icon_target_attr: '_blank',
5
+ c_icon_link_screen_reader_text: 'Icon Link',
6
+ c_icon_url: false,
7
+ c_icon_classes: 'lrv-u-display-block lrv-u-width-16 lrv-u-height-16',
8
+ c_icon_rel_name: 'noopener noreferrer',
9
+ c_icon_screen_reader_tag_text: '',
10
+ c_icon_screen_reader_text: 'Plus Icon',
11
+ c_icon_screen_reader_title_attr: 'Plus Icon'
12
+ };
@@ -1,8 +1,28 @@
1
1
  {% if c_icon_url %}
2
- <a class="{{ c_icon_link_classes }}" href="{{ c_icon_url }}" aria-label="{{ c_icon_name }}" {% if c_icon_rel_name %}rel="{{ c_icon_rel_name }}"{% endif %} target="_blank">
2
+ <a class="{{ c_icon_link_classes }}" href="{{ c_icon_url }}"
3
+ {% if c_icon_rel_name %}
4
+ rel="{{ c_icon_rel_name }}"
5
+ {% endif %}
6
+ {% if c_icon_target_attr %}
7
+ target="{{ c_icon_target_attr }}"
8
+ {% endif %}
9
+ >
10
+ <span class="lrv-a-screen-reader-only">{{ c_icon_link_screen_reader_text }}</span>
11
+ {% endif %}
12
+
13
+ {% if c_icon_screen_reader_text %}
14
+ {% if c_icon_screen_reader_tag_text %}
15
+ <{{ c_icon_screen_reader_tag_text }} class="lrv-a-screen-reader-only" title="{{ c_icon_screen_reader_title_attr }}">{{ c_icon_screen_reader_text }}</{{ c_icon_screen_reader_tag_text }}>
16
+ {% else %}
17
+ <span class="lrv-a-screen-reader-only" title="{{ c_icon_screen_reader_title_attr }}">{{ c_icon_screen_reader_text }}</span>
18
+ {% endif %}
3
19
  {% endif %}
4
20
 
5
- <svg class="c-icon {{ modifier_class }} {{ c_icon_classes }}">
21
+ <svg class="c-icon {{ modifier_class }} {{ c_icon_classes }}"
22
+ {% if c_icon_screen_reader_text %}
23
+ aria-hidden="true"
24
+ {% endif %}
25
+ >
6
26
  <use xlink:href="#{{ c_icon_name }}" />
7
27
  {% if c_icon_secondary_name %}
8
28
  <use xlink:href="#{{ c_icon_secondary_name }}" />
@@ -0,0 +1,8 @@
1
+ module.exports = {
2
+ c_input_type_attr: 'text',
3
+ c_input_id_attr: 'inputExample',
4
+ c_input_label_class: 'lrv-a-screen-reader-only',
5
+ c_input_label_text: 'Input Example',
6
+ c_input_class: '',
7
+ c_input_placeholder_attr: 'Enter text.',
8
+ };
@@ -0,0 +1,14 @@
1
+ <label class="c-input" for="{{ c_input_id_attr }}">
2
+ <span class="{{ c_input_label_class }}">{{ c_input_label_text }}</span>
3
+ <input
4
+ id="{{ c_input_id_attr }}"
5
+ type="{{ c_input_type_attr }}"
6
+ class="{{ c_input_class }}"
7
+ name="{{ c_input_id_attr }}"
8
+ placeholder="{{ c_input_placeholder_attr }}"
9
+ aria-invalid="{{ c_input_aria_invalid_attr }}"
10
+ data-error="{{ c_input_error_attr }}"
11
+ size="{{ c_input_size_attr }}"
12
+ maxlength="{{ c_input_maxlength_attr }}"
13
+ />
14
+ </label>
@@ -0,0 +1,12 @@
1
+ `c-label` should be used for the labels for components.
2
+
3
+ | Attributes | Description |
4
+ |----------------------|-------------------------------------------------------------------------------------------|
5
+ | c_label_text | Text content for the label. |
6
+ | c_label_classes | CSS classes of the label. |
7
+ | c_label_tag | Which tag need to use to render label, either `h2` or `span` where default will be `span` |
8
+ | c_label_id_attr | Value of id attribute label. |
9
+ | c_label_url | URL for label. (optional) |
10
+ | c_label_link_classes | CSS classes for link. |
11
+
12
+
@@ -0,0 +1,7 @@
1
+ module.exports = {
2
+ c_label_text: 'Label Here',
3
+ c_label_tag_text: 'span',
4
+ c_label_id_attr: '',
5
+ c_label_url: '#',
6
+ c_label_link_classes: ''
7
+ };
@@ -0,0 +1,19 @@
1
+ {% if c_label_tag_text %}
2
+ <{{ c_label_tag_text }} id="{{ c_label_id_attr }}" class="c-label {{ modifier_class }} {{ c_label_classes }}" {{ c_label_data_attr }}>
3
+ {% else %}
4
+ <span id="{{ c_label_id_attr }}" class="c-label {{ modifier_class }} {{ c_label_classes }}" {{ c_label_data_attr }}>
5
+ {% endif %}
6
+
7
+ {% if c_label_url %}
8
+ <a href="{{ c_label_url }}" class="c-label__link {{ c_label_link_classes }}">
9
+ {% endif %}
10
+ {{ c_label_text }}
11
+ {% if c_label_url %}
12
+ </a>
13
+ {% endif %}
14
+
15
+ {% if c_label_tag_text %}
16
+ </{{ c_label_tag_text }}>
17
+ {% else %}
18
+ </span>
19
+ {% endif %}
@@ -0,0 +1,35 @@
1
+ This is our lazy loading, responsive image pattern. It is optimized to provide an aspect ratio and no reflow when the image is loaded for a smooth user experience. Images loaded using this pattern **must**:
2
+
3
+ **Option 1:** Be cropped using a class from `a-crop` applied to `c_lazy_image_crop_class`. This is the most common and simplest option.
4
+
5
+ **Option 2:** Calculate a padding-bottom value based on the image's height and width in `c_lazy_image_crop_style_attr`. This is useful for images with unpredictable aspect ratios such as those in `the_content`in WordPress.
6
+
7
+ ## Option 2: Inline aspect ratio
8
+
9
+ An example of calculating the padding-bottom attribute in a PHP object is as follows:
10
+
11
+ ```language-php
12
+ if ( ! empty( $image_height ) && ! empty( $image_width ) ) {
13
+ $post_content_image['c_lazy_image_crop_style_attr'] = 'padding-bottom:calc((' . $image_height . '/' . $image_width . ')*100%);';
14
+ }
15
+ ```
16
+
17
+ Assuming an image URL in the following format:
18
+ https://pmcdeadline2.files.wordpress.com/2019/10/monica-beletsky-apple.jpg?w=450&h=253&crop=1
19
+
20
+ The image's dimensions are retrieved from the image URL in class-image-caption.php using the following regex (adapted from the ArtNews 2019 theme in class-image-captions.php):
21
+
22
+ ```language-php
23
+ $image_src = '';
24
+ $image_height = '';
25
+ $image_width = '';
26
+ if ( preg_match(
27
+ "/\<img.+src\=(?:\"|\')(.+?)(?:\"|\').+width\=(?:\"|\')(.+?)(?:\"|\').+height\=(?:\"|\')(.+?)(?:\"|\')\>/",
28
+ $content,
29
+ $matches
30
+ ) ) {
31
+ $image_src = $matches[1]; // @codeCoverageIgnore
32
+ $image_width = $matches[2]; // @codeCoverageIgnore
33
+ $image_height = $matches[3]; // @codeCoverageIgnore
34
+ }
35
+ ```
@@ -0,0 +1,17 @@
1
+ module.exports = {
2
+ c_lazy_image_classes: '',
3
+ c_lazy_image_link_url: false,
4
+ c_lazy_image_link_classes: 'lrv-a-unstyle-link',
5
+ c_lazy_image_crop_class: 'lrv-a-crop-16x9',
6
+ c_lazy_image_crop_style_attr: false,
7
+ c_lazy_image_link_tab_index_attr: false,
8
+ c_lazy_image_alt_attr: 'Lazy loaded image',
9
+ c_lazy_image_src_url: 'https://farm5.staticflickr.com/4078/5441060528_31db7838ba_z.jpg',
10
+ c_lazy_image_placeholder_url: 'data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==',
11
+ c_lazy_image_srcset_attr: 'https://farm5.staticflickr.com/4078/5441060528_31db7838ba_m.jpg 240w,https://farm5.staticflickr.com/4078/5441060528_31db7838ba_n.jpg 320w,https://farm5.staticflickr.com/4078/5441060528_31db7838ba.jpg 500w,https://farm5.staticflickr.com/4078/5441060528_31db7838ba_z.jpg 640w,https://farm5.staticflickr.com/4078/5441060528_31db7838ba_b.jpg 1024w',
12
+ c_lazy_image_sizes_attr: 'auto',
13
+ c_lazy_image_img_classes: 'lrv-u-background-color-grey-lightest lrv-u-width-100p lrv-u-display-block lrv-u-height-auto',
14
+ c_lazy_image_height_attr: '',
15
+ c_lazy_image_width_attr: '',
16
+ c_lazy_image_in_initial_viewport: false
17
+ }
@@ -0,0 +1,31 @@
1
+ <div class="c-lazy-image {{ modifier_class }} {{ c_lazy_image_classes }}">
2
+ {% if c_lazy_image_link_url %}
3
+ <a href="{{ c_lazy_image_link_url }}" class="c-lazy-image__link {{ c_lazy_image_link_classes }}"
4
+ {% if c_lazy_image_link_tab_index_attr %}
5
+ tabindex="{{ c_lazy_image_link_tab_index_attr }}"
6
+ {% endif %}
7
+ >
8
+ {% endif %}
9
+
10
+ {% if c_lazy_image_crop_class %}
11
+ <div class="{{ c_lazy_image_crop_class }}" style="{{ c_lazy_image_crop_style_attr }}">
12
+ {% endif %}
13
+
14
+ {% if c_lazy_image_markup %}
15
+ {{ c_lazy_image_markup }}
16
+ {% else %}
17
+ {% if c_lazy_image_in_initial_viewport %}
18
+ <img class="c-lazy-image__img {{ c_lazy_image_img_classes }}" src="{{ c_lazy_image_src_url }}" alt="{{ c_lazy_image_alt_attr }}" srcset="{{ c_lazy_image_srcset_attr }}" sizes="{{ c_lazy_image_sizes_attr }}" height="{{ c_lazy_image_height_attr }}" width="{{ c_lazy_image_width_attr }}">
19
+ {% else %}
20
+ <img class="c-lazy-image__img {{ c_lazy_image_img_classes }}" src="{{ c_lazy_image_placeholder_url }}" data-lazy-src="{{ c_lazy_image_src_url }}" alt="{{ c_lazy_image_alt_attr }}" data-lazy-srcset="{{ c_lazy_image_srcset_attr }}" data-lazy-sizes="{{ c_lazy_image_sizes_attr }}" height="{{ c_lazy_image_height_attr }}" width="{{ c_lazy_image_width_attr }}">
21
+ {% endif %}
22
+ {% endif %}
23
+
24
+ {% if c_lazy_image_crop_class %}
25
+ </div>
26
+ {% endif %}
27
+
28
+ {% if c_lazy_image_link_url %}
29
+ </a>
30
+ {% endif %}
31
+ </div>
@@ -0,0 +1 @@
1
+ A simple text link element with no other containing or inner markup.
@@ -1,6 +1,9 @@
1
1
  module.exports = {
2
- "modifier_class": "",
3
- "c_link_classes": "pmc-a-unstyle-link",
4
- "c_link_text": "A plain text link",
5
- "c_link_url": "#"
6
- };
2
+ modifier_class: '',
3
+ c_link_classes: 'lrv-a-unstyle-link',
4
+ c_link_text: 'A plain text link',
5
+ c_link_url: '#',
6
+ c_link_rel_attr: false,
7
+ c_link_aria_label_attr: false,
8
+ c_link_target_attr: false,
9
+ };
@@ -1,3 +1,13 @@
1
- <a class="c-link {{ modifier_class }} {{ c_link_classes }}" href="{{ c_link_url }}">
1
+ <a class="c-link {{ modifier_class }} {{ c_link_classes }}" href="{{ c_link_url }}"
2
+ {% if c_link_target_attr %}
3
+ target="{{ c_link_target_attr }}"
4
+ {% endif %}
5
+ {% if c_link_rel_attr %}
6
+ rel="{{ c_link_rel_attr }}"
7
+ {% endif %}
8
+ {% if c_link_aria_label_attr %}
9
+ aria-label="{{ c_link_aria_label_attr }}"
10
+ {% endif %}
11
+ >
2
12
  {{ c_link_text }}
3
13
  </a>
@@ -0,0 +1,7 @@
1
+ module.exports = {
2
+ c_logo_is_h1: false,
3
+ c_logo_classes: '',
4
+ c_logo_url: '/',
5
+ c_logo_svg: 'brand-logo',
6
+ c_logo_screen_reader_text: 'Logo text'
7
+ };
@@ -0,0 +1,10 @@
1
+ {% if c_logo_is_h1 %}
2
+ <h1 class="lrv-u-flex">
3
+ {% endif %}
4
+ <a class="c-logo {{ modifier_class }} {{ c_logo_classes }}" href="{{ c_logo_url }}">
5
+ {% include '../../build/svg/' ~ c_logo_svg ~ '.svg' %}
6
+ <span class="lrv-a-screen-reader-only">{{ c_logo_screen_reader_text }}</span>
7
+ </a>
8
+ {% if c_logo_is_h1 %}
9
+ </h1>
10
+ {% endif %}
@@ -0,0 +1,7 @@
1
+ module.exports = {
2
+ c_nav_link_classes: '',
3
+ c_nav_link_text: 'Navigation Item',
4
+ c_nav_link_screen_reader_text: 'Navigation Item',
5
+ c_nav_link_url: '#',
6
+ c_nav_link_aria_current_attr: 'page'
7
+ }
@@ -0,0 +1,10 @@
1
+ <a class="c-nav-link {{ modifier_class }} {{ c_nav_link_classes }}" href="{{ c_nav_link_url }}"
2
+ {% if c_nav_link_aria_current_attr %}
3
+ aria-current="{{ c_nav_link_aria_current_attr }}"
4
+ {% endif %}
5
+ >
6
+ {{ c_nav_link_text }}
7
+ {% if c_nav_link_screen_reader_text %}
8
+ <span class="lrv-a-screen-reader-only">{{ c_nav_link_screen_reader_text }}</span>
9
+ {% endif %}
10
+ </a>
@@ -0,0 +1,3 @@
1
+ module.exports = {
2
+ c_play_badge_classes: ''
3
+ }
@@ -0,0 +1,7 @@
1
+ <svg class="c-play-badge {{ modifier_class }} {{ c_play_badge_classes }}" viewBox="0 0 88 88">
2
+ <g transform="translate(-.082 -.082)" fill="none" fill-rule="evenodd">
3
+ <circle class="c-play-badge__fill" stroke-width="4" cx="44" cy="44" r="44" />
4
+ <circle class="c-play-badge__border" fill="none" stroke="none" stroke-width=4 cx="44" cy="44" r="44" stroke-dasharray="276" stroke-dashoffset="276" />
5
+ <path class="c-play-badge__icon" d="M38.242 28.835c-.634-.467-2.323-.467-2.46 1.298v19.743a.99.99 0 0 0 1.577.796 3.88 3.88 0 0 0 1.577-3.123V33.105l16.008 10.969-18.458 12.61c-.44.3-.703.798-.703 1.331a1.564 1.564 0 0 0 2.46 1.298l20.383-13.941c.528-.317 1.252-1.615 0-2.596l-20.384-13.94z" />
6
+ </g>
7
+ </svg>
@@ -0,0 +1,5 @@
1
+ module.exports = {
2
+ c_select_option_url: '#',
3
+ c_select_option_value_attr: 'option-value',
4
+ c_select_option_text: 'Option Text'
5
+ };
@@ -0,0 +1,5 @@
1
+ {% if c_select_option_url %}
2
+ <option data-select-url="{{ c_select_option_url }}" value="{{ c_select_option_value_attr }}">{{ c_select_option_text }}</option>
3
+ {% else %}
4
+ <option value="{{ c_select_option_value_attr }}">{{ c_select_option_text }}</option>
5
+ {% endif %}
@@ -1,8 +1,7 @@
1
1
  module.exports = {
2
- "modifier_class": "",
3
- "c_span_data_attr": "",
4
- "c_span_classes": "pmc-u-whitespace-nowrap",
5
- "c_span_text": "Label Text",
6
- "c_span_url": "#",
7
- "c_span_link_classes": ""
8
- };
2
+ modifier_class: '',
3
+ c_span_classes: 'lrv-u-whitespace-nowrap',
4
+ c_span_text: 'Label Text',
5
+ c_span_url: '',
6
+ c_span_link_classes: ''
7
+ };
@@ -0,0 +1,7 @@
1
+ const clonedeep = require( 'lodash.clonedeep' );
2
+ const c_span = clonedeep( require( './c-span.prototype' ) );
3
+
4
+ c_span.c_span_text = 'News';
5
+ c_span.c_span_url = '#';
6
+
7
+ module.exports = c_span;
@@ -0,0 +1,4 @@
1
+ module.exports = {
2
+ c_svg_classes: '',
3
+ c_svg_name: 'brand-logo'
4
+ }
@@ -0,0 +1,3 @@
1
+ <div class="c-svg {{ c_svg_classes }}">
2
+ {% include '../../build/svg/' ~ c_svg_name ~ '.svg' %}
3
+ </div>
@@ -0,0 +1,3 @@
1
+ # c-tagline
2
+
3
+ c-tagline is similar to c-dek, but intended for single line taglines or descriptions of other content. Use c_tagline_markup if the content you are passing needs to use `wp_kses`.
@@ -0,0 +1,4 @@
1
+ module.exports = {
2
+ c_tagline_classes: '',
3
+ c_tagline_text: 'Here is a pretty small amount of text for the tagline. It is a very flexible components, and is really just a single line of text.'
4
+ };
@@ -1,9 +1,9 @@
1
1
  {% if c_tagline_text %}
2
- <p class="c-tagline {{ modifier_class }} {{ c_tagline_classes }}" {{ c_tagline_data_attr }}>{{ c_tagline_text }}</p>
2
+ <p class="c-tagline {{ modifier_class }} {{ c_tagline_classes }}">{{ c_tagline_text }}</p>
3
3
  {% endif %}
4
4
 
5
5
  {% if c_tagline_markup %}
6
- <div class="c-tagline {{ modifier_class }} {{ c_tagline_classes }}" {{ c_tagline_data_attr }}>
7
- {{ c_tagline_markup }}
6
+ <div class="c-tagline {{ modifier_class }} {{ c_tagline_classes }}">
7
+ {{ c_tagline_markup|raw }}
8
8
  </div>
9
9
  {% endif %}
@@ -1,5 +1,6 @@
1
1
  module.exports = {
2
- "c_timestamp_classes": "",
3
- "c_timestamp_datetime_attr": "00:00-YY-DD-MM",
4
- "c_timestamp_text": "July 3, 2001"
5
- };
2
+ c_timestamp_classes: '',
3
+ c_timestamp_datetime_attr: '00:00-YY-DD-MM',
4
+ c_timestamp_text: 'July 3, 2001',
5
+ c_timestamp_aria_label_attr: false
6
+ };
@@ -1 +1,9 @@
1
- <time class="c-timestamp {{ modifier_class }} {{ c_timestamp_classes }}" datetime="{{ c_timestamp_datetime_attr }}">{{ c_timestamp_text }}</time>
1
+ <time class="c-timestamp {{ modifier_class }} {{ c_timestamp_classes }}"
2
+ datetime="{{ c_timestamp_datetime_attr }}"
3
+ {% if c_timestamp_aria_label_attr %}
4
+ aria-label="{{ c_timestamp_aria_label_attr }}"
5
+ {% endif %}
6
+ >
7
+ {{ c_timestamp_text }}
8
+
9
+ </time>
@@ -0,0 +1,7 @@
1
+ `c-title` should be used for the titles of articles, usually contained within a river or other `section` element. It is an `h3` and supports either `text` or `markup` for its content.
2
+
3
+ If a value for `c_title_markup` is present, it will display in place of `c_title_text`. This is so that `i` and `em` tags are supported.
4
+
5
+ This pattern also supports `c_title_above_url` which is an anchor tag, within the `h3` but with a separate URL, as well as `c_title_before_text` which is a span within the same link as the main `h3`.
6
+
7
+ In the future, these should/could be refactored into something like `c_title_pre`, and should not have conditionals checking the data.
@@ -1,5 +1,9 @@
1
1
  module.exports = {
2
- "c_title_classes": "",
3
- "c_title_text": "Title of a story",
4
- "c_title_url": "#"
2
+ c_title_classes: '',
3
+ c_title_tag_text: '',
4
+ c_title_id_attr: 'title-of-a-story',
5
+ c_title_text: 'Title of a story',
6
+ c_title_markup: '',
7
+ c_title_link_classes: '',
8
+ c_title_url: '#'
5
9
  }
@@ -1,4 +1,8 @@
1
- <h3 class="c-title {{ modifier_class }} {{ c_title_classes }}">
1
+ {% if c_title_tag_text %}
2
+ <{{ c_title_tag_text }} id="{{ c_title_id_attr }}" class="c-title {{ modifier_class }} {{ c_title_classes }}">
3
+ {% else %}
4
+ <h3 id="{{ c_title_id_attr }}" class="c-title {{ modifier_class }} {{ c_title_classes }}">
5
+ {% endif %}
2
6
 
3
7
  {% if c_title_above_url %}
4
8
  <a href="{{ c_title_above_url }}" class="{{ c_title_above_link_classes }}">
@@ -14,10 +18,18 @@
14
18
  <span class="c-title__before {{ c_title_before_classes }}">{{ c_title_before_text }}</span>
15
19
  {% endif %}
16
20
 
17
- {{ c_title_text }}
21
+ {% if c_title_markup %}
22
+ {{ c_title_markup|raw }}
23
+ {% else %}
24
+ {{ c_title_text }}
25
+ {% endif %}
18
26
 
19
27
  {% if c_title_url %}
20
28
  </a>
21
29
  {% endif %}
22
30
 
31
+ {% if c_title_tag_text %}
32
+ </{{ c_title_tag_text }}>
33
+ {% else %}
23
34
  </h3>
35
+ {% endif %}
package/css.html ADDED
@@ -0,0 +1,44 @@
1
+ {% extends "base.html" %}
2
+
3
+ {% block content %}
4
+
5
+ <h1>{{ name }}</h1>
6
+
7
+ <div class="lrv-u-padding-a-1 lrv-a-grid lrv-a-cols2">
8
+ <section>
9
+ <h2>Utilities - Default tokens</h2>
10
+ {% for key, value in spec %}
11
+ {% if value.selectors|length > 0 and 'u-' in key %}
12
+ <details>
13
+ <summary>
14
+ <strong class="lrv-u-cursor-pointer">.lrv-{{ key }}{% if true == value.tokens %}<strong class="lrv-u-font-size-14" style="background-color: yellow;">From Tokens</strong>{% endif %}</strong>
15
+ </summary>
16
+ <ul>
17
+ {% for selector in value.selectors %}
18
+ <li>{{ selector }}</li>
19
+ {% endfor %}
20
+ </ul>
21
+ </details>
22
+ {% endif %}
23
+ {% endfor %}
24
+ </section>
25
+ <section>
26
+ <h2>Algorithms</h2>
27
+ {% for key, value in spec %}
28
+ {% if value.selectors|length > 0 and 'a-' in key %}
29
+ <details>
30
+ <summary>
31
+ <strong class="lrv-u-cursor-pointer">.lrv-{{ key }}{% if true == value.tokens %}<strong class="lrv-u-font-size-14" style="background-color: yellow;">From Tokens</strong>{% endif %}</strong>
32
+ </summary>
33
+ <ul>
34
+ {% for selector in value.selectors %}
35
+ <li>{{ selector }}</li>
36
+ {% endfor %}
37
+ </ul>
38
+ </details>
39
+ {% endif %}
40
+ {% endfor %}
41
+ </section>
42
+ </div>
43
+
44
+ {% endblock content %}
package/index.html CHANGED
@@ -1,27 +1,9 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <meta http-equiv="X-UA-Compatible" content="ie=edge">
7
- <title>Larva Homepage</title>
8
- </head>
9
- <body>
1
+ {% extends "base.html" %}
10
2
 
11
- <div class="pmc-a-wrapper pmc-u-margin-t-1">
12
- <h1>Welcome to Larva!</h1>
13
- <p>This is a little baby server for building patterns. To navigate to a pattern, provide the route:</p>
14
- <pre>http://localhost:3000/{project|larva}/{patternType}/{patternName}</pre>
15
-
16
- <p>For example:</p>
17
- <a href="http://localhost:3000/larva/objects/o-nav">
18
- <pre>http://localhost:3000/larva/objects/o-nav</pre>
19
- </a>
20
- <p>or, if you are working in a project, point to the local project with:</p>
21
- <a href="http://localhost:3000/project/modules/breadcrumbs">
22
- <pre>http://localhost:3000/project/modules/breadcrumbs</pre>
23
- </a>
3
+ {% block content %}
4
+ <div class="lrv-a-wrapper lrv-u-margin-tb-2">
5
+ <h1>Welcome to the Larva pattern library for {{brand}}!</h1>
6
+ <p>When viewing this page from a local server, you can use the server to quickly update and build front-end Larva modules. As a static site, this pattern library is for documentation.</p>
7
+ <p>View available patterns by clicking the "Show Larva UI" button on the bottom right. Anything under the "Larva" column is shared across all brands and themed with design tokens. Anything under the "Project" column is a brand-specific pattern. If there is no "Project" column, then the brand is only using shared patterns.</p>
24
8
  </div>
25
-
26
- </body>
27
- </html>
9
+ {% endblock %}
package/index.js CHANGED
@@ -0,0 +1,4 @@
1
+ module.exports = {
2
+ o_nav: require( './objects/o-nav/o-nav.prototype' ),
3
+ o_tease: require( './objects/o-tease/o-tease.prototype' )
4
+ }
@@ -0,0 +1,3 @@
1
+ # age-gate
2
+
3
+ This module is relied heavily upon in the `pmc-age-gate` plugin and contains `js-` classes in the twig file that are important to its functionality. Custom JS and CSS (to handle pop-up modal in which the age gate module will appear) are handled in the aforementioned plugin.