sfc-utils 1.4.137 → 1.4.138
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 +2 -2
- package/brands2.js +220 -216
- package/brands3.js +228 -214
- package/nav2.js +14 -3
- package/package.json +1 -1
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
|
-
|
|
32
|
-
subButton.
|
|
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
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
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
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
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
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
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
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
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
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
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
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
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
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
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
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
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
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
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
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
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
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
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
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
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
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
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
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
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
|
@@ -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
|
-
} =
|
|
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}
|