marc-leopold/components/GalleryPage.vue

128 lines
2.0 KiB
Vue
Raw Normal View History

2019-01-03 21:11:23 +00:00
<template>
<div class="gallery-page">
<div class="image-viewer"
:class="{ 'is-visible': imageViewerIsVisible }">
<div class="close-viewer"
@click="toggleImageViewer">
X
</div>
</div>
2019-01-04 09:24:38 +00:00
<div class="gallery-container">
<GalleryFeatured :galleries="galleries" />
<GalleryThumbs :galleries="galleries" />
2019-01-03 21:11:23 +00:00
</div>
</div>
</template>
<script>
import GalleryFeatured from '@/components/GalleryFeatured'
import GalleryThumbs from '@/components/GalleryThumbs'
2019-01-03 21:11:23 +00:00
export default {
components: {
GalleryFeatured,
GalleryThumbs
},
2019-01-03 21:11:23 +00:00
props: {
galleries: {
type: Array,
required: true
}
},
data () {
return {
imageViewerIsVisible: false
2019-01-03 21:11:23 +00:00
}
},
methods: {
toggleImageViewer () {
this.imageViewerIsVisible = !this.imageViewerIsVisible;
}
2019-01-03 21:11:23 +00:00
}
}
</script>
<style lang="scss" scoped>
.gallery-page {
position: relative;
height: 100%;
width: 100%;
}
.image-viewer {
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
background: linear-gradient(
to bottom left,
magenta,
cyan
);
}
2019-01-03 21:11:23 +00:00
@media (max-width: $bp__layout) {
$gallery-thumb-slider-width: 10rem;
2019-01-03 21:11:23 +00:00
.gallery-page {
padding-top: $site-menu__header-height;
}
2019-01-04 09:24:38 +00:00
.gallery-container {
2019-01-03 21:11:23 +00:00
position: relative;
height: 100%;
2019-01-04 09:24:38 +00:00
width: 100%;
2019-01-03 21:11:23 +00:00
overflow-x: hidden;
overflow-y: auto;
}
.close-viewer {
font-size: 10em;
cursor: pointer;
}
.image-viewer {
z-index: 50;
2019-01-03 21:11:23 +00:00
transition: opacity 1s; //TEMP
opacity: 0;
pointer-events: none;
2019-01-03 21:11:23 +00:00
&.is-visible {
opacity: 1;
pointer-events: auto;
}
}
}
2019-01-03 21:11:23 +00:00
@media (min-width: $bp__layout) {
.mobile-only {
display: none;
}
2019-01-04 09:24:38 +00:00
2019-01-03 21:11:23 +00:00
.gallery-page {
padding-left: $site-menu__header-width;
}
2019-01-04 09:24:38 +00:00
.gallery-container {
2019-01-04 09:56:46 +00:00
display: flex;
flex-direction: row;
2019-01-04 09:56:46 +00:00
justify-content: space-between;
2019-01-04 09:24:38 +00:00
position: relative;
height: 100%;
width: 100%;
overflow: hidden;
}
.close-viewer {
display: none;
}
2019-01-03 21:11:23 +00:00
}
2019-01-03 21:11:23 +00:00
</style>