22/invite/style.scss

146 lines
2.5 KiB
SCSS
Raw Normal View History

2017-07-20 21:15:03 +03:00
$foreground: #FFFFFF;
$background: #000000;
2017-07-20 23:30:58 +03:00
2017-07-21 13:32:52 +03:00
$animation-length: 5s;
$animation-delay: $animation-length - 1.7;
2017-07-21 10:56:11 +03:00
$slide-count: 6;
2017-07-20 23:30:58 +03:00
2017-07-20 21:15:03 +03:00
* {
box-sizing: border-box;
}
body {
justify-content: center;
align-items: center;
background: $background;
color: $foreground;
font-family: Sans-Serif;
margin:0;
padding:0;
overflow:hidden;
2017-07-21 10:56:11 +03:00
animation: colorchange 30s linear alternate infinite;
}
h1 {
margin:0;
2017-07-20 21:15:03 +03:00
}
.container {
height:100vh;
width: 100vw;
2017-07-20 23:30:58 +03:00
2017-07-21 10:56:11 +03:00
@for $child from 0 to $slide-count - 2 {
2017-07-20 23:30:58 +03:00
>:nth-child(#{$child+1}) {
animation-delay: $animation-delay*$child;
animation-duration: $animation-length;
2017-07-21 00:13:21 +03:00
animation-name: slide-in-out;
2017-07-20 23:30:58 +03:00
animation-fill-mode: both;
}
2017-07-20 21:15:03 +03:00
}
2017-07-21 00:13:21 +03:00
2017-07-21 10:56:11 +03:00
>:nth-child(#{$slide-count - 1}) {
animation-delay: $animation-delay* ($slide-count - 2);
animation-duration: $animation-length;
animation-name: slide-in-and-move-up;
animation-fill-mode: both;
}
2017-07-21 00:13:21 +03:00
>:nth-child(#{$slide-count}) {
animation-delay: $animation-delay* ($slide-count - 1);
animation-duration: $animation-length;
animation-name: slide-in;
animation-fill-mode: both;
2017-07-21 10:56:11 +03:00
2017-07-21 13:32:52 +03:00
h2 {
margin-bottom: 120px;
}
}
>:nth-child(#{$slide-count + 1}) {
animation-delay: $animation-delay* ($slide-count + 1);
animation-duration: $animation-length;
animation-name: slide-in-last;
animation-fill-mode: both;
2017-07-21 10:56:11 +03:00
h1 {
margin: 120px;
}
2017-07-21 00:13:21 +03:00
}
2017-07-20 21:15:03 +03:00
}
.slide {
position: absolute;
height:100vh;
width: 100vw;
display: flex;
align-items: center;
justify-content: center;
2017-07-21 00:13:21 +03:00
flex-direction: column;
2017-07-21 13:32:52 +03:00
text-align: center;
img {
max-height: 80vh;
}
2017-07-20 21:15:03 +03:00
}
2017-07-21 00:13:21 +03:00
@keyframes slide-in-out {
2017-07-20 21:15:03 +03:00
0% {
2017-07-21 00:13:21 +03:00
transform: translateY(50px);
2017-07-20 21:15:03 +03:00
opacity: 0;
}
2017-07-21 00:13:21 +03:00
30%, 60% {
2017-07-20 23:30:58 +03:00
transform: translateY(0);
2017-07-20 21:15:03 +03:00
opacity: 1;
}
2017-07-20 23:30:58 +03:00
2017-07-20 21:15:03 +03:00
100% {
2017-07-20 23:30:58 +03:00
transform: translateY(-50px);
2017-07-20 21:15:03 +03:00
opacity: 0;
}
}
2017-07-21 00:13:21 +03:00
2017-07-21 10:56:11 +03:00
@keyframes slide-in-and-move-up {
2017-07-21 00:13:21 +03:00
0% {
transform: translateY(50px);
opacity: 0;
}
2017-07-21 10:56:11 +03:00
30%, 60% {
2017-07-21 00:13:21 +03:00
transform: translateY(0);
opacity: 1;
}
2017-07-21 10:56:11 +03:00
100% {
transform: translateY(50px);
opacity: 1;
}
}
@keyframes slide-in {
0% {
transform: translateY(100px);
opacity: 0;
}
30%, 100% {
2017-07-21 13:32:52 +03:00
transform: translateY(0);
opacity: 1;
}
}
@keyframes slide-in-last {
0% {
transform: translateY(300px);
opacity: 0;
}
30%, 100% {
transform: translateY(200px);
2017-07-21 10:56:11 +03:00
opacity: 1;
}
2017-07-21 00:13:21 +03:00
}
@keyframes colorchange {
2017-07-21 10:56:11 +03:00
0% {background: #01004b;}
33% {background: #002b4a;}
66% {background: #01004b;}
2017-07-21 00:13:21 +03:00
100% {background: #30004b;}
}