Implement Interactive Globe on Homepage

This commit is contained in:
2021-10-03 13:56:11 +02:00
parent 2634e0473a
commit f6da3c4b55
8 changed files with 355 additions and 121 deletions

View File

@@ -1,119 +1,3 @@
/* ==========================================================================
PAGE TRANSITION
========================================================================== */
.transition {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 400;
overflow: hidden;
display: flex;
align-items: center;
justify-content: center;
cursor: wait;
&, * {
will-change: transform, opacity;
}
// Content
&__loader {
position: relative;
z-index: 2;
}
// Background
&__background {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: $color-primary;
transform-origin: 50% 0;
}
// Hidden
&.hidden {
display: none;
}
}
/* ==========================================================================
REVEAL ANIMATIONS
========================================================================== */
.anim-mask {
display: block;
overflow: hidden;
white-space: nowrap;
span {
display: inline-block;
}
}
/* ==========================================================================
KEYFRAMES ANIMATIONS
========================================================================== */
// Rotate button dashes
@keyframes rotateDashes {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
/*
** Spinning globe
*/
@keyframes moveContinents {
0% { transform: translate(0,0); }
100% { transform: translate(-80.26px, 28.2px); }
}
.anim-spinGlobe {
animation: moveContinents 1.7s linear infinite;
animation-play-state: paused;
}
// Small
@keyframes moveContinentsSmall {
0% { transform: translate(0,0); }
100% { transform: translate(-96.95px, 0); }
}
.anim-spinGlobeSmall {
animation: moveContinentsSmall 1.5s linear infinite;
animation-play-state: paused;
}
/*
** Layout
*/
// List
@keyframes layoutListOdd {
0% { transform: translateX(0); }
50% { transform: translateX(2px); }
}
@keyframes layoutListEven {
0% { transform: translateX(0); }
50% { transform: translateX(-4px); }
}
// Grid
@keyframes layoutGridOdd {
0% { transform: translateY(0); }
50% { transform: translateY(2px); }
}
@keyframes layoutGridEven {
0% { transform: translateY(0); }
50% { transform: translateY(-3px); }
}
/*
** Globe
*/