Skip to content

Commit

Permalink
fix: refactor the bannerText byline (#502)
Browse files Browse the repository at this point in the history
* fix: refactorr the bannerText byline

* fix: update byline computed

* fix: update the component library

* fix: delete articleType

* fix: delte
  • Loading branch information
jendiamond authored Oct 14, 2022
1 parent 3f8ad60 commit da70abd
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 12 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"sass": "^1.45.2",
"sass-loader": "^10.1.1",
"ucla-library-design-tokens": "^5.3.0",
"ucla-library-website-components": "^1.57.1",
"ucla-library-website-components": "^1.57.2",
"vue-svg-loader": "^0.16.0",
"vue-template-compiler": "^2.6.12"
}
Expand Down
12 changes: 10 additions & 2 deletions pages/about/blogs/_slug.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
category="Blog"
:title="page.title"
:text="page.text"
:byline="parsedByline"
article-type="blogs"
:byline="parsedBylineBannerText"
:locations="page.locations"
/>

<section-wrapper class="section-banner">
Expand Down Expand Up @@ -106,6 +106,14 @@ export default {
})
},
parsedBylineBannerText() {
return (this.page.contributors || []).map((entry) => {
return `${entry.byline} ${
entry.title || entry.staffMember[0].title
}`
})
},
parsedDate() {
return format(new Date(this.page.dateCreated), "MMMM d, Y")
},
Expand Down
12 changes: 10 additions & 2 deletions pages/about/news/_slug.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
category="Library News"
:title="page.title"
:text="page.text"
:byline="parsedByline"
article-type="news"
:byline="parsedBylineBannerText"
:locations="page.locations"
/>

<section-wrapper class="section-banner">
Expand Down Expand Up @@ -106,6 +106,14 @@ export default {
})
},
parsedBylineBannerText() {
return (this.page.contributors || []).map((entry) => {
return `${entry.byline} ${
entry.title || entry.staffMember[0].title
}`
})
},
parsedDate() {
return format(new Date(this.page.dateCreated), "MMMM d, Y")
},
Expand Down

2 comments on commit da70abd

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.