Skip to content

Commit

Permalink
Add a unique class to each thumbnail with video ID, #49
Browse files Browse the repository at this point in the history
  • Loading branch information
davekiss committed Mar 22, 2018
1 parent 28c5fa5 commit d7aedee
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions vimeography-harvestone/src/components/Thumbnail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
import { mapState } from 'vuex'
const defaultTemplate = `
<figure class="swiper-slide vimeography-thumbnail">
<router-link class="vimeography-link" :to="this.query" exact exact-active-class="vimeography-link-active">
<img class="vimeography-thumbnail-img" :src="thumbnailUrl" :title="video.name" />
<figure :class="this.thumbnailClass">
<router-link class="vimeography-link" :title="video.name" :to="this.query" exact exact-active-class="vimeography-link-active">
<img class="vimeography-thumbnail-img" :src="thumbnailUrl" :alt="video.name" />
</router-link>
</figure>
`;
Expand All @@ -15,6 +15,9 @@ const Thumbnail = {
props: ['video'],
template: userTemplate ? userTemplate.innerText : defaultTemplate,
computed: {
thumbnailClass() {
return `swiper-slide vimeography-thumbnail vimeography-video-${this.video.id}`
},
query() {
const q = {
...this.$route.query,
Expand Down

0 comments on commit d7aedee

Please sign in to comment.