2019-01-04 13:10:41 +00:00
|
|
|
<template>
|
2019-01-04 13:55:30 +00:00
|
|
|
<ul>
|
2019-01-04 13:10:41 +00:00
|
|
|
<li v-for="(gallery, index) in galleries"
|
|
|
|
class="featured-image"
|
2019-01-10 14:08:58 +00:00
|
|
|
:style="{ 'height': featuredHeight,
|
|
|
|
'background-image': 'url(' + gallery.featuredImage + ')' }"
|
2019-01-09 14:12:30 +00:00
|
|
|
:key="index"
|
|
|
|
@click="$emit('clicked', index)">
|
2019-01-04 13:10:41 +00:00
|
|
|
<span>{{ gallery.title }}</span>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
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-10 14:08:58 +00:00
|
|
|
computed: {
|
|
|
|
},
|
|
|
|
|
2019-01-04 13:10:41 +00:00
|
|
|
methods: {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
@media (max-width: $bp__layout) {
|
|
|
|
.featured-image {
|
2019-01-09 12:56:10 +00:00
|
|
|
height: calc(50vh - #{$site-menu__header-height / 2}) !important; // must override inline style set with prop
|
2019-01-04 13:10:41 +00:00
|
|
|
width: 100vw;
|
|
|
|
flex: 0 0 100vw;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@media (min-width: $bp__layout) {
|
|
|
|
.featured-image {
|
|
|
|
width: 100%;
|
2019-01-10 14:08:58 +00:00
|
|
|
background-size: cover;
|
|
|
|
background-position: center center;
|
2019-01-04 13:10:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
</style>
|