Add Fullscreen in viewer, Track links with Google Analytics, Use .env file
All checks were successful
continuous-integration/drone/push Build is passing

- Fullscreen is a component that watches a store value set by the Carousel component on a picture click
- Use a .env file for API and website related settings and informations
- Google Analytics is now in place, tracking each routes link and viewer photo change
This commit is contained in:
2020-03-28 15:21:51 +01:00
parent 23db9e343c
commit 0635b65abf
20 changed files with 384 additions and 138 deletions

View File

@@ -0,0 +1,83 @@
.fullscreen {
position: fixed;
z-index: 200;
top: 0;
left: 0;
width: 100%;
height: 100%;
overflow: hidden;
pointer-events: none;
// Photo
&__image {
width: 100%;
height: 100%;
overflow-x: auto;
opacity: 0;
transform: scale(1.1);
transition: transform 0.8s $ease-quart, opacity 0.8s $ease-quart;
will-change: transform, opacity;
img {
position: relative;
z-index: 200;
display: block;
height: 100%;
width: auto;
}
// Open
&.is-open {
opacity: 1;
transform: scale(1);
pointer-events: auto;
}
}
// Controls
&__close {
position: fixed;
z-index: 201;
bottom: 24px;
left: 0;
width: 100%;
display: flex;
justify-content: center;
opacity: 0;
transform: scale(1.1) translateY(24px);
transition: transform 0.8s $ease-quart, opacity 0.8s $ease-quart;
will-change: transform, opacity;
// Visible state
&.is-visible {
opacity: 1;
transform: scale(1) translateY(0);
}
}
// Loading
&__loading {
position: absolute;
z-index: 202;
top: 50%;
left: 50%;
opacity: 1;
transform: translate(-50%, -50%);
transform-origin: 50% 50%;
display: flex;
align-items: center;
justify-content: center;
width: 80px;
height: 80px;
background-color: $color-primary;
border-radius: 100%;
transition: transform 0.8s $ease-quart, opacity 0.8s $ease-quart;
will-change: transform, opacity;
// Hidden state
&.is-hidden {
transform: scale(1.05) translate(-50%, -50%);
opacity: 0;
}
}
}