@penskemediacorp/larva-patterns 0.6.2 → 0.6.3
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/components/c-svg/c-svg.prototype.js +4 -0
- package/components/c-svg/c-svg.twig +3 -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/newswire/newswire.prototype.js +7 -1
- package/modules/newswire/newswire.twig +3 -3
- package/objects/o-card/o-card.prototype.js +1 -0
- package/objects/o-card/o-card.twig +4 -0
- package/package.json +3 -3
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
const clonedeep = require( 'lodash.clonedeep' );
|
|
2
|
+
|
|
3
|
+
const c_heading_prototype = require( '../../components/c-heading/c-heading.prototype' );
|
|
4
|
+
const o_card_prototype = require( '../../objects/o-card/o-card.prototype' );
|
|
5
|
+
const c_title_prototype = require( '../../components/c-title/c-title.prototype' );
|
|
6
|
+
const c_svg_prototype = require( '../../components/c-svg/c-svg.prototype' );
|
|
7
|
+
const c_span_prototype = require( '../../components/c-span/c-span.prototype' );
|
|
8
|
+
|
|
9
|
+
const c_heading = clonedeep( c_heading_prototype );
|
|
10
|
+
const o_card = clonedeep( o_card_prototype );
|
|
11
|
+
const c_title = clonedeep( c_title_prototype );
|
|
12
|
+
const c_svg = clonedeep( c_svg_prototype );
|
|
13
|
+
const c_span = clonedeep( c_span_prototype );
|
|
14
|
+
|
|
15
|
+
c_heading.c_heading_text = 'Most Popular';
|
|
16
|
+
|
|
17
|
+
c_svg.c_svg_classes = 'lrv-u-height-16 lrv-u-color-black';
|
|
18
|
+
c_svg.c_svg_name = 'brand-logo';
|
|
19
|
+
|
|
20
|
+
c_title.c_title_text = 'Lorem ipsum dolor, sit amet consectetur adipisicing elit. Animi expedita pariatur.';
|
|
21
|
+
c_title.c_title_classes += ' lrv-u-margin-b-075';
|
|
22
|
+
c_title.c_title_url = false;
|
|
23
|
+
|
|
24
|
+
o_card.o_card_classes = 'lrv-u-flex lrv-u-height-100p lrv-u-color-brand-primary:hover';
|
|
25
|
+
o_card.o_card_link_url = '#';
|
|
26
|
+
o_card.o_card_link_classes = 'lrv-a-unstyle-link';
|
|
27
|
+
o_card.o_card_content_classes = 'lrv-u-flex lrv-u-flex-direction-column';
|
|
28
|
+
o_card.o_card_image_wrap_classes = '';
|
|
29
|
+
o_card.c_lazy_image = false;
|
|
30
|
+
o_card.c_span = false;
|
|
31
|
+
o_card.c_svg = c_svg;
|
|
32
|
+
o_card.c_title = c_title;
|
|
33
|
+
o_card.c_timestamp = false;
|
|
34
|
+
|
|
35
|
+
module.exports = {
|
|
36
|
+
brands_most_popular_classes: 'lrv-a-wrapper lrv-u-margin-b-150',
|
|
37
|
+
brands_most_popular_items_wrapper_classes: '',
|
|
38
|
+
c_heading: c_heading,
|
|
39
|
+
popular_items: [ o_card, o_card, o_card, o_card ],
|
|
40
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<section class="brands-most-popular // {{brands_most_popular_classes}}">
|
|
2
|
+
{% if c_heading %}
|
|
3
|
+
{% include "@larva/components/c-heading/c-heading.twig" with c_heading %}
|
|
4
|
+
{% endif %}
|
|
5
|
+
|
|
6
|
+
<div class="{{ brands_most_popular_items_wrapper_classes }}">
|
|
7
|
+
{% for item in popular_items %}
|
|
8
|
+
{% include "@larva/objects/o-card/o-card.twig" with item %}
|
|
9
|
+
{% endfor %}
|
|
10
|
+
</div>
|
|
11
|
+
</section>
|
|
@@ -5,12 +5,14 @@ const c_span_prototype = require( '../../components/c-span/c-span.prototype' );
|
|
|
5
5
|
const c_timestamp_prototype = require( '../../components/c-timestamp/c-timestamp.prototype' );
|
|
6
6
|
const c_heading_prototype = require( '../../components/c-heading/c-heading.prototype' );
|
|
7
7
|
const c_title_prototype = require( '../../components/c-title/c-title.prototype' );
|
|
8
|
+
const c_svg_prototype = require( '../../components/c-svg/c-svg.prototype' );
|
|
8
9
|
|
|
9
10
|
const o_card = clonedeep( o_card_prototype );
|
|
10
11
|
const c_span = clonedeep( c_span_prototype );
|
|
11
12
|
const c_timestamp = clonedeep( c_timestamp_prototype );
|
|
12
13
|
const c_heading = clonedeep( c_heading_prototype );
|
|
13
14
|
const c_title = clonedeep( c_title_prototype );
|
|
15
|
+
const c_svg = clonedeep( c_svg_prototype );
|
|
14
16
|
|
|
15
17
|
c_heading.c_heading_text = 'Newswire';
|
|
16
18
|
c_heading.c_heading_classes = 'lrv-u-font-family-primary lrv-u-font-size-32 lrv-u-margin-b-050';
|
|
@@ -23,7 +25,7 @@ c_title.c_title_text = 'Lorem ipsum dolor, sit amet consectetur adipisicing elit
|
|
|
23
25
|
c_title.c_title_classes += ' lrv-u-font-size-12 lrv-u-font-size-14@desktop lrv-u-font-weight-normal lrv-u-margin-b-050';
|
|
24
26
|
c_title.c_title_url = false;
|
|
25
27
|
|
|
26
|
-
o_card.o_card_classes = 'lrv-u-flex lrv-u-flex-direction-column
|
|
28
|
+
o_card.o_card_classes = 'lrv-u-flex lrv-u-flex-direction-column';
|
|
27
29
|
o_card.o_card_link_url = '#';
|
|
28
30
|
o_card.o_card_link_classes = 'lrv-a-unstyle-link lrv-u-display-block';
|
|
29
31
|
o_card.o_card_image_wrap_classes = '';
|
|
@@ -32,8 +34,12 @@ o_card.c_lazy_image.c_lazy_image_crop_class = 'lrv-a-crop-4x3';
|
|
|
32
34
|
o_card.c_span = c_span;
|
|
33
35
|
o_card.c_title = c_title;
|
|
34
36
|
o_card.c_timestamp = c_timestamp;
|
|
37
|
+
o_card.c_svg = c_svg;
|
|
35
38
|
|
|
36
39
|
module.exports = {
|
|
40
|
+
newswire_classes: 'lrv-a-wrapper lrv-u-padding-b-2',
|
|
41
|
+
newswire_list_classes: 'lrv-a-unstyle-list js-Flickity js-Flickity--fourths js-Flickity--isContained js-Flickity--nav-top-right js-Flickity--bordered-buttons js-Flickity--isFreeScrol js-Flickity--newswire lrv-u-padding-l-00',
|
|
42
|
+
newswire_list_item_classes: 'js-Flickity-cell lrv-u-margin-r-150',
|
|
37
43
|
c_heading: c_heading,
|
|
38
44
|
newswire_aria_labelledby_attr: c_heading.c_heading_id_attr,
|
|
39
45
|
newswire_items: [ o_card, o_card, o_card, o_card, o_card ]
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
<section class="newswire //
|
|
1
|
+
<section class="newswire // {{ newswire_classes }}">
|
|
2
2
|
{% if c_heading %}
|
|
3
3
|
{% include "@larva/components/c-heading/c-heading.twig" with c_heading %}
|
|
4
4
|
{% endif %}
|
|
5
|
-
<ul class="
|
|
5
|
+
<ul class="{{ newswire_list_classes }}"
|
|
6
6
|
{% if newswire_aria_labelledby_attr %}
|
|
7
7
|
aria-labelledby="{{ newswire_aria_labelledby_attr }}"
|
|
8
8
|
{% endif %}
|
|
9
9
|
>
|
|
10
10
|
{% for item in newswire_items %}
|
|
11
|
-
<li class="
|
|
11
|
+
<li class="{{ newswire_list_item_classes }}">
|
|
12
12
|
{% include "@larva/objects/o-card/o-card.twig" with item %}
|
|
13
13
|
</li>
|
|
14
14
|
{% endfor %}
|
|
@@ -29,6 +29,10 @@
|
|
|
29
29
|
{% include "@larva/objects/o-span-group/o-span-group.twig" with o_span_group %}
|
|
30
30
|
{% endif %}
|
|
31
31
|
|
|
32
|
+
{% if c_svg %}
|
|
33
|
+
{% include "@larva/components/c-svg/c-svg.twig" with c_svg %}
|
|
34
|
+
{% endif %}
|
|
35
|
+
|
|
32
36
|
{% if c_span %}
|
|
33
37
|
{% include "@larva/components/c-span/c-span.twig" with c_span %}
|
|
34
38
|
{% endif %}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@penskemediacorp/larva-patterns",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.3",
|
|
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": "^0.6.
|
|
23
|
+
"@penskemediacorp/larva-css": "^0.6.3",
|
|
24
24
|
"@penskemediacorp/larva-js": "^0.6.0",
|
|
25
25
|
"@penskemediacorp/larva-svg": "^0.6.0",
|
|
26
26
|
"lodash.clonedeep": "^4.5.0"
|
|
27
27
|
},
|
|
28
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "f0ffbd9ac9ba9b13889ade0e4dbc9c94f9e6dd11"
|
|
29
29
|
}
|