|
|
|
$jump-duration: 0.7s; |
|
$jump-easing: cubic-bezier(0.895, 0.03, 0.685, 0.22); |
|
$ease-out-cubic: cubic-bezier(0.215, 0.61, 0.355, 1); |
|
|
|
|
|
html, body { background: #2B2E31; color: #FFF; } |
|
html { height: 100%; display: flex; } |
|
body { margin: auto; } |
|
|
|
/* ---------------------------------- */ |
|
|
|
@import url('https://fonts.googleapis.com/css?family=Orbitron:700'); |
|
.one-k { |
|
font-family: 'Orbitron', monospace; |
|
font-weight: 700; |
|
font-size: 20vw; |
|
@media (min-width: 600px) { font-size: 120px; } |
|
perspective: 200px; |
|
perspective-origin: top center; |
|
color: #FFD950; |
|
|
|
.word { |
|
transform: rotateX(15deg); |
|
display: inline-block; |
|
transform-style: preserve-3d; |
|
} |
|
|
|
.char { |
|
display: inline-block; |
|
transform-style: preserve-3d; |
|
position: relative; |
|
|
|
&:before, |
|
&:after { |
|
content: attr(data-char); |
|
position: absolute; |
|
top: 0; |
|
left: 0; |
|
opacity: 0.4; |
|
transform-style: preserve-3d; |
|
transform: translate3d(0, 3px, -10px); |
|
} |
|
|
|
&:after { |
|
transform: translate3d(0, 3px, -20px); |
|
opacity: 0.2; |
|
} |
|
|
|
&[data-char=","] { vertical-align: .1em; } |
|
|
|
// animation: flip-around 4s cubic-bezier(.5,0,.5,1) infinite; |
|
// @keyframes flip-around { |
|
// to { transform: rotateY(1turn); } |
|
// } |
|
|
|
animation: celebration-dance $jump-duration linear infinite alternate; |
|
animation-delay: calc( -.2s * var(--char-index) ); |
|
transform-origin: center bottom; |
|
} |
|
} |
|
|
|
/* ---------------------------------- */ |
|
|
|
|
|
.dance-container { |
|
height: 60%; |
|
max-height: 15vw; |
|
@media (min-width: 600px) { |
|
max-height: 90px; |
|
} |
|
position: absolute; |
|
bottom: 34%; |
|
left: 0; |
|
right: 0; |
|
display: flex; |
|
width: 100%; |
|
justify-content: center; |
|
align-items: center; |
|
animation: fade-in 0.4s linear 0s both; |
|
@keyframes fade-in { |
|
from { opacity: 0; } |
|
} |
|
} |
|
|
|
.avatar-container { |
|
display: inline-block; |
|
height: 100%; |
|
animation: celebration-dance $jump-duration linear infinite alternate; |
|
transform-origin: center bottom; |
|
|
|
// margin-right: -5%; |
|
// outline: solid 1px red; |
|
|
|
&.-david { |
|
animation-delay: $jump-duration/-2; |
|
} |
|
} |
|
|
|
.avatar { |
|
height: 100%; |
|
width: auto; |
|
animation: do-a-flip $jump-duration * 20 linear -$jump-duration infinite; |
|
transform-origin: 60% center; |
|
|
|
.-david & { |
|
transform-origin: 40% center; |
|
} |
|
} |
|
|
|
.avatar svg { |
|
height: 100%; |
|
transform: translateX(10%); |
|
.-david & { |
|
transform: translateX(-10%); |
|
} |
|
} |
|
|
|
@keyframes celebration-dance { |
|
0% { |
|
transform: translate3d(0, -30%, 0) scaleY(1); |
|
animation-timing-function: $jump-easing; |
|
} |
|
50% { |
|
transform: translate3d(0, 0, 0) scaleY(1.2) scaleX(0.9); |
|
} |
|
70% { |
|
transform: translate3d(0, 0, 0) scaleY(0.9) scaleX(1); |
|
} |
|
100% { |
|
transform: translate3d(0, 0, 0) scaleY(0.8) scaleX(1.1); |
|
} |
|
} |
|
|
|
@keyframes do-a-flip { |
|
0% { transform: rotate(0deg); } |
|
21% { transform: rotate(0deg); animation-timing-function: $ease-out-cubic; } |
|
28% { transform: rotate(-360deg); } |
|
71% { transform: rotate(-360deg); animation-timing-function: $ease-out-cubic; } |
|
78% { transform: rotate(360deg); } |
|
100% { transform: rotate(360deg); } |
|
} |