sfc-utils 1.3.67 → 1.3.69
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/components/ogpubdate.mjs
CHANGED
|
@@ -5,12 +5,12 @@ import {
|
|
|
5
5
|
moddateString
|
|
6
6
|
} from './helpers/datehelpers.mjs'
|
|
7
7
|
|
|
8
|
-
const OgPubDate = (
|
|
8
|
+
const OgPubDate = () => {
|
|
9
9
|
return (
|
|
10
10
|
<>
|
|
11
11
|
{moddateString &&
|
|
12
|
-
<p
|
|
13
|
-
}
|
|
12
|
+
<p className="mt-md og-pub-date">Originally published on {pubdateString}</p>
|
|
13
|
+
}
|
|
14
14
|
</>
|
|
15
15
|
)
|
|
16
16
|
}
|
package/components/topper2.mjs
CHANGED
|
@@ -82,7 +82,7 @@ const Topper2 = ({ settings, wcmData }) => {
|
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
// Apply extra custom styling if it exists in the spreadsheet
|
|
85
|
-
if (Title_Style !== "") {
|
|
85
|
+
if (Title_Style && Title_Style !== "") {
|
|
86
86
|
let extraStyles = Title_Style.split(", ");
|
|
87
87
|
defaultStyles = defaultStyles.concat(extraStyles);
|
|
88
88
|
}
|
|
@@ -138,6 +138,8 @@ const Topper2 = ({ settings, wcmData }) => {
|
|
|
138
138
|
|
|
139
139
|
/** Converts wcm string from spreadsheet into a list of WCM ids */
|
|
140
140
|
const getWcmIdList = (listStr) => {
|
|
141
|
+
if (!listStr) return [];
|
|
142
|
+
|
|
141
143
|
return listStr.split(";").map((d) => parseInt(d));
|
|
142
144
|
}
|
|
143
145
|
|
|
@@ -175,12 +177,14 @@ const Topper2 = ({ settings, wcmData }) => {
|
|
|
175
177
|
case "stacked":
|
|
176
178
|
return (<TopperImage wcm={Image} alt={Image_Alt} wcmData={wcmData} />)
|
|
177
179
|
case "full-screen":
|
|
178
|
-
return (
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
180
|
+
return (
|
|
181
|
+
<TopperImage
|
|
182
|
+
wcm={Image}
|
|
183
|
+
alt={Image_Alt}
|
|
184
|
+
wcmData={wcmData}
|
|
185
|
+
overrideCssList={[imageStyles.cImgFullscreen]}
|
|
186
|
+
/>
|
|
187
|
+
)
|
|
184
188
|
case "side-by-side":
|
|
185
189
|
return (
|
|
186
190
|
<TopperImage
|
package/example/gatsby-node.js
CHANGED
|
@@ -17,16 +17,20 @@ const addValidWcmId = (numStr, wcmPhotos) => {
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
// Add topper image(s) to wcmPhotos list
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
if (topperData[0].Image) {
|
|
21
|
+
let numStr = (topperData[0].Image).toString();
|
|
22
|
+
|
|
23
|
+
if (numStr.includes(";")) {
|
|
24
|
+
let numList = numStr.split(";");
|
|
25
|
+
for (var num of numList) {
|
|
26
|
+
addValidWcmId(num, wcmPhotos);
|
|
27
|
+
}
|
|
28
|
+
} else {
|
|
29
|
+
addValidWcmId(numStr, wcmPhotos);
|
|
25
30
|
}
|
|
26
|
-
} else {
|
|
27
|
-
addValidWcmId(numStr, wcmPhotos);
|
|
28
31
|
}
|
|
29
32
|
|
|
33
|
+
|
|
30
34
|
// Create nodes so GraphQL can access
|
|
31
35
|
exports.sourceNodes = async ({
|
|
32
36
|
actions,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import Credits from './credits'
|
|
3
3
|
import CreditLine from './creditline'
|
|
4
|
+
import OgPubDate from '../../../../components/ogpubdate.mjs'
|
|
4
5
|
import * as creditssectionStyles from '../../styles/modules/creditssection.module.less'
|
|
5
6
|
let rawCredits;
|
|
6
7
|
try {
|
|
@@ -27,6 +28,7 @@ const CreditsSection = () => {
|
|
|
27
28
|
}
|
|
28
29
|
return (
|
|
29
30
|
<section aria-label="Credits" className={creditssectionStyles.section}>
|
|
31
|
+
<OgPubDate/>
|
|
30
32
|
<h4 className={creditssectionStyles.hed}>Credits</h4>
|
|
31
33
|
{Object.keys(creditObj).map((key) => (
|
|
32
34
|
<Credits type={key} key={key}>
|
package/package.json
CHANGED
|
@@ -157,4 +157,38 @@ a {
|
|
|
157
157
|
&:visited {
|
|
158
158
|
color: @grey-75;
|
|
159
159
|
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/* Gift button mods */
|
|
163
|
+
.byline-wrapper {
|
|
164
|
+
overflow: auto;
|
|
165
|
+
}
|
|
166
|
+
.byline-wrapper .devhub .givegift {
|
|
167
|
+
padding: 1px 0px !important;
|
|
168
|
+
border-radius: 30px;
|
|
169
|
+
font-size: 16px;
|
|
170
|
+
}
|
|
171
|
+
.byline-wrapper .giftarticle.devhub {
|
|
172
|
+
margin-top: 0 !important;
|
|
173
|
+
margin-right: 4px !important;
|
|
174
|
+
}
|
|
175
|
+
.byline-wrapper .articleHeader--shareTools {
|
|
176
|
+
align-items: center;
|
|
177
|
+
}
|
|
178
|
+
.giftarticle svg {
|
|
179
|
+
padding-top: 1px;
|
|
180
|
+
}
|
|
181
|
+
@media (max-width: 420px){
|
|
182
|
+
.byline-wrapper .devhub .givegift {
|
|
183
|
+
font-size: 14px;
|
|
184
|
+
}
|
|
185
|
+
.giftarticle svg {
|
|
186
|
+
padding-top: 3px;
|
|
187
|
+
margin-right: 4px !important;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
/* End gift button mods */
|
|
191
|
+
|
|
192
|
+
.og-pub-date {
|
|
193
|
+
color: @grey-75;
|
|
160
194
|
}
|