tidy up after refactor
This commit is contained in:
parent
519a47d846
commit
cc160d0b7a
|
@ -1,7 +1,8 @@
|
||||||
<template>
|
<template>
|
||||||
<ul class="featured-images">
|
<ul>
|
||||||
<li v-for="(gallery, index) in galleries"
|
<li v-for="(gallery, index) in galleries"
|
||||||
class="featured-image"
|
class="featured-image"
|
||||||
|
:style="{ 'height': featuredHeight }"
|
||||||
:key="index">
|
:key="index">
|
||||||
<span>{{ gallery.title }}</span>
|
<span>{{ gallery.title }}</span>
|
||||||
</li>
|
</li>
|
||||||
|
@ -14,6 +15,10 @@ export default {
|
||||||
galleries: {
|
galleries: {
|
||||||
type: Array,
|
type: Array,
|
||||||
required: true
|
required: true
|
||||||
|
},
|
||||||
|
featuredHeight: {
|
||||||
|
type: String,
|
||||||
|
required: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -28,28 +33,17 @@ export default {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
||||||
@media (max-width: $bp__layout) {
|
@media (max-width: $bp__layout) {
|
||||||
.featured-image {
|
.featured-image {
|
||||||
height: 50vh;
|
height: 50vh !important; // must override inline style set with prop
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
flex: 0 0 100vw;
|
flex: 0 0 100vw;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (min-width: $bp__layout) {
|
@media (min-width: $bp__layout) {
|
||||||
$featured-width: 20rem;
|
|
||||||
$featured-height: 16rem;
|
|
||||||
|
|
||||||
.featured-images {
|
|
||||||
order: 2;
|
|
||||||
flex: 0 0 $featured-width;
|
|
||||||
overflow-y: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.featured-image {
|
.featured-image {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: $featured-height;;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,9 +7,13 @@
|
||||||
X
|
X
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="gallery-container">
|
<div class="gallery">
|
||||||
<GalleryFeatured :galleries="galleries" />
|
<GalleryFeatured class="gallery__featured"
|
||||||
<GalleryThumbs :galleries="galleries" />
|
:featured-height="featuredImageHeight"
|
||||||
|
:galleries="galleries" />
|
||||||
|
<GalleryThumbs class="gallery__thumbs"
|
||||||
|
:featured-height="featuredImageHeight"
|
||||||
|
:galleries="galleries" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -33,6 +37,7 @@ export default {
|
||||||
|
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
|
featuredImageHeight: '16rem',
|
||||||
imageViewerIsVisible: false
|
imageViewerIsVisible: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -62,17 +67,15 @@ export default {
|
||||||
to bottom left,
|
to bottom left,
|
||||||
magenta,
|
magenta,
|
||||||
cyan
|
cyan
|
||||||
);
|
); // TEMP
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: $bp__layout) {
|
@media (max-width: $bp__layout) {
|
||||||
$gallery-thumb-slider-width: 10rem;
|
|
||||||
|
|
||||||
.gallery-page {
|
.gallery-page {
|
||||||
padding-top: $site-menu__header-height;
|
padding-top: $site-menu__header-height;
|
||||||
}
|
}
|
||||||
|
|
||||||
.gallery-container {
|
.gallery {
|
||||||
position: relative;
|
position: relative;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
@ -80,6 +83,12 @@ export default {
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.gallery__thumbs {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
.close-viewer {
|
.close-viewer {
|
||||||
font-size: 10em;
|
font-size: 10em;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
@ -108,7 +117,7 @@ export default {
|
||||||
padding-left: $site-menu__header-width;
|
padding-left: $site-menu__header-width;
|
||||||
}
|
}
|
||||||
|
|
||||||
.gallery-container {
|
.gallery {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
@ -118,6 +127,20 @@ export default {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.gallery__featured {
|
||||||
|
order: 2;
|
||||||
|
flex: 0 0 20rem;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gallery__thumbs {
|
||||||
|
order: 1;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: space-between;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
.close-viewer {
|
.close-viewer {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,14 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="gallery-thumbs">
|
<div>
|
||||||
<div class="gallery-thumbs__spacer"></div>
|
<div class="gallery-thumbs__spacer"></div>
|
||||||
<ul class="gallery-thumbs__list">
|
<ul class="gallery-thumbs__list">
|
||||||
<li v-for="(gallery, index) in galleries"
|
<li v-for="(gallery, index) in galleries"
|
||||||
:key="index">
|
:key="index">
|
||||||
<ul class="gallery-thumbs__row">
|
<ul class="gallery-thumbs__row">
|
||||||
<NavArrow class="gallery-thumbs__slider mobile-only" />
|
<NavArrow class="gallery-thumbs__slider mobile-only" />
|
||||||
<li class="featured-image mobile-only"></li>
|
<li class="featured-image mobile-only"
|
||||||
|
:style="{ 'height': featuredHeight }">
|
||||||
|
</li>
|
||||||
<li v-for="image in gallery.images"
|
<li v-for="image in gallery.images"
|
||||||
class="thumb-container"
|
class="thumb-container"
|
||||||
:key="image.url">
|
:key="image.url">
|
||||||
|
@ -30,6 +32,10 @@ export default {
|
||||||
galleries: {
|
galleries: {
|
||||||
type: Array,
|
type: Array,
|
||||||
required: true
|
required: true
|
||||||
|
},
|
||||||
|
featuredHeight: {
|
||||||
|
type: String,
|
||||||
|
required: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -53,14 +59,6 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: $bp__layout) {
|
@media (max-width: $bp__layout) {
|
||||||
$gallery-thumb-slider-width: 10rem;
|
|
||||||
|
|
||||||
.gallery-thumbs {
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.gallery-thumbs__spacer {
|
.gallery-thumbs__spacer {
|
||||||
display:none;
|
display:none;
|
||||||
}
|
}
|
||||||
|
@ -71,15 +69,15 @@ export default {
|
||||||
|
|
||||||
.gallery-thumbs__slider {
|
.gallery-thumbs__slider {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: $gallery-thumb-slider-width;
|
width: 10rem;
|
||||||
height: $gallery-thumb-slider-width;
|
height: 10rem;
|
||||||
bottom: 1rem;
|
bottom: 1rem;
|
||||||
left: 100vw;
|
left: 100vw;
|
||||||
transform: translateX( calc(-2rem - 100%));
|
transform: translateX( calc(-2rem - 100%));
|
||||||
}
|
}
|
||||||
|
|
||||||
.featured-image {
|
.featured-image {
|
||||||
height: 50vh;
|
height: 50vh !important; // must override inline style set with prop
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
flex: 0 0 100vw;
|
flex: 0 0 100vw;
|
||||||
}
|
}
|
||||||
|
@ -91,7 +89,6 @@ export default {
|
||||||
|
|
||||||
@media (min-width: $bp__layout) {
|
@media (min-width: $bp__layout) {
|
||||||
$thumbs-height: 8rem;
|
$thumbs-height: 8rem;
|
||||||
$featured-height: 16rem;
|
|
||||||
|
|
||||||
.mobile-only {
|
.mobile-only {
|
||||||
display: none;
|
display: none;
|
||||||
|
@ -99,26 +96,16 @@ export default {
|
||||||
|
|
||||||
.featured-image {
|
.featured-image {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: $featured-height;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.thumb-container {
|
.thumb-container {
|
||||||
height: $thumbs-height;
|
height: $thumbs-height;
|
||||||
}
|
}
|
||||||
|
|
||||||
.gallery-thumbs {
|
|
||||||
order: 1;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: space-between;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.gallery-thumbs__list {
|
.gallery-thumbs__list {
|
||||||
height: $thumbs-height;
|
height: $thumbs-height;
|
||||||
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
// overflow: auto; // TEMP
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.gallery-thumbs__row {
|
.gallery-thumbs__row {
|
||||||
|
|
Loading…
Reference in New Issue