|
$red: #F37272; |
|
$brown: #584E4A; |
|
$whitey: #f0f0f0; |
|
|
|
$snap: cubic-bezier(1.000, 0.005, 0.240, 1.000); |
|
$bounce: cubic-bezier(0.175, 0.885, 0.320, 1.275); |
|
|
|
* { |
|
box-sizing: border-box; |
|
} |
|
html, |
|
body { |
|
height: 100%; |
|
overflow: hidden; |
|
} |
|
.page { |
|
height: 100%; |
|
background-color: $brown; |
|
} |
|
.content { |
|
// essential |
|
height: 200%; // make higher or you'll see background when rotated |
|
transform-origin: top left; |
|
transition: transform .7s $snap; |
|
|
|
// styling |
|
background-color: $whitey; |
|
} |
|
.content_inner { |
|
// essential |
|
height: 50%; // compensate for higher .content |
|
overflow-y: auto; // set expected overflow |
|
|
|
// styling |
|
padding: 50px 20%; |
|
} |
|
|
|
/* basically all styling from now on */ |
|
.menu_toggle { |
|
z-index: 900; |
|
position: fixed; |
|
top: 0; |
|
left: 0; |
|
display: block; |
|
cursor: pointer; |
|
width: 100px; |
|
height: 80px; |
|
background-color: $red; |
|
border-bottom-right-radius: 100%; |
|
|
|
&:active { |
|
i { |
|
opacity: 0.8 |
|
} |
|
} |
|
i { |
|
color: $whitey; |
|
} |
|
.menu_open, |
|
.menu_close { |
|
position: absolute; |
|
top: 50%; |
|
left: 50%; |
|
margin-top: -15px; |
|
margin-left: -12px; |
|
transition: transform .7s $snap; |
|
} |
|
.menu_open { |
|
transform-origin: -100px -100px; |
|
} |
|
.menu_close { |
|
transform: rotate(20deg); |
|
transform-origin: -100px -160px; |
|
} |
|
} |
|
.menu_items { |
|
position: fixed; |
|
bottom: 0; |
|
left: 50px; |
|
list-style-type: none; |
|
margin: 0; |
|
padding: 0; |
|
|
|
li { |
|
height: 60px; |
|
margin-bottom: 30px; |
|
transform: translateX(-300px); |
|
transition: transform .7s 0s $snap; |
|
|
|
&:nth-child(2){ |
|
margin-left: 40px; |
|
} |
|
&:nth-child(3){ |
|
margin-left: 80px; |
|
} |
|
} |
|
a { |
|
display: block; |
|
text-decoration: none; |
|
text-transform: uppercase; |
|
letter-spacing: 2px; |
|
color: darken($whitey, 30%); |
|
transition: color .2s; |
|
|
|
.icon { |
|
position: relative; |
|
display: inline-block; |
|
margin-right: 25px; |
|
color: $whitey; |
|
|
|
&:after { |
|
position: absolute; |
|
top: 50%; |
|
left: 50%; |
|
content: ''; |
|
display: block; |
|
width: 60px; |
|
height: 60px; |
|
margin-left: -33px; |
|
margin-top: -32px; |
|
border-radius: 100%; |
|
border: 2px solid $whitey; |
|
transition: border-color .2s; |
|
} |
|
} |
|
|
|
&:hover { |
|
color: $whitey; |
|
.icon { |
|
&:after { |
|
border-color: $red; |
|
} |
|
} |
|
} |
|
&:active { |
|
.icon { |
|
color: $red; |
|
} |
|
} |
|
} |
|
} |
|
|
|
|
|
/* Let's open up the menu */ |
|
.shazam { |
|
.content { |
|
transform: rotate(-30deg); |
|
} |
|
|
|
// this will show hidden content overflow when rotated, |
|
// but will result in a jump, if you've already scrolled down the content |
|
// plus, you will lose your current reading position |
|
// fixable with JS, not gonna bother |
|
|
|
/*.content_inner { |
|
height: 100%; |
|
}*/ |
|
|
|
.menu_open { |
|
transform: rotate(-20deg); |
|
} |
|
.menu_close { |
|
transform: rotate(0); |
|
} |
|
|
|
.menu_items { |
|
li { |
|
transform: translateX(0); |
|
transition: transform .35s .45s $bounce; |
|
|
|
&:nth-child(2){ |
|
transition-delay: .47s; |
|
} |
|
&:nth-child(3){ |
|
transition-delay: .48s; |
|
} |
|
} |
|
} |
|
} |
|
|
|
// misc |
|
h1 { |
|
padding-bottom: 15px; |
|
border-bottom: 1px solid #ddd; |
|
} |
|
body { |
|
color: $brown; |
|
} |