sfc-utils 1.4.62 → 1.4.64
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 +13 -3
- package/package.json +2 -2
package/components/byline.mjs
CHANGED
|
@@ -13,9 +13,19 @@ const Byline = ({ meta, updateNote, updatePrefix, ReplacementTime }) => {
|
|
|
13
13
|
} = meta
|
|
14
14
|
const has_authors = AUTHORS[0].AUTHOR_NAME !== ""
|
|
15
15
|
|
|
16
|
+
// check the width of the byline wrapper. if it's less than @md or 672px,
|
|
17
|
+
// change the display type to "block" to avoid large white spaces with
|
|
18
|
+
// the gift button
|
|
19
|
+
if (typeof window !== "undefined" && typeof document !== "undefined") {
|
|
20
|
+
let bylineContainer = document.getElementById("byline-wrapper")
|
|
21
|
+
if (bylineContainer && bylineContainer.offsetWidth < 672) {
|
|
22
|
+
bylineContainer.style.display = "block"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
16
26
|
return (
|
|
17
27
|
<>
|
|
18
|
-
<div className="byline-wrapper">
|
|
28
|
+
<div className="byline-wrapper" id="byline-wrapper">
|
|
19
29
|
<div className="byline">
|
|
20
30
|
{has_authors &&
|
|
21
31
|
<>
|
|
@@ -77,12 +87,12 @@ const Byline = ({ meta, updateNote, updatePrefix, ReplacementTime }) => {
|
|
|
77
87
|
{ReplacementTime &&
|
|
78
88
|
<ReplacementTime />
|
|
79
89
|
}
|
|
80
|
-
|
|
90
|
+
|
|
81
91
|
{/* Add a note if this is a live-updating project */}
|
|
82
92
|
{updateNote && (
|
|
83
93
|
<>
|
|
84
94
|
<span>{" "}|{" "}</span>
|
|
85
|
-
<span className="topper-update-note">{updateNote}</span>
|
|
95
|
+
<span className="topper-update-note">{updateNote}</span>
|
|
86
96
|
</>
|
|
87
97
|
)}
|
|
88
98
|
</div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sfc-utils",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.64",
|
|
4
4
|
"author": "ewagstaff <evanjwagstaff@gmail.com>",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"archieml": "^0.4.2",
|
|
@@ -14,4 +14,4 @@
|
|
|
14
14
|
"react-transition-group": "^4.4.5",
|
|
15
15
|
"write": "^2.0.0"
|
|
16
16
|
}
|
|
17
|
-
}
|
|
17
|
+
}
|