@penskemediacorp/larva-patterns 1.28.0 → 1.28.1-alpha.141
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/algorithms/a-term-content-grid/README.md +1 -0
- package/algorithms/a-term-content-grid/a-term-content-grid.html +27 -0
- package/algorithms/a-term-content-grid/a-term-content-grid.prototype.js +11 -0
- package/components/c-nav-link/c-nav-link.twig +6 -0
- package/components/c-timestamp/c-timestamp.twig +3 -0
- package/components/c-title/c-title.twig +5 -1
- package/modules/article-timestamp/article-timestamp.prototype.js +1 -1
- package/modules/author/author.prototype.js +3 -3
- package/modules/author-blurb/author-blurb.prototype.js +3 -3
- package/modules/author-details/author-details.prototype.js +5 -5
- package/modules/badge/badge.prototype.js +1 -1
- package/modules/banner/banner.twig +12 -4
- package/modules/brands-most-popular/brands-most-popular.prototype.js +1 -0
- package/modules/breaking-news/breaking-news.prototype.js +2 -2
- package/modules/buy-now/buy-now.prototype.js +1 -1
- package/modules/container/container.prototype.js +1 -1
- package/modules/content-showcase/content-showcase.prototype.js +3 -3
- package/modules/content-showcase/content-showcase.the-moth.js +5 -5
- package/modules/fact-list/README.md +1 -0
- package/modules/fact-list/fact-list.prototype.js +21 -0
- package/modules/fact-list/fact-list.twig +14 -0
- package/modules/fact-list-item/README.md +1 -0
- package/modules/fact-list-item/fact-list-item.prototype.js +28 -0
- package/modules/fact-list-item/fact-list-item.thumbnail.js +13 -0
- package/modules/fact-list-item/fact-list-item.twig +17 -0
- package/modules/fact-list-menu/README.md +1 -0
- package/modules/fact-list-menu/fact-list-menu.prototype.js +40 -0
- package/modules/fact-list-menu/fact-list-menu.twig +11 -0
- package/modules/faq/faq.prototype.js +30 -0
- package/modules/faq/faq.twig +17 -0
- package/modules/footer-newsletter/footer-newsletter.prototype.js +7 -3
- package/modules/footer-tip/footer-tip.prototype.js +2 -2
- package/modules/heading/heading.twig +1 -1
- package/modules/how-we-test-products/how-we-test-products.prototype.js +50 -0
- package/modules/how-we-test-products/how-we-test-products.twig +19 -0
- package/modules/mega-menu-footer/mega-menu-footer.prototype.js +7 -0
- package/modules/mega-menu-footer/mega-menu-footer.twig +26 -4
- package/modules/mega-menu-item/mega-menu-item.twig +8 -2
- package/modules/multiple-products/multiple-products.prototype.js +20 -0
- package/modules/multiple-products/multiple-products.twig +14 -0
- package/modules/newsletter/newsletter.prototype.js +1 -1
- package/modules/newsletter-cta/newsletter-cta.prototype.js +1 -0
- package/modules/newsletter-cta/newsletter-cta.twig +1 -1
- package/modules/newswire/newswire.prototype.js +1 -0
- package/modules/page-404/page-404.smart.js +60 -0
- package/modules/page-404/page-404.twig +16 -0
- package/modules/paragraph/paragraph.prototype.js +1 -0
- package/modules/paragraph/paragraph.twig +6 -1
- package/modules/post-content-image/post-content-image.twig +1 -1
- package/modules/product-card/product-card.prototype.js +41 -0
- package/modules/product-card/product-card.twig +57 -0
- package/modules/product-grid/product-grid.prototype.js +46 -0
- package/modules/product-grid/product-grid.twig +21 -0
- package/modules/pros-and-cons/pros-and-cons.prototype.js +15 -0
- package/modules/pros-and-cons/pros-and-cons.twig +12 -0
- package/modules/section-heading/section-heading.h2.js +1 -1
- package/modules/section-heading/section-heading.h3.js +1 -1
- package/modules/separator/separator.prototype.js +1 -0
- package/modules/separator/separator.twig +1 -1
- package/modules/table-of-contents/table-of-contents.prototype.js +38 -0
- package/modules/table-of-contents/table-of-contents.twig +44 -0
- package/modules/tag-list/README.md +1 -0
- package/modules/tag-list/tag-list.prototype.js +42 -0
- package/modules/tag-list/tag-list.thumbnail.js +49 -0
- package/modules/tag-list/tag-list.twig +16 -0
- package/modules/term-content-top/README.md +1 -0
- package/modules/term-content-top/term-content-top.heading-tags.js +14 -0
- package/modules/term-content-top/term-content-top.prototype.js +73 -0
- package/modules/term-content-top/term-content-top.twig +22 -0
- package/objects/o-card/o-card.twig +5 -1
- package/objects/o-faq-item/o-faq-item.prototype.js +18 -0
- package/objects/o-faq-item/o-faq-item.twig +8 -0
- package/objects/o-multiple-product-item/o-multiple-product-item.prototype.js +18 -0
- package/objects/o-multiple-product-item/o-multiple-product-item.twig +25 -0
- package/objects/o-product-card/o-product-card.primary.js +9 -0
- package/objects/o-product-card/o-product-card.prototype.js +60 -0
- package/objects/o-product-card/o-product-card.twig +64 -0
- package/objects/o-video-card/o-video-card.twig +6 -1
- package/package.json +6 -6
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<div class="toc // {{ toc_classes }}" >
|
|
2
|
+
|
|
3
|
+
{% if c_heading %}
|
|
4
|
+
{% include "@larva/components/c-heading/c-heading.twig" with c_heading %}
|
|
5
|
+
{% endif %}
|
|
6
|
+
|
|
7
|
+
<nav class="toc-navigation // {{ toc_navigation_classes }}"
|
|
8
|
+
{% if nav_title_id_attr %}
|
|
9
|
+
aria-label="{{ nav_title_id_attr }}"
|
|
10
|
+
{% endif %}
|
|
11
|
+
{% if nav_list_labelledby_attr %}
|
|
12
|
+
aria-labelledby="{{ nav_list_labelledby_attr }}"
|
|
13
|
+
{% endif %}
|
|
14
|
+
>
|
|
15
|
+
|
|
16
|
+
<ul class="toc-list // {{ toc_list_classes }}">
|
|
17
|
+
{% for item in toc_list_items %}
|
|
18
|
+
<li class="toc-list-item // {{ toc_list_item_outer_classes }}">
|
|
19
|
+
{% include "@larva/components/c-nav-link/c-nav-link.twig" with item %}
|
|
20
|
+
</li>
|
|
21
|
+
{% endfor %}
|
|
22
|
+
</ul>
|
|
23
|
+
|
|
24
|
+
{% if toc_mobile_list_items %}
|
|
25
|
+
<ul class="toc-list-mobile // {{ toc_mobile_list_classes }}">
|
|
26
|
+
{% for item in toc_mobile_list_items %}
|
|
27
|
+
<li class="toc-list-item // {{ toc_mobile_list_item_outer_classes }}">
|
|
28
|
+
{% include "@larva/components/c-nav-link/c-nav-link.twig" with item %}
|
|
29
|
+
</li>
|
|
30
|
+
{% endfor %}
|
|
31
|
+
</ul>
|
|
32
|
+
{% endif %}
|
|
33
|
+
|
|
34
|
+
{% if nav_title_text %}
|
|
35
|
+
{% if nav_title_outer_classes %}
|
|
36
|
+
<div class="nav__title-outer {{ nav_title_outer_classes }}">
|
|
37
|
+
{% endif %}
|
|
38
|
+
<h4 id="{{ nav_title_id_attr }}" class="nav__title {{ nav_title_classes }}">{{ nav_title_text }}</h4>
|
|
39
|
+
{% if nav_title_outer_classes %}
|
|
40
|
+
</div>
|
|
41
|
+
{% endif %}
|
|
42
|
+
{% endif %}
|
|
43
|
+
</nav>
|
|
44
|
+
</div>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Renders a styled list of tags. Usage is associated with `pmc/term-content` plugin. A thumbnail variant is available to display tags with their corresponding thumbnails.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
const clonedeep = require( 'lodash.clonedeep');
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Larva includes.
|
|
5
|
+
*/
|
|
6
|
+
const c_span = clonedeep( require( '@penskemediacorp/larva-patterns/components/c-span/c-span.prototype' ) );
|
|
7
|
+
|
|
8
|
+
/* Generate a list of tag titles. */
|
|
9
|
+
const titles = [
|
|
10
|
+
'Music',
|
|
11
|
+
'Software Development',
|
|
12
|
+
'Data Science',
|
|
13
|
+
'Sustainable Agriculture',
|
|
14
|
+
'Art',
|
|
15
|
+
'Digital Marketing Strategies'
|
|
16
|
+
];
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Generate a list of `c_span` links.
|
|
20
|
+
* For demo purposes, append commas to all items except last in array.
|
|
21
|
+
*/
|
|
22
|
+
const tag_list_terms = Array.from( titles, ( title, index ) => ( {
|
|
23
|
+
c_span: {
|
|
24
|
+
...c_span,
|
|
25
|
+
c_span_classes: '',
|
|
26
|
+
c_span_link_classes: 'lrv-u-font-weight-bold lrv-u-color-black lrv-u-color-brand-primary:hover lrv-a-hover-effect',
|
|
27
|
+
c_span_text: `${title}${index === titles.length - 1 ? '' : ','}`,
|
|
28
|
+
c_span_url: `#test-link-${ index + 1 }`,
|
|
29
|
+
}
|
|
30
|
+
} ) );
|
|
31
|
+
|
|
32
|
+
module.exports = {
|
|
33
|
+
tag_list_classes: [
|
|
34
|
+
'lrv-a-unstyle-list',
|
|
35
|
+
'lrv-u-display-inline-flex',
|
|
36
|
+
'lrv-u-flex-wrap-wrap',
|
|
37
|
+
'lrv-u-flex-direction-row',
|
|
38
|
+
].join(' '),
|
|
39
|
+
tag_list_term_item_classes: 'lrv-u-margin-r-025',
|
|
40
|
+
tag_list_term_classes: '',
|
|
41
|
+
tag_list_terms,
|
|
42
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
const clonedeep = require( 'lodash.clonedeep' );
|
|
2
|
+
/**
|
|
3
|
+
* Larva includes.
|
|
4
|
+
*/
|
|
5
|
+
const c_lazy_image = clonedeep( require( '@penskemediacorp/larva-patterns/components/c-lazy-image/c-lazy-image.prototype.js' ) );
|
|
6
|
+
const tag_list = clonedeep( require( '@penskemediacorp/larva-patterns/modules/tag-list/tag-list.prototype' ) );
|
|
7
|
+
|
|
8
|
+
/* Update `c_span` styles and add thumbnail. */
|
|
9
|
+
const tag_list_terms = Array.from( tag_list.tag_list_terms, ( term, index ) => ( {
|
|
10
|
+
...term,
|
|
11
|
+
c_span: {
|
|
12
|
+
...term.c_span,
|
|
13
|
+
c_span_text: term.c_span.c_span_text.replace(/,\s*$/, ''),
|
|
14
|
+
c_span_classes: [
|
|
15
|
+
'a-truncate-ellipsis',
|
|
16
|
+
'lrv-u-color-brand-secondary-dark',
|
|
17
|
+
'lrv-u-display-block',
|
|
18
|
+
'lrv-u-font-family-basic',
|
|
19
|
+
'lrv-u-font-size-13',
|
|
20
|
+
'lrv-u-text-align-center',
|
|
21
|
+
'lrv-u-text-transform-uppercase',
|
|
22
|
+
].join( ' ' ),
|
|
23
|
+
},
|
|
24
|
+
o_figure: {
|
|
25
|
+
...term.o_figure,
|
|
26
|
+
o_figure_classes: 'lrv-u-margin-b-050',
|
|
27
|
+
c_lazy_image: {
|
|
28
|
+
...c_lazy_image,
|
|
29
|
+
c_lazy_image_img_classes: 'lrv-u-background-color-grey-light lrv-u-border-radius-50p lrv-u-display-block lrv-u-height-auto',
|
|
30
|
+
c_lazy_image_crop_class: 'lrv-a-crop-1x1',
|
|
31
|
+
c_lazy_image_classes: 'lrv-u-margin-lr-auto',
|
|
32
|
+
c_lazy_image_placeholder_url: `https://source.unsplash.com/random/200x200/#${index}`,
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
} ) );
|
|
36
|
+
|
|
37
|
+
module.exports = {
|
|
38
|
+
...tag_list,
|
|
39
|
+
tag_list_classes: [
|
|
40
|
+
'lrv-a-cols2',
|
|
41
|
+
'lrv-a-cols1@tablet',
|
|
42
|
+
'lrv-a-cols3@desktop',
|
|
43
|
+
'lrv-a-grid',
|
|
44
|
+
'lrv-a-unstyle-list',
|
|
45
|
+
].join( ' ' ),
|
|
46
|
+
tag_list_term_classes: 'lrv-u-align-items-center lrv-u-flex-direction-column lrv-u-flex-wrap-wrap lrv-u-flex',
|
|
47
|
+
tag_list_term_item_classes: 'lrv-u-margin-lr-auto lrv-u-width-150 lrv-u-max-width-100p',
|
|
48
|
+
tag_list_terms,
|
|
49
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{% if tag_list_terms %}
|
|
2
|
+
<ul class="tag-list-terms // {{ tag_list_classes }}">
|
|
3
|
+
{% for term_item in tag_list_terms %}
|
|
4
|
+
<li class="tag-list-term // {{ tag_list_term_classes }}">
|
|
5
|
+
<div class="tag-list-term-item // {{ tag_list_term_item_classes }}">
|
|
6
|
+
{% if term_item['o_figure'] %}
|
|
7
|
+
{% include "@larva/objects/o-figure/o-figure.twig" with term_item['o_figure'] %}
|
|
8
|
+
{% endif %}
|
|
9
|
+
{% if term_item['c_span'] %}
|
|
10
|
+
{% include "@larva/components/c-span/c-span.twig" with term_item['c_span'] %}
|
|
11
|
+
{% endif %}
|
|
12
|
+
</div>
|
|
13
|
+
</li>
|
|
14
|
+
{% endfor %}
|
|
15
|
+
</ul>
|
|
16
|
+
{% endif %}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Renders a styled term content area. Usage is associated with `pmc/term-content` plugin. A `heading-tags` variable is available to render an alternate layout that features a tag list with thumbnails.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
const clonedeep = require( 'lodash.clonedeep' );
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Module includes.
|
|
5
|
+
*/
|
|
6
|
+
const term_content_top = clonedeep( require( './term-content-top.prototype' ) );
|
|
7
|
+
const tag_list = clonedeep( require( '../../modules/tag-list/tag-list.thumbnail' ) );
|
|
8
|
+
|
|
9
|
+
term_content_top.o_figure = '';
|
|
10
|
+
term_content_top.fact_list = '';
|
|
11
|
+
term_content_top.fact_list_menu = '';
|
|
12
|
+
term_content_top.tag_list = tag_list
|
|
13
|
+
|
|
14
|
+
module.exports = term_content_top;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
const clonedeep = require( 'lodash.clonedeep' );
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Larva includes.
|
|
5
|
+
*/
|
|
6
|
+
const c_tagline = clonedeep( require( '@penskemediacorp/larva-patterns/components/c-tagline/c-tagline.prototype' ) );
|
|
7
|
+
const o_figure = clonedeep( require( '@penskemediacorp/larva-patterns/objects/o-figure/o-figure.prototype.js' ) );
|
|
8
|
+
const article_excerpt = clonedeep( require( '@penskemediacorp/larva-patterns/modules/article-excerpt/article-excerpt.prototype' ) );
|
|
9
|
+
const article_title = clonedeep( require( '@penskemediacorp/larva-patterns/modules/article-title/article-title.prototype' ) );
|
|
10
|
+
const fact_list = clonedeep( require( '@penskemediacorp/larva-patterns/modules/fact-list/fact-list.prototype' ) );
|
|
11
|
+
const fact_list_menu = clonedeep( require( '@penskemediacorp/larva-patterns/modules/fact-list-menu/fact-list-menu.prototype' ) );
|
|
12
|
+
|
|
13
|
+
// Configure page title.
|
|
14
|
+
article_title.article_title_markup = 'Kitchen Appliances';
|
|
15
|
+
article_title.article_title_classes = [
|
|
16
|
+
'lrv-u-font-family-primary',
|
|
17
|
+
'lrv-u-font-size-32',
|
|
18
|
+
'lrv-u-font-size-46@tablet',
|
|
19
|
+
'lrv-u-line-height-small',
|
|
20
|
+
'lrv-u-margin-b-00',
|
|
21
|
+
'lrv-u-padding-tb-075@tablet',
|
|
22
|
+
].join( ' ' );
|
|
23
|
+
|
|
24
|
+
// Configure tagline.
|
|
25
|
+
c_tagline.c_tagline_text = 'The best products for your kitchen';
|
|
26
|
+
c_tagline.c_tagline_classes = [
|
|
27
|
+
'lrv-u-font-family-secondary',
|
|
28
|
+
'lrv-u-font-size-18@mobile-max',
|
|
29
|
+
'lrv-u-font-size-28',
|
|
30
|
+
'lrv-u-margin-b-1',
|
|
31
|
+
'lrv-u-margin-t-00',
|
|
32
|
+
].join( ' ' );
|
|
33
|
+
article_title.c_tagline = c_tagline;
|
|
34
|
+
|
|
35
|
+
// Begin configuring featured iamge.
|
|
36
|
+
o_figure.o_figure_classes = 'lrv-u-font-family-secondary lrv-u-margin-b-00 lrv-u-width-100p lrv-a-term-content-grid__primary';
|
|
37
|
+
o_figure.c_lazy_image.c_lazy_image_placeholder_url = 'https://source.unsplash.com/random/500x500';
|
|
38
|
+
|
|
39
|
+
// Configure featured image captions and credit.
|
|
40
|
+
o_figure.c_figcaption.c_figcaption_caption_markup = 'Caption text.';
|
|
41
|
+
o_figure.c_figcaption.c_figcaption_credit_text = 'Photo credit text.';
|
|
42
|
+
o_figure.c_figcaption.c_figcaption_caption_classes = 'lrv-u-font-size-12 lrv-u-font-size-14@tablet';
|
|
43
|
+
o_figure.c_figcaption.c_figcaption_classes = [
|
|
44
|
+
'lrv-u-flex',
|
|
45
|
+
'lrv-u-flex-direction-column',
|
|
46
|
+
'lrv-u-margin-t-050',
|
|
47
|
+
'lrv-u-padding-b-1',
|
|
48
|
+
].join( ' ' );
|
|
49
|
+
|
|
50
|
+
o_figure.c_figcaption.c_figcaption_credit_classes = [
|
|
51
|
+
'lrv-u-color-grey-dark',
|
|
52
|
+
'lrv-u-font-family-basic',
|
|
53
|
+
'lrv-u-font-size-10',
|
|
54
|
+
'lrv-u-font-size-12@mobile-max',
|
|
55
|
+
'lrv-u-line-height-large',
|
|
56
|
+
].join( ' ' );
|
|
57
|
+
|
|
58
|
+
article_excerpt.article_excerpt_markup = 'We’ve spent hundreds of hours researching appliances, '
|
|
59
|
+
+ 'interviewing experts, poring over owner reviews, and testing appliances both large '
|
|
60
|
+
+ 'and small—many over the course of several years—to find the best appliances for your '
|
|
61
|
+
+ 'kitchen and home. From dishwashers and refrigerators to vacuums and steam cleaners, '
|
|
62
|
+
+ 'our experts pick out the right appliances for all kinds of living situations, to '
|
|
63
|
+
+ 'help keep your chores short and sweet.';
|
|
64
|
+
|
|
65
|
+
module.exports = {
|
|
66
|
+
article_excerpt,
|
|
67
|
+
article_title,
|
|
68
|
+
fact_list_menu,
|
|
69
|
+
fact_list,
|
|
70
|
+
o_figure,
|
|
71
|
+
term_content_top_classes: 'lrv-u-margin-t-1 lrv-a-term-content-grid',
|
|
72
|
+
term_content_secondary_classes: 'lrv-a-term-content-grid__secondary',
|
|
73
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<div class="term-content-top // {{ term_content_top_classes }}">
|
|
2
|
+
{% if o_figure %}
|
|
3
|
+
{% include "@larva/objects/o-figure/o-figure.twig" with o_figure %}
|
|
4
|
+
{% endif %}
|
|
5
|
+
<div class="term-content-detail // {{ term_content_secondary_classes }}">
|
|
6
|
+
{% if article_title %}
|
|
7
|
+
{% include "@larva/modules/article-title/article-title.twig" with article_title %}
|
|
8
|
+
{% endif %}
|
|
9
|
+
{% if fact_list_menu %}
|
|
10
|
+
{% include "@larva/modules/fact-list-menu/fact-list-menu.twig" with fact_list_menu %}
|
|
11
|
+
{% endif %}
|
|
12
|
+
{% if article_excerpt %}
|
|
13
|
+
{% include "@larva/modules/article-excerpt/article-excerpt.twig" with article_excerpt %}
|
|
14
|
+
{% endif %}
|
|
15
|
+
</div>
|
|
16
|
+
{% if tag_list %}
|
|
17
|
+
{% include "@larva/modules/tag-list/tag-list.twig" with tag_list %}
|
|
18
|
+
{% endif %}
|
|
19
|
+
{% if fact_list %}
|
|
20
|
+
{% include "@larva/modules/fact-list/fact-list.twig" with fact_list %}
|
|
21
|
+
{% endif %}
|
|
22
|
+
</div>
|
|
@@ -5,7 +5,11 @@
|
|
|
5
5
|
{% endif %}
|
|
6
6
|
|
|
7
7
|
{% if o_card_link_url %}
|
|
8
|
-
<a tabindex="0" href="{{ o_card_link_url }}" class="{{ o_card_link_classes }}"
|
|
8
|
+
<a tabindex="0" href="{{ o_card_link_url }}" class="{{ o_card_link_classes }}"
|
|
9
|
+
{% if o_card_link_rel_attribute %}
|
|
10
|
+
rel="{{ o_card_link_rel_attribute }}"
|
|
11
|
+
{% endif %}
|
|
12
|
+
>
|
|
9
13
|
{% endif %}
|
|
10
14
|
|
|
11
15
|
{% if o_card_image_wrap_classes %}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const clonedeep = require( 'lodash.clonedeep' );
|
|
2
|
+
|
|
3
|
+
const c_title = clonedeep(
|
|
4
|
+
require( '../../components/c-title/c-title.prototype' )
|
|
5
|
+
);
|
|
6
|
+
const c_dek = clonedeep(
|
|
7
|
+
require( '../../components/c-dek/c-dek.prototype' )
|
|
8
|
+
);
|
|
9
|
+
|
|
10
|
+
c_title.c_title_url = '';
|
|
11
|
+
c_title.c_title_classes = 'lrv-u-margin-t-1 lrv-u-padding-b-1 lrv-u-border-b-1';
|
|
12
|
+
|
|
13
|
+
module.exports = {
|
|
14
|
+
modifier_class: '',
|
|
15
|
+
o_faq_item_classes: '',
|
|
16
|
+
c_title,
|
|
17
|
+
c_dek,
|
|
18
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<div class="o-faq-item {{ modifier_class }} {{ o_faq_item_classes }}">
|
|
2
|
+
{% if c_title %}
|
|
3
|
+
{% include "@larva/components/c-title/c-title.twig" with c_title %}
|
|
4
|
+
{% endif %}
|
|
5
|
+
{% if c_dek %}
|
|
6
|
+
{% include "@larva/components/c-dek/c-dek.twig" with c_dek %}
|
|
7
|
+
{% endif %}
|
|
8
|
+
</div>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const clonedeep = require( 'lodash.clonedeep' );
|
|
2
|
+
|
|
3
|
+
const c_lazy_image = clonedeep( require( '../../components/c-lazy-image/c-lazy-image.prototype' ) );
|
|
4
|
+
const article_kicker = clonedeep( require( '../../modules/article-kicker/article-kicker.prototype' ) );
|
|
5
|
+
const c_title = clonedeep( require( '../../components/c-title/c-title.prototype' ) );
|
|
6
|
+
const c_link = clonedeep( require( '../../components/c-link/c-link.prototype' ) );
|
|
7
|
+
const c_button = clonedeep( require( '../../components/c-button/c-button.prototype' ) );
|
|
8
|
+
|
|
9
|
+
c_lazy_image.c_lazy_image_crop_class = 'lrv-a-crop-1x1';
|
|
10
|
+
|
|
11
|
+
module.exports = {
|
|
12
|
+
modifier_class: '',
|
|
13
|
+
c_lazy_image,
|
|
14
|
+
article_kicker,
|
|
15
|
+
c_title,
|
|
16
|
+
c_link,
|
|
17
|
+
c_button,
|
|
18
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<div class="o-multiple-products-item {{ modifier_class }} {{ o_multiple_products_item_classes }}">
|
|
2
|
+
<div class="o-multiple-products-item-title-wrapper">
|
|
3
|
+
{% if c_lazy_image %}
|
|
4
|
+
{% include "@larva/components/c-lazy-image/c-lazy-image.twig" with c_lazy_image %}
|
|
5
|
+
{% endif %}
|
|
6
|
+
{% if article_kicker %}
|
|
7
|
+
<div class="article_kicker_outer // {{ article_kicker_outer_classes }}">
|
|
8
|
+
{% include "@larva/modules/article-kicker/article-kicker.twig" with article_kicker %}
|
|
9
|
+
</div>
|
|
10
|
+
{% endif %}
|
|
11
|
+
{% if c_title %}
|
|
12
|
+
{% include "@larva/components/c-title/c-title.twig" with c_title %}
|
|
13
|
+
{% endif %}
|
|
14
|
+
</div>
|
|
15
|
+
<div class="o-multiple-products-item-jump-to-link">
|
|
16
|
+
{% if c_link %}
|
|
17
|
+
{% include "@larva/components/c-link/c-link.twig" with c_link %}
|
|
18
|
+
{% endif %}
|
|
19
|
+
</div>
|
|
20
|
+
<div class="o-multiple-products-item-button-wrapper">
|
|
21
|
+
{% if c_button %}
|
|
22
|
+
{% include "@larva/components/c-button/c-button.twig" with c_button %}
|
|
23
|
+
{% endif %}
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const clonedeep = require( 'lodash.clonedeep' );
|
|
2
|
+
|
|
3
|
+
const o_product_card = clonedeep( require( './o-product-card.prototype' ) );
|
|
4
|
+
|
|
5
|
+
o_product_card.o_product_card_classes = 'o-product-card--primary lrv-u-border-a-1@mobile-max lrv-u-border-color-grey-light lrv-u-width-100p';
|
|
6
|
+
o_product_card.o_product_card_header_classes = 'lrv-u-padding-a-025 lrv-u-text-align-center lrv-u-background-color-brand-primary';
|
|
7
|
+
o_product_card.c_title_award.c_title_classes = 'lrv-u-border-a-2 lrv-a-font-secondary-m lrv-u-padding-tb-050';
|
|
8
|
+
|
|
9
|
+
module.exports = o_product_card;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
const clonedeep = require( 'lodash.clonedeep' );
|
|
2
|
+
|
|
3
|
+
const c_title = clonedeep( require( '@penskemediacorp/larva-patterns/components/c-title/c-title.prototype.js' ) );
|
|
4
|
+
const c_button_prototype = require( '@penskemediacorp/larva-patterns/components/c-button/c-button.brand-basic.js' );
|
|
5
|
+
const c_tagline_prototype = require( '@penskemediacorp/larva-patterns/components/c-tagline/c-tagline.prototype.js' );
|
|
6
|
+
const c_lazy_image_prototype = require( '@penskemediacorp/larva-patterns/components/c-lazy-image/c-lazy-image.prototype.js' );
|
|
7
|
+
const c_dek = clonedeep(
|
|
8
|
+
require( '@penskemediacorp/larva-patterns/components/c-dek/c-dek.prototype.js' )
|
|
9
|
+
);
|
|
10
|
+
|
|
11
|
+
c_title.c_title_url = false;
|
|
12
|
+
|
|
13
|
+
const c_title_award = clonedeep( c_title );
|
|
14
|
+
|
|
15
|
+
const c_title_brand = clonedeep( c_title );
|
|
16
|
+
const c_lazy_image = clonedeep( c_lazy_image_prototype );
|
|
17
|
+
const c_tagline_product = clonedeep( c_tagline_prototype );
|
|
18
|
+
const c_button_buy = clonedeep( c_button_prototype );
|
|
19
|
+
|
|
20
|
+
c_dek.c_dek_classes = 'lrv-u-padding-a-075 lrv-u-margin-tb-00 lrv-a-font-secondary-s';
|
|
21
|
+
|
|
22
|
+
const c_dek_verdict = clonedeep( c_dek );
|
|
23
|
+
const c_dek_pros = clonedeep( c_dek );
|
|
24
|
+
const c_dek_cons = clonedeep( c_dek );
|
|
25
|
+
|
|
26
|
+
c_title_award.c_title_classes = 'lrv-u-color-white lrv-a-font-secondary-m lrv-u-border-a-2 lrv-u-padding-tb-050';
|
|
27
|
+
|
|
28
|
+
c_lazy_image.c_lazy_image_crop_class = 'lrv-a-crop-1x1';
|
|
29
|
+
|
|
30
|
+
c_title_brand.c_title_text = 'Google';
|
|
31
|
+
c_title_brand.c_title_classes = 'lrv-u-padding-t-1 lrv-a-font-primary-m';
|
|
32
|
+
c_title_brand.c_title_link_classes = 'lrv-a-unstyle-link';
|
|
33
|
+
|
|
34
|
+
c_tagline_product.c_tagline_classes = 'lrv-u-margin-tb-050 lrv-a-font-secondary-s';
|
|
35
|
+
c_tagline_product.c_tagline_text = 'Smart Thermostat For Home';
|
|
36
|
+
|
|
37
|
+
c_button_buy.c_button_text = 'Buy Now';
|
|
38
|
+
c_button_buy.c_button_classes =
|
|
39
|
+
'lrv-u-cursor-pointer lrv-u-padding-tb-025 lrv-u-padding-lr-2 lrv-u-background-color-brand-primary lrv-u-color-black lrv-a-font-secondary-m lrv-u-text-transform-uppercase ';
|
|
40
|
+
|
|
41
|
+
module.exports = {
|
|
42
|
+
o_product_card_classes: 'lrv-u-border-a-1',
|
|
43
|
+
o_product_card_header_classes:
|
|
44
|
+
'lrv-u-padding-a-025 lrv-u-text-align-center lrv-u-background-color-brand-secondary',
|
|
45
|
+
o_product_card_details_classes:
|
|
46
|
+
'lrv-u-text-align-center lrv-u-padding-tb-2 lrv-u-padding-lr-1 lrv-u-flex-grow-1',
|
|
47
|
+
o_product_card_verdict_classes: 'lrv-u-flex',
|
|
48
|
+
o_product_card_pros_classes: 'lrv-u-flex',
|
|
49
|
+
o_product_card_cons_classes: 'lrv-u-flex',
|
|
50
|
+
o_product_card_link_url: '#',
|
|
51
|
+
o_product_card_link_classes: 'lrv-a-unstyle-link',
|
|
52
|
+
c_title_award,
|
|
53
|
+
c_title_brand,
|
|
54
|
+
c_lazy_image,
|
|
55
|
+
c_tagline_product,
|
|
56
|
+
c_button_buy,
|
|
57
|
+
c_dek_verdict,
|
|
58
|
+
c_dek_pros,
|
|
59
|
+
c_dek_cons,
|
|
60
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
<div class="o-product-card {{o_product_card_classes}}">
|
|
2
|
+
{% if o_product_card_link_url %}
|
|
3
|
+
<a tabindex="0" href="{{ o_product_card_link_url }}" class="o-product-card__link {{ o_product_card_link_classes }}">
|
|
4
|
+
{% endif %}
|
|
5
|
+
|
|
6
|
+
<div class="o-product-card__award {{o_product_card_header_classes}}">
|
|
7
|
+
{% if c_title_award %}
|
|
8
|
+
{% include "@larva/components/c-title/c-title.twig" with c_title_award %}
|
|
9
|
+
{% endif %}
|
|
10
|
+
</div>
|
|
11
|
+
|
|
12
|
+
<div class="o-product-card__product-details {{o_product_card_details_classes}}">
|
|
13
|
+
{% if c_lazy_image %}
|
|
14
|
+
{% include "@larva/components/c-lazy-image/c-lazy-image.twig" with c_lazy_image %}
|
|
15
|
+
{% endif %}
|
|
16
|
+
|
|
17
|
+
{% if c_title_brand %}
|
|
18
|
+
{% include "@larva/components/c-title/c-title.twig" with c_title_brand %}
|
|
19
|
+
{% endif %}
|
|
20
|
+
|
|
21
|
+
{% if c_tagline_product %}
|
|
22
|
+
{% include "@larva/components/c-tagline/c-tagline.twig" with c_tagline_product %}
|
|
23
|
+
{% endif %}
|
|
24
|
+
|
|
25
|
+
{% if c_button_buy %}
|
|
26
|
+
{% include "@larva/components/c-button/c-button.twig" with c_button_buy %}
|
|
27
|
+
{% endif %}
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
<div class="o-product-card__verdict best-of-verdict {{o_product_card_verdict_classes}}" >
|
|
31
|
+
<div class="o-product-card__header-verdict lrv-a-hidden@desktop lrv-a-font-secondary-m lrv-u-padding-a-075">
|
|
32
|
+
{{product_grid_header_verdict_text}}
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
{% if c_dek_verdict %}
|
|
36
|
+
{% include "@larva/components/c-dek/c-dek.twig" with c_dek_verdict %}
|
|
37
|
+
{% endif %}
|
|
38
|
+
</div>
|
|
39
|
+
|
|
40
|
+
<div class="o-product-card__pros best-of-pros {{o_product_card_pros_classes}}" >
|
|
41
|
+
<div class="o-product-card__header-pros lrv-a-hidden@desktop lrv-a-font-secondary-m lrv-u-padding-a-075">
|
|
42
|
+
{{product_grid_header_pros_text}}
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
{% if c_dek_pros %}
|
|
46
|
+
{% include "@larva/components/c-dek/c-dek.twig" with c_dek_pros %}
|
|
47
|
+
{% endif %}
|
|
48
|
+
</div>
|
|
49
|
+
|
|
50
|
+
<div class="o-product-card__cons best-of-cons {{o_product_card_cons_classes}}">
|
|
51
|
+
<div class="o-product-card__header-cons lrv-a-hidden@desktop lrv-a-font-secondary-m lrv-u-padding-a-075">
|
|
52
|
+
{{product_grid_header_cons_text}}
|
|
53
|
+
</div>
|
|
54
|
+
|
|
55
|
+
{% if c_dek_cons %}
|
|
56
|
+
{% include "@larva/components/c-dek/c-dek.twig" with c_dek_cons %}
|
|
57
|
+
{% endif %}
|
|
58
|
+
</div>
|
|
59
|
+
|
|
60
|
+
{% if o_product_card_link_url %}
|
|
61
|
+
</a>
|
|
62
|
+
{% endif %}
|
|
63
|
+
|
|
64
|
+
</div>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
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 }}">
|
|
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 }}" data-video-player-id="{{ o_video_card_player_id_attr }}" data-video-media-id="{{ o_video_card_media_id_attr }}">
|
|
3
3
|
|
|
4
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
5
|
|
|
@@ -22,6 +22,11 @@
|
|
|
22
22
|
{% else %}
|
|
23
23
|
<div hidden id="jwplayerContainer" data-video-showcase-jwplayer></div>
|
|
24
24
|
{% endif %}
|
|
25
|
+
{% if o_video_card_connatix_id_attr %}
|
|
26
|
+
<div hidden id="{{ o_video_card_connatix_id_attr }}" data-video-showcase-connatix></div>
|
|
27
|
+
{% else %}
|
|
28
|
+
<div hidden id="connatixContainer" data-video-showcase-connatix></div>
|
|
29
|
+
{% endif %}
|
|
25
30
|
|
|
26
31
|
<div class="js-VideoShowcasePlayerOembed" hidden data-video-showcase-oembed></div>
|
|
27
32
|
{% endif %}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@penskemediacorp/larva-patterns",
|
|
3
|
-
"version": "1.28.
|
|
3
|
+
"version": "1.28.1-alpha.141+22ee9bc5",
|
|
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,10 +20,10 @@
|
|
|
20
20
|
"url": "https://github.com/Penske-Media-Corp/pmc-larva/issues"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@penskemediacorp/larva-css": "^1.28.
|
|
24
|
-
"@penskemediacorp/larva-js": "^1.28.
|
|
25
|
-
"@penskemediacorp/larva-svg": "^1.28.
|
|
26
|
-
"lodash.clonedeep": "^4
|
|
23
|
+
"@penskemediacorp/larva-css": "^1.28.1-alpha.141+22ee9bc5",
|
|
24
|
+
"@penskemediacorp/larva-js": "^1.28.1-alpha.141+22ee9bc5",
|
|
25
|
+
"@penskemediacorp/larva-svg": "^1.28.1-alpha.141+22ee9bc5",
|
|
26
|
+
"lodash.clonedeep": "^4"
|
|
27
27
|
},
|
|
28
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "22ee9bc5c5a423890ac6029ff1cd8da825f83fd9"
|
|
29
29
|
}
|