TeaWeb/loader/app/css/loader.scss

223 lines
3.4 KiB
SCSS
Raw Normal View History

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