2019-01-04 13:10:41 +00:00
|
|
|
<template>
|
2019-01-10 17:17:15 +00:00
|
|
|
<ul class="gallery-featured">
|
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-10 17:28:57 +00:00
|
|
|
<span class="gallery-title">{{ gallery.title }}</span>
|
2019-01-04 13:10:41 +00:00
|
|
|
</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>
|
2019-01-10 17:28:57 +00:00
|
|
|
.featured-image {
|
|
|
|
width: 100%;
|
|
|
|
background-size: cover;
|
|
|
|
background-position: center center;
|
|
|
|
}
|
|
|
|
|
2019-01-04 13:10:41 +00:00
|
|
|
@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) {
|
2019-01-10 17:17:15 +00:00
|
|
|
.gallery-featured {
|
|
|
|
transition: opacity .3s; // TEMP
|
|
|
|
opacity: .3;
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
opacity: 1;
|
|
|
|
}
|
|
|
|
}
|
2019-01-04 13:10:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
</style>
|