File tree Expand file tree Collapse file tree 5 files changed +79
-15
lines changed Expand file tree Collapse file tree 5 files changed +79
-15
lines changed Original file line number Diff line number Diff line change @@ -158,14 +158,70 @@ header {
158
158
}
159
159
160
160
nav {
161
+ input {
162
+ display : none ;
163
+ }
164
+
161
165
@media screen and (min-width : 1020px ) {
162
166
float : left ;
163
167
}
164
- @media screen and (max-width : 1019px ) {
168
+
169
+ @media screen and (min-width : 720px ) and (max-width : 1019px ) {
165
170
text-align : center ;
166
171
margin : 0 -1em ;
167
172
}
168
173
174
+ @media screen and (max-width : 719px ) {
175
+ height : 50px ;
176
+ position : relative ;
177
+
178
+ input {
179
+ display : block ;
180
+ float : right ;
181
+ appearance : none ;
182
+ background : url(http://github.com/%3Cspan%20class=%22pl-s%22%3E%3Cspan%20class=%22pl-pds%22%3E"%3C/span%3E/img/menu.svg%3Cspan%20class=%22pl-pds%22%3E"%3C/span%3E%3C/span%3E) ;
183
+ width : 42px ;
184
+ height : 42px ;
185
+ margin : 4px 0 ;
186
+ cursor : pointer ;
187
+
188
+ .hero & {
189
+ background : url(http://github.com/%3Cspan%20class=%22pl-s%22%3E%3Cspan%20class=%22pl-pds%22%3E"%3C/span%3E/img/menu-white.svg%3Cspan%20class=%22pl-pds%22%3E"%3C/span%3E%3C/span%3E) ;
190
+ }
191
+ }
192
+
193
+ div {
194
+ display : none ;
195
+ }
196
+
197
+ input :checked + div {
198
+ display : block ;
199
+ position : absolute ;
200
+ top : 100% ;
201
+ right : 0 ;
202
+ left : 0 ;
203
+ a {
204
+ display : block ;
205
+ background : white ;
206
+ width : 100% ;
207
+ left : 0 ;
208
+ .hero & {
209
+ background : @dark-color ;
210
+ & :hover ,
211
+ & :focus {
212
+ color : white ;
213
+ }
214
+ }
215
+ }
216
+ a :not (:first-child ) {
217
+ border-top : solid 1px #eee ;
218
+ .hero & {
219
+ border-top-color : #666 ;
220
+ }
221
+ }
222
+ }
223
+ }
224
+
169
225
a {
170
226
color : #aaa ;
171
227
display : inline-block ;
@@ -224,10 +280,11 @@ footer {
224
280
}
225
281
}
226
282
227
- a , span {
283
+ a ,
284
+ span {
228
285
color : white ;
229
286
display : table ;
230
- margin : 2px -10px ;
287
+ margin : 2px 15 px 2 px -10px ;
231
288
padding : 3px 10px ;
232
289
position : relative ;
233
290
@@ -247,11 +304,13 @@ footer {
247
304
margin : 0 0 10px ;
248
305
249
306
& ,
250
- & > a , & > span {
307
+ & > a ,
308
+ & > span {
251
309
color : lighten (@dark-color , 50% );
252
310
}
253
311
254
- & > a , & > span {
312
+ & > a ,
313
+ & > span {
255
314
margin : 0 -10px ;
256
315
}
257
316
}
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ div.index {
54
54
height : 13vh ;
55
55
}
56
56
57
- nav > a {
57
+ nav a {
58
58
text-shadow : 0 1px 1px @dark-color , 0 0 3px @dark-color ;
59
59
60
60
& :hover , & :focus {
Original file line number Diff line number Diff line change @@ -11,22 +11,22 @@ const links: LinkItem[] = [
11
11
{
12
12
section : "learn" ,
13
13
text : "Learn" ,
14
- href : "/learn/"
14
+ href : "/learn/" ,
15
15
} ,
16
16
{
17
17
section : "code" ,
18
18
text : "Code" ,
19
- href : "/code/"
19
+ href : "/code/" ,
20
20
} ,
21
21
{
22
22
section : "community" ,
23
23
text : "Community" ,
24
- href : "/community/"
24
+ href : "/community/" ,
25
25
} ,
26
26
{
27
27
section : "faq" ,
28
28
text : "FAQ" ,
29
- href : "/faq/"
29
+ href : "/faq/" ,
30
30
} ,
31
31
{
32
32
section : "spec" ,
@@ -47,10 +47,13 @@ const links: LinkItem[] = [
47
47
48
48
export default ( ) => (
49
49
< nav >
50
- { links . map ( ( link , i ) => (
51
- < Link key = { i } href = { link . href } >
52
- { link . text }
53
- </ Link >
54
- ) ) }
50
+ < input type = "checkbox" id = "menubox" aria-label = "Menu" />
51
+ < div >
52
+ { links . map ( ( link , i ) => (
53
+ < Link key = { i } href = { link . href } >
54
+ { link . text }
55
+ </ Link >
56
+ ) ) }
57
+ </ div >
55
58
</ nav >
56
59
)
You can’t perform that action at this time.
0 commit comments