Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DNM] Post-launch polishing patch #96

Closed
wants to merge 32 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
47d2bcd
Added 'image' value to article structured data
frederickobrien Nov 19, 2020
9c7f82e
Update _slug.vue
frederickobrien Nov 19, 2020
a2af866
Update _slug.vue
frederickobrien Nov 19, 2020
73afc89
Update nuxt.config.js
frederickobrien Nov 19, 2020
ad084b9
Outline test
frederickobrien Nov 20, 2020
357cb45
Update _slug.vue
frederickobrien Nov 20, 2020
4a3458a
Update _slug.vue
frederickobrien Nov 20, 2020
e64bc71
Update _slug.vue
frederickobrien Nov 20, 2020
10a1844
Update _slug.vue
frederickobrien Nov 20, 2020
7a92896
Update _slug.vue
frederickobrien Nov 21, 2020
38a60a1
Album artwork credit groundwork
frederickobrien Nov 21, 2020
28e6885
Update _slug.vue
frederickobrien Nov 21, 2020
31819cc
Update _slug.vue
frederickobrien Nov 21, 2020
9324b21
Info icon for artwork stories
frederickobrien Nov 21, 2020
f9f8499
Update _slug.vue
frederickobrien Nov 21, 2020
9c243a4
Update _slug.vue
frederickobrien Nov 21, 2020
3a6f61a
Update _slug.vue
frederickobrien Nov 21, 2020
c38158c
Update _slug.vue
frederickobrien Nov 21, 2020
f649b16
Update NavBar.vue
frederickobrien Nov 21, 2020
de4c256
Container class for album artwork on articles
frederickobrien Nov 21, 2020
55987c9
Breadcrumb schema in reviews
frederickobrien Nov 21, 2020
5b4b69b
siteConstants tweak
frederickobrien Nov 21, 2020
52be2bc
Update _slug.vue
frederickobrien Nov 21, 2020
4c54d58
Update _slug.vue
frederickobrien Nov 21, 2020
4929fa6
Update _slug.vue
frederickobrien Nov 21, 2020
54a2fc2
Artwork story toggle attempt
frederickobrien Nov 21, 2020
370a8fd
Update _slug.vue
frederickobrien Nov 21, 2020
eb1958c
Add ampersand in multi author posts
andrewbridge Nov 21, 2020
73c6395
Custom components for lead articles and reviews
frederickobrien Nov 24, 2020
56b8faf
Artwork toggle on click attempt
frederickobrien Nov 29, 2020
a3998d5
Reverted
frederickobrien Nov 29, 2020
e59e469
Merge branch 'main' into post-launch-polishing-patch
frederickobrien Nov 29, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion assets/utilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,17 @@ const resolveAuthorLink = (author?: Author) => {
url: linkData,
};
}
}
};

const authorDivider = (key: number, length: number) => {
if (key === length - 1) {
return '';
}
if (key === length - 2) {
return ' & ';
}
return ', ';
};

const audioxideStructuredData = () => ({
'@context': 'http://schema.org',
Expand Down Expand Up @@ -127,6 +137,7 @@ export {
albumCoverAlt,
throttle,
resolveAuthorLink,
authorDivider,
audioxideStructuredData,
generateBreadcrumbs,
}
2 changes: 2 additions & 0 deletions components/Icon.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
faRss,
faSearch,
faBrain,
faInfoCircle,
} from '@fortawesome/free-solid-svg-icons';
import {
faFacebookF,
Expand All @@ -27,6 +28,7 @@
faRss,
faSearch,
faBrain,
faInfoCircle,
faSpinnerThird,
});

Expand Down
30 changes: 30 additions & 0 deletions components/LeadArticleLink.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<template>
<div class="post-link">
<div class="img-wrap">
<img v-if="image" :src="post.metadata.featuredimage[`${imageSize}-${imageFormat}`]" :alt="post.metadata.featuredimageAlt" loading="lazy" width="300" height="200" />
</div>
<div class="info">
<h4 v-if="title"><nuxt-link :to="`/${post.metadata.type}/${post.metadata.slug}`" class="overlay-link">{{ post.metadata.title | unescape }}</nuxt-link></h4>
<p v-if="blurb">{{ post.metadata.summary }}</p>
<p v-if="author && post.metadata.author" class="author">By <span class="name">{{ post.metadata.author.name }}</span></p>
</div>
</div>
</template>

<script lang="ts">
import PostLink from './PostLink.vue';

export default PostLink.extend({
name: 'LeadArticleLink',
});
</script>

<style lang="scss" scoped>
@import "~assets/styles/variables";

@include postLink;
@include small {
@include postLinkFlex;
}

</style>
54 changes: 54 additions & 0 deletions components/LeadReviewLink.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<template>
<div class="post-link review-link">
<div class="img-wrap" :style="{ borderColor: post.metadata.colours[0] }">
<img v-if="image" :src="post.metadata.featuredimage[`${imageSize}-${imageFormat}`]" :alt="coverAlt" loading="lazy" width="300" height="300" />
</div>
<div class="info">
<h4 v-if="title">
<nuxt-link :to="`/${post.metadata.type}/${post.metadata.slug}`" class="overlay-link">
<span class="album">{{ post.metadata.album }}</span>
<span class="artist">{{ post.metadata.artist }}</span>
</nuxt-link>
</h4>
<p v-if="blurb">{{ post.metadata.summary }}</p>
<p v-if="author && post.metadata.author" class="author">By <span class="name">{{ post.metadata.author.name }}</span></p>
</div>
</div>
</template>

