TeaWeb/loader/css/loader.scss

196 lines
2.8 KiB
SCSS
Raw Normal View History

$setup-time: 80s / 24; /* 24 frames / sec; the initial sequence is 80 seconds */
2018-04-19 17:46:47 +00:00
#loader-overlay {
position: absolute;
overflow: hidden;
2018-04-19 17:46:47 +00:00
2019-08-30 21:06:39 +00:00
top: 0;
left: 0;
right: 0;
bottom: 0;
2018-04-19 17:46:47 +00:00
background: #1e1e1e;
2019-08-30 21:06:39 +00:00
user-select: none;
2018-04-19 17:46:47 +00:00
z-index: 10000;
2018-04-19 17:46:47 +00:00
display: flex;
flex-direction: column;
justify-content: center;
2018-04-19 17:46:47 +00:00
.container {
flex-shrink: 0;
2019-08-30 21:06:39 +00:00
display: block;
position: relative;
2019-08-30 21:06:39 +00:00
width: 1000px;
height: 1000px;
2019-08-30 21:06:39 +00:00
align-self: center;
margin-bottom: 10vh;
transition-duration: .5s;
2019-08-30 21:06:39 +00:00
}
.setup, .idle {
position: absolute;
2019-08-30 21:06:39 +00:00
top: 0;
left: 0;
right: 0;
bottom: 0;
2019-08-30 21:06:39 +00:00
display: none;
2019-08-30 21:06:39 +00:00
&.visible {
display: block;
2019-08-30 21:06:39 +00:00
}
}
.setup.visible {
animation: loader-initial-sequence 0s cubic-bezier(.81,.01,.65,1.16) $setup-time forwards;
2019-08-30 21:06:39 +00:00
}
.idle {
img {
2019-08-30 21:06:39 +00:00
position: absolute;
}
.steam {
2019-08-30 21:06:39 +00:00
position: absolute;
top: 282px;
left: 380px;
2019-08-30 21:06:39 +00:00
width: 249px;
height: 125px;
background: url("../img/loader/steam.png") 0 0;
2019-08-30 21:06:39 +00:00
animation: sprite-steam 2.5s steps(50) forwards infinite;
}
2019-08-30 21:06:39 +00:00
}
2018-04-19 17:46:47 +00:00
&.finishing {
.idle {
.steam {
display: none;
}
2018-04-19 17:46:47 +00:00
.bowl {
animation: swipe-out-bowl .5s both;
}
2019-08-30 21:06:39 +00:00
.text {
animation: swipe-out-text .5s .12s both;
}
}
2019-08-30 21:06:39 +00:00
pointer-events: none;
animation: overlay-fade .3s .2s both;
2019-08-30 21:06:39 +00:00
}
2018-04-19 17:46:47 +00:00
.loader-stage {
position: absolute;
2018-04-19 17:46:47 +00:00
left: 5px;
bottom: 5px;
2018-04-19 17:46:47 +00:00
font-size: 12px;
font-family: monospace;
2018-04-19 17:46:47 +00:00
color: #999;
2019-08-30 21:06:39 +00:00
}
2018-04-19 17:46:47 +00:00
}
@media all and (max-width: 850px) {
#loader-overlay .container {
transform: scale(.5);
2019-08-30 21:06:39 +00:00
}
}
2019-08-30 21:06:39 +00:00
@media all and (max-height: 700px) {
#loader-overlay .container {
transform: scale(.5);
2019-08-30 21:06:39 +00:00
}
}
2019-08-30 21:06:39 +00:00
@media all and (max-width: 400px) {
#loader-overlay .container {
transform: scale(.3);
2019-08-30 21:06:39 +00:00
}
}
2019-08-30 21:06:39 +00:00
@keyframes loader-initial-sequence {
to {
display: none;
2019-08-30 21:06:39 +00:00
}
}
2019-08-30 21:06:39 +00:00
@keyframes sprite-steam {
to {
background-position: 0 -6250px;
2019-08-30 21:06:39 +00:00
}
}
2019-08-30 21:06:39 +00:00
@keyframes swipe-out-bowl {
from {
transform: translate3d(0, 0, 0);
2019-08-30 21:06:39 +00:00
}
40% {
opacity: 1;
transform: translate3d(-60px, 0, 0) skew(-5deg, 0) rotateY(-6deg);
2019-08-30 21:06:39 +00:00
}
2018-04-19 17:46:47 +00:00
to {
opacity: 0;
transform: translate3d(700px, 0, 0) skew(30deg, 0) rotateZ(-6deg);
2019-08-30 21:06:39 +00:00
}
}
2018-04-19 17:46:47 +00:00
@keyframes swipe-out-text {
from {
transform: translate3d(0, 0, 0);
2019-08-30 21:06:39 +00:00
}
2018-04-19 17:46:47 +00:00
40% {
2019-08-30 21:06:39 +00:00
opacity: 1;
transform: translate3d(-30px, 20px, 0) skew(-5deg, 0);
2019-08-30 21:06:39 +00:00
}
2018-04-19 17:46:47 +00:00
to {
2019-08-30 21:06:39 +00:00
opacity: 0;
transform: translate3d(550px, 0, 0) skew(30deg, 0) scale(.96, 1.25) rotateZ(6deg);
2019-08-30 21:06:39 +00:00
}
}
2018-04-19 17:46:47 +00:00
@keyframes overlay-fade {
to {
2019-08-30 21:06:39 +00:00
opacity: 0;
}
}
/* Automated loader timeout */
#loader-overlay:not(.initialized) + #critical-load {
2019-08-30 21:06:39 +00:00
display: block !important;
opacity: 0;
2018-04-19 17:46:47 +00:00
animation: loader-setup-timeout 0s ease-in $setup-time forwards;
2018-04-19 17:46:47 +00:00
2019-08-30 21:06:39 +00:00
.error::before {
content: 'Failed to startup loader!';
2019-08-30 21:06:39 +00:00
}
2018-04-19 17:46:47 +00:00
2019-08-30 21:06:39 +00:00
.detail::before {
content: 'Lookup the console for more details';
}
}
2018-04-19 17:46:47 +00:00
@keyframes loader-setup-timeout {
2019-08-30 21:06:39 +00:00
to {
opacity: 1;
}
2018-04-19 17:46:47 +00:00
}