Improvements in slide list alignment.

This commit is contained in:
Mateus Machado Luna 2018-10-02 11:40:06 -03:00
parent cb6fd738b0
commit 45d9df7848
2 changed files with 64 additions and 21 deletions

View File

@ -185,13 +185,10 @@
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
min-height: calc(100vh - 142px); min-height: calc(100vh - 142px);
margin-bottom: 1rem;
transition: height 0.3s, min-height 0.3s; transition: height 0.3s, min-height 0.3s;
.slide-main-content { .slide-main-content {
position: relative; position: relative;
min-height: 70vh;
max-height: 70vh;
width: 100vw; width: 100vw;
display: flex; display: flex;
align-items: center; align-items: center;
@ -206,22 +203,37 @@
max-width: 100vh; max-width: 100vh;
text-align: center; text-align: center;
color: white; color: white;
max-height: calc(100vh - 115px);
overflow: hidden;
transition: height 0.3s, max-height 0.3s;
} }
.empty_document { .empty-document {
font-size: 4rem; font-size: 4rem;
font-weight: normal; font-weight: normal;
color: $gray4; color: $gray4;
text-align: center; text-align: center;
position: relative; position: relative;
width: 100%; max-height: calc(100vh - 115px);
height: 80%; overflow: hidden;
transition: height 0.3s, max-height 0.3s;
margin: auto; margin: auto;
img {
height: 100%;
}
p { p {
position: absolute; position: absolute;
margin: calc(50% - 4rem) auto; margin: calc(50% - 4rem) auto;
width: 100%; width: 100%;
} }
@media screen and (max-width: 1024px) and (min-width: 768px) {
font-size: 3rem;
p {
margin: calc(50% - 1rem) auto;
}
}
@media screen and (max-width: 768px) { @media screen and (max-width: 768px) {
font-size: 2rem; font-size: 2rem;
p { p {
@ -233,9 +245,10 @@
} }
.slide-title-area { .slide-title-area {
width: 100%; width: 100%;
position: relative; position: absolute;
top: -85px; bottom: 115px;
margin-bottom: -85px; // top: -85px;
// margin-bottom: -85px;
background-color: rgba(0,0,0,0.5); background-color: rgba(0,0,0,0.5);
padding: 1rem $page-side-padding; padding: 1rem $page-side-padding;
display: flex; display: flex;
@ -324,9 +337,12 @@
} }
} }
.tainacan-slides-list { .tainacan-slides-list {
background-color: rgba(0,0,0,0.5);
position: relative; position: relative;
transition: opacity 0.3s, visibility 0.3s, display 0.3s; transition: opacity 0.3s, visibility 0.3s, display 0.3s;
min-height: 60px; height: 115px;
min-height: 115px;
padding: 0.75rem 0;
.loading-icon { .loading-icon {
width: 100%; width: 100%;
@ -336,7 +352,6 @@
} }
#tainacan-slide-container { #tainacan-slide-container {
background-color: rgba(0,0,0,0.5);
padding: 0 $page-side-padding; padding: 0 $page-side-padding;
display: flex; display: flex;
flex-wrap: nowrap; flex-wrap: nowrap;
@ -362,7 +377,7 @@
cursor: pointer; cursor: pointer;
&.active-item img { &.active-item img {
border-bottom: 4px solid $turquoise5 !important; border-bottom: 4px solid $turquoise5;
} }
&:hover img{ &:hover img{
border-bottom: 4px solid $gray2; border-bottom: 4px solid $gray2;
@ -381,7 +396,7 @@
} }
} }
.hide-controls { .hide-controls {
@media screen and (max-width: 768px) { // @media screen and (max-width: 768px) {
.slide-control-arrow { .slide-control-arrow {
visibility: hidden; visibility: hidden;
opacity: 0; opacity: 0;
@ -404,6 +419,26 @@
} }
.tainacan-slide-main-view { .tainacan-slide-main-view {
min-height: 100vh; min-height: 100vh;
.slide-main-content {
&>div,
&>div audio,
&>div img,
&>div video,
&>div.tainacan-embed-container {
max-height: 100vh;
}
}
} }
} .empty-document {
max-height: 100vh;
img {
width: auto;
}
}
@media screen and (max-width: 768px) {
.empty-document img { width: 100% !important; }
}
// }
} }

View File

@ -134,7 +134,7 @@
v-if="!isLoadingItem && slideItems.length > 0 && (item.document != undefined && item.document != undefined && item.document != '')" v-if="!isLoadingItem && slideItems.length > 0 && (item.document != undefined && item.document != undefined && item.document != '')"
v-html="item.document_as_html" /> v-html="item.document_as_html" />
<div v-else> <div v-else>
<div class="empty_document"> <div class="empty-document">
<p>{{ $i18n.get('label_document_empty') }}</p> <p>{{ $i18n.get('label_document_empty') }}</p>
<img <img
:alt="$i18n.get('label_document_empty')" :alt="$i18n.get('label_document_empty')"
@ -152,7 +152,11 @@
</span> </span>
</button> </button>
</section> </section>
<section
<!-- SLIDE ITEMS LIST -->
<div class="tainacan-slides-list">
<section
@click.prevent="onHideControls()" @click.prevent="onHideControls()"
v-if="slideItems[slideIndex] != undefined" v-if="slideItems[slideIndex] != undefined"
class="slide-title-area"> class="slide-title-area">
@ -170,9 +174,6 @@
:time="this.slideTimeout/1000" /> :time="this.slideTimeout/1000" />
</button> </button>
</section> </section>
<!-- SLIDE ITEMS LIST -->
<div class="tainacan-slides-list">
<swiper <swiper
@slideChange="onSlideChange()" @slideChange="onSlideChange()"
ref="mySwiper" ref="mySwiper"
@ -585,6 +586,13 @@ export default {
.table-wrapper { .table-wrapper {
overflow: hidden !important; overflow: hidden !important;
display: flex;
flex-wrap: nowrap;
flex-direction: column;
justify-content: space-between;
height: 100vh;
width: 100vw;
} }
</style> </style>