mod-build 3.4.27 → 3.4.30-beta.1

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.
@@ -48,7 +48,8 @@ module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
48
48
  // local dev files
49
49
  const remoteFilesForLocalDev = {
50
50
  '/scripts/mod-form.js': ['/temp/scripts/', 'mod-form.js'],
51
- '/scripts/mod-utils.js': ['/temp/scripts/', 'mod-utils.js']
51
+ '/scripts/mod-utils.js': ['/temp/scripts/', 'mod-utils.js'],
52
+ '/scripts/qs-form.js': ['/temp/scripts/', 'qs-form.js']
52
53
  };
53
54
 
54
55
  if (!nodeEnv) {
@@ -12,7 +12,7 @@ module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
12
12
  var qsFooterData = require('../src/data/components/qs-footer.js');
13
13
  var quoteFooterData = require('../src/data/components/quote-footer.js');
14
14
 
15
- var templatesData = Object.assign(commonData(), qsFooterData(), quoteFooterData(), siteData, { isLocal, nodeEnv, assetsPath, buildPath });
15
+ var templatesData = Object.assign(commonData(), qsFooterData(siteData), quoteFooterData(siteData), siteData, { isLocal, nodeEnv, assetsPath, buildPath });
16
16
 
17
17
  // This is helper function to evaluate JS expressions
18
18
  // in Handlebars, e.g. for conditions
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mod-build",
3
- "version": "3.4.27",
3
+ "version": "3.4.30-beta.1",
4
4
  "description": "Share components for S3 sites.",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -1,4 +1,5 @@
1
- var qsFooterData = function() {
1
+ var qsFooterData = function(siteData) {
2
+ var trade = siteData && siteData.primary_trade ? '&trade=' + siteData.primary_trade.replace(/[\s]+|_/g, '-').toLowerCase() : '';
2
3
  var data = {
3
4
  qsFooterData: {
4
5
  links: [
@@ -37,7 +38,7 @@ var qsFooterData = function() {
37
38
  contractor: {
38
39
  text: 'Are you a contractor?',
39
40
  linkText: 'Join Our Contractor Network',
40
- link: 'https://modernize.com/pro/register/leads/?trade=bathrooms&utm_campaign=quinstreet-referral'
41
+ link: 'https://modernize.com/pro/register/leads/?utm_campaign=quinstreet-referral' + trade
41
42
  }
42
43
  }
43
44
  };
@@ -1,11 +1,12 @@
1
- var quoteFooterData = function() {
1
+ var quoteFooterData = function(siteData) {
2
+ var trade = siteData && siteData.primary_trade ? '&trade=' + siteData.primary_trade.replace(/[\s]+|_/g, '-').toLowerCase() : '';
2
3
  var data = {
3
4
  quoteFooterData: {
4
5
  copyright: 'All Rights Reserved.',
5
6
  contractor: {
6
7
  text: 'Are you a contractor?',
7
8
  linkText: 'Join Our Contractor Network',
8
- link: 'https://modernize.com/pro/register/leads/?trade=bathrooms&utm_campaign=quinstreet-referral'
9
+ link: 'https://modernize.com/pro/register/leads/?utm_campaign=quinstreet-referral' + trade
9
10
  },
10
11
  capchaDisclosure: {
11
12
  text: 'This site is protected by reCAPTCHA and the Google',
@@ -21,15 +22,18 @@ var quoteFooterData = function() {
21
22
  privacyLinks: [
22
23
  {
23
24
  text: 'California Privacy',
24
- anchor: 'ccpa'
25
+ anchor: 'ccpa',
26
+ modal: true
25
27
  },
26
28
  {
27
29
  text: 'New York Privacy',
28
- anchor: 'nyna'
30
+ anchor: 'nyna',
31
+ modal: true
29
32
  },
30
33
  {
31
34
  text: 'Do Not Sell My Personal Information',
32
- anchor: 'uspi'
35
+ anchor: 'https://privacy-central.securiti.ai/#/dsr/983cfd4b-c36a-4601-89e9-b651e5a05708',
36
+ modal: false
33
37
  }
34
38
  ],
35
39
  links: [
@@ -20,7 +20,7 @@
20
20
  data-load="/modals{{this.url}}index.html"
21
21
  {{/xif}}
22
22
  >
23
- {{this.name}}
23
+ {{{this.name}}}
24
24
  </a>
25
25
  </li>
26
26
  {{/each}}
@@ -42,7 +42,7 @@
42
42
  data-load="/modals{{this.url}}index.html"
43
43
  {{/xif}}
44
44
  >
45
- {{this.name}}
45
+ {{{this.name}}}
46
46
  </a>
47
47
  </li>
48
48
  {{/each}}
@@ -24,7 +24,19 @@
24
24
  {{#xif "this.privacylinks === 'top'"}}
25
25
  <div class="footer__links">
26
26
  {{#each quoteFooterData.privacyLinks}}
27
- <a href="{{../links.privacy}}" data-load="./modals/privacy/index.html" data-bind="modal-link" data-anchor="#{{this.anchor}}">{{{this.text}}}</a>
27
+ <a
28
+ {{#xif "this.modal === true" }}
29
+ href="{{../links.privacy}}"
30
+ data-load="./modals/privacy/index.html"
31
+ data-bind="modal-link"
32
+ data-anchor="#{{this.anchor}}"
33
+ {{/xif}}
34
+ {{#xif "this.modal === false" }}
35
+ href="{{this.anchor}}"
36
+ target="_blank"
37
+ rel="noopener noreferrer"
38
+ {{/xif}}
39
+ >{{{this.text}}}</a>
28
40
  {{/each}}
29
41
  <!--
30
42
  - Define the customPrivacyLinks array of objects in template.js / siteconfig.js
@@ -32,7 +44,19 @@
32
44
  -->
33
45
  {{#if this.customPrivacyLinks}}
34
46
  {{#each this.customPrivacyLinks}}
35
- <a href="{{../links.privacy}}" data-load="./modals/privacy/index.html" data-bind="modal-link" data-anchor="#{{this.anchor}}">{{{this.text}}}</a>
47
+ <a
48
+ {{#xif "this.modal === true" }}
49
+ href="{{../links.privacy}}"
50
+ data-load="./modals/privacy/index.html"
51
+ data-bind="modal-link"
52
+ data-anchor="#{{this.anchor}}"
53
+ {{/xif}}
54
+ {{#xif "this.modal === false" }}
55
+ href="{{this.anchor}}"
56
+ target="_blank"
57
+ rel="noopener noreferrer"
58
+ {{/xif}}
59
+ >{{{this.text}}}</a>
36
60
  {{/each}}
37
61
  {{/if}}
38
62
  </div>
@@ -52,7 +76,7 @@
52
76
  <div class="footer__links">
53
77
  {{#each quoteFooterData.links}}
54
78
  <a href="{{#if this.modal}}/{{this.url}}{{else}}{{this.url}}{{/if}}" {{#xif "this.modal === true" }}data-load="./modals/{{this.url}}/index.html" data-bind="modal-link"{{/xif}} {{#if this.target}}target="{{this.target}}" {{#xif "this.target === '_blank'"}} rel="noopener noreferrer"{{/xif}} {{/if}}>
55
- {{this.text}}
79
+ {{{this.text}}}
56
80
  </a>
57
81
  {{/each}}
58
82
  <!--
@@ -61,7 +85,7 @@
61
85
  -->
62
86
  {{#if this.customFooterLinks}}
63
87
  {{#each this.customFooterLinks}}
64
- <a href="{{#if this.modal}}/{{this.url}}{{else}}{{this.url}}{{/if}}" {{#xif "this.modal === true" }}data-load="./modals/{{this.url}}/index.html" data-bind="modal-link"{{/xif}} {{#if this.target}}target="{{this.target}}" {{#xif "this.target === '_blank'"}} rel="noopener noreferrer"{{/xif}}{{/if}}>{{this.text}}</a>
88
+ <a href="{{#if this.modal}}/{{this.url}}{{else}}{{this.url}}{{/if}}" {{#xif "this.modal === true" }}data-load="./modals/{{this.url}}/index.html" data-bind="modal-link"{{/xif}} {{#if this.target}}target="{{this.target}}" {{#xif "this.target === '_blank'"}} rel="noopener noreferrer"{{/xif}}{{/if}}>{{{this.text}}}</a>
65
89
  {{/each}}
66
90
  {{/if}}
67
91
  </div>
@@ -69,7 +93,19 @@
69
93
  {{#xif "this.privacylinks === 'bottom'"}}
70
94
  <div class="footer__links">
71
95
  {{#each quoteFooterData.privacyLinks}}
72
- <a href="{{../links.privacy}}" data-load="./modals/privacy/index.html" data-bind="modal-link" data-anchor="#{{this.anchor}}">{{{this.text}}}</a>
96
+ <a
97
+ {{#xif "this.modal === true" }}
98
+ href="{{../links.privacy}}"
99
+ data-load="./modals/privacy/index.html"
100
+ data-bind="modal-link"
101
+ data-anchor="#{{this.anchor}}"
102
+ {{/xif}}
103
+ {{#xif "this.modal === false" }}
104
+ href="{{this.anchor}}"
105
+ target="_blank"
106
+ rel="noopener noreferrer"
107
+ {{/xif}}
108
+ >{{{this.text}}}</a>
73
109
  {{/each}}
74
110
  <!--
75
111
  - Define the customPrivacyLinks array of objects in template.js / siteconfig.js
@@ -77,7 +113,19 @@
77
113
  -->
78
114
  {{#if this.customPrivacyLinks}}
79
115
  {{#each this.customPrivacyLinks}}
80
- <a href="{{../links.privacy}}" data-load="./modals/privacy/index.html" data-bind="modal-link" data-anchor="#{{this.anchor}}">{{{this.text}}}</a>
116
+ <a
117
+ {{#xif "this.modal === true" }}
118
+ href="{{../links.privacy}}"
119
+ data-load="./modals/privacy/index.html"
120
+ data-bind="modal-link"
121
+ data-anchor="#{{this.anchor}}"
122
+ {{/xif}}
123
+ {{#xif "this.modal === false" }}
124
+ href="{{this.anchor}}"
125
+ target="_blank"
126
+ rel="noopener noreferrer"
127
+ {{/xif}}
128
+ >{{{this.text}}}</a>
81
129
  {{/each}}
82
130
  {{/if}}
83
131
  </div>
@@ -25,7 +25,19 @@
25
25
  <ul class="footer__links">
26
26
  {{#each quoteFooterData.privacyLinks}}
27
27
  <li>
28
- <a href="{{../links.privacy}}" data-load="./modals/privacy/index.html" data-bind="modal-link" data-anchor="#{{this.anchor}}">
28
+ <a
29
+ {{#xif "this.modal === true" }}
30
+ href="{{../links.privacy}}"
31
+ data-load="./modals/privacy/index.html"
32
+ data-bind="modal-link"
33
+ data-anchor="#{{this.anchor}}"
34
+ {{/xif}}
35
+ {{#xif "this.modal === false" }}
36
+ href="{{this.anchor}}"
37
+ target="_blank"
38
+ rel="noopener noreferrer"
39
+ {{/xif}}
40
+ >
29
41
  {{{this.text}}}
30
42
  </a>
31
43
  </li>
@@ -37,7 +49,19 @@
37
49
  {{#if this.customPrivacyLinks}}
38
50
  {{#each this.customPrivacyLinks}}
39
51
  <li>
40
- <a href="{{../links.privacy}}" data-load="./modals/privacy/index.html" data-bind="modal-link" data-anchor="#{{this.anchor}}">
52
+ <a
53
+ {{#xif "this.modal === true" }}
54
+ href="{{../links.privacy}}"
55
+ data-load="./modals/privacy/index.html"
56
+ data-bind="modal-link"
57
+ data-anchor="#{{this.anchor}}"
58
+ {{/xif}}
59
+ {{#xif "this.modal === false" }}
60
+ href="{{this.anchor}}"
61
+ target="_blank"
62
+ rel="noopener noreferrer"
63
+ {{/xif}}
64
+ >
41
65
  {{{this.text}}}
42
66
  </a>
43
67
  </li>
@@ -50,7 +74,7 @@
50
74
  <ul class="footer__links">
51
75
  {{#each quoteFooterData.links}}
52
76
  <li>
53
- <a href="{{#if this.modal}}/{{this.url}}{{else}}{{this.url}}{{/if}}" {{#xif "this.modal === true" }}data-load="./modals/{{this.url}}/index.html" data-bind="modal-link"{{/xif}} {{#if this.target}}target="{{this.target}}"{{#xif "this.target === '_blank'"}} rel="noopener noreferrer"{{/xif}}{{/if}}>{{this.text}}</a>
77
+ <a href="{{#if this.modal}}/{{this.url}}{{else}}{{this.url}}{{/if}}" {{#xif "this.modal === true" }}data-load="./modals/{{this.url}}/index.html" data-bind="modal-link"{{/xif}} {{#if this.target}}target="{{this.target}}"{{#xif "this.target === '_blank'"}} rel="noopener noreferrer"{{/xif}}{{/if}}>{{{this.text}}}</a>
54
78
  </li>
55
79
  {{/each}}
56
80
  <!--
@@ -60,7 +84,7 @@
60
84
  {{#if this.customFooterLinks}}
61
85
  {{#each this.customFooterLinks}}
62
86
  <li>
63
- <a href="{{#if this.modal}}/{{this.url}}{{else}}{{this.url}}{{/if}}" {{#xif "this.modal === true" }}data-load="./modals/{{this.url}}/index.html" data-bind="modal-link"{{/xif}} {{#if this.target}}target="{{this.target}}"{{#xif "this.target === '_blank'"}} rel="noopener noreferrer"{{/xif}}{{/if}}>{{this.text}}</a>
87
+ <a href="{{#if this.modal}}/{{this.url}}{{else}}{{this.url}}{{/if}}" {{#xif "this.modal === true" }}data-load="./modals/{{this.url}}/index.html" data-bind="modal-link"{{/xif}} {{#if this.target}}target="{{this.target}}"{{#xif "this.target === '_blank'"}} rel="noopener noreferrer"{{/xif}}{{/if}}>{{{this.text}}}</a>
64
88
  </li>
65
89
  {{/each}}
66
90
  {{/if}}
@@ -83,7 +107,19 @@
83
107
  <ul class="footer__links">
84
108
  {{#each quoteFooterData.privacyLinks}}
85
109
  <li>
86
- <a href="{{../links.privacy}}" data-load="./modals/privacy/index.html" data-bind="modal-link" data-anchor="#{{this.anchor}}">
110
+ <a
111
+ {{#xif "this.modal === true" }}
112
+ href="{{../links.privacy}}"
113
+ data-load="./modals/privacy/index.html"
114
+ data-bind="modal-link"
115
+ data-anchor="#{{this.anchor}}"
116
+ {{/xif}}
117
+ {{#xif "this.modal === false" }}
118
+ href="{{this.anchor}}"
119
+ target="_blank"
120
+ rel="noopener noreferrer"
121
+ {{/xif}}
122
+ >
87
123
  {{{this.text}}}
88
124
  </a>
89
125
  </li>
@@ -95,7 +131,19 @@
95
131
  {{#if this.customPrivacyLinks}}
96
132
  {{#each this.customPrivacyLinks}}
97
133
  <li>
98
- <a href="{{../links.privacy}}" data-load="./modals/privacy/index.html" data-bind="modal-link" data-anchor="#{{this.anchor}}">
134
+ <a
135
+ {{#xif "this.modal === true" }}
136
+ href="{{../links.privacy}}"
137
+ data-load="./modals/privacy/index.html"
138
+ data-bind="modal-link"
139
+ data-anchor="#{{this.anchor}}"
140
+ {{/xif}}
141
+ {{#xif "this.modal === false" }}
142
+ href="{{this.anchor}}"
143
+ target="_blank"
144
+ rel="noopener noreferrer"
145
+ {{/xif}}
146
+ >
99
147
  {{{this.text}}}
100
148
  </a>
101
149
  </li>