@penskemediacorp/larva-patterns 1.9.0-alpha.0 → 1.10.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/section-heading/section-heading.h2.js +9 -0
- package/modules/section-heading/section-heading.h3.js +10 -0
- package/modules/section-heading/section-heading.prototype.js +14 -0
- package/modules/section-heading/section-heading.twig +8 -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 +14 -0
- package/objects/o-author/o-author.twig +17 -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,11 +1,10 @@
|
|
|
1
|
+
const clonedeep = require( 'lodash.clonedeep' );
|
|
2
|
+
|
|
3
|
+
const c_lazy_image = clonedeep( require( '../../components/c-lazy-image/c-lazy-image.prototype' ) );
|
|
4
|
+
|
|
1
5
|
module.exports = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
"o_figure_permalink_url": "#",
|
|
8
|
-
"o_figure_alt_text": "Thumbnail image",
|
|
9
|
-
"o_figure_image_url": "https://picsum.photos/57/11"
|
|
10
|
-
}
|
|
11
|
-
}
|
|
6
|
+
o_sponsored_by_classes: 'lrv-u-flex lrv-u-align-items-center',
|
|
7
|
+
o_sponsored_by_title_classes: 'lrv-u-font-size-14 lrv-u-margin-r-050 lrv-u-font-style-italic',
|
|
8
|
+
o_sponsored_by_text: 'Sponsored by',
|
|
9
|
+
c_lazy_image: c_lazy_image
|
|
10
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<div class="o-sponsored-by {{ modifier_class }} {{ o_sponsored_by_classes }}">
|
|
2
2
|
<span class="{{ o_sponsored_by_title_classes }}">{{ o_sponsored_by_text }}</span>
|
|
3
3
|
|
|
4
|
-
{% if
|
|
5
|
-
{% include "@larva/
|
|
4
|
+
{% if c_lazy_image %}
|
|
5
|
+
{% include "@larva/components/c-lazy-image/c-lazy-image.twig" with c_lazy_image %}
|
|
6
6
|
{% endif %}
|
|
7
7
|
</div>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
const clonedeep = require( 'lodash.clonedeep' );
|
|
2
|
+
|
|
3
|
+
const c_timestamp_prototype = require( '../../components/c-timestamp/c-timestamp.prototype' );
|
|
4
|
+
const o_tease_prototype = require( '../o-tease/o-tease.prototype.js' );
|
|
5
|
+
|
|
6
|
+
const c_timestamp = clonedeep( c_timestamp_prototype );
|
|
7
|
+
const o_tease = clonedeep( o_tease_prototype );
|
|
8
|
+
|
|
9
|
+
c_timestamp.c_timestamp_classes = "lrv-u-font-family-primary lrv-u-background-color-body lrv-u-font-weight-bold lrv-u-font-size-12 lrv-u-color-brand-primary";
|
|
10
|
+
|
|
11
|
+
o_tease.c_tagline = false;
|
|
12
|
+
o_tease.c_heading = false;
|
|
13
|
+
o_tease.c_button = false;
|
|
14
|
+
o_tease.c_span = false;
|
|
15
|
+
|
|
16
|
+
o_tease.o_tease_classes += ' u-align-items-flex-start@mobile-max u-flex-direction-row-reverse';
|
|
17
|
+
o_tease.o_tease_secondary_classes += ' lrv-u-margin-r-1 u-width-65';
|
|
18
|
+
|
|
19
|
+
o_tease.c_lazy_image.c_lazy_image_img_classes += ' lrv-u-border-radius-5 u-box-shadow-light';
|
|
20
|
+
o_tease.c_lazy_image.c_lazy_image_crop_class = 'lrv-a-crop-1x1';
|
|
21
|
+
|
|
22
|
+
o_tease.c_title.c_title_text = 'Art Basel Plans ‘Interventions’ for 50th Anniversary, with Kasper König in Charge';
|
|
23
|
+
o_tease.c_title.c_title_classes = 'lrv-u-font-family-primary lrv-u-font-size-14 lrv-u-font-size-16@desktop u-color-black lrv-u-font-weight-normal';
|
|
24
|
+
|
|
25
|
+
module.exports = {
|
|
26
|
+
o_story_arc_item_classes: '',
|
|
27
|
+
c_timestamp: c_timestamp,
|
|
28
|
+
o_tease: o_tease,
|
|
29
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<div class="{{ o_story_arc_item_classes }}">
|
|
2
|
+
<span class="a-span-sandwich lrv-u-margin-b-1">
|
|
3
|
+
{% if c_timestamp %}
|
|
4
|
+
{% include "@larva/components/c-timestamp/c-timestamp.twig" with c_timestamp %}
|
|
5
|
+
{% endif %}
|
|
6
|
+
</span>
|
|
7
|
+
|
|
8
|
+
{% include "@larva/objects/o-tease/o-tease.twig" with o_tease %}
|
|
9
|
+
</div>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
const clonedeep = require( 'lodash.clonedeep' );
|
|
2
|
+
|
|
3
|
+
const c_heading_prototype = require( '@penskemediacorp/larva-patterns/components/c-heading/c-heading.prototype.js' );
|
|
4
|
+
const c_heading = clonedeep( c_heading_prototype );
|
|
5
|
+
|
|
6
|
+
const o_nav_prototype = require( '@penskemediacorp/larva-patterns/objects/o-nav/o-nav.prototype' );
|
|
7
|
+
const o_nav = clonedeep( o_nav_prototype );
|
|
8
|
+
|
|
9
|
+
const o_nav_items_c_links__prototype = require( '@penskemediacorp/larva-patterns/components/c-link/c-link.prototype.js' );
|
|
10
|
+
|
|
11
|
+
c_heading.c_heading_text = 'Market';
|
|
12
|
+
c_heading.c_heading_classes = 'lrv-u-font-family-secondary lrv-u-font-size-56@desktop-xl lrv-u-font-size-50 lrv-u-margin-b-050@mobile-max lrv-u-line-height-small lrv-u-text-align-center@mobile-max lrv-u-margin-r-2@desktop';
|
|
13
|
+
c_heading.c_heading_is_primary_heading = true;
|
|
14
|
+
|
|
15
|
+
o_nav.o_nav_list_items = [];
|
|
16
|
+
const menuLinks = [ 'View All', 'Tag Title', 'Tag Title', 'Tag Title', 'Tag Title', 'Tag Title' ];
|
|
17
|
+
|
|
18
|
+
for (let i = 0; i < menuLinks.length; i++) {
|
|
19
|
+
let c_link = clonedeep( o_nav_items_c_links__prototype );
|
|
20
|
+
|
|
21
|
+
c_link.c_link_text = menuLinks[i];
|
|
22
|
+
c_link.c_link_classes += ' c_link_classes lrv-u-font-family-primary lrv-u-color-grey-dark:hover';
|
|
23
|
+
|
|
24
|
+
o_nav.o_nav_list_items.push( c_link );
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const mobileDropdownUtilities = ' lrv-u-border-a-1@mobile-max lrv-u-justify-content-center lrv-u-margin-b-050@mobile-max lrv-u-border-color-grey-light';
|
|
28
|
+
|
|
29
|
+
o_nav.o_nav_classes = 'lrv-u-flex@desktop lrv-u-align-items-center lrv-u-text-align-center lrv-js-MobileHeightToggle';
|
|
30
|
+
o_nav.o_nav_title_text = 'View Categories';
|
|
31
|
+
o_nav.o_nav_title_classes = 'lrv-a-hidden@desktop lrv-js-MobileHeightToggle-trigger lrv-a-icon-after lrv-a-icon-arrow-down lrv-u-font-size-16 lrv-u-font-family-primary lrv-u-font-weight-normal lrv-u-padding-tb-050 lrv-u-width-100p@mobile-max ' + mobileDropdownUtilities;
|
|
32
|
+
o_nav.o_nav_list_classes += ' lrv-js-MobileHeightToggle-target lrv-u-flex lrv-u-flex-direction-column@mobile-max lrv-u-line-height-large lrv-u-flex-wrap-wrap lrv-a-space-children--1 lrv-a-space-children-horizontal@tablet';
|
|
33
|
+
o_nav.o_nav_list_item_classes = mobileDropdownUtilities;
|
|
34
|
+
|
|
35
|
+
module.exports = {
|
|
36
|
+
o_sub_header_classes: 'lrv-u-flex u-align-items-flex-end@tablet lrv-u-flex-direction-column@mobile-max',
|
|
37
|
+
c_heading: c_heading,
|
|
38
|
+
o_nav: o_nav,
|
|
39
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<header class="o-sub-header // {{ o_sub_header_classes }}">
|
|
2
|
+
{% if c_heading %}
|
|
3
|
+
{% include "@larva/components/c-heading/c-heading.twig" with c_heading %}
|
|
4
|
+
{% endif %}
|
|
5
|
+
|
|
6
|
+
{% if o_nav %}
|
|
7
|
+
{% include "@larva/objects/o-nav/o-nav.twig" with o_nav %}
|
|
8
|
+
{% endif %}
|
|
9
|
+
</header>
|
|
@@ -1,22 +1,26 @@
|
|
|
1
|
+
const clonedeep = require( 'lodash.clonedeep' );
|
|
2
|
+
|
|
3
|
+
const c_lazy_image = clonedeep( require( '../../components/c-lazy-image/c-lazy-image.prototype' ) );
|
|
4
|
+
const c_title = clonedeep( require( '../../components/c-title/c-title.prototype' ) );
|
|
5
|
+
const c_tagline = clonedeep( require( '../../components/c-tagline/c-tagline.prototype' ) );
|
|
6
|
+
const c_heading = clonedeep( require( '../../components/c-heading/c-heading.prototype' ) );
|
|
7
|
+
|
|
8
|
+
c_title.c_title_url = false;
|
|
9
|
+
|
|
10
|
+
c_heading.c_heading_url = false;
|
|
11
|
+
|
|
12
|
+
c_lazy_image.c_lazy_image_link_url = false;
|
|
13
|
+
c_lazy_image.c_lazy_image_crop_class = 'lrv-a-crop-3x2';
|
|
14
|
+
c_lazy_image.c_lazy_image_alt_attr = 'Post tease thumbnail image';
|
|
15
|
+
|
|
1
16
|
module.exports = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
},
|
|
12
|
-
"c_tagline": {
|
|
13
|
-
"c_tagline_classes": "",
|
|
14
|
-
"c_tagline_markup": "here is title text from o-tease.json"
|
|
15
|
-
},
|
|
16
|
-
"o_figure": {
|
|
17
|
-
"o_figure_crop_class": "pmc-u-crop-2x3",
|
|
18
|
-
"o_figure_alt_attr": "Thumbnail image",
|
|
19
|
-
"o_figure_image_url": "https://picsum.photos/100/100",
|
|
20
|
-
"o_figure_caption_text": "Here in o-tease"
|
|
21
|
-
}
|
|
17
|
+
o_tease_url: '#',
|
|
18
|
+
o_tease_classes: 'lrv-u-flex lrv-u-align-items-center',
|
|
19
|
+
o_tease_link_classes: 'lrv-u-display-contents',
|
|
20
|
+
o_tease_primary_classes: 'lrv-u-flex-grow-1',
|
|
21
|
+
o_tease_secondary_classes: 'lrv-u-flex-shrink-0 lrv-u-width-30p',
|
|
22
|
+
c_heading: c_heading,
|
|
23
|
+
c_title: c_title,
|
|
24
|
+
c_tagline: c_tagline,
|
|
25
|
+
c_lazy_image: c_lazy_image
|
|
22
26
|
};
|
|
@@ -5,9 +5,13 @@
|
|
|
5
5
|
{% endif %}
|
|
6
6
|
|
|
7
7
|
{% if o_tease_url %}
|
|
8
|
-
<a href="{{ o_tease_url }}" class="
|
|
8
|
+
<a href="{{ o_tease_url }}" class="{{ o_tease_link_classes }}">
|
|
9
9
|
{% endif %}
|
|
10
10
|
<div class="o-tease__primary {{ o_tease_primary_classes }}">
|
|
11
|
+
{% if c_span %}
|
|
12
|
+
{% include "@larva/components/c-span/c-span.twig" with c_span %}
|
|
13
|
+
{% endif %}
|
|
14
|
+
|
|
11
15
|
{% if c_heading %}
|
|
12
16
|
{% include "@larva/components/c-heading/c-heading.twig" with c_heading %}
|
|
13
17
|
{% endif %}
|
|
@@ -29,9 +33,9 @@
|
|
|
29
33
|
{% endif %}
|
|
30
34
|
</div>
|
|
31
35
|
|
|
32
|
-
{% if
|
|
36
|
+
{% if c_lazy_image %}
|
|
33
37
|
<div class="o-tease__secondary {{ o_tease_secondary_classes }}">
|
|
34
|
-
{% include "@larva/
|
|
38
|
+
{% include "@larva/components/c-lazy-image/c-lazy-image.twig" with c_lazy_image %}
|
|
35
39
|
</div>
|
|
36
40
|
{% endif %}
|
|
37
41
|
|
|
@@ -1,26 +1,14 @@
|
|
|
1
|
+
const clonedeep = require( 'lodash.clonedeep' );
|
|
2
|
+
|
|
3
|
+
const o_tease = clonedeep( require( '../o-tease/o-tease.prototype' ) );
|
|
4
|
+
|
|
1
5
|
module.exports = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"o_figure_crop_class": "pmc-a-crop-16x9",
|
|
10
|
-
"o_figure_alt_attr": "Thumbnail image",
|
|
11
|
-
"o_figure_image_url": "https://picsum.photos/200/300"
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
"c_title": {
|
|
16
|
-
"c_title_text": "Story list item 2"
|
|
17
|
-
},
|
|
18
|
-
"o_figure": {
|
|
19
|
-
"o_figure_crop_class": "pmc-a-crop-16x9",
|
|
20
|
-
"o_figure_permalink_url": "https://notlaura.com",
|
|
21
|
-
"o_figure_alt_attr": "Thumbnail image",
|
|
22
|
-
"o_figure_image_url": "https://picsum.photos/300/300"
|
|
23
|
-
}
|
|
24
|
-
}
|
|
6
|
+
o_tease_list_classes: 'lrv-a-unstyle-list',
|
|
7
|
+
o_tease_list_labelledby_attr: '',
|
|
8
|
+
o_tease_list_item_classes: '',
|
|
9
|
+
o_tease_list_items: [
|
|
10
|
+
o_tease,
|
|
11
|
+
o_tease,
|
|
12
|
+
o_tease
|
|
25
13
|
]
|
|
26
|
-
}
|
|
14
|
+
};
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
<ul class="o-tease-list {{ modifier_class }} {{ o_tease_list_classes }}"
|
|
1
|
+
<ul class="o-tease-list {{ modifier_class }} {{ o_tease_list_classes }}"
|
|
2
|
+
{% if o_tease_list_labelledby_attr %}
|
|
3
|
+
aria-labelledby="{{ o_tease_list_labelledby_attr }}"
|
|
4
|
+
{% endif %}
|
|
5
|
+
>
|
|
2
6
|
{% for item in o_tease_list_items %}
|
|
3
7
|
<li class="o-tease-list__item {{ o_tease_list_item_classes }}">
|
|
4
8
|
{% include "@larva/objects/o-tease/o-tease.twig" with item %}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
const clonedeep = require( 'lodash.clonedeep' );
|
|
2
|
+
|
|
3
|
+
const c_play_icon_prototype = require( '../../components/c-play-badge/c-play-badge.prototype.js' );
|
|
4
|
+
const c_play_icon = clonedeep( c_play_icon_prototype );
|
|
5
|
+
|
|
6
|
+
const o_indicator_prototype = require( '../o-indicator/o-indicator.prototype.js' );
|
|
7
|
+
const o_indicator = clonedeep( o_indicator_prototype );
|
|
8
|
+
|
|
9
|
+
const c_heading_prototype = require( '../../components/c-heading/c-heading.prototype.js' );
|
|
10
|
+
const c_heading = clonedeep( c_heading_prototype );
|
|
11
|
+
|
|
12
|
+
const c_span_prototype = require( '../../components/c-span/c-span.prototype.js' );
|
|
13
|
+
const c_span = clonedeep( c_span_prototype );
|
|
14
|
+
|
|
15
|
+
const c_dek_prototype = require( '../../components/c-dek/c-dek.prototype.js' );
|
|
16
|
+
const c_dek = clonedeep( c_dek_prototype );
|
|
17
|
+
|
|
18
|
+
c_play_icon.c_play_badge_classes = 'lrv-a-glue lrv-a-glue--b-0 u-transform-translate-a-n50p u-width-55 u-height-55 is-to-be-hidden';
|
|
19
|
+
c_play_icon.c_play_badge_background_fill_classes = 'lrv-u-background-color-transparent';
|
|
20
|
+
|
|
21
|
+
o_indicator.o_indicator_classes = 'lrv-u-margin-b-025 u-margin-t-050@tablet';
|
|
22
|
+
|
|
23
|
+
c_dek.c_dek_classes = 'lrv-u-display-none js-VideoShowcasePlayerDek';
|
|
24
|
+
|
|
25
|
+
module.exports = {
|
|
26
|
+
o_video_card_permalink_url: "#single_url",
|
|
27
|
+
o_video_card_alt_attr: "Thumbnail image",
|
|
28
|
+
o_video_card_image_url: "https://source.unsplash.com/random/595x333",
|
|
29
|
+
o_video_card_lazy_image_url: 'https://source.unsplash.com/random/595x333',
|
|
30
|
+
o_video_card_caption_text: "Here is some caption text",
|
|
31
|
+
o_video_card_link_showcase_trigger_data_attr: "<div class='embed-youtube'><iframe title='Spring - Blender Open Movie' width='500' height='281' src='https://www.youtube.com/embed/WhWc3b3KhnY?feature=oembed&autoplay=1&mute=1' frameborder='0' allow='accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture' allowfullscreen=''></iframe></div>",
|
|
32
|
+
o_video_card_link_showcase_type_data_attr: "oembed",
|
|
33
|
+
o_video_card_link_showcase_permalink_data_url: "#url_test",
|
|
34
|
+
modifier_class: "",
|
|
35
|
+
o_video_card_classes: 'u-background-color-picked-bluewood u-margin-r-1@tablet lrv-u-justify-content-space-between',
|
|
36
|
+
o_video_card_crop_class: "lrv-a-crop-16x9 lrv-a-glue-parent c-play-badge-parent",
|
|
37
|
+
o_video_card_image_classes: "is-to-be-hidden lrv-u-display-block",
|
|
38
|
+
o_video_card_is_player: true,
|
|
39
|
+
c_label: "",
|
|
40
|
+
o_video_card_crop_data_attr: "",
|
|
41
|
+
o_video_card_meta_classes: 'lrv-u-flex lrv-u-flex-direction-column lrv-u-width-100p u-padding-lr-075@mobile-max lrv-u-padding-tb-050 u-position-relative',
|
|
42
|
+
o_video_card_link_classes: 'lrv-u-width-100p',
|
|
43
|
+
o_video_card_permalink_classes: 'u-margin-r-050@mobile-max',
|
|
44
|
+
c_play_icon,
|
|
45
|
+
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
<div tabindex="0"
|
|
2
|
+
class="o-video-card__link // {{ o_video_card_link_classes }}" data-video-showcase-trigger="{{ o_video_card_link_showcase_trigger_data_attr }}" data-video-showcase-type="{{ o_video_card_link_showcase_type_data_attr }}" data-video-showcase-dek="{{ o_video_card_link_showcase_dek_data_attr }}" data-video-showcase-title="{{ o_video_card_link_showcase_title_data_attr }}" data-video-showcase-permalink="{{ o_video_card_link_showcase_permalink_data_url }}" data-video-showcase-time="{{ o_video_card_link_showcase_time_data_attr }}">
|
|
3
|
+
|
|
4
|
+
<div class="o-video-card {{ modifier_class }} {{ o_video_card_classes }}" data-video-showcase-autoplay="{{ o_video_card_link_showcase_autoplay_data_attr }}" data-video-showcase-player>
|
|
5
|
+
|
|
6
|
+
{% if o_video_card_crop_class %}
|
|
7
|
+
<div class="{{ o_video_card_crop_class }}" data-video-showcase-active-text="{{ o_video_card_crop_data_attr }}">
|
|
8
|
+
{% endif %}
|
|
9
|
+
|
|
10
|
+
{% if o_video_card_permalink_url %}
|
|
11
|
+
<a href="{{ o_video_card_permalink_url }}" class="{{ o_video_card_permalink_classes }}">
|
|
12
|
+
{% endif %}
|
|
13
|
+
<img class="o-video-card__image {{ o_video_card_image_classes }}" data-lazy-src="{{ o_video_card_image_url }}" src="{{ o_video_card_lazy_image_url }}" alt="{{ o_video_card_alt_attr }}">
|
|
14
|
+
{% if o_video_card_permalink_url %}
|
|
15
|
+
</a>
|
|
16
|
+
{% endif %}
|
|
17
|
+
|
|
18
|
+
{% if o_video_card_is_player %}
|
|
19
|
+
<iframe class="js-VideoShowcasePlayerIframe" title="video" hidden frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture; fullscreen" data-video-showcase-iframe></iframe>
|
|
20
|
+
{% if o_video_card_id_attr %}
|
|
21
|
+
<div hidden id="{{ o_video_card_id_attr }}" data-video-showcase-jwplayer></div>
|
|
22
|
+
{% else %}
|
|
23
|
+
<div hidden id="jwplayerContainer" data-video-showcase-jwplayer></div>
|
|
24
|
+
{% endif %}
|
|
25
|
+
|
|
26
|
+
<div class="js-VideoShowcasePlayerOembed" hidden data-video-showcase-oembed></div>
|
|
27
|
+
{% endif %}
|
|
28
|
+
|
|
29
|
+
{% if c_play_icon %}
|
|
30
|
+
{% if o_video_card_permalink_url %}
|
|
31
|
+
<a href="{{ o_video_card_permalink_url }}">
|
|
32
|
+
{% endif %}
|
|
33
|
+
{% include "@larva/components/c-play-badge/c-play-badge.twig" with c_play_icon %}
|
|
34
|
+
{% if o_video_card_permalink_url %}
|
|
35
|
+
</a>
|
|
36
|
+
{% endif %}
|
|
37
|
+
{% endif %}
|
|
38
|
+
|
|
39
|
+
{% if o_video_card_crop_class %}
|
|
40
|
+
</div>
|
|
41
|
+
{% endif %}
|
|
42
|
+
|
|
43
|
+
<div class="o-video-card__meta // {{ o_video_card_meta_classes }}">
|
|
44
|
+
{% if o_indicator %}
|
|
45
|
+
{% include "@larva/objects/o-indicator/o-indicator.twig" with o_indicator %}
|
|
46
|
+
{% endif %}
|
|
47
|
+
|
|
48
|
+
{% if o_category_link %}
|
|
49
|
+
{% include "@larva/objects/o-category-link/o-category-link.twig" with o_category_link %}
|
|
50
|
+
{% endif %}
|
|
51
|
+
|
|
52
|
+
{% if c_heading %}
|
|
53
|
+
{% include "@larva/components/c-heading/c-heading.twig" with c_heading %}
|
|
54
|
+
{% endif %}
|
|
55
|
+
|
|
56
|
+
{% if c_dek %}
|
|
57
|
+
{% include "@larva/components/c-dek/c-dek.twig" with c_dek %}
|
|
58
|
+
{% endif %}
|
|
59
|
+
|
|
60
|
+
{% if c_span %}
|
|
61
|
+
{% include "@larva/components/c-span/c-span.twig" with c_span %}
|
|
62
|
+
{% endif %}
|
|
63
|
+
</div>
|
|
64
|
+
|
|
65
|
+
</div>
|
|
66
|
+
|
|
67
|
+
</div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@penskemediacorp/larva-patterns",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.10.0",
|
|
4
4
|
"description": "Larva markup patterns.",
|
|
5
5
|
"author": "laras126 <laras126@gmail.com>",
|
|
6
6
|
"homepage": "https://github.com/Penske-Media-Corp/pmc-larva/tree/master/packages/patterns#readme",
|
|
@@ -20,13 +20,10 @@
|
|
|
20
20
|
"url": "https://github.com/Penske-Media-Corp/pmc-larva/issues"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@penskemediacorp/larva": "^1.
|
|
24
|
-
"@penskemediacorp/larva-
|
|
25
|
-
"@penskemediacorp/larva-
|
|
26
|
-
"
|
|
23
|
+
"@penskemediacorp/larva-css": "^1.10.0",
|
|
24
|
+
"@penskemediacorp/larva-js": "^1.10.0",
|
|
25
|
+
"@penskemediacorp/larva-svg": "^1.10.0",
|
|
26
|
+
"lodash.clonedeep": "^4.5.0"
|
|
27
27
|
},
|
|
28
|
-
"
|
|
29
|
-
"stylelint": "^10.1.0"
|
|
30
|
-
},
|
|
31
|
-
"gitHead": "da8d0ff6592f8d36a9a1f20760a4c8385f5d38c9"
|
|
28
|
+
"gitHead": "52e2d2a7e62179621ff7b5a353657faca2a9230c"
|
|
32
29
|
}
|
package/pattern.html
CHANGED
|
@@ -1,16 +1,68 @@
|
|
|
1
1
|
{% extends "base.html" %}
|
|
2
2
|
|
|
3
3
|
{% block content %}
|
|
4
|
-
|
|
5
|
-
{
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
{% if 'components' == type or 'modules' == type or 'objects' == type %}
|
|
5
|
+
{% set ext = '.twig' %}
|
|
6
|
+
{% else %}
|
|
7
|
+
{% set ext = '.html' %}
|
|
8
|
+
{% endif %}
|
|
9
|
+
|
|
10
|
+
{% set path = type ~"/" ~ name ~ "/" ~ name ~ ext %}
|
|
11
|
+
|
|
12
|
+
<header class="lrv-u-background-color-grey-light lrv-u-padding-a-1 js-LarvaUiToggle-panel">
|
|
13
|
+
<h1 class="lrv-u-font-family-basic lrv-u-margin-a-00">{{ source ~ ' ' ~ type ~ ': ' }}<code>{{ name }}{{ variant ? '.' ~ variant }}</code></h1>
|
|
14
|
+
<div class="lrv-u-flex lrv-u-align-items-center lrv-a-space-children-horizontal lrv-a-space-children--1">
|
|
15
|
+
<h2>Available Variants</h2>
|
|
16
|
+
{% for item in variants %}
|
|
17
|
+
{% set slug = item == 'prototype' ? '' : item %}
|
|
18
|
+
{% set link = "/" ~ source ~ "/" ~ type ~ "/" ~ name ~ "/" ~ slug %}
|
|
19
|
+
{% set current_class = variant == item ? 'lrv-u-background-color-brand-primary lrv-u-color-white lrv-u-color-white:hover' : '' %}
|
|
20
|
+
|
|
21
|
+
<a href="{{ link }}" class="lrv-u-padding-a-050 {{ current_class }}">{{ item }}</a>
|
|
22
|
+
{% endfor %}
|
|
23
|
+
</div>
|
|
24
|
+
</header>
|
|
25
|
+
|
|
26
|
+
{% if data.error %}
|
|
27
|
+
<div class="lrv-a-wrapper">
|
|
28
|
+
<h2 style="color: red;">
|
|
29
|
+
{{ data.message|raw }}
|
|
30
|
+
</h2>
|
|
31
|
+
<code>{{ data.error.message }}</code>
|
|
32
|
+
<pre>
|
|
33
|
+
{{ data.error.stack }}
|
|
34
|
+
</pre>
|
|
35
|
+
</div>
|
|
36
|
+
{% else %}
|
|
37
|
+
{% include path with data %}
|
|
38
|
+
{% endif %}
|
|
39
|
+
|
|
40
|
+
<div class="lrv-u-background-color-grey-light lrv-a-grid lrv-u-font-size-12 lrv-u-border-t-1 lrv-u-border-color-grey lrv-u-padding-a-2 js-LarvaUiToggle-panel">
|
|
41
|
+
<details>
|
|
42
|
+
<summary class="lrv-u-font-size-24 lrv-u-cursor-pointer"><code>{{ name }}</code> README</summary>
|
|
43
|
+
<div class="lrv-u-padding-a-1 lrv-u-background-color-white lrv-u-font-size-16">
|
|
44
|
+
{{ source( "@" ~ source ~ "/" ~ type ~"/" ~ name ~ "/" ~ 'README.md', true )|markdown|raw }}
|
|
45
|
+
</div>
|
|
46
|
+
</details>
|
|
47
|
+
<details>
|
|
48
|
+
{% if type == 'one-offs' %}
|
|
49
|
+
<summary class="lrv-u-font-size-24 lrv-u-cursor-pointer"><code>{{ name }}</code> HTML <small class="lrv-u-font-size-16">Dummy HTML for development.</small></summary>
|
|
50
|
+
{% else %}
|
|
51
|
+
<summary class="lrv-u-font-size-24 lrv-u-cursor-pointer"><code>{{ name }}</code> Twig <small class="lrv-u-font-size-16">The markup file.</small></summary>
|
|
52
|
+
{% endif %}
|
|
53
|
+
|
|
54
|
+
<pre class="lrv-a-wrapper language-twig"><code>{{ source( path )|escape }}</code></pre>
|
|
55
|
+
</details>
|
|
56
|
+
|
|
57
|
+
{% if type != 'algorithms' %}
|
|
58
|
+
<details>
|
|
59
|
+
<summary class="lrv-u-font-size-24 lrv-u-cursor-pointer"><code>{{ name }}{{ variant ? '.' ~ variant }}</code> JSON <small class="lrv-u-font-size-16">The data object for this pattern.</small></summary>
|
|
60
|
+
<pre class="lrv-a-wrapper language-json"><code>{{ json_pretty|raw }}</code></pre>
|
|
61
|
+
</details>
|
|
62
|
+
{% endif %}
|
|
10
63
|
|
|
11
|
-
|
|
64
|
+
{% if type == 'algorithms' %}
|
|
12
65
|
|
|
13
|
-
|
|
14
|
-
<pre class="pmc-a-wrapper language-json"><code>{{ json_pretty|raw }}</code></pre>
|
|
66
|
+
{% endif %}
|
|
15
67
|
</div>
|
|
16
68
|
{% endblock %}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<section>
|
|
2
|
+
<h2 style="background-color: whitesmoke;" class="lrv-u-padding-a-1 lrv-u-margin-b-2">Text Colors</h2>
|
|
3
|
+
<div class="lrv-a-grid lrv-a-cols3 lrv-a-cols4@tablet lrv-u-margin-tb-1">
|
|
4
|
+
{% for class in colors.color %}
|
|
5
|
+
<div class="lrv-u-flex lrv-u-flex-direction-column">
|
|
6
|
+
<strong class="lrv-u-width-100 {{ class }}">Here is some text</strong>
|
|
7
|
+
<p><code>.{{ class }}</code></p>
|
|
8
|
+
</div>
|
|
9
|
+
{% endfor %}
|
|
10
|
+
</div>
|
|
11
|
+
</section>
|
|
12
|
+
<section>
|
|
13
|
+
<h2 style="background-color: whitesmoke;" class="lrv-u-padding-a-1 lrv-u-margin-b-2">Border Colors</h2>
|
|
14
|
+
<div class="lrv-a-grid lrv-a-cols3 lrv-a-cols4@tablet lrv-u-margin-tb-1">
|
|
15
|
+
{% for class in colors['border-color'] %}
|
|
16
|
+
<div class="lrv-u-flex lrv-u-flex-direction-column">
|
|
17
|
+
<div class="lrv-u-width-100 lrv-u-padding-a-025 lrv-u-border-a-3 {{ class }}"></div>
|
|
18
|
+
<p><code>.{{ class }}</code></p>
|
|
19
|
+
</div>
|
|
20
|
+
{% endfor %}
|
|
21
|
+
</div>
|
|
22
|
+
</section>
|
|
23
|
+
<section>
|
|
24
|
+
<h2 style="background-color: whitesmoke;" class="lrv-u-padding-a-1 lrv-u-margin-b-2">Background Colors</h2>
|
|
25
|
+
<div class="lrv-a-grid lrv-a-cols3 lrv-u-margin-tb-1">
|
|
26
|
+
{% for class in colors['background-color'] %}
|
|
27
|
+
<div class="lrv-u-flex lrv-u-flex-direction-column">
|
|
28
|
+
<div class="lrv-u-width-100 lrv-u-border-a-1 lrv-u-padding-a-1 {{ class }}"></div>
|
|
29
|
+
<p><code>.{{ class }}</code></p>
|
|
30
|
+
</div>
|
|
31
|
+
{% endfor %}
|
|
32
|
+
</div>
|
|
33
|
+
</section>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{% if not font_styles %}
|
|
2
|
+
<section class="lrv-a-wrapper lrv-u-width-50p lrv-u-color-white lrv-u-margin-tb-2 lrv-u-padding-a-1 lrv-u-background-color-grey-darkest">
|
|
3
|
+
{% set url = 'https://' ~ brand ~ '.larva.pmcdev.io/project/__tests__/style-guide' %}
|
|
4
|
+
<h2>This brand does not have typography tokens yet.</h2>
|
|
5
|
+
<p>Visit this documentation to learn how to set them up in Larva, and in the mean time, the brand's typography styles may be available at the legacy URL:</p>
|
|
6
|
+
<a href="{{url}}">{{url}}</a></p>
|
|
7
|
+
</section>
|
|
8
|
+
|
|
9
|
+
{% endif %}
|
|
10
|
+
|
|
11
|
+
{% for key, sizes in font_styles %}
|
|
12
|
+
<div class="lrv-u-border-t-1 lrv-u-padding-b-2">
|
|
13
|
+
<h2 class="lrv-u-padding-a-1" style="background-color: lemonchiffon;">{{ key }}</h2>
|
|
14
|
+
|
|
15
|
+
{% for class in sizes %}
|
|
16
|
+
<div class="lrv-u-border-b-1 lrv-u-border-color-grey lrv-u-margin-t-1">
|
|
17
|
+
<code>.{{class}}</code>
|
|
18
|
+
<p class="{{ class }}">Each of us knows a little, together we know a lot.</p>
|
|
19
|
+
</div>
|
|
20
|
+
{% endfor %}
|
|
21
|
+
</div>
|
|
22
|
+
{% endfor %}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{% extends "base.html" %}
|
|
2
|
+
|
|
3
|
+
{% block content %}
|
|
4
|
+
<div class="lrv-a-wrapper">
|
|
5
|
+
<header class="lrv-u-margin-tb-1">
|
|
6
|
+
<h1>Style Guide for <code class="lrv-u-background-color-grey-dark lrv-u-border-radius-5 lrv-u-padding-lr-050 lrv-u-padding-tb-025 lrv-u-color-white">{{brand}}</code></h1>
|
|
7
|
+
<p>This style guide is generated from design tokens. The correct way to set up and customize the style guide is outlined in <a href="https://confluence.pmcdev.io/x/TgmeAw"><u>this Confluence Page</u></a>.</p>
|
|
8
|
+
</header>
|
|
9
|
+
{% include "style-guide/fonts.html" %}
|
|
10
|
+
{% include "style-guide/colors.html" %}
|
|
11
|
+
{% block elements %}
|
|
12
|
+
{% endblock elements %}
|
|
13
|
+
</div>
|
|
14
|
+
{% endblock content %}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
// Button
|
|
2
|
-
//
|
|
3
|
-
// .c-button--block - Used on previous next, etc.
|
|
4
|
-
// .c-button--plain - Plain button.
|
|
5
|
-
//
|
|
6
|
-
// Markup: c-button.twig
|
|
7
|
-
//
|
|
8
|
-
// Style Guide: Components.Button
|
|
9
|
-
|
|
10
|
-
@import '~@setup';
|
|
11
|
-
|
|
12
|
-
.c-button {
|
|
13
|
-
@include _button-base( $color: $color-red-31, $color-hover: $color-red-18 );
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.c-button--block {
|
|
17
|
-
background-color: $color-red-31;
|
|
18
|
-
box-shadow: $shadow-light;
|
|
19
|
-
color: $color-white;
|
|
20
|
-
border: none;
|
|
21
|
-
border-radius: 0;
|
|
22
|
-
transition: box-shadow $transition-button;
|
|
23
|
-
|
|
24
|
-
&:hover {
|
|
25
|
-
color: $color-white;
|
|
26
|
-
box-shadow: $shadow-dark;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.c-button--plain {
|
|
31
|
-
border: none;
|
|
32
|
-
border-radius: 0;
|
|
33
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
// Tagline
|
|
2
|
-
//
|
|
3
|
-
// Tagline supports both escaped text data as `c_tagline_text` and markup from `wp_kses_post` as `c_tagline_markup`.
|
|
4
|
-
//
|
|
5
|
-
// Markup: c-tagline.twig
|
|
6
|
-
//
|
|
7
|
-
// Style Guide: Components.Tagline
|
|
8
|
-
|
|
9
|
-
@import '~@setup';
|
|
10
|
-
|
|
11
|
-
.c-tagline,
|
|
12
|
-
.c-tagline > p {
|
|
13
|
-
margin-top: 0;
|
|
14
|
-
margin-bottom: $spacer-050;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.c-tagline--a-content__link a {
|
|
18
|
-
@include a-content__link( inherit );
|
|
19
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
// Figure
|
|
2
|
-
//
|
|
3
|
-
// This pattern should be applied to containers of `img` elements that use the .u-crop
|
|
4
|
-
// pattern. It will assume the width of it's parent and supports an optional cropping class,
|
|
5
|
-
// link wrapper, and a caption.
|
|
6
|
-
//
|
|
7
|
-
// .o-figure--circle - Should be used in conjunction with pmc-u-crop-1x1 for the crop class.
|
|
8
|
-
//
|
|
9
|
-
// Markup: o-figure.twig
|
|
10
|
-
//
|
|
11
|
-
// Style guide: Components.Figure
|
|
12
|
-
|
|
13
|
-
@import '../../../node_modules/@penskemediacorp/larva-scss/src/setup.scss';
|
|
14
|
-
|
|
15
|
-
.o-figure {
|
|
16
|
-
width: 100%;
|
|
17
|
-
display: block;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.o-figure--circle {
|
|
21
|
-
border-radius: 50%;
|
|
22
|
-
overflow: hidden;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.o-figure--embedded {
|
|
26
|
-
width: auto;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.o-figure__link {
|
|
30
|
-
@include pmc-unstyle-link;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.o-figure__image {
|
|
34
|
-
width: 100%;
|
|
35
|
-
height: auto;
|
|
36
|
-
display: block;
|
|
37
|
-
background-color: map-get( $semantic-color-list, grey-light );
|
|
38
|
-
transition: opacity $transition-thumbnail-hover;
|
|
39
|
-
|
|
40
|
-
// Prevent small movement when opacity changes on hover.
|
|
41
|
-
transform: translate3d( 0px, 0px, 0px ); // stylelint-disable-line unit-blacklist
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.o-figure__link:hover .o-figure__image {
|
|
45
|
-
opacity: 0.75;
|
|
46
|
-
}
|