/
style.scss
127 lines (107 loc) · 2 KB
/
style.scss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
body {
overflow-x: hidden;
font-family: Helvetica, Arial, sans-serif;
margin: 0;
}
p {
line-height: 1.5em;
}
#navMenu {
height: 100%; width: 0;
position: fixed;
z-index: 1;
top: 0; left: -400px;
background: #000;
overflow-x: hidden;
ul {
padding: 0;
margin: 0;
}
a {
padding: 1em 1.25em;
text-decoration: none;
color: #ccc;
display: block;
border-bottom: 1px solid #444;
transition: .25s;
&:hover {
background: #333;
color: #fff;
}
}
&.open {
width: 400px;
left: 0;
}
}
/* Style page content - use this if you want to push the page content to the right when you open the side navigation */
#main {
transition: margin-left .5s;
padding: 1em;
left: 0;
position: relative;
}
#main.open {
left: 400px;
}
/* On smaller screens, where height is less than 450px, change the style of the sidenav (less padding and a smaller font size) */
@media screen and (max-height: 450px) {
.sidenav {padding-top: 15px;}
.sidenav a {font-size: 18px;}
}
#navBtn {
width: 2em;
height: 1.5em;
position: relative;
transform: rotate(0deg);
transition: .5s ease-in-out;
cursor: pointer;
span {
display: block;
position: absolute;
height: .3em; width: 100%;
background: #000;
border-radius: 1em;
opacity: 1;
left: 0;
transform: rotate(0deg);
transition: .25s ease-in-out;
&:nth-child(1) {
top: 0;
}
&:nth-child(2), &:nth-child(3) {
top: .55em;
}
&:nth-child(4) {
top: 1.15em;
}
}
&.open span:nth-child(1) {
top: .55em;
width: 0%;
left: 50%;
}
&.open span:nth-child(2) {
transform: rotate(45deg);
}
&.open span:nth-child(3) {
transform: rotate(-45deg);
}
&.open span:nth-child(4) {
top: .55em;
width: 0%;
left: 50%;
}
&:hover {
span {
transition: .25s;
background: #ff9900;
}
span:nth-child(1) {
top: -.1em;
}
span:nth-child(4) {
top: 1.27em;
}
}
}