sfc-utils 1.4.137 → 1.4.139

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/accountswap.js CHANGED
@@ -28,8 +28,8 @@ const pollForAccount = async function (i, isNav) {
28
28
  await new Promise((resolve) => setTimeout(resolve, 1000));
29
29
  return await pollForAccount(i + 1, isNav);
30
30
  }
31
- subButtonText.innerText = "Account";
32
- subButton.setAttribute("href", accountURL);
31
+ // Change the inner HTML
32
+ subButton.innerHTML = `<div id="#nav2-sub-box" href="${accountURL}">Account</div>`;
33
33
  // Instead of having a true link, set click event to run treg.realm.iframeProfile.NavigateToIndex()
34
34
  if (window.treg.realm.iframeProfile) {
35
35
  subButton.onclick = function (e) {
package/brands2.js CHANGED
@@ -1,226 +1,230 @@
1
-
2
1
  // Set brand object to override CSS based on this market's styles
3
- let getBrands2 = function(market){
4
- // We can add any Hearst global overrides here:
5
- let defaultObj = {
6
- styles: {
7
- "@alert-red": "#d20000",
8
- // Defaults
9
- "@hed": '"Lora", Georgia, serif',
10
- "@hed-alt": '"Lora", Georgia, serif',
11
- "@serif": '"Lora", Georgia, serif',
12
- "@sans": '"Source Sans Pro", Helvetica, sans-serif',
13
- "@sans-alt": '"Source Sans Pro", Helvetica, sans-serif',
2
+ let getBrands2 = function (market) {
3
+ // We can add any Hearst global overrides here:
4
+ let defaultObj = {
5
+ styles: {
6
+ "@alert-red": "#d20000",
7
+ // Defaults
8
+ "@hed": '"Lora", Georgia, serif',
9
+ "@hed-alt": '"Lora", Georgia, serif',
10
+ "@serif": '"Lora", Georgia, serif',
11
+ "@sans": '"Source Sans Pro", Helvetica, sans-serif',
12
+ "@sans-alt": '"Source Sans Pro", Helvetica, sans-serif',
14
13
 
15
- // Icons
16
- "@sub-icon": `url('data:image/svg+xml, <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="white"><path d="M160 416H96c-17.67 0-32-14.33-32-32V128c0-17.67 14.33-32 32-32h64c17.67 0 32-14.33 32-32S177.7 32 160 32H96C42.98 32 0 74.98 0 128v256c0 53.02 42.98 96 96 96h64c17.67 0 32-14.33 32-32S177.7 416 160 416zM502.6 233.4l-128-128c-12.51-12.51-32.76-12.49-45.25 0c-12.5 12.5-12.5 32.75 0 45.25L402.8 224H192C174.3 224 160 238.3 160 256s14.31 32 32 32h210.8l-73.38 73.38c-12.5 12.5-12.5 32.75 0 45.25s32.75 12.5 45.25 0l128-128C515.1 266.1 515.1 245.9 502.6 233.4z"/></svg>')`,
17
- },
18
- attributes: {
19
- "subscribeLink": "https://www.hearst.com/newspapers?projects=true"
20
- }
21
- }
14
+ // Icons
15
+ "@sub-icon": `url('data:image/svg+xml, <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="white"><path d="M160 416H96c-17.67 0-32-14.33-32-32V128c0-17.67 14.33-32 32-32h64c17.67 0 32-14.33 32-32S177.7 32 160 32H96C42.98 32 0 74.98 0 128v256c0 53.02 42.98 96 96 96h64c17.67 0 32-14.33 32-32S177.7 416 160 416zM502.6 233.4l-128-128c-12.51-12.51-32.76-12.49-45.25 0c-12.5 12.5-12.5 32.75 0 45.25L402.8 224H192C174.3 224 160 238.3 160 256s14.31 32 32 32h210.8l-73.38 73.38c-12.5 12.5-12.5 32.75 0 45.25s32.75 12.5 45.25 0l128-128C515.1 266.1 515.1 245.9 502.6 233.4z"/></svg>')`,
16
+ },
17
+ attributes: {
18
+ subscribeLink: "https://www.hearst.com/newspapers?projects=true",
19
+ },
20
+ };
22
21
 
23
- // Handle market-specific styles here:
24
- let marketObj = {
25
- /* San Franicsco Chronicle */
26
- SFC: {
27
- styles: {
28
- "@brand": "#26A0A5",
29
- "@brand-secondary": "#FFBC30",
30
- "@hed": '"Tiempos Headline", "Baskerville", Georgia, serif',
31
- "@hed-alt": '"Tiempos Headline", "Baskerville", Georgia, serif',
32
- "@serif": '"Tiempos", "Baskerville", Georgia, serif',
33
- "@sans": '"National", Arial, Helvetica, sans-serif',
34
- "@sans-alt": '"National", Arial, Helvetica, sans-serif'
35
- },
36
- attributes: {
37
- "marketPrefix": "sf",
38
- "siteName": "The San Francisco Chronicle",
39
- "twitter": "sfchronicle",
40
- "gaAccount": "UA-1616916-26",
41
- "subscribeLink": "https://www.sfchronicle.com/subproject",
42
- "sailCustomer": "fca2a0390286f0e53120a668534d9529",
43
- "sailSiteName": "san-francisco-chronicle",
44
- "siteId": 35,
45
- }
46
- },
22
+ // Handle market-specific styles here:
23
+ let marketObj = {
24
+ /* San Franicsco Chronicle */
25
+ SFC: {
26
+ styles: {
27
+ "@brand": "#26A0A5",
28
+ "@brand-secondary": "#FFBC30",
29
+ "@hed": '"Tiempos Headline", "Baskerville", Georgia, serif',
30
+ "@hed-alt": '"Tiempos Headline", "Baskerville", Georgia, serif',
31
+ "@serif": '"Tiempos", "Baskerville", Georgia, serif',
32
+ "@sans": '"National", Arial, Helvetica, sans-serif',
33
+ "@sans-alt": '"National", Arial, Helvetica, sans-serif',
34
+ },
35
+ attributes: {
36
+ marketPrefix: "sf",
37
+ siteName: "The San Francisco Chronicle",
38
+ twitter: "sfchronicle",
39
+ gaAccount: "UA-1616916-26",
40
+ //subscribeLink: "https://www.sfchronicle.com/subproject",
41
+ subscribeLink:
42
+ "https://subscription.sfchronicle.com/checkout/684/1444?origin=button&ipid=project&variant=devhub",
43
+ sailCustomer: "fca2a0390286f0e53120a668534d9529",
44
+ sailSiteName: "san-francisco-chronicle",
45
+ siteId: 35,
46
+ },
47
+ },
47
48
 
48
- /* Houston Chronicle */
49
- Houston: {
50
- styles: {
51
- "@brand": "#FF7500",
52
- "@brand-secondary": "#1874CB",
53
- "@hed": '"Publico Headline", Georgia, "Baskerville", serif',
54
- "@hed-alt": '"Marr Sans Condensed", Georgia, "Baskerville", serif',
55
- "@serif": '"Publico", Georgia, "Baskerville", serif',
56
- "@sans": '"Marr Sans", Arial, Helvetica, sans-serif',
57
- "@sans-alt": '"Marr Sans Condensed", Impact, Helvetica, sans-serif'
58
- },
59
- attributes: {
60
- "marketPrefix": "hc",
61
- "siteName": "The Houston Chronicle",
62
- "twitter": "HoustonChron",
63
- "invert": true,
64
- "gaAccount": "UA-1616916-24",
65
- "subscribeLink": "https://www.houstonchronicle.com/subproject",
66
- "sailCustomer": "48e30b5083cf6bf47c519651453c9e8a",
67
- "sailSiteName": "houston-chronicle",
68
- "siteId": 33
69
- }
70
- },
49
+ /* Houston Chronicle */
50
+ Houston: {
51
+ styles: {
52
+ "@brand": "#FF7500",
53
+ "@brand-secondary": "#1874CB",
54
+ "@hed": '"Publico Headline", Georgia, "Baskerville", serif',
55
+ "@hed-alt": '"Marr Sans Condensed", Georgia, "Baskerville", serif',
56
+ "@serif": '"Publico", Georgia, "Baskerville", serif',
57
+ "@sans": '"Marr Sans", Arial, Helvetica, sans-serif',
58
+ "@sans-alt": '"Marr Sans Condensed", Impact, Helvetica, sans-serif',
59
+ },
60
+ attributes: {
61
+ marketPrefix: "hc",
62
+ siteName: "The Houston Chronicle",
63
+ twitter: "HoustonChron",
64
+ invert: true,
65
+ gaAccount: "UA-1616916-24",
66
+ subscribeLink: "https://www.houstonchronicle.com/subproject",
67
+ sailCustomer: "48e30b5083cf6bf47c519651453c9e8a",
68
+ sailSiteName: "houston-chronicle",
69
+ siteId: 33,
70
+ },
71
+ },
71
72
 
72
- /* Albany Times Union */
73
- Albany: {
74
- styles: {
75
- "@brand": "#006FBA",
76
- "@brand-secondary": "#E5A72C",
77
- "@hed": '"ChronicleDispCond", Georgia, serif',
78
- "@hed-alt": '"ChronicleDispCond", Georgia, serif',
79
- "@serif": '"ChronicleText", Georgia, serif',
80
- "@sans": '"HelveticaNeue", Helvetica, sans-serif',
81
- "@sans-alt": '"HelveticaNeueCond", Impact, Helvetica, sans-serif'
82
- },
83
- attributes: {
84
- "marketPrefix": "tu",
85
- "siteName": "Times Union",
86
- "twitter": "timesunion",
87
- "invert": true,
88
- "gaAccount": "UA-1616916-7",
89
- "subscribeLink": "https://www.timesunion.com/subproject",
90
- "sailCustomer": "5bb9eee089bdc2e27cbd265535ad1f90",
91
- "sailSiteName": "times-union",
92
- "siteId": 3
93
- }
94
- },
73
+ /* Albany Times Union */
74
+ Albany: {
75
+ styles: {
76
+ "@brand": "#006FBA",
77
+ "@brand-secondary": "#E5A72C",
78
+ "@hed": '"ChronicleDispCond", Georgia, serif',
79
+ "@hed-alt": '"ChronicleDispCond", Georgia, serif',
80
+ "@serif": '"ChronicleText", Georgia, serif',
81
+ "@sans": '"HelveticaNeue", Helvetica, sans-serif',
82
+ "@sans-alt": '"HelveticaNeueCond", Impact, Helvetica, sans-serif',
83
+ },
84
+ attributes: {
85
+ marketPrefix: "tu",
86
+ siteName: "Times Union",
87
+ twitter: "timesunion",
88
+ invert: true,
89
+ gaAccount: "UA-1616916-7",
90
+ subscribeLink: "https://www.timesunion.com/subproject",
91
+ sailCustomer: "5bb9eee089bdc2e27cbd265535ad1f90",
92
+ sailSiteName: "times-union",
93
+ siteId: 3,
94
+ },
95
+ },
95
96
 
96
- /* San Antonio Express News */
97
- SanAntonio: {
98
- styles: {
99
- "@brand": "#BA142D",
100
- "@brand-secondary": "#189196"
101
- },
102
- attributes: {
103
- "marketPrefix": "sa",
104
- "siteName": "Express-News",
105
- "twitter": "ExpressNews",
106
- "invert": true,
107
- "gaAccount": "UA-1616916-27",
108
- "subscribeLink": "https://www.expressnews.com/subproject",
109
- "sailCustomer": "aec52c4681ed63b5beab139a2584f0d4",
110
- "sailSiteName": "san-antonio-express-news",
111
- "siteId": 36
112
- }
113
- },
97
+ /* San Antonio Express News */
98
+ SanAntonio: {
99
+ styles: {
100
+ "@brand": "#BA142D",
101
+ "@brand-secondary": "#189196",
102
+ },
103
+ attributes: {
104
+ marketPrefix: "sa",
105
+ siteName: "Express-News",
106
+ twitter: "ExpressNews",
107
+ invert: true,
108
+ gaAccount: "UA-1616916-27",
109
+ subscribeLink: "https://www.expressnews.com/subproject",
110
+ sailCustomer: "aec52c4681ed63b5beab139a2584f0d4",
111
+ sailSiteName: "san-antonio-express-news",
112
+ siteId: 36,
113
+ },
114
+ },
114
115
 
115
- /* Connecticut */
116
- CT: {
117
- styles: {
118
- "@brand": "#1A98FF",
119
- "@brand-secondary": "#FFBC30"
120
- },
121
- attributes: {
122
- "marketPrefix": "in",
123
- "siteName": "CTInsider",
124
- "twitter": "insider_ct",
125
- "invert": true,
126
- "gaAccount": "UA-1616916-99",
127
- "subscribeLink": "https://www.ctinsider.com/subproject",
128
- "sailCustomer": "9b21160afa226c9f84d27b47c3d52364",
129
- "sailSiteName": "ct-insider",
130
- "siteId": 61
131
- }
132
- },
116
+ /* Connecticut */
117
+ CT: {
118
+ styles: {
119
+ "@brand": "#1A98FF",
120
+ "@brand-secondary": "#FFBC30",
121
+ },
122
+ attributes: {
123
+ marketPrefix: "in",
124
+ siteName: "CTInsider",
125
+ twitter: "insider_ct",
126
+ invert: true,
127
+ gaAccount: "UA-1616916-99",
128
+ subscribeLink: "https://www.ctinsider.com/subproject",
129
+ sailCustomer: "9b21160afa226c9f84d27b47c3d52364",
130
+ sailSiteName: "ct-insider",
131
+ siteId: 61,
132
+ },
133
+ },
133
134
 
134
- /* Communities */
135
- Texcom: {
136
- styles: {
137
- "@brand": "#900900",
138
- "@brand-secondary": "#189196"
139
- },
140
- attributes: {
141
- "marketPrefix": "texcom/mrt",
142
- "siteName": "Midland Reporter-Telegram",
143
- "twitter": "mwtnews",
144
- "invert": true,
145
- "gaAccount": "UA-1616916-99",
146
- "subscribeLink": "/subproject",
147
- "sailCustomer": "4a181de0b63a131cf27f8ea9485e5e1c",
148
- "sailSiteName": "midland-reporter-telegram",
149
- "siteId": 57
150
- }
151
- },
152
- Midcom: {
153
- styles: {
154
- "@brand": "#900900",
155
- "@brand-secondary": "#189196"
156
- },
157
- attributes: {
158
- "marketPrefix": "midcom/mid",
159
- "siteName": "Midland Daily News",
160
- "twitter": "MDN",
161
- "invert": true,
162
- "gaAccount": "UA-1616916-99",
163
- "subscribeLink": "/subproject",
164
- "sailCustomer": "4a181de0b63a131cf27f8ea9485e5e1c",
165
- "sailSiteName": "midland-daily-news",
166
- "siteId": 61
167
- }
168
- },
169
- Conroe: {
170
- styles: {
171
- "@brand": "#900900",
172
- "@brand-secondary": "#189196"
173
- },
174
- attributes: {
175
- "marketPrefix": "conroe",
176
- "siteName": "Conroe Courier",
177
- "twitter": "ConroeCourier",
178
- "invert": true,
179
- "gaAccount": "UA-1616916-99",
180
- "subscribeLink": "https://www.yourconroenews.com/subproject",
181
- "sailCustomer": "4a181de0b63a131cf27f8ea9485e5e1c",
182
- "sailSiteName": "the-courier-of-montgomery-county",
183
- "siteId": 68
184
- }
185
- },
186
- Seattle: {
187
- styles: {
188
- "@brand": "#3F8395",
189
- "@brand-secondary": "#189196"
190
- },
191
- attributes: {
192
- "marketPrefix": "seattle",
193
- "siteName": "Seattle PI",
194
- "twitter": "seattlepi",
195
- "invert": true,
196
- "gaAccount": "UA-1616916-99",
197
- "subscribeLink": "",
198
- "sailCustomer": "da30899589786517b0c0cead37a48b06",
199
- "sailSiteName": "seattle-post-intelligencer",
200
- "siteId": 20
201
- }
202
- },
203
- /* Misc */
204
- TK: {
205
- styles: {
206
- "@brand": "#900900",
207
- "@brand-secondary": "#189196"
208
- },
209
- attributes: {
210
- "marketPrefix": "tk",
211
- "siteName": "Hearst Digital News",
212
- "twitter": "Hearst",
213
- "invert": true,
214
- }
215
- }
216
- }
135
+ /* Communities */
136
+ Texcom: {
137
+ styles: {
138
+ "@brand": "#900900",
139
+ "@brand-secondary": "#189196",
140
+ },
141
+ attributes: {
142
+ marketPrefix: "texcom/mrt",
143
+ siteName: "Midland Reporter-Telegram",
144
+ twitter: "mwtnews",
145
+ invert: true,
146
+ gaAccount: "UA-1616916-99",
147
+ subscribeLink: "/subproject",
148
+ sailCustomer: "4a181de0b63a131cf27f8ea9485e5e1c",
149
+ sailSiteName: "midland-reporter-telegram",
150
+ siteId: 57,
151
+ },
152
+ },
153
+ Midcom: {
154
+ styles: {
155
+ "@brand": "#900900",
156
+ "@brand-secondary": "#189196",
157
+ },
158
+ attributes: {
159
+ marketPrefix: "midcom/mid",
160
+ siteName: "Midland Daily News",
161
+ twitter: "MDN",
162
+ invert: true,
163
+ gaAccount: "UA-1616916-99",
164
+ subscribeLink: "/subproject",
165
+ sailCustomer: "4a181de0b63a131cf27f8ea9485e5e1c",
166
+ sailSiteName: "midland-daily-news",
167
+ siteId: 61,
168
+ },
169
+ },
170
+ Conroe: {
171
+ styles: {
172
+ "@brand": "#900900",
173
+ "@brand-secondary": "#189196",
174
+ },
175
+ attributes: {
176
+ marketPrefix: "conroe",
177
+ siteName: "Conroe Courier",
178
+ twitter: "ConroeCourier",
179
+ invert: true,
180
+ gaAccount: "UA-1616916-99",
181
+ subscribeLink: "https://www.yourconroenews.com/subproject",
182
+ sailCustomer: "4a181de0b63a131cf27f8ea9485e5e1c",
183
+ sailSiteName: "the-courier-of-montgomery-county",
184
+ siteId: 68,
185
+ },
186
+ },
187
+ Seattle: {
188
+ styles: {
189
+ "@brand": "#3F8395",
190
+ "@brand-secondary": "#189196",
191
+ },
192
+ attributes: {
193
+ marketPrefix: "seattle",
194
+ siteName: "Seattle PI",
195
+ twitter: "seattlepi",
196
+ invert: true,
197
+ gaAccount: "UA-1616916-99",
198
+ subscribeLink: "",
199
+ sailCustomer: "da30899589786517b0c0cead37a48b06",
200
+ sailSiteName: "seattle-post-intelligencer",
201
+ siteId: 20,
202
+ },
203
+ },
204
+ /* Misc */
205
+ TK: {
206
+ styles: {
207
+ "@brand": "#900900",
208
+ "@brand-secondary": "#189196",
209
+ },
210
+ attributes: {
211
+ marketPrefix: "tk",
212
+ siteName: "Hearst Digital News",
213
+ twitter: "Hearst",
214
+ invert: true,
215
+ },
216
+ },
217
+ };
217
218
 
218
- // Combine global and market styles to return the final object
219
- let combinedStyles = {
220
- styles: Object.assign(defaultObj.styles, marketObj[market].styles),
221
- attributes: Object.assign(defaultObj.attributes, marketObj[market].attributes)
222
- }
223
- return combinedStyles
224
- }
219
+ // Combine global and market styles to return the final object
220
+ let combinedStyles = {
221
+ styles: Object.assign(defaultObj.styles, marketObj[market].styles),
222
+ attributes: Object.assign(
223
+ defaultObj.attributes,
224
+ marketObj[market].attributes
225
+ ),
226
+ };
227
+ return combinedStyles;
228
+ };
225
229
 
226
- module.exports = { getBrands2 }
230
+ module.exports = { getBrands2 };
package/brands3.js CHANGED
@@ -1,224 +1,238 @@
1
-
2
1
  // Set brand object to override CSS based on this market's styles
3
- let getBrands3 = function(market){
4
- // We can add any Hearst global overrides here:
5
- let defaultObj = {
6
- styles: {
7
- "@alert-red": "#d20000",
8
- // Defaults
9
- "@display": '"Archivo", Arial, sans-serif',
10
- "@body": '"Mulish", Verdana, sans-serif',
11
- "@secondary": '"Rubik", Arial, sans-serif',
12
- //backwards compatible
13
- "@hed": '"Archivo", Arial, sans-serif',
14
- "@hed-alt": '"Archivo", Arial, sans-serif',
15
- "@serif": '"Mulish", Verdana, sans-serif',
16
- "@sans": '"Rubik", Arial, sans-serif',
17
- "@sans-alt": '"Rubik", Arial, sans-serif',
2
+ let getBrands3 = function (market) {
3
+ // We can add any Hearst global overrides here:
4
+ let defaultObj = {
5
+ styles: {
6
+ "@alert-red": "#d20000",
7
+ // Defaults
8
+ "@display": '"Archivo", Arial, sans-serif',
9
+ "@body": '"Mulish", Verdana, sans-serif',
10
+ "@secondary": '"Rubik", Arial, sans-serif',
11
+ //backwards compatible
12
+ "@hed": '"Archivo", Arial, sans-serif',
13
+ "@hed-alt": '"Archivo", Arial, sans-serif',
14
+ "@serif": '"Mulish", Verdana, sans-serif',
15
+ "@sans": '"Rubik", Arial, sans-serif',
16
+ "@sans-alt": '"Rubik", Arial, sans-serif',
18
17
 
19
- // Icons
20
- "@sub-icon": `url('data:image/svg+xml, <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="white"><path d="M160 416H96c-17.67 0-32-14.33-32-32V128c0-17.67 14.33-32 32-32h64c17.67 0 32-14.33 32-32S177.7 32 160 32H96C42.98 32 0 74.98 0 128v256c0 53.02 42.98 96 96 96h64c17.67 0 32-14.33 32-32S177.7 416 160 416zM502.6 233.4l-128-128c-12.51-12.51-32.76-12.49-45.25 0c-12.5 12.5-12.5 32.75 0 45.25L402.8 224H192C174.3 224 160 238.3 160 256s14.31 32 32 32h210.8l-73.38 73.38c-12.5 12.5-12.5 32.75 0 45.25s32.75 12.5 45.25 0l128-128C515.1 266.1 515.1 245.9 502.6 233.4z"/></svg>')`,
21
- },
22
- attributes: {
23
- "subscribeLink": "https://www.hearst.com/newspapers?projects=true"
24
- }
25
- }
18
+ // Icons
19
+ "@sub-icon": `url('data:image/svg+xml, <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="white"><path d="M160 416H96c-17.67 0-32-14.33-32-32V128c0-17.67 14.33-32 32-32h64c17.67 0 32-14.33 32-32S177.7 32 160 32H96C42.98 32 0 74.98 0 128v256c0 53.02 42.98 96 96 96h64c17.67 0 32-14.33 32-32S177.7 416 160 416zM502.6 233.4l-128-128c-12.51-12.51-32.76-12.49-45.25 0c-12.5 12.5-12.5 32.75 0 45.25L402.8 224H192C174.3 224 160 238.3 160 256s14.31 32 32 32h210.8l-73.38 73.38c-12.5 12.5-12.5 32.75 0 45.25s32.75 12.5 45.25 0l128-128C515.1 266.1 515.1 245.9 502.6 233.4z"/></svg>')`,
20
+ },
21
+ attributes: {
22
+ subscribeLink: "https://www.hearst.com/newspapers?projects=true",
23
+ },
24
+ };
26
25
 
27
- // Handle market-specific styles here:
28
- let marketObj = {
29
- /* San Franicsco Chronicle */
30
- SFC: {
31
- styles: {
32
- "@brand": "#26A0A5",
33
- "@brand-secondary": "#FFBC30",
34
- "@display": '"Tiempos Headline", "Baskerville", Georgia, serif',
35
- "@body": '"Tiempos", "Baskerville", Georgia, serif',
36
- "@secondary": '"National", Arial, Helvetica, sans-serif',
37
- //backwards compatible
38
- "@hed": '"Tiempos Headline", "Baskerville", Georgia, serif',
39
- "@hed-alt": '"Tiempos Headline", "Baskerville", Georgia, serif',
40
- "@serif": '"Tiempos", "Baskerville", Georgia, serif',
41
- "@sans": '"National", Arial, Helvetica, sans-serif',
42
- "@sans-alt": '"National", Arial, Helvetica, sans-serif'
43
- },
44
- attributes: {
45
- "marketPrefix": "sf",
46
- "siteName": "The San Francisco Chronicle",
47
- "twitter": "sfchronicle",
48
- "gaAccount": "UA-1616916-26",
49
- "subscribeLink": "https://www.sfchronicle.com/subproject",
50
- "sailCustomer": "fca2a0390286f0e53120a668534d9529",
51
- "sailSiteName": "san-francisco-chronicle",
52
- "siteId": 35,
53
- }
54
- },
26
+ // Handle market-specific styles here:
27
+ let marketObj = {
28
+ /* San Franicsco Chronicle */
29
+ SFC: {
30
+ styles: {
31
+ "@brand": "#26A0A5",
32
+ "@brand-secondary": "#FFBC30",
33
+ "@display": '"Tiempos Headline", "Baskerville", Georgia, serif',
34
+ "@body": '"Tiempos", "Baskerville", Georgia, serif',
35
+ "@secondary": '"National", Arial, Helvetica, sans-serif',
36
+ //backwards compatible
37
+ "@hed": '"Tiempos Headline", "Baskerville", Georgia, serif',
38
+ "@hed-alt": '"Tiempos Headline", "Baskerville", Georgia, serif',
39
+ "@serif": '"Tiempos", "Baskerville", Georgia, serif',
40
+ "@sans": '"National", Arial, Helvetica, sans-serif',
41
+ "@sans-alt": '"National", Arial, Helvetica, sans-serif',
42
+ },
43
+ attributes: {
44
+ marketPrefix: "sf",
45
+ siteName: "The San Francisco Chronicle",
46
+ twitter: "sfchronicle",
47
+ gaAccount: "UA-1616916-26",
48
+ //subscribeLink: "https://www.sfchronicle.com/subproject",
49
+ subscribeLink:
50
+ "https://subscription.sfchronicle.com/checkout/684/1444?origin=button&ipid=project&variant=devhub",
51
+ signinLink:
52
+ "https://realm.hearstnp.com/aGRuLnNhbmZyYW5jaXNjbw==/c2ZjaHJvbmljbGUuY29t/1079/account/login",
53
+ sailCustomer: "fca2a0390286f0e53120a668534d9529",
54
+ sailSiteName: "san-francisco-chronicle",
55
+ siteId: 35,
56
+ },
57
+ },
55
58
 
56
- /* Houston Chronicle */
57
- Houston: {
58
- styles: {
59
- "@brand": "#CB0024",
60
- "@brand-secondary": "#1C2146"
61
- },
62
- attributes: {
63
- "marketPrefix": "hc",
64
- "siteName": "The Houston Chronicle",
65
- "twitter": "HoustonChron",
66
- "invert": true,
67
- "gaAccount": "UA-1616916-24",
68
- "subscribeLink": "https://www.houstonchronicle.com/subproject",
69
- "sailCustomer": "48e30b5083cf6bf47c519651453c9e8a",
70
- "sailSiteName": "houston-chronicle",
71
- "siteId": 33
72
- }
73
- },
59
+ /* Houston Chronicle */
60
+ Houston: {
61
+ styles: {
62
+ "@brand": "#CB0024",
63
+ "@brand-secondary": "#1C2146",
64
+ },
65
+ attributes: {
66
+ marketPrefix: "hc",
67
+ siteName: "The Houston Chronicle",
68
+ twitter: "HoustonChron",
69
+ invert: true,
70
+ gaAccount: "UA-1616916-24",
71
+ subscribeLink: "https://www.houstonchronicle.com/subproject",
72
+ signinLink:
73
+ "https://realm.hearstnp.com/aGRuLmhvdXN0b24=/aG91c3RvbmNocm9uaWNsZS5jb20=/1078/account/login",
74
+ sailCustomer: "48e30b5083cf6bf47c519651453c9e8a",
75
+ sailSiteName: "houston-chronicle",
76
+ siteId: 33,
77
+ },
78
+ },
74
79
 
75
- /* Albany Times Union */
76
- Albany: {
77
- styles: {
78
- "@brand": "#006FBA",
79
- "@brand-secondary": "#E5A72C"
80
- },
81
- attributes: {
82
- "marketPrefix": "tu",
83
- "siteName": "Times Union",
84
- "twitter": "timesunion",
85
- "invert": true,
86
- "gaAccount": "UA-1616916-7",
87
- "subscribeLink": "https://www.timesunion.com/subproject",
88
- "sailCustomer": "5bb9eee089bdc2e27cbd265535ad1f90",
89
- "sailSiteName": "times-union",
90
- "siteId": 3
91
- }
92
- },
80
+ /* Albany Times Union */
81
+ Albany: {
82
+ styles: {
83
+ "@brand": "#006FBA",
84
+ "@brand-secondary": "#E5A72C",
85
+ },
86
+ attributes: {
87
+ marketPrefix: "tu",
88
+ siteName: "Times Union",
89
+ twitter: "timesunion",
90
+ invert: true,
91
+ gaAccount: "UA-1616916-7",
92
+ subscribeLink: "https://www.timesunion.com/subproject",
93
+ signinLink:
94
+ "https://realm.hearstnp.com/aGRuLmFsYmFueQ==/dGltZXN1bmlvbi5jb20=/1077/account/login",
95
+ sailCustomer: "5bb9eee089bdc2e27cbd265535ad1f90",
96
+ sailSiteName: "times-union",
97
+ siteId: 3,
98
+ },
99
+ },
93
100
 
94
- /* San Antonio Express News */
95
- SanAntonio: {
96
- styles: {
97
- "@brand": "#BA142D",
98
- "@brand-secondary": "#189196"
99
- },
100
- attributes: {
101
- "marketPrefix": "sa",
102
- "siteName": "Express-News",
103
- "twitter": "ExpressNews",
104
- "invert": true,
105
- "gaAccount": "UA-1616916-27",
106
- "subscribeLink": "https://www.expressnews.com/subproject",
107
- "sailCustomer": "aec52c4681ed63b5beab139a2584f0d4",
108
- "sailSiteName": "san-antonio-express-news",
109
- "siteId": 36
110
- }
111
- },
101
+ /* San Antonio Express News */
102
+ SanAntonio: {
103
+ styles: {
104
+ "@brand": "#BA142D",
105
+ "@brand-secondary": "#189196",
106
+ },
107
+ attributes: {
108
+ marketPrefix: "sa",
109
+ siteName: "Express-News",
110
+ twitter: "ExpressNews",
111
+ invert: true,
112
+ gaAccount: "UA-1616916-27",
113
+ subscribeLink: "https://www.expressnews.com/subproject",
114
+ signinLink:
115
+ "https://realm.hearstnp.com/aGRuLnNhbmFudG9uaW8=/ZXhwcmVzc25ld3MuY29t/1080/account/login",
116
+ sailCustomer: "aec52c4681ed63b5beab139a2584f0d4",
117
+ sailSiteName: "san-antonio-express-news",
118
+ siteId: 36,
119
+ },
120
+ },
112
121
 
113
- /* Connecticut */
114
- CT: {
115
- styles: {
116
- "@brand": "#1A98FF",
117
- "@brand-secondary": "#FFBC30"
118
- },
119
- attributes: {
120
- "marketPrefix": "in",
121
- "siteName": "CTInsider",
122
- "twitter": "insider_ct",
123
- "invert": true,
124
- "gaAccount": "UA-1616916-99",
125
- "subscribeLink": "https://www.ctinsider.com/subproject",
126
- "sailCustomer": "9b21160afa226c9f84d27b47c3d52364",
127
- "sailSiteName": "ct-insider",
128
- "siteId": 61
129
- }
130
- },
122
+ /* Connecticut */
123
+ CT: {
124
+ styles: {
125
+ "@brand": "#1A98FF",
126
+ "@brand-secondary": "#FFBC30",
127
+ },
128
+ attributes: {
129
+ marketPrefix: "in",
130
+ siteName: "CTInsider",
131
+ twitter: "insider_ct",
132
+ invert: true,
133
+ gaAccount: "UA-1616916-99",
134
+ subscribeLink: "https://www.ctinsider.com/subproject",
135
+ signinLink:
136
+ "https://realm.hearstnp.com/aGRuLmN0cHJlbWl1bQ==/Y3RpbnNpZGVyLmNvbQ==/1083/account/login",
137
+ sailCustomer: "9b21160afa226c9f84d27b47c3d52364",
138
+ sailSiteName: "ct-insider",
139
+ siteId: 61,
140
+ },
141
+ },
131
142
 
132
- /* Communities */
133
- Texcom: {
134
- styles: {
135
- "@brand": "#900900",
136
- "@brand-secondary": "#189196"
137
- },
138
- attributes: {
139
- "marketPrefix": "texcom/mrt",
140
- "siteName": "Midland Reporter-Telegram",
141
- "twitter": "mwtnews",
142
- "invert": true,
143
- "gaAccount": "UA-1616916-99",
144
- "subscribeLink": "/subproject",
145
- "sailCustomer": "4a181de0b63a131cf27f8ea9485e5e1c",
146
- "sailSiteName": "midland-reporter-telegram",
147
- "siteId": 57
148
- }
149
- },
150
- Midcom: {
151
- styles: {
152
- "@brand": "#900900",
153
- "@brand-secondary": "#189196"
154
- },
155
- attributes: {
156
- "marketPrefix": "midcom/mid",
157
- "siteName": "Midland Daily News",
158
- "twitter": "MDN",
159
- "invert": true,
160
- "gaAccount": "UA-1616916-99",
161
- "subscribeLink": "/subproject",
162
- "sailCustomer": "4a181de0b63a131cf27f8ea9485e5e1c",
163
- "sailSiteName": "midland-daily-news",
164
- "siteId": 61
165
- }
166
- },
167
- Conroe: {
168
- styles: {
169
- "@brand": "#900900",
170
- "@brand-secondary": "#189196"
171
- },
172
- attributes: {
173
- "marketPrefix": "conroe",
174
- "siteName": "Conroe Courier",
175
- "twitter": "ConroeCourier",
176
- "invert": true,
177
- "gaAccount": "UA-1616916-99",
178
- "subscribeLink": "https://www.yourconroenews.com/subproject",
179
- "sailCustomer": "4a181de0b63a131cf27f8ea9485e5e1c",
180
- "sailSiteName": "the-courier-of-montgomery-county",
181
- "siteId": 68
182
- }
183
- },
184
- Seattle: {
185
- styles: {
186
- "@brand": "#3F8395",
187
- "@brand-secondary": "#189196"
188
- },
189
- attributes: {
190
- "marketPrefix": "seattle",
191
- "siteName": "Seattle PI",
192
- "twitter": "seattlepi",
193
- "invert": true,
194
- "gaAccount": "UA-1616916-99",
195
- "subscribeLink": "",
196
- "sailCustomer": "da30899589786517b0c0cead37a48b06",
197
- "sailSiteName": "seattle-post-intelligencer",
198
- "siteId": 20
199
- }
200
- },
201
- /* Misc */
202
- TK: {
203
- styles: {
204
- "@brand": "#900900",
205
- "@brand-secondary": "#189196"
206
- },
207
- attributes: {
208
- "marketPrefix": "tk",
209
- "siteName": "Hearst Digital News",
210
- "twitter": "Hearst",
211
- "invert": true,
212
- }
213
- }
214
- }
143
+ /* Communities */
144
+ Texcom: {
145
+ styles: {
146
+ "@brand": "#900900",
147
+ "@brand-secondary": "#189196",
148
+ },
149
+ attributes: {
150
+ marketPrefix: "texcom/mrt",
151
+ siteName: "Midland Reporter-Telegram",
152
+ twitter: "mwtnews",
153
+ invert: true,
154
+ gaAccount: "UA-1616916-99",
155
+ subscribeLink: "/subproject",
156
+ sailCustomer: "4a181de0b63a131cf27f8ea9485e5e1c",
157
+ sailSiteName: "midland-reporter-telegram",
158
+ siteId: 57,
159
+ },
160
+ },
161
+ Midcom: {
162
+ styles: {
163
+ "@brand": "#900900",
164
+ "@brand-secondary": "#189196",
165
+ },
166
+ attributes: {
167
+ marketPrefix: "midcom/mid",
168
+ siteName: "Midland Daily News",
169
+ twitter: "MDN",
170
+ invert: true,
171
+ gaAccount: "UA-1616916-99",
172
+ subscribeLink: "/subproject",
173
+ sailCustomer: "4a181de0b63a131cf27f8ea9485e5e1c",
174
+ sailSiteName: "midland-daily-news",
175
+ siteId: 61,
176
+ },
177
+ },
178
+ Conroe: {
179
+ styles: {
180
+ "@brand": "#900900",
181
+ "@brand-secondary": "#189196",
182
+ },
183
+ attributes: {
184
+ marketPrefix: "conroe",
185
+ siteName: "Conroe Courier",
186
+ twitter: "ConroeCourier",
187
+ invert: true,
188
+ gaAccount: "UA-1616916-99",
189
+ subscribeLink: "https://www.yourconroenews.com/subproject",
190
+ sailCustomer: "4a181de0b63a131cf27f8ea9485e5e1c",
191
+ sailSiteName: "the-courier-of-montgomery-county",
192
+ siteId: 68,
193
+ },
194
+ },
195
+ Seattle: {
196
+ styles: {
197
+ "@brand": "#3F8395",
198
+ "@brand-secondary": "#189196",
199
+ },
200
+ attributes: {
201
+ marketPrefix: "seattle",
202
+ siteName: "Seattle PI",
203
+ twitter: "seattlepi",
204
+ invert: true,
205
+ gaAccount: "UA-1616916-99",
206
+ subscribeLink: "",
207
+ sailCustomer: "da30899589786517b0c0cead37a48b06",
208
+ sailSiteName: "seattle-post-intelligencer",
209
+ siteId: 20,
210
+ },
211
+ },
212
+ /* Misc */
213
+ TK: {
214
+ styles: {
215
+ "@brand": "#900900",
216
+ "@brand-secondary": "#189196",
217
+ },
218
+ attributes: {
219
+ marketPrefix: "tk",
220
+ siteName: "Hearst Digital News",
221
+ twitter: "Hearst",
222
+ invert: true,
223
+ },
224
+ },
225
+ };
215
226
 
216
- // Combine global and market styles to return the final object
217
- let combinedStyles = {
218
- styles: Object.assign(defaultObj.styles, marketObj[market].styles),
219
- attributes: Object.assign(defaultObj.attributes, marketObj[market].attributes)
220
- }
221
- return combinedStyles
222
- }
227
+ // Combine global and market styles to return the final object
228
+ let combinedStyles = {
229
+ styles: Object.assign(defaultObj.styles, marketObj[market].styles),
230
+ attributes: Object.assign(
231
+ defaultObj.attributes,
232
+ marketObj[market].attributes
233
+ ),
234
+ };
235
+ return combinedStyles;
236
+ };
223
237
 
224
- module.exports = { getBrands3 }
238
+ module.exports = { getBrands3 };
package/nav2.js CHANGED
@@ -1,4 +1,4 @@
1
- let { getBrands } = require("./brands");
1
+ let { getBrands3 } = require("./brands");
2
2
 
3
3
  // Handle nav for various markets and include nav options for other links
4
4
  let getNav2 = function (meta, urlAdd, forceColor, navLink, navArray) {
@@ -27,8 +27,8 @@ let getNav2 = function (meta, urlAdd, forceColor, navLink, navArray) {
27
27
  }
28
28
 
29
29
  let {
30
- attributes: { marketPrefix, invert, subscribeLink },
31
- } = getBrands(meta.PROJECT.MARKET_KEY);
30
+ attributes: { marketPrefix, invert, subscribeLink, signinLink },
31
+ } = getBrands3(meta.PROJECT.MARKET_KEY);
32
32
  // Handle various CT domains
33
33
  if (typeof window !== "undefined") {
34
34
  switch (window.location.origin) {
@@ -138,12 +138,23 @@ let getNav2 = function (meta, urlAdd, forceColor, navLink, navArray) {
138
138
  `;
139
139
  }
140
140
 
141
+ // Using style tags just to make this easy
141
142
  let rightBlock = `
142
- <a id="nav2-sub-box" href="${subscribeLink}" target="_blank">
143
+ <a id="nav2-sub-box" style="font-weight: 700;" href="${subscribeLink}" target="_blank">
143
144
  <div>Subscribe</div>
144
145
  </a>
145
146
  `;
146
147
 
148
+ // If there's a signin link, add it here
149
+ if (signinLink) {
150
+ rightBlock =
151
+ `
152
+ <a id="nav2-sub-box" style="margin: 0; font-weight: 700;" href="${signinLink}" target="_blank">
153
+ <span>Sign in</span>
154
+ </a>
155
+ <span style="font-size: 14px; padding: 2px 0 2px;">or</span>` + rightBlock;
156
+ }
157
+
147
158
  let navHTML = `<nav class="nav2-container ${invertClass}">
148
159
  <div class="nav2-left">
149
160
  ${navLinkInsert}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sfc-utils",
3
- "version": "1.4.137",
3
+ "version": "1.4.139",
4
4
  "author": "ewagstaff <evanjwagstaff@gmail.com>",
5
5
  "dependencies": {
6
6
  "archieml": "^0.4.2",