sfc-utils 1.3.11 → 1.3.15

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sfc-utils",
3
- "version": "1.3.11",
3
+ "version": "1.3.15",
4
4
  "author": "ewagstaff <evanjwagstaff@gmail.com>",
5
5
  "dependencies": {
6
6
  "archieml": "^0.4.2",
package/topper.js CHANGED
@@ -84,6 +84,29 @@ let getTopper = function(settings){
84
84
  // Check safely for MOD_DATE
85
85
  let readableModDate = storySettings.LastModDate_C2P ? convertDatesToAP(storySettings.LastModDate_C2P) : false;
86
86
  let getBylineText = (authorName, authorLink, publishDate, modifyDate) =>{
87
+ let authorNames = []
88
+ if (authorName) {
89
+ authorNames = authorName.split(',')
90
+ }
91
+ let authorLinks = []
92
+ if (authorLink) {
93
+ authorLinks = authorLink.split(',')
94
+ }
95
+ let authorHTML = ""
96
+ for (let i = 0; i<authorNames.length; i++){
97
+ // If we have a matching link, build it
98
+ if (authorLinks[i]){
99
+ authorHTML += `<a itemscope="" itemprop="author" itemtype="http://schema.org/Person" class="byline-link" href=${authorLinks[i].includes('http') ? `\"${authorLinks[i].trim()}\"` : `\"https://${authorLinks[i].trim()}\"`}>${authorNames[i].trim()}</a>`
100
+ } else {
101
+ // If we don't just print the name
102
+ authorHTML += `<span itemscope="" itemprop="author" itemtype="http://schema.org/Person">${authorNames[i].trim()}</span>`
103
+ }
104
+ if (i < authorNames.length - 1){
105
+ authorHTML += ", "
106
+ } else if (i === authorNames.length - 1){
107
+ authorHTML += " and "
108
+ }
109
+ }
87
110
  let newPubDateString = publishDate;
88
111
  try {
89
112
  newPubDateString = publishDate.match(/.*\d{4}/gm)[0];
@@ -91,10 +114,10 @@ let getTopper = function(settings){
91
114
  // That's fine
92
115
  console.log(err);
93
116
  }
94
- let author = authorLink ?
95
- `<a class="byline-link" href=${authorLink.includes('http') ? `\"${authorLink}\"` : `\"https://${authorLink}\"`}>${authorName.trim()}</a>`
96
- : authorName.trim();
97
- let initialText = (`By ${author} | ${newPubDateString}`);
117
+ // let author = authorLink ?
118
+ // `<a class="byline-link" href=${authorLink.includes('http') ? `\"${authorLink}\"` : `\"https://${authorLink}\"`}>${authorName.trim()}</a>`
119
+ // : authorName.trim();
120
+ let initialText = (`By ${authorHTML} | ${newPubDateString}`);
98
121
  if(modifyDate){
99
122
  return initialText + (" | Updated: " + modifyDate);
100
123
  }
package/icons/x.js DELETED
@@ -1,5 +0,0 @@
1
- // NOTE: Remember to give your SVG fill="currentcolor" so that it can be styled in CSS
2
-
3
- const xIcon = `<svg fill="currentcolor" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path d="M376.6 427.5c11.31 13.58 9.484 33.75-4.094 45.06c-5.984 4.984-13.25 7.422-20.47 7.422c-9.172 0-18.27-3.922-24.59-11.52L192 305.1l-135.4 162.5c-6.328 7.594-15.42 11.52-24.59 11.52c-7.219 0-14.48-2.438-20.47-7.422c-13.58-11.31-15.41-31.48-4.094-45.06l142.9-171.5L7.422 84.5C-3.891 70.92-2.063 50.75 11.52 39.44c13.56-11.34 33.73-9.516 45.06 4.094L192 206l135.4-162.5c11.3-13.58 31.48-15.42 45.06-4.094c13.58 11.31 15.41 31.48 4.094 45.06l-142.9 171.5L376.6 427.5z"/></svg>`
4
-
5
- module.exports = { xIcon }