@penskemediacorp/larva-patterns 1.8.0-alpha.0 → 1.9.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/LICENSE +21 -0
- package/__tests__/css/css.html +9 -0
- package/__tests__/css/css.prototype.js +1 -0
- package/__tests__/hub/hub.html +25 -0
- package/__tests__/hub/hub.prototype.js +30 -0
- package/__tests__/profile/profile.html +29 -0
- package/__tests__/profile/profile.prototype.js +17 -0
- package/__tests__/profile-index/profile-index.html +9 -0
- package/__tests__/profile-index/profile-index.prototype.js +6 -0
- package/__tests__/vlanding/vlanding.html +7 -0
- package/__tests__/vlanding/vlanding.prototype.js +11 -0
- package/_templates/pattern-nav.html +52 -12
- package/algorithms/a-carousel-grid/README.md +5 -0
- package/algorithms/a-carousel-grid/a-carousel-grid.html +25 -0
- package/algorithms/a-carousel-grid/a-carousel-grid.overlay.js +12 -0
- package/algorithms/a-carousel-grid/a-carousel-grid.prototype.js +0 -0
- package/algorithms/a-icon/a-icon.html +1 -0
- package/algorithms/a-icon/a-icon.prototype.js +0 -0
- package/base.html +62 -19
- package/components/c-button/README.md +3 -0
- package/components/c-button/c-button.black.js +7 -0
- package/components/c-button/c-button.brand-basic.js +8 -0
- package/components/c-button/c-button.ghost.js +10 -0
- package/components/c-button/c-button.prototype.js +10 -4
- package/components/c-button/c-button.stripped.js +8 -0
- package/components/c-button/c-button.twig +13 -7
- package/components/c-checkbox-input/c-checkbox-input.prototype.js +6 -0
- package/components/c-checkbox-input/c-checkbox-input.twig +4 -0
- package/components/c-dek/README.md +3 -0
- package/components/c-dek/c-dek.prototype.js +5 -0
- package/components/c-dek/c-dek.twig +9 -0
- package/components/c-email-field/README.md +0 -0
- package/components/c-email-field/c-email-field.ghost.js +10 -0
- package/components/c-email-field/c-email-field.prototype.js +8 -0
- package/components/c-email-field/c-email-field.twig +4 -0
- package/components/c-figcaption/c-figcaption.prototype.js +9 -0
- package/components/c-figcaption/c-figcaption.twig +16 -0
- package/components/c-heading/README.md +4 -0
- package/components/c-heading/c-heading.prototype.js +8 -3
- package/components/c-heading/c-heading.twig +11 -2
- package/components/c-hidden-field/c-hidden-field.prototype.js +5 -0
- package/components/c-hidden-field/c-hidden-field.twig +1 -0
- package/components/c-icon/c-icon.full.js +6 -5
- package/components/c-icon/c-icon.prototype.js +12 -10
- package/components/c-icon/c-icon.twig +22 -2
- package/components/c-input/c-input.prototype.js +8 -0
- package/components/c-input/c-input.twig +14 -0
- package/components/c-label/README.md +12 -0
- package/components/c-label/c-label.prototype.js +7 -0
- package/components/c-label/c-label.twig +19 -0
- package/components/c-lazy-image/README.md +35 -0
- package/components/c-lazy-image/c-lazy-image.prototype.js +17 -0
- package/components/c-lazy-image/c-lazy-image.twig +31 -0
- package/components/c-link/README.md +1 -0
- package/components/c-link/c-link.prototype.js +8 -5
- package/components/c-link/c-link.twig +11 -1
- package/components/c-logo/c-logo.prototype.js +7 -0
- package/components/c-logo/c-logo.twig +10 -0
- package/components/c-nav-link/c-nav-link.prototype.js +7 -0
- package/components/c-nav-link/c-nav-link.twig +10 -0
- package/components/c-play-badge/c-play-badge.prototype.js +3 -0
- package/components/c-play-badge/c-play-badge.twig +7 -0
- package/components/c-select-option/c-select-option.prototype.js +5 -0
- package/components/c-select-option/c-select-option.twig +5 -0
- package/components/c-span/c-span.prototype.js +6 -7
- package/components/c-span/c-span.tag.js +7 -0
- package/components/c-svg/c-svg.prototype.js +4 -0
- package/components/c-svg/c-svg.twig +3 -0
- package/components/c-tagline/README.md +3 -0
- package/components/c-tagline/c-tagline.prototype.js +4 -0
- package/components/c-tagline/c-tagline.twig +3 -3
- package/components/c-timestamp/c-timestamp.prototype.js +5 -4
- package/components/c-timestamp/c-timestamp.twig +9 -1
- package/components/c-title/README.md +7 -0
- package/components/c-title/c-title.prototype.js +7 -3
- package/components/c-title/c-title.twig +14 -2
- package/css.html +44 -0
- package/index.html +7 -25
- package/index.js +2 -1
- package/modules/age-gate/README.md +3 -0
- package/modules/age-gate/age-gate.prototype.js +68 -0
- package/modules/age-gate/age-gate.twig +37 -0
- package/modules/article-callout/article-callout.prototype.js +5 -0
- package/modules/article-callout/article-callout.twig +3 -0
- package/modules/article-excerpt/article-excerpt.prototype.js +4 -0
- package/modules/article-excerpt/article-excerpt.twig +1 -0
- package/modules/article-kicker/article-kicker.prototype.js +6 -0
- package/modules/article-kicker/article-kicker.twig +13 -0
- package/modules/article-tags/article-tags.prototype.js +9 -10
- package/modules/article-tags/article-tags.twig +1 -1
- package/modules/article-timestamp/article-timestamp.prototype.js +13 -0
- package/modules/article-timestamp/article-timestamp.twig +5 -0
- package/modules/article-title/article-title.prototype.js +4 -0
- package/modules/article-title/article-title.twig +1 -0
- package/modules/author/author.prototype.js +43 -0
- package/modules/author/author.twig +38 -0
- package/modules/author-blurb/author-blurb.prototype.js +56 -0
- package/modules/author-blurb/author-blurb.twig +27 -0
- package/modules/author-details/author-details.prototype.js +70 -0
- package/modules/author-details/author-details.twig +25 -0
- package/modules/back-to-list/back-to-list.prototype.js +11 -0
- package/modules/back-to-list/back-to-list.twig +5 -0
- package/modules/badge/badge.prototype.js +10 -6
- package/modules/badge/badge.twig +1 -1
- package/modules/banner/banner.prototype.js +10 -0
- package/modules/banner/banner.twig +10 -0
- package/modules/brands-most-popular/brands-most-popular.prototype.js +40 -0
- package/modules/brands-most-popular/brands-most-popular.twig +11 -0
- package/modules/breadcrumbs/breadcrumbs.prototype.js +4 -5
- package/modules/breadcrumbs/breadcrumbs.twig +1 -1
- package/modules/breaking-news/breaking-news.prototype.js +29 -0
- package/modules/breaking-news/breaking-news.twig +18 -0
- package/modules/button/button.prototype.js +9 -0
- package/modules/button/button.twig +7 -0
- package/modules/buy-now/buy-now.prototype.js +36 -0
- package/modules/buy-now/buy-now.twig +23 -0
- package/modules/carousel-grid/README.md +7 -0
- package/modules/carousel-grid/carousel-grid.overlay.js +26 -0
- package/modules/carousel-grid/carousel-grid.prototype.js +50 -0
- package/modules/carousel-grid/carousel-grid.twig +17 -0
- package/modules/carousel-slider/carousel-slider.prototype.js +56 -0
- package/modules/carousel-slider/carousel-slider.twig +11 -0
- package/modules/container/README.md +3 -0
- package/modules/container/container.prototype.js +7 -0
- package/modules/container/container.twig +1 -0
- package/modules/content-showcase/content-showcase.prototype.js +30 -0
- package/modules/content-showcase/content-showcase.the-moth.js +33 -0
- package/modules/content-showcase/content-showcase.twig +7 -0
- package/modules/expandable-search/expandable-search.prototype.js +19 -0
- package/modules/expandable-search/expandable-search.twig +9 -0
- package/modules/featured-stories/featured-stories.prototype.js +27 -0
- package/modules/featured-stories/featured-stories.twig +18 -0
- package/modules/featured-video/featured-video.prototype.js +33 -0
- package/modules/featured-video/featured-video.twig +8 -0
- package/modules/featured-video/featured-video.video-post.js +10 -0
- package/modules/footer/README.md +15 -0
- package/modules/footer/footer.prototype.js +14 -0
- package/modules/footer/footer.twig +22 -0
- package/modules/footer-button-list/footer-button-list.prototype.js +43 -0
- package/modules/footer-button-list/footer-button-list.twig +13 -0
- package/modules/footer-magazine-image/footer-magazine-image.prototype.js +15 -0
- package/modules/footer-magazine-image/footer-magazine-image.twig +3 -0
- package/modules/footer-menus/README.md +3 -0
- package/modules/footer-menus/footer-menus.prototype.js +9 -9
- package/modules/footer-menus/footer-menus.twig +2 -2
- package/modules/footer-newsletter/README.md +5 -0
- package/modules/footer-newsletter/footer-newsletter.prototype.js +21 -0
- package/modules/footer-newsletter/footer-newsletter.twig +5 -0
- package/modules/footer-social/README.md +3 -0
- package/modules/footer-social/footer-social.prototype.js +27 -20
- package/modules/footer-social/footer-social.twig +2 -2
- package/modules/footer-tip/footer-tip.prototype.js +21 -13
- package/modules/footer-tip/footer-tip.twig +2 -2
- package/modules/header/header.article.js +39 -0
- package/modules/header/header.prototype.js +90 -0
- package/modules/header/header.twig +74 -0
- package/modules/header-menu/header-menu.prototype.js +26 -0
- package/modules/header-menu/header-menu.twig +3 -0
- package/modules/header-sticky/header-sticky.article.js +43 -0
- package/modules/header-sticky/header-sticky.prototype.js +39 -0
- package/modules/header-sticky/header-sticky.twig +30 -0
- package/modules/heading/heading.h1.js +8 -0
- package/modules/heading/heading.h2.js +8 -0
- package/modules/heading/heading.h3.js +8 -0
- package/modules/heading/heading.h4.js +7 -0
- package/modules/heading/heading.h5.js +7 -0
- package/modules/heading/heading.h6.js +7 -0
- package/modules/heading/heading.prototype.js +9 -0
- package/modules/heading/heading.twig +3 -0
- package/modules/hero-image-story/hero-image-story.prototype.js +41 -0
- package/modules/hero-image-story/hero-image-story.twig +8 -0
- package/modules/injected-related-content/injected-related-content.prototype.js +61 -0
- package/modules/injected-related-content/injected-related-content.twig +23 -0
- package/modules/linked-gallery/linked-gallery.prototype.js +56 -0
- package/modules/linked-gallery/linked-gallery.twig +21 -0
- package/modules/list/list.ordered.js +7 -0
- package/modules/list/list.prototype.js +57 -0
- package/modules/list/list.twig +11 -0
- package/modules/listicle-item/listicle-item.prototype.js +11 -0
- package/modules/listicle-item/listicle-item.twig +3 -0
- package/modules/mega-menu/mega-menu.prototype.js +16 -0
- package/modules/mega-menu/mega-menu.twig +10 -0
- package/modules/mega-menu-content/mega-menu-content.prototype.js +10 -0
- package/modules/mega-menu-content/mega-menu-content.twig +5 -0
- package/modules/mega-menu-footer/mega-menu-footer.prototype.js +41 -0
- package/modules/mega-menu-footer/mega-menu-footer.twig +19 -0
- package/modules/mega-menu-footer-subscribe/mega-menu-footer-subscribe.prototype.js +20 -0
- package/modules/mega-menu-footer-subscribe/mega-menu-footer-subscribe.twig +4 -0
- package/modules/mega-menu-item/mega-menu-item.prototype.js +23 -0
- package/modules/mega-menu-item/mega-menu-item.twig +13 -0
- package/modules/more-stories-button/more-stories-button.profile.js +12 -0
- package/modules/more-stories-button/more-stories-button.prototype.js +29 -0
- package/modules/more-stories-button/more-stories-button.twig +13 -0
- package/modules/newsletter/newsletter.prototype.js +46 -0
- package/modules/newsletter/newsletter.twig +21 -0
- package/modules/newsletter-cta/newsletter-cta.prototype.js +21 -0
- package/modules/newsletter-cta/newsletter-cta.twig +22 -0
- package/modules/newswire/newswire.prototype.js +46 -0
- package/modules/newswire/newswire.twig +16 -0
- package/modules/page-404/page-404.prototype.js +44 -0
- package/modules/page-404/page-404.twig +32 -0
- package/modules/paragraph/paragraph.narrow.js +8 -0
- package/modules/paragraph/paragraph.prototype.js +8 -0
- package/modules/paragraph/paragraph.twig +3 -0
- package/modules/pmc-footer/pmc-footer.prototype.js +26 -24
- package/modules/pmc-footer/pmc-footer.twig +11 -9
- package/modules/post-content-image/post-content-image.prototype.js +14 -0
- package/modules/post-content-image/post-content-image.twig +3 -0
- package/modules/production-credits/production-credits.prototype.js +5 -0
- package/modules/production-credits/production-credits.twig +4 -0
- package/modules/profile-blurb/profile-blurb.card.js +28 -0
- package/modules/profile-blurb/profile-blurb.prototype.js +45 -0
- package/modules/profile-blurb/profile-blurb.twig +37 -0
- package/modules/profile-body/profile-body.prototype.js +20 -0
- package/modules/profile-body/profile-body.twig +15 -0
- package/modules/profile-browse-by/profile-browse-by.prototype.js +29 -0
- package/modules/profile-browse-by/profile-browse-by.twig +6 -0
- package/modules/profile-card-list/profile-card-list.prototype.js +25 -0
- package/modules/profile-card-list/profile-card-list.twig +7 -0
- package/modules/profile-filter/profile-filter.prototype.js +26 -0
- package/modules/profile-filter/profile-filter.twig +15 -0
- package/modules/profile-gallery/profile-gallery.prototype.js +28 -0
- package/modules/profile-gallery/profile-gallery.twig +13 -0
- package/modules/profile-header/profile-header.prototype.js +29 -0
- package/modules/profile-header/profile-header.twig +27 -0
- package/modules/profile-highlights/profile-highlights.prototype.js +22 -0
- package/modules/profile-highlights/profile-highlights.twig +17 -0
- package/modules/profile-landing-header/profile-landing-header.prototype.js +17 -0
- package/modules/profile-landing-header/profile-landing-header.twig +12 -0
- package/modules/profile-landing-river/profile-landing-river.prototype.js +21 -0
- package/modules/profile-landing-river/profile-landing-river.twig +13 -0
- package/modules/profile-related-stories/profile-related-stories.prototype.js +33 -0
- package/modules/profile-related-stories/profile-related-stories.twig +9 -0
- package/modules/pullquote/pullquote.prototype.js +8 -0
- package/modules/pullquote/pullquote.twig +3 -0
- package/modules/read-next/read-next.prototype.js +20 -0
- package/modules/read-next/read-next.twig +4 -0
- package/modules/search-form/search-form.prototype.js +8 -0
- package/modules/search-form/search-form.twig +11 -0
- package/modules/secondary-stories/secondary-stories.prototype.js +119 -0
- package/modules/secondary-stories/secondary-stories.twig +22 -0
- package/modules/separator/separator.prototype.js +4 -0
- package/modules/separator/separator.thick.js +7 -0
- package/modules/separator/separator.twig +1 -0
- package/modules/separator/separator.wide-thick.js +7 -0
- package/modules/separator/separator.wide.js +7 -0
- package/modules/social-share/social-share.prototype.js +43 -0
- package/modules/social-share/social-share.twig +30 -0
- package/modules/special-coverage/special-coverage.prototype.js +47 -0
- package/modules/special-coverage/special-coverage.twig +29 -0
- package/modules/story/story.borders.js +8 -0
- package/modules/story/story.center-vertical-borders.js +7 -0
- package/modules/story/story.center-vertical.js +11 -0
- package/modules/story/story.prototype.js +43 -0
- package/modules/story/story.right-borders.js +9 -0
- package/modules/story/story.right.js +14 -0
- package/modules/story/story.story-arc.js +9 -0
- package/modules/story/story.twig +88 -0
- package/modules/story/story.vertical-borders.js +7 -0
- package/modules/story/story.vertical.js +11 -0
- package/modules/story-arc-stories/story-arc-stories.prototype.js +21 -0
- package/modules/story-arc-stories/story-arc-stories.twig +14 -0
- package/modules/story-featured-quote/story-featured-quote.prototype.js +28 -0
- package/modules/story-featured-quote/story-featured-quote.twig +27 -0
- package/modules/story-grid/story-grid.prototype.js +24 -0
- package/modules/story-grid/story-grid.river.js +15 -0
- package/modules/story-grid/story-grid.twig +17 -0
- package/modules/sub-header/sub-header.prototype.js +8 -0
- package/modules/sub-header/sub-header.twig +7 -0
- package/modules/top-stories/top-stories.prototype.js +41 -0
- package/modules/top-stories/top-stories.twig +12 -0
- package/modules/top-stories/top-stories.xl.js +14 -0
- package/modules/vlanding-playlist/README.md +1 -0
- package/modules/vlanding-playlist/vlanding-playlist.prototype.js +34 -0
- package/modules/vlanding-playlist/vlanding-playlist.twig +20 -0
- package/modules/vlanding-video-card/README.md +1 -0
- package/modules/vlanding-video-card/vlanding-video-card.prototype.js +25 -0
- package/modules/vlanding-video-card/vlanding-video-card.twig +56 -0
- package/modules/vlanding-video-showcase/README.md +12 -0
- package/modules/vlanding-video-showcase/vlanding-video-showcase.prototype.js +68 -0
- package/modules/vlanding-video-showcase/vlanding-video-showcase.twig +46 -0
- package/objects/o-account-menu/o-account-menu.prototype.js +35 -0
- package/objects/o-account-menu/o-account-menu.twig +25 -0
- package/objects/o-author/o-author.prototype.js +13 -0
- package/objects/o-author/o-author.twig +13 -0
- package/objects/o-card/README.md +1 -0
- package/objects/o-card/o-card.prototype.js +25 -0
- package/objects/o-card/o-card.twig +75 -0
- package/objects/o-card-list/README.md +3 -0
- package/objects/o-card-list/o-card-list.prototype.js +13 -0
- package/objects/o-card-list/o-card-list.twig +7 -0
- package/objects/o-category-link/o-category-link.prototype.js +6 -0
- package/objects/o-category-link/o-category-link.twig +5 -0
- package/objects/o-checkbox-input-list/o-checkbox-input-list.prototype.js +16 -0
- package/objects/o-checkbox-input-list/o-checkbox-input-list.twig +15 -0
- package/objects/o-collection-item/o-collection-item.floated.js +8 -0
- package/objects/o-collection-item/o-collection-item.prototype.js +11 -0
- package/objects/o-collection-item/o-collection-item.twig +5 -0
- package/objects/o-email-capture-form/README.md +11 -0
- package/objects/o-email-capture-form/o-email-capture-form.minimal.js +15 -0
- package/objects/o-email-capture-form/o-email-capture-form.prototype.js +17 -0
- package/objects/o-email-capture-form/o-email-capture-form.twig +16 -0
- package/objects/o-figure/README.md +17 -0
- package/objects/o-figure/o-figure.prototype.js +15 -7
- package/objects/o-figure/o-figure.twig +22 -45
- package/objects/o-header/o-header.prototype.js +12 -10
- package/objects/o-header/o-header.twig +5 -1
- package/objects/o-header-buttons/o-header-buttons.column.js +10 -0
- package/objects/o-header-buttons/o-header-buttons.prototype.js +41 -0
- package/objects/o-header-buttons/o-header-buttons.twig +42 -0
- package/objects/o-icon-button/README.md +5 -0
- package/objects/o-icon-button/o-icon-button.prototype.js +21 -0
- package/objects/o-icon-button/o-icon-button.search.js +9 -0
- package/objects/o-icon-button/o-icon-button.twig +29 -0
- package/objects/o-indicator/README.md +1 -0
- package/objects/o-indicator/o-indicator.photos.js +12 -0
- package/objects/o-indicator/o-indicator.prototype.js +8 -0
- package/objects/o-indicator/o-indicator.twig +9 -0
- package/objects/o-input-group/o-input-group.prototype.js +11 -0
- package/objects/o-input-group/o-input-group.twig +5 -0
- package/objects/o-nav/README.md +2 -2
- package/objects/o-nav/o-nav.horizontal.js +6 -6
- package/objects/o-nav/o-nav.prototype.js +17 -13
- package/objects/o-nav/o-nav.twig +29 -3
- package/objects/o-select-nav/o-select-nav.prototype.js +17 -0
- package/objects/o-select-nav/o-select-nav.twig +9 -0
- package/objects/o-social-list/o-social-list.prototype.js +21 -31
- package/objects/o-social-list/o-social-list.twig +10 -2
- package/objects/o-span-group/README.md +1 -0
- package/objects/o-span-group/o-span-group.prototype.js +11 -0
- package/objects/o-span-group/o-span-group.twig +5 -0
- package/objects/o-sponsored-by/o-sponsored-by.prototype.js +9 -10
- package/objects/o-sponsored-by/o-sponsored-by.twig +2 -2
- package/objects/o-story-arc-item/o-story-arc-item.prototype.js +29 -0
- package/objects/o-story-arc-item/o-story-arc-item.twig +9 -0
- package/objects/o-sub-header/o-sub-header.prototype.js +39 -0
- package/objects/o-sub-header/o-sub-header.twig +9 -0
- package/objects/o-tease/o-tease.prototype.js +24 -20
- package/objects/o-tease/o-tease.twig +7 -3
- package/objects/o-tease-list/o-tease-list.prototype.js +12 -24
- package/objects/o-tease-list/o-tease-list.twig +5 -1
- package/objects/o-video-card/o-video-card.prototype.js +45 -0
- package/objects/o-video-card/o-video-card.twig +67 -0
- package/package.json +6 -9
- package/pattern.html +61 -9
- package/style-guide/colors.html +33 -0
- package/style-guide/fonts.html +22 -0
- package/style-guide/index.html +14 -0
- package/components/c-button/c-button.scss +0 -33
- package/components/c-tagline/c-tagline.json +0 -4
- package/components/c-tagline/c-tagline.scss +0 -19
- package/objects/o-figure/o-figure.scss +0 -46
- package/objects/o-tease/o-tease.scss +0 -30
- 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 @@
|
|
|
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
|
|
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
|
-
|
|
3
|
+
const c_icon_prototype = require( './c-icon.prototype' );
|
|
4
|
+
const c_icon = clonedeep( c_icon_prototype );
|
|
6
5
|
|
|
7
|
-
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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 }}"
|
|
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,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,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
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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,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,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,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
|
+
{% 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
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{% if c_tagline_text %}
|
|
2
|
-
<p class="c-tagline {{ modifier_class }} {{ c_tagline_classes }}"
|
|
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 }}"
|
|
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
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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 }}"
|
|
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
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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
|
-
|
|
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
|
-
{
|
|
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
|
-
|
|
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
|
-
|
|
12
|
-
|
|
13
|
-
<
|
|
14
|
-
<
|
|
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,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.
|