2019-01-04 13:10:41 +00:00
|
|
|
<template>
|
2019-01-04 13:55:30 +00:00
|
|
|
<div>
|
2019-01-04 13:10:41 +00:00
|
|
|
<div class="gallery-thumbs__spacer"></div>
|
|
|
|
<ul class="gallery-thumbs__list">
|
|
|
|
<li v-for="(gallery, index) in galleries"
|
|
|
|
:key="index">
|
|
|
|
<ul class="gallery-thumbs__row">
|
2019-01-04 13:55:30 +00:00
|
|
|
<li class="featured-image mobile-only"
|
|
|
|
:style="{ 'height': featuredHeight }">
|
2019-01-04 16:18:45 +00:00
|
|
|
<ThumbNav direction="right" />
|
2019-01-04 13:55:30 +00:00
|
|
|
</li>
|
2019-01-04 13:10:41 +00:00
|
|
|
<li v-for="image in gallery.images"
|
|
|
|
class="thumb-container"
|
|
|
|
:key="image.url">
|
2019-01-04 16:18:45 +00:00
|
|
|
<ThumbNav direction="left" />
|
|
|
|
<ThumbNav direction="right" />
|
2019-01-04 13:10:41 +00:00
|
|
|
<span>{{ image.thumbUrl }}</span>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2019-01-04 16:18:45 +00:00
|
|
|
import ThumbNav from '@/components/ThumbNav'
|
|
|
|
|
2019-01-04 13:10:41 +00:00
|
|
|
export default {
|
|
|
|
components: {
|
2019-01-04 16:18:45 +00:00
|
|
|
ThumbNav
|
2019-01-04 13:10:41 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
props: {
|
|
|
|
galleries: {
|
|
|
|
type: Array,
|
|
|
|
required: true
|
2019-01-04 13:55:30 +00:00
|
|
|
},
|
|
|
|
featuredHeight: {
|
|
|
|
type: String,
|
|
|
|
required: true
|
2019-01-04 13:10:41 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
data () {
|
|
|
|
return {
|
2019-01-04 16:18:45 +00:00
|
|
|
activeThumbIndices: []
|
2019-01-04 13:10:41 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2019-01-04 16:18:45 +00:00
|
|
|
mounted () {
|
|
|
|
console.log('mounted')
|
|
|
|
},
|
|
|
|
|
2019-01-04 13:10:41 +00:00
|
|
|
methods: {
|
2019-01-04 15:23:13 +00:00
|
|
|
slideRight(index) {
|
|
|
|
console.log('slideRight: ', index)
|
|
|
|
}
|
2019-01-04 13:10:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.gallery-thumbs__row {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: row;
|
|
|
|
list-style: none;
|
|
|
|
padding: 0;
|
|
|
|
margin: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
@media (max-width: $bp__layout) {
|
|
|
|
.gallery-thumbs__spacer {
|
|
|
|
display:none;
|
|
|
|
}
|
|
|
|
|
|
|
|
.gallery-thumbs__row {
|
|
|
|
position: relative;
|
|
|
|
}
|
|
|
|
|
|
|
|
.gallery-thumbs__slider {
|
|
|
|
position: absolute;
|
2019-01-04 13:55:30 +00:00
|
|
|
width: 10rem;
|
|
|
|
height: 10rem;
|
2019-01-04 13:10:41 +00:00
|
|
|
bottom: 1rem;
|
|
|
|
left: 100vw;
|
|
|
|
transform: translateX( calc(-2rem - 100%));
|
|
|
|
}
|
|
|
|
|
|
|
|
.featured-image {
|
2019-01-04 13:55:30 +00:00
|
|
|
height: 50vh !important; // must override inline style set with prop
|
2019-01-04 13:10:41 +00:00
|
|
|
width: 100vw;
|
|
|
|
flex: 0 0 100vw;
|
|
|
|
}
|
|
|
|
|
|
|
|
.thumb-container {
|
|
|
|
height: 50vh;
|
2019-01-04 16:18:45 +00:00
|
|
|
width: 100vw;
|
2019-01-04 13:10:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@media (min-width: $bp__layout) {
|
|
|
|
$thumbs-height: 8rem;
|
|
|
|
|
|
|
|
.mobile-only {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
.featured-image {
|
|
|
|
width: 100%;
|
|
|
|
}
|
|
|
|
|
|
|
|
.thumb-container {
|
|
|
|
height: $thumbs-height;
|
|
|
|
}
|
|
|
|
|
2019-01-04 13:55:30 +00:00
|
|
|
.gallery-thumbs__list {
|
|
|
|
height: $thumbs-height;
|
|
|
|
|
2019-01-04 13:10:41 +00:00
|
|
|
overflow: hidden;
|
|
|
|
}
|
|
|
|
|
2019-01-04 13:55:30 +00:00
|
|
|
.gallery-thumbs__row {
|
|
|
|
flex: 0 0 $thumbs-height;
|
|
|
|
}
|
2019-01-04 16:18:45 +00:00
|
|
|
|
|
|
|
.thumb-nav {
|
|
|
|
display: none;
|
|
|
|
}
|
2019-01-04 13:10:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
</style>
|