@penskemediacorp/larva-patterns 0.5.3 → 0.5.4
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/__tests__/hub/hub.html +4 -0
- package/__tests__/hub/hub.prototype.js +5 -1
- package/modules/injected-related-content/injected-related-content.prototype.js +59 -0
- package/modules/injected-related-content/injected-related-content.twig +23 -0
- package/modules/newsletter/newsletter.prototype.js +46 -0
- package/modules/newsletter/newsletter.twig +21 -0
- package/modules/story-grid/story-grid.river.js +11 -0
- package/package.json +3 -3
package/__tests__/hub/hub.html
CHANGED
|
@@ -16,4 +16,8 @@
|
|
|
16
16
|
{% include "modules/story-grid/story-grid.twig" with story_grid %}
|
|
17
17
|
|
|
18
18
|
{% include "modules/story-grid/story-grid.twig" with story_grid %}
|
|
19
|
+
|
|
20
|
+
{% include "modules/story-grid/story-grid.twig" with story_grid_river %}
|
|
21
|
+
|
|
22
|
+
{% include "modules/injected-related-content/injected-related-content.twig" with injected_related_content %}
|
|
19
23
|
</div>
|
|
@@ -4,12 +4,14 @@ const { __experimentalCloneWithFallback } = require( '@penskemediacorp/larva' );
|
|
|
4
4
|
const carousel_grid = __experimentalCloneWithFallback( 'modules/carousel-grid/carousel-grid.prototype' );
|
|
5
5
|
const carousel_slider = __experimentalCloneWithFallback( 'modules/carousel-slider/carousel-slider.prototype' );
|
|
6
6
|
const story_grid = __experimentalCloneWithFallback( 'modules/story-grid/story-grid.prototype' );
|
|
7
|
+
const story_grid_river = __experimentalCloneWithFallback( 'modules/story-grid/story-grid.river' );
|
|
7
8
|
const heading_h1 = __experimentalCloneWithFallback( 'modules/heading/heading.h1' );
|
|
8
9
|
const heading_h3 = __experimentalCloneWithFallback( 'modules/heading/heading.h3' );
|
|
9
10
|
const story = __experimentalCloneWithFallback( 'modules/story/story.prototype' );
|
|
10
11
|
const button = __experimentalCloneWithFallback( 'modules/button/button.prototype' );
|
|
11
12
|
const paragraph = __experimentalCloneWithFallback( 'modules/paragraph/paragraph.prototype' );
|
|
12
13
|
const separator = __experimentalCloneWithFallback( 'modules/separator/separator.prototype' );
|
|
14
|
+
const injected_related_content = __experimentalCloneWithFallback( 'modules/injected-related-content/injected-related-content.prototype' );
|
|
13
15
|
|
|
14
16
|
module.exports = {
|
|
15
17
|
carousel_grid,
|
|
@@ -20,5 +22,7 @@ module.exports = {
|
|
|
20
22
|
paragraph,
|
|
21
23
|
story,
|
|
22
24
|
button,
|
|
23
|
-
separator
|
|
25
|
+
separator,
|
|
26
|
+
injected_related_content,
|
|
27
|
+
story_grid_river
|
|
24
28
|
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
const clonedeep = require('lodash.clonedeep');
|
|
2
|
+
|
|
3
|
+
const c_title_prototype = require('../../components/c-title/c-title.prototype');
|
|
4
|
+
const c_heading = clonedeep(c_title_prototype);
|
|
5
|
+
|
|
6
|
+
c_heading.c_title_text = 'Related';
|
|
7
|
+
c_heading.c_title_classes = 'lrv-a-font-primary-xxxs lrv-u-font-weight-bold lrv-u-color-black lrv-u-text-transform-uppercase lrv-u-border-b-1 lrv-u-padding-b-050 ';
|
|
8
|
+
c_heading.c_title_url = false;
|
|
9
|
+
|
|
10
|
+
const c_title = clonedeep(c_title_prototype);
|
|
11
|
+
|
|
12
|
+
c_title.c_title_text = 'Chronixx Says Some Dancehall Lyrics Are ‘Embarrassing’, Artists Should Stop Calling Him For Features';
|
|
13
|
+
c_title.c_title_classes = 'lrv-a-font-primary-xs lrv-u-color-black lrv-u-padding-t-125';
|
|
14
|
+
c_title.c_title_link_classes = 'lrv-a-font-primary-xs lrv-u-color-black lrv-a-truncate-ellipsis-5line@desktop-xl-max lrv-a-truncate-ellipsis-3line@desktop-xl';
|
|
15
|
+
c_title.c_title_url = '#';
|
|
16
|
+
|
|
17
|
+
const c_lazy_image_prototype = require('../../components/c-lazy-image/c-lazy-image.prototype.js');
|
|
18
|
+
const c_lazy_image = clonedeep(c_lazy_image_prototype);
|
|
19
|
+
|
|
20
|
+
c_lazy_image.c_lazy_image_classes = 'lrv-a-floated-right@tablet lrv-u-width-150 lrv-u-width-100p@mobile-max lrv-u-margin-l-125 lrv-u-margin-t-150@mobile-max lrv-u-margin-l-00@mobile-max';
|
|
21
|
+
c_lazy_image.c_lazy_image_crop_class = 'lrv-a-crop-1x1@tablet';
|
|
22
|
+
|
|
23
|
+
const o_card_prototype = require('../../objects/o-card/o-card.prototype');
|
|
24
|
+
const o_card_first = clonedeep(o_card_prototype);
|
|
25
|
+
|
|
26
|
+
o_card_first.o_card_classes = '';
|
|
27
|
+
o_card_first.c_title.c_title_text = 'Chronixx Draws Inspiration From These Capleton Lyrics';
|
|
28
|
+
o_card_first.c_title.c_title_classes = 'lrv-a-font-primary-xxxs lrv-u-color-black lrv-u-border-b-1 lrv-u-border-t-1@desktop-xl-max lrv-u-padding-b-1 lrv-u-padding-t-00@desktop-xl lrv-u-padding-t-1 ';
|
|
29
|
+
o_card_first.c_title.c_title_link_classes = 'lrv-a-font-primary-xxxs lrv-u-color-black lrv-a-truncate-ellipsis-3line@desktop-xl lrv-a-truncate-ellipsis-1line@tablet-desktop-only lrv-a-truncate-ellipsis-2line@mobile-max';
|
|
30
|
+
o_card_first.c_title.c_title_url = '#';
|
|
31
|
+
o_card_first.c_lazy_image = false;
|
|
32
|
+
o_card_first.c_span = false;
|
|
33
|
+
o_card_first.c_timestamp = false;
|
|
34
|
+
|
|
35
|
+
const o_card_last = clonedeep(o_card_prototype);
|
|
36
|
+
|
|
37
|
+
o_card_last.o_card_classes = '';
|
|
38
|
+
o_card_last.c_title.c_title_text = 'Chronixx calls for change in new video “Safe N Sound”';
|
|
39
|
+
o_card_last.c_title.c_title_classes = 'lrv-a-font-primary-xxxs lrv-u-color-black lrv-u-padding-b-00@desktop-xl lrv-u-padding-b-1 lrv-u-padding-t-1';
|
|
40
|
+
o_card_last.c_title.c_title_link_classes = 'lrv-a-font-primary-xxxs lrv-u-color-black lrv-a-truncate-ellipsis-3line@desktop-xl lrv-a-truncate-ellipsis-1line@tablet-desktop-only lrv-a-truncate-ellipsis-2line@mobile-max';
|
|
41
|
+
o_card_last.c_title.c_title_url = '#';
|
|
42
|
+
o_card_last.c_lazy_image = false;
|
|
43
|
+
o_card_last.c_span = false;
|
|
44
|
+
o_card_last.c_timestamp = false;
|
|
45
|
+
|
|
46
|
+
module.exports = {
|
|
47
|
+
injected_related_content_classes: 'lrv-u-border-t-1 lrv-u-padding-t-025',
|
|
48
|
+
injected_related_content_inner_classes: 'lrv-u-flex lrv-u-flex-direction-column@desktop-xl-max lrv-u-border-b-1 lrv-u-border-t-1 lrv-u-padding-b-150@desktop-xl lrv-u-padding-t-150',
|
|
49
|
+
injected_related_content_primary_classes: 'lrv-u-padding-b-1@mobile-max lrv-u-padding-b-150 lrv-u-padding-b-00@desktop-xl',
|
|
50
|
+
injected_related_content_heading_classes: 'lrv-u-padding-b-00@desktop-xl lrv-u-display-inline-block',
|
|
51
|
+
injected_related_content_secondary_classes: 'lrv-u-padding-l-125@desktop-xl',
|
|
52
|
+
c_heading,
|
|
53
|
+
c_title,
|
|
54
|
+
c_lazy_image,
|
|
55
|
+
o_card_items: [
|
|
56
|
+
o_card_first,
|
|
57
|
+
o_card_last
|
|
58
|
+
]
|
|
59
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<div class="injected-related-content // {{injected_related_content_classes}}" >
|
|
2
|
+
<div class="injected-related-content-inner // {{injected_related_content_inner_classes}}">
|
|
3
|
+
<div class="injected-related-content-primary // {{injected_related_content_primary_classes}}">
|
|
4
|
+
<div class="injected-related-content-heading // {{injected_related_content_heading_classes}}">
|
|
5
|
+
{% include "@larva/components/c-title/c-title.twig" with c_heading %}
|
|
6
|
+
</div>
|
|
7
|
+
{% if c_lazy_image %}
|
|
8
|
+
{% include "@larva/components/c-lazy-image/c-lazy-image.twig" with c_lazy_image %}
|
|
9
|
+
{% endif %}
|
|
10
|
+
|
|
11
|
+
{% if c_title %}
|
|
12
|
+
{% include "@larva/components/c-title/c-title.twig" with c_title %}
|
|
13
|
+
{% endif %}
|
|
14
|
+
|
|
15
|
+
</div>
|
|
16
|
+
<div class="injected-related-content-secondary // {{injected_related_content_secondary_classes}}">
|
|
17
|
+
{% for item in o_card_items %}
|
|
18
|
+
{% include "@larva/objects/o-card/o-card.twig" with item %}
|
|
19
|
+
{% endfor %}
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
const clonedeep = require( 'lodash.clonedeep' );
|
|
2
|
+
|
|
3
|
+
const c_title_prototype = require( '../../components/c-title/c-title.prototype' );
|
|
4
|
+
const c_title = clonedeep( c_title_prototype );
|
|
5
|
+
|
|
6
|
+
const c_logo_prototype = require( '../../components/c-logo/c-logo.prototype' );
|
|
7
|
+
const c_logo = clonedeep( c_logo_prototype );
|
|
8
|
+
|
|
9
|
+
const o_email_capture_form_prototype = require( '../../objects/o-email-capture-form/o-email-capture-form.prototype' );
|
|
10
|
+
const o_email_capture_form = clonedeep( o_email_capture_form_prototype );
|
|
11
|
+
|
|
12
|
+
const c_tagline_prototype = require( '../../components/c-tagline/c-tagline.prototype' );
|
|
13
|
+
const c_tagline = clonedeep( c_tagline_prototype );
|
|
14
|
+
|
|
15
|
+
const c_tagline_terms = clonedeep( c_tagline_prototype );
|
|
16
|
+
|
|
17
|
+
c_tagline.c_tagline_classes = 'lrv-u-margin-t-1 lrv-u-margin-b-00 lrv-u-text-align-center lrv-u-font-size-20 lrv-u-line-height-small lrv-u-margin-b-2';
|
|
18
|
+
c_tagline.c_tagline_text = 'Sign Up for our Newsletters';
|
|
19
|
+
|
|
20
|
+
c_logo.c_logo_classes = 'lrv-a-unstyle-link lrv-u-display-contents lrv-u-width-100p lrv-u-color-black';
|
|
21
|
+
|
|
22
|
+
o_email_capture_form.c_email_field.c_email_field_input_placeholder_attr = 'Email';
|
|
23
|
+
o_email_capture_form.c_email_field.c_email_field_input_classes += ' lrv-u-border-a-0 lrv-u-font-size-14 lrv-u-width-100p lrv-u-margin-b-1 lrv-u-padding-lr-1 lrv-u-padding-tb-050 lrv-u-border-radius-5';
|
|
24
|
+
o_email_capture_form.c_email_field.c_email_field_label_for_attr = 'EmailAddress';
|
|
25
|
+
o_email_capture_form.c_email_field.c_email_field_input_name_attr = 'EmailAddress';
|
|
26
|
+
o_email_capture_form.c_button.c_button_text = 'Subscribe Today';
|
|
27
|
+
o_email_capture_form.c_button.c_button_classes += ' lrv-u-background-color-black lrv-u-color-white lrv-u-border-radius-5 lrv-u-width-100p lrv-u-text-align-center lrv-u-padding-a-050 lrv-u-font-weight-bold';
|
|
28
|
+
o_email_capture_form.c_email_field.c_email_field_label_classes = 'lrv-a-screen-reader-only';
|
|
29
|
+
o_email_capture_form.c_email_field.c_email_field_label_text = 'Email Address';
|
|
30
|
+
|
|
31
|
+
c_tagline_terms.c_tagline_classes = 'lrv-u-margin-t-1';
|
|
32
|
+
c_tagline_terms.c_tagline_text = false;
|
|
33
|
+
c_tagline_terms.c_tagline_markup = 'By subscribing, I agree to the <a href="#">Terms of Use</a> and <a href="#">Privacy Policy</a>.';
|
|
34
|
+
|
|
35
|
+
module.exports = {
|
|
36
|
+
newsletter_classes: 'lrv-u-padding-tb-2 lrv-u-padding-lr-2 lrv-u-flex lrv-u-flex-direction-column lrv-u-align-items-center',
|
|
37
|
+
newsletter_typography_class: '',
|
|
38
|
+
newsletter_text_align_class: '',
|
|
39
|
+
newsletter_color_class: '',
|
|
40
|
+
newsletter_background_color_class: '',
|
|
41
|
+
c_title: c_title,
|
|
42
|
+
c_logo: c_logo,
|
|
43
|
+
c_tagline: c_tagline,
|
|
44
|
+
o_email_capture_form: o_email_capture_form,
|
|
45
|
+
c_tagline_terms: c_tagline_terms,
|
|
46
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<div class="newsletter // {{ newsletter_classes }} {{ newsletter_typography_class }} {{ newsletter_text_align_class }} {{ newsletter_color_class }} {{ newsletter_background_color_class }}">
|
|
2
|
+
{% if c_title %}
|
|
3
|
+
{% include "@larva/components/c-title/c-title.twig" with c_title %}
|
|
4
|
+
{% endif %}
|
|
5
|
+
|
|
6
|
+
{% if c_logo %}
|
|
7
|
+
{% include "@larva/components/c-logo/c-logo.twig" with c_logo %}
|
|
8
|
+
{% endif %}
|
|
9
|
+
|
|
10
|
+
{% if c_tagline %}
|
|
11
|
+
{% include "@larva/components/c-tagline/c-tagline.twig" with c_tagline %}
|
|
12
|
+
{% endif %}
|
|
13
|
+
|
|
14
|
+
{% if o_email_capture_form %}
|
|
15
|
+
{% include "@larva/objects/o-email-capture-form/o-email-capture-form.twig" with o_email_capture_form %}
|
|
16
|
+
{% endif %}
|
|
17
|
+
|
|
18
|
+
{% if c_tagline_terms %}
|
|
19
|
+
{% include "@larva/components/c-tagline/c-tagline.twig" with c_tagline_terms %}
|
|
20
|
+
{% endif %}
|
|
21
|
+
</div>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const { __experimentalCloneWithFallback } = require( '@penskemediacorp/larva' );
|
|
2
|
+
const clonedeep = require( 'lodash.clonedeep' );
|
|
3
|
+
|
|
4
|
+
const story_grid = __experimentalCloneWithFallback( 'modules/story-grid/story-grid.prototype' );
|
|
5
|
+
const story_prototype = __experimentalCloneWithFallback( 'modules/story/story.prototype' );
|
|
6
|
+
|
|
7
|
+
story_grid.story_grid_story_cards = story_grid.story_grid_story_cards.map( () => clonedeep( story_prototype ) );
|
|
8
|
+
|
|
9
|
+
story_grid.story_grid_grid_classes = '';
|
|
10
|
+
|
|
11
|
+
module.exports = story_grid;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@penskemediacorp/larva-patterns",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.4",
|
|
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.5.
|
|
23
|
+
"@penskemediacorp/larva-css": "^0.5.4",
|
|
24
24
|
"@penskemediacorp/larva-js": "^0.5.0",
|
|
25
25
|
"@penskemediacorp/larva-svg": "^0.5.0",
|
|
26
26
|
"lodash.clonedeep": "^4.5.0"
|
|
27
27
|
},
|
|
28
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "8d36aeb3dc6334c40f2e2c3a3ccac41312ef9d94"
|
|
29
29
|
}
|