Skip to content

Commit

Permalink
update parsedByline
Browse files Browse the repository at this point in the history
  • Loading branch information
jendiamond committed Aug 16, 2023
1 parent 97ea472 commit 7d9871b
Showing 1 changed file with 9 additions and 41 deletions.
50 changes: 9 additions & 41 deletions pages/about/news/_slug.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
:category="parsedCategory"
:title="page.title"
:text="page.text"
:byline="parsedBylineBannerText"
:byline="parsedByline"
:locations="parsedLocations"
:date-created="page.postDate"
/>
Expand Down Expand Up @@ -102,24 +102,14 @@ export default {
},
computed: {
parsedByline() {
let byline = (this.page.contributors || []).map((entry) => {
return `${entry.byline || ""} ${
entry.title || entry.staffMember[0].title
}`
let byline = (this.page.contributors || []).map((contributor) => {
if ((contributor.staffMember && contributor.staffMember.length > 0) || contributor.title)
return `${contributor.byline || ""} ${ contributor.title || contributor.staffMember[0].title}`
})
return byline.map((entry) => {
return entry
return byline.map((contributor) => {
return contributor
})
},
parsedBylineBannerText() {
return (this.page.contributors || []).map((entry) => {
return `${entry.byline} ${
entry.title || entry.staffMember[0].title
}`
})
},
parsedDate() {
return format(new Date(this.page.postDate), "MMMM d, Y")
},
Expand Down Expand Up @@ -151,30 +141,8 @@ export default {

<style lang="scss" scoped>
.page-news-detail {
.highlighted-news {
@include visually-hidden;
}
// .flexible-content {
// margin: 0 auto;
// }
// @media #{$medium} {
// .block-campus-map,
// .section-block-spaces,
// .block-hours,
// .block-amenities,
// .simple-cards,
// .section-teaser-list,
// .section-teaser-card {
// padding: 0 var(--unit-gutter);
// }
// }
// @media #{$small} {
// .page {
// width: 100%;
// }
// }
.highlighted-news {
@include visually-hidden;
}
}
</style>

0 comments on commit 7d9871b

Please sign in to comment.