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"
|
2019-01-23 11:29:48 +00:00
|
|
|
class="featured-image thumb-overlay"
|
2019-01-17 11:42:41 +00:00
|
|
|
:style="{ '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
|
|
|
},
|
2019-01-04 13:10:41 +00:00
|
|
|
},
|
|
|
|
}
|
|
|
|
</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-12 20:08:07 +00:00
|
|
|
overflow: hidden;
|
2019-01-10 17:28:57 +00:00
|
|
|
}
|
|
|
|
|
2019-01-04 13:10:41 +00:00
|
|
|
@media (max-width: $bp__layout) {
|
|
|
|
.featured-image {
|
2019-01-17 11:42:41 +00:00
|
|
|
height: calc(50vh - #{$site-menu__header-height / 2});
|
2019-01-04 13:10:41 +00:00
|
|
|
width: 100vw;
|
|
|
|
flex: 0 0 100vw;
|
|
|
|
}
|
2019-01-12 16:51:12 +00:00
|
|
|
|
|
|
|
.gallery-title {
|
|
|
|
position: absolute;
|
|
|
|
display: block;
|
|
|
|
max-width: 66%;
|
2019-01-27 16:27:02 +00:00
|
|
|
top: 50%;
|
|
|
|
left: 50%;
|
|
|
|
transform: translate(-50%, -50%);
|
2019-01-12 16:51:12 +00:00
|
|
|
|
|
|
|
font-size: 1.5em;
|
|
|
|
|
|
|
|
color: #fff;
|
|
|
|
}
|
|
|
|
|
2019-01-04 13:10:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@media (min-width: $bp__layout) {
|
2019-01-10 17:17:15 +00:00
|
|
|
.gallery-featured {
|
|
|
|
transition: opacity .3s; // TEMP
|
2019-01-12 20:08:07 +00:00
|
|
|
padding: 8px;
|
2019-01-27 13:34:32 +00:00
|
|
|
|
|
|
|
cursor: pointer;
|
2019-01-10 17:17:15 +00:00
|
|
|
}
|
2019-01-17 12:05:25 +00:00
|
|
|
|
|
|
|
.featured-image {
|
2019-01-23 11:29:48 +00:00
|
|
|
z-index: 10;
|
|
|
|
position: relative;
|
2019-01-17 12:05:25 +00:00
|
|
|
height: 0;
|
|
|
|
padding-top: 100%;
|
2019-01-23 11:29:48 +00:00
|
|
|
margin-bottom: 4px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.gallery-title {
|
|
|
|
z-index: 15;
|
|
|
|
position: absolute;
|
|
|
|
top: 8px;
|
|
|
|
right: 8px;
|
|
|
|
text-align: right;
|
|
|
|
font-size: 1em;
|
|
|
|
@include font-title();
|
|
|
|
color: $color__neutral-900;
|
|
|
|
|
|
|
|
@media (min-width: $bp__gallery-compact) {
|
|
|
|
font-size: 1.3em;
|
|
|
|
}
|
2019-01-17 12:05:25 +00:00
|
|
|
}
|
|
|
|
|
2019-01-04 13:10:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
</style>
|