<script lang="ts">
import { PropType } from 'vue';
import { albumCoverAlt } from '~/assets/utilities';
import PostLink from './PostLink.vue';

export default PostLink.extend({
name: 'LeadReviewLink',
props: {
imageFormat: { type: String as PropType<ImageSizeAspectRatios>, default: 'square' },
},
computed: {
coverAlt(): string {
return albumCoverAlt(this.post as Review);
}
}
});
</script>

<style lang="scss" scoped>
@import "~assets/styles/variables";

@include postLink;
@include postLinkFlex;

h4 span {
display: block;
}

.img-wrap {
border: $line-width solid black;
}

.album {
font-style: italic;
}
</style>
2 changes: 0 additions & 2 deletions components/NavBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ const nav = [
]
},
{ link: { text: 'Interviews', route: '/interviews' } },
{ link: { text: 'About', route: '/about' } },
{ link: { text: 'Contact', route: '/contact' } },
];

type NavConfig = typeof nav;
Expand Down
3 changes: 3 additions & 0 deletions components/PostContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@ export default Vue.extend({
padding-right: 15px;
font-size: $site-content__font--small;
}
.article-album-image {
outline: 1px solid #dddddd;
}
hr {
@include hr-line-styles;
margin-top: $site-content__spacer--x-large;
Expand Down
5 changes: 4 additions & 1 deletion pages/_type/_slug.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<span v-for="(author, key) in article.metadata.author.authors" :key="'author' + key">
<a class="review-header__author"
:href="authorLinks[key].url"
v-if="authorLinks[key]">{{author.name}}</a><span v-else>{{author.name}}</span>{{ key !== authorLinks.length - 1 ? ', ' : ''}}
v-if="authorLinks[key]">{{author.name}}</a><span v-else>{{author.name}}</span>{{ authorDivider(key, authorLinks.length) }}
</span>
</p>
</header>
Expand Down Expand Up @@ -143,6 +143,9 @@ export default Vue.extend({
return this.article.metadata.author.authors.map(resolveAuthorLink);
}
},
methods: {
authorDivider,
}
})

</script>
Expand Down
45 changes: 36 additions & 9 deletions pages/reviews/_slug.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<span v-for="(reviewItem, key) in reviews" :key="`reviewers-${key}`">
<a class="review-header__author"
:href="reviewAuthorLinks[key].url"
v-if="reviewAuthorLinks[key]">{{reviewItem.author.name}}</a><span v-else>{{reviewItem.author.name}}</span>{{ key !== reviews.length - 1 ? ', ' : ''}}
v-if="reviewAuthorLinks[key]">{{reviewItem.author.name}}</a><span v-else>{{reviewItem.author.name}}</span>{{ authorDivider(key, reviews.length) }}
</span>
</p>
</header>
Expand All @@ -39,7 +39,10 @@
</template>
<figure>
<img class="review-sidebar__album-cover" :alt="coverAlt" :src="review.metadata.featuredimage['medium-square']" :style="sidebarStyles" width="600" height="600" />
<figcaption class="review-sidebar__album-info">{ { review.featured_media.description } }</figcaption>
<template v-if="review.metadata.artworkCredit">
<figcaption id="review-sidebar__artwork-info">The album artwork of <i>{{ review.metadata.album }}<i/> by {{ review.metadata.artist }} {{ review.metadata.artworkCredit }} [<a :href="review.metadata.artworkCreditSource" target="_blank" rel="noopener">Source</a>]</figcaption>
<span class="review-sidebar__artwork-info-icon"><icon @click="toggleArtworkCredit" icon="info-circle" /></span>
</template>
</figure>
</div>
<div class="review-sidebar__total-score" :style="sidebarStyles">
Expand Down Expand Up @@ -243,6 +246,9 @@ export default Vue.extend({
coverAlt(): string {
return albumCoverAlt(this.review);
}
},
methods: {
authorDivider,
}
})
</script>
Expand All @@ -254,6 +260,8 @@ export default Vue.extend({
border-bottom: 5px solid black;
padding-top: $site-content__spacer--large;
padding-bottom: $site-content__spacer--x-large;
margin-bottom: -1px;
z-index: 2;
}

.collapsible {
Expand Down Expand Up @@ -319,6 +327,7 @@ export default Vue.extend({

.review-sidebar__ribbon {
position: absolute;
z-index: 3;
top: -7px;
right: 8%;
width: 12%;
Expand All @@ -328,12 +337,32 @@ export default Vue.extend({
display: block;
width: 100%;
height: auto;
border: 1px solid #dddddd;
border-top: 0;
outline: 1px solid #dddddd;
z-index: 1;
}

#review-sidebar__artwork-info {
font-family: 'Source Sans Pro', sans-serif;
position: absolute;
bottom:0;
left:0;
// display: none;
padding: 5% 20% 5% 5%;
opacity: 0.8;
color: white;
background-color: black;
line-height: 1.3;
font-size: 0.9em;
}

.review-sidebar__album-info {
display: none;
.review-sidebar__artwork-info-icon {
color: lightgray;
margin: 1em;
width: 2em;
height: 2em;
position: absolute;
bottom: 0;
right: 0;
}

.review-sidebar__total-score, .review-sidebar__tracks {
Expand Down Expand Up @@ -472,8 +501,6 @@ export default Vue.extend({
}
}

/* LARGE STYLING (TABLET) */

/* LARGE STYLING (TABLET) */
/* LARGE STYLING (DESKTOP) */

</style>