sfc-utils 1.4.33 → 1.4.35
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/byline.mjs +7 -2
- package/components/topper2.mjs +1 -0
- package/copy/docs.js +10 -8
- package/example/package-lock.json +1 -1
- package/example/package.json +1 -1
- package/package.json +2 -1
- package/styles/modules/topper2.module.less +16 -3
- package/styles/modules/topperimage.module.less +13 -1
package/components/byline.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
moddateString,
|
|
8
8
|
} from './helpers/datehelpers.mjs'
|
|
9
9
|
|
|
10
|
-
const Byline = ({ meta, updateNote }) => {
|
|
10
|
+
const Byline = ({ meta, updateNote, updatePrefix }) => {
|
|
11
11
|
const {
|
|
12
12
|
PROJECT: { AUTHORS, ISO_MODDATE, ISO_PUBDATE },
|
|
13
13
|
} = meta
|
|
@@ -61,7 +61,12 @@ const Byline = ({ meta, updateNote }) => {
|
|
|
61
61
|
dateTime={ISO_MODDATE}
|
|
62
62
|
itemProp="dateModified"
|
|
63
63
|
>
|
|
64
|
-
|
|
64
|
+
{updatePrefix ? (
|
|
65
|
+
<>{updatePrefix}{' '}</>
|
|
66
|
+
) : (
|
|
67
|
+
<>Updated{' '}</>
|
|
68
|
+
)}
|
|
69
|
+
{moddateString}
|
|
65
70
|
</time>
|
|
66
71
|
</>
|
|
67
72
|
)}
|
package/components/topper2.mjs
CHANGED
package/copy/docs.js
CHANGED
|
@@ -19,24 +19,24 @@ var archieml = require("archieml");
|
|
|
19
19
|
var htmlparser = require("htmlparser2");
|
|
20
20
|
var Entities = require("html-entities").AllHtmlEntities;
|
|
21
21
|
|
|
22
|
-
let googleAuth = (config, directory = null, filenames = null) => {
|
|
22
|
+
let googleAuth = (config, directory = null, filenames = null, useID = null) => {
|
|
23
23
|
var auth = null;
|
|
24
24
|
authObj
|
|
25
25
|
.authenticate({ fallback: false })
|
|
26
26
|
.then((resp) => {
|
|
27
27
|
auth = resp;
|
|
28
|
-
grabDocs(auth, config, directory, filenames).catch(() => {
|
|
28
|
+
grabDocs(auth, config, directory, filenames, useID).catch(() => {
|
|
29
29
|
// If the first attempt failed, then make another req using the fallback
|
|
30
30
|
authObj.authenticate({ fallback: true }).then((resp) => {
|
|
31
31
|
auth = resp;
|
|
32
|
-
grabDocs(auth, config, directory, filenames);
|
|
32
|
+
grabDocs(auth, config, directory, filenames, useID);
|
|
33
33
|
});
|
|
34
34
|
});
|
|
35
35
|
})
|
|
36
36
|
.catch(() => {
|
|
37
37
|
// Failure if we fall back but there's no token
|
|
38
38
|
auth = authObj.task();
|
|
39
|
-
grabDocs(auth, config, directory, filenames);
|
|
39
|
+
grabDocs(auth, config, directory, filenames, useID);
|
|
40
40
|
});
|
|
41
41
|
};
|
|
42
42
|
|
|
@@ -51,7 +51,7 @@ var camelCase = function (str) {
|
|
|
51
51
|
* https://console.developers.google.com/apis/api/drive.googleapis.com/quotas?project=<project>
|
|
52
52
|
* where <project> is the project you authenticated with using `grunt google-auth`
|
|
53
53
|
*/
|
|
54
|
-
let grabDocs = (auth, config, directory = null, filenames = null) => {
|
|
54
|
+
let grabDocs = (auth, config, directory = null, filenames = null, useID = null) => {
|
|
55
55
|
return new Promise((resolve, reject) => {
|
|
56
56
|
var drive = google.drive({
|
|
57
57
|
auth,
|
|
@@ -75,9 +75,11 @@ let grabDocs = (auth, config, directory = null, filenames = null) => {
|
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
var filename = meta.data.name.replace(/\s+/g, "_");
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
78
|
+
if (useID) {
|
|
79
|
+
// If we want to use the ID as the filename, do it
|
|
80
|
+
filename = fileId;
|
|
81
|
+
} else if (filenames) {
|
|
82
|
+
//find the appropriate filename if filenames arr is included in params
|
|
81
83
|
let match = filenames.find((f) => f.id === fileId);
|
|
82
84
|
filename = match.name;
|
|
83
85
|
}
|
package/example/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sfc-utils",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.35",
|
|
4
4
|
"author": "ewagstaff <evanjwagstaff@gmail.com>",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"archieml": "^0.4.2",
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"htmlparser2": "4.1.0",
|
|
11
11
|
"opn": "^6.0.0",
|
|
12
12
|
"prop-types": "^15.8.1",
|
|
13
|
+
"react-helmet": "^6.1.0",
|
|
13
14
|
"react-transition-group": "^4.4.5",
|
|
14
15
|
"write": "^2.0.0"
|
|
15
16
|
}
|
|
@@ -9,7 +9,12 @@
|
|
|
9
9
|
|
|
10
10
|
.topperContainerFullScreen {
|
|
11
11
|
max-width: 100%;
|
|
12
|
+
height: calc(100vh - 37px);
|
|
12
13
|
position: relative;
|
|
14
|
+
|
|
15
|
+
@media @tablet {
|
|
16
|
+
height: auto;
|
|
17
|
+
}
|
|
13
18
|
}
|
|
14
19
|
|
|
15
20
|
.topperContainerSlideshowFullScreen {
|
|
@@ -25,6 +30,7 @@
|
|
|
25
30
|
.topperContainerSideBySide {
|
|
26
31
|
display: flex;
|
|
27
32
|
align-items: center;
|
|
33
|
+
justify-content: center;
|
|
28
34
|
background: var(--container-background-color);
|
|
29
35
|
|
|
30
36
|
@media (max-width: @lg) {
|
|
@@ -57,11 +63,14 @@
|
|
|
57
63
|
}
|
|
58
64
|
|
|
59
65
|
.imageFullScreen {
|
|
60
|
-
|
|
66
|
+
position: absolute;
|
|
61
67
|
width: 100%;
|
|
62
68
|
|
|
63
|
-
@media @
|
|
69
|
+
@media @tablet {
|
|
70
|
+
margin: 0;
|
|
71
|
+
padding: 0;
|
|
64
72
|
height: 100%;
|
|
73
|
+
position: static;
|
|
65
74
|
}
|
|
66
75
|
}
|
|
67
76
|
|
|
@@ -314,7 +323,11 @@
|
|
|
314
323
|
}
|
|
315
324
|
|
|
316
325
|
.dropshadow {
|
|
317
|
-
text-shadow: 1px 1px 10px rgba(0, 0, 0, .4)
|
|
326
|
+
text-shadow: 1px 1px 10px rgba(0, 0, 0, .4);
|
|
327
|
+
|
|
328
|
+
@media @tablet {
|
|
329
|
+
text-shadow: none;
|
|
330
|
+
}
|
|
318
331
|
}
|
|
319
332
|
|
|
320
333
|
.hideWhenTablet {
|
|
@@ -70,6 +70,14 @@
|
|
|
70
70
|
padding-bottom: var(--img-bottom-padding-ratio);
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
+
.c-container-fullscreen {
|
|
74
|
+
padding-bottom: 100vh;
|
|
75
|
+
|
|
76
|
+
@media @tablet {
|
|
77
|
+
padding-bottom: var(--img-bottom-padding-ratio);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
73
81
|
.c-container-small-visual {
|
|
74
82
|
height: calc(var(--img-bottom-padding-fraction)*var(--small-visual-max-width));
|
|
75
83
|
max-width: var(--small-visual-max-width);
|
|
@@ -108,6 +116,11 @@
|
|
|
108
116
|
height: calc(100vh - 37px);
|
|
109
117
|
|
|
110
118
|
@media @tablet {
|
|
119
|
+
display: block;
|
|
120
|
+
position: absolute;
|
|
121
|
+
margin: 0;
|
|
122
|
+
padding: 0;
|
|
123
|
+
width: 100%;
|
|
111
124
|
height: auto;
|
|
112
125
|
}
|
|
113
126
|
}
|
|
@@ -134,7 +147,6 @@
|
|
|
134
147
|
}
|
|
135
148
|
|
|
136
149
|
.c-img-side-by-side {
|
|
137
|
-
object-fit: cover;
|
|
138
150
|
width: 50vw;
|
|
139
151
|
height: var(--img-height-viewport);
|
|
140
152
|
|