Bouncing masthead

This commit is contained in:
oitsjustjose 2020-02-27 00:25:38 -05:00
commit 15d23904be
4 changed files with 192 additions and 13 deletions

View file

@ -15,6 +15,7 @@ $brightCyan: #00d9ff;
$cyan: #00bee0;
$brightGreen: #85d82d;
$green: #7cb342;
$mastColor: #7cb342;
a,
p,
@ -47,6 +48,8 @@ pre {
body {
background-color: $background;
color: $foreground;
margin-left: 0px;
margin-right: 0px;
}
a {
@ -56,9 +59,45 @@ a {
}
}
.masthead {
height: 100vh;
width: 100%;
background-color: $mastColor;
color: $background;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
p.content {
// height: 100%;
font-size: 64px;
font-weight: 900;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
.subheader {
font-size: 32px;
}
}
.down {
position: absolute;
transform: (50%, 50%);
bottom: 0;
i {
font-size: 64px;
}
}
}
.container {
width: 90vw;
margin-left: 5vw;
margin: 2rem 5vw;
}
.centered {
@ -114,8 +153,12 @@ img {
flex-direction: row;
align-items: center;
@at-root body.masthead {
height: calc(100vh - 3rem);
}
@at-root body {
margin-top: 4rem;
margin-top: 3rem;
}
.item {
@ -179,7 +222,7 @@ img {
}
button {
padding: .75rem 1rem;
padding: 0.75rem 1rem;
border-radius: 8px;
border: none;
outline: none;
@ -188,7 +231,7 @@ button {
user-select: none;
&.small {
padding: 0.5rem .75rem;
padding: 0.5rem 0.75rem;
}
&.hoverable {
@ -223,3 +266,25 @@ button {
background-color: map-get($dark, "buttonActive");
}
}
.bounce {
-moz-animation: bounce 2s infinite;
-webkit-animation: bounce 2s infinite;
animation: bounce 2s infinite;
}
@keyframes bounce {
0%,
20%,
50%,
80%,
100% {
transform: translateY(0);
}
40% {
transform: translateY(-30px);
}
60% {
transform: translateY(-15px);
}
}