@penskemediacorp/larva-patterns 0.6.3 → 0.6.4-develop.17

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.
Files changed (60) hide show
  1. package/__tests__/vlanding/vlanding.html +1 -0
  2. package/__tests__/vlanding/vlanding.prototype.js +3 -1
  3. package/components/c-input/c-input.prototype.js +8 -0
  4. package/components/c-input/c-input.twig +14 -0
  5. package/components/c-lazy-image/c-lazy-image.prototype.js +3 -2
  6. package/components/c-lazy-image/c-lazy-image.twig +5 -1
  7. package/modules/age-gate/README.md +3 -0
  8. package/modules/age-gate/age-gate.prototype.js +68 -0
  9. package/modules/age-gate/age-gate.twig +37 -0
  10. package/modules/banner/banner.prototype.js +10 -0
  11. package/modules/banner/banner.twig +10 -0
  12. package/modules/expandable-search/expandable-search.prototype.js +19 -0
  13. package/modules/expandable-search/expandable-search.twig +9 -0
  14. package/modules/featured-stories/featured-stories.prototype.js +23 -0
  15. package/modules/featured-stories/featured-stories.twig +18 -0
  16. package/modules/footer-button-list/footer-button-list.prototype.js +43 -0
  17. package/modules/footer-button-list/footer-button-list.twig +13 -0
  18. package/modules/footer-magazine-image/footer-magazine-image.prototype.js +15 -0
  19. package/modules/footer-magazine-image/footer-magazine-image.twig +3 -0
  20. package/modules/header/header.article.js +39 -0
  21. package/modules/header/header.prototype.js +90 -0
  22. package/modules/header/header.twig +74 -0
  23. package/modules/header-menu/header-menu.prototype.js +26 -0
  24. package/modules/header-menu/header-menu.twig +3 -0
  25. package/modules/header-sticky/header-sticky.article.js +43 -0
  26. package/modules/header-sticky/header-sticky.prototype.js +39 -0
  27. package/modules/header-sticky/header-sticky.twig +30 -0
  28. package/modules/heading/heading.twig +3 -1
  29. package/modules/mega-menu/mega-menu.prototype.js +16 -0
  30. package/modules/mega-menu/mega-menu.twig +10 -0
  31. package/modules/mega-menu-content/mega-menu-content.prototype.js +10 -0
  32. package/modules/mega-menu-content/mega-menu-content.twig +5 -0
  33. package/modules/mega-menu-footer/mega-menu-footer.prototype.js +41 -0
  34. package/modules/mega-menu-footer/mega-menu-footer.twig +19 -0
  35. package/modules/mega-menu-footer-subscribe/mega-menu-footer-subscribe.prototype.js +20 -0
  36. package/modules/mega-menu-footer-subscribe/mega-menu-footer-subscribe.twig +4 -0
  37. package/modules/mega-menu-item/mega-menu-item.prototype.js +23 -0
  38. package/modules/mega-menu-item/mega-menu-item.twig +13 -0
  39. package/modules/read-next/read-next.prototype.js +20 -0
  40. package/modules/read-next/read-next.twig +4 -0
  41. package/modules/search-form/search-form.prototype.js +8 -0
  42. package/modules/search-form/search-form.twig +11 -0
  43. package/modules/story/story.twig +11 -0
  44. package/modules/story-featured-quote/story-featured-quote.prototype.js +32 -0
  45. package/modules/story-featured-quote/story-featured-quote.twig +25 -0
  46. package/modules/story-grid/story-grid.twig +5 -0
  47. package/modules/sub-header/sub-header.prototype.js +8 -0
  48. package/modules/sub-header/sub-header.twig +7 -0
  49. package/objects/o-account-menu/o-account-menu.prototype.js +35 -0
  50. package/objects/o-account-menu/o-account-menu.twig +25 -0
  51. package/objects/o-header/o-header.twig +4 -0
  52. package/objects/o-header-buttons/o-header-buttons.column.js +10 -0
  53. package/objects/o-header-buttons/o-header-buttons.prototype.js +41 -0
  54. package/objects/o-header-buttons/o-header-buttons.twig +42 -0
  55. package/objects/o-input-group/o-input-group.prototype.js +11 -0
  56. package/objects/o-input-group/o-input-group.twig +5 -0
  57. package/objects/o-nav/o-nav.twig +10 -4
  58. package/objects/o-sub-header/o-sub-header.prototype.js +39 -0
  59. package/objects/o-sub-header/o-sub-header.twig +9 -0
  60. package/package.json +5 -5
@@ -0,0 +1,42 @@
1
+ <div class="lrv-u-flex {{o_header_button_classes}}">
2
+ <div class="item-wrap // {{ got_tip_wrapper_classes }}">
3
+ {% include "@larva/components/c-link/c-link.twig" with c_got_a_tip %}
4
+ </div>
5
+
6
+ {% if show_flyout %}
7
+
8
+ <div class="item-wrap // {{ account_menu_classes }} ">
9
+ {% include "@larva/objects/o-account-menu/o-account-menu.twig" with o_account_menu %}
10
+ </div>
11
+
12
+ {% else %}
13
+
14
+ <div class="item-wrap // {{ account_menu_classes }} {{ hide_flyout_classes}}">
15
+ {% include "@larva/components/c-link/c-link.twig" with c_account_link %}
16
+ </div>
17
+
18
+ {% endif %}
19
+
20
+ {% if button_wrap %}
21
+
22
+ <div class="items-wrap // {{ button_wrap_classes }}">
23
+ {% if c_subscribe_link %}
24
+ {% include "@larva/components/c-link/c-link.twig" with c_subscribe_link %}
25
+ {% endif %}
26
+
27
+ {% include "@larva/components/c-link/c-link.twig" with c_login_link %}
28
+ </div>
29
+
30
+ {% else %}
31
+
32
+ <div class="item-wrap // {{ subscribe_wrapper_classes }}">
33
+ {% if c_subscribe_link %}
34
+ {% include "@larva/components/c-link/c-link.twig" with c_subscribe_link %}
35
+ {% endif %}
36
+ </div>
37
+ <div class="item-wrap // {{ login_wrapper_classes }} ">
38
+ {% include "@larva/components/c-link/c-link.twig" with c_login_link %}
39
+ </div>
40
+
41
+ {% endif %}
42
+ </div>
@@ -0,0 +1,11 @@
1
+ const clonedeep = require( 'lodash.clonedeep' );
2
+ const c_input = clonedeep(require('@penskemediacorp/larva-patterns/components/c-input/c-input.prototype'));
3
+
4
+ module.exports = {
5
+ o_input_group_class: '',
6
+ o_input_group_items: [
7
+ c_input,
8
+ c_input,
9
+ c_input
10
+ ]
11
+ };
@@ -0,0 +1,5 @@
1
+ <div class="o-input-group {{ o_input_group_class }}">
2
+ {% for item in o_input_group_items %}
3
+ {% include "@larva/components/c-input/c-input.twig" with item %}
4
+ {% endfor %}
5
+ </div>
@@ -13,10 +13,16 @@
13
13
  >
14
14
 
15
15
  {% if o_nav_title_text %}
16
- {% if o_nav_tag_text %}
17
- <{{ o_nav_tag_text }} id="{{ o_nav_title_id_attr }}" class="o-nav__title {{ o_nav_title_classes }}">{{ o_nav_title_text }}</{{ o_nav_tag_text }}>
18
- {% else %}
19
- <h4 id="{{ o_nav_title_id_attr }}" class="o-nav__title {{ o_nav_title_classes }}">{{ o_nav_title_text }}</h4>
16
+ {% if o_nav_title_outer %}
17
+ <div class="o-nav__title-outer {{ o_nav_title_outer_classes }}">
18
+ {% endif %}
19
+ {% if o_nav_tag_text %}
20
+ <{{ o_nav_tag_text }} id="{{ o_nav_title_id_attr }}" class="o-nav__title {{ o_nav_title_classes }}">{{ o_nav_title_text }}</{{ o_nav_tag_text }}>
21
+ {% else %}
22
+ <h4 id="{{ o_nav_title_id_attr }}" class="o-nav__title {{ o_nav_title_classes }}">{{ o_nav_title_text }}</h4>
23
+ {% endif %}
24
+ {% if o_nav_title_outer %}
25
+ </div>
20
26
  {% endif %}
21
27
  {% endif %}
22
28
 
@@ -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>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@penskemediacorp/larva-patterns",
3
- "version": "0.6.3",
3
+ "version": "0.6.4-develop.17+854eedf7",
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.3",
24
- "@penskemediacorp/larva-js": "^0.6.0",
25
- "@penskemediacorp/larva-svg": "^0.6.0",
23
+ "@penskemediacorp/larva-css": "^0.6.4-develop.17+854eedf7",
24
+ "@penskemediacorp/larva-js": "^0.6.4-develop.17+854eedf7",
25
+ "@penskemediacorp/larva-svg": "^0.6.4-develop.17+854eedf7",
26
26
  "lodash.clonedeep": "^4.5.0"
27
27
  },
28
- "gitHead": "f0ffbd9ac9ba9b13889ade0e4dbc9c94f9e6dd11"
28
+ "gitHead": "854eedf76f31c2ed8f5300329cc2242f936e69b8"
29
29
  }