Skip to content

Commit d04c1ea

Browse files
committed
New mobile navigation menu
1 parent 64aeeba commit d04c1ea

File tree

2 files changed

+34
-36
lines changed

2 files changed

+34
-36
lines changed

site/javascript/garden.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,7 @@ Page.prototype = {
196196
this.resizeTimeout = setTimeout(function() {
197197
that.sections.map();
198198
that.sections.expand(that.section);
199-
200-
}, 50);
199+
}, 100);
201200
}
202201
};
203202

@@ -206,8 +205,7 @@ prettyPrint();
206205

207206
// GA tracking code
208207
var _gaq = _gaq || [];
209-
_gaq.push(['_setAccount', 'UA-20768522-1']);
210-
_gaq.push(['_trackPageview']);
208+
_gaq.push(['_setAccount', 'UA-20768522-1'], ['_trackPageview']);
211209
(function() {
212210
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
213211
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';

site/style/garden.css

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -97,18 +97,21 @@ nav > div li.active a {
9797
color: #FFC76D;
9898
}
9999

100-
nav > div ul {
101-
height: 40px;
100+
#hide_menu {
101+
display: none;
102102
}
103103

104-
#top {
105-
position: absolute;
106-
top: 0;
107-
right: 0;
104+
#top, #hide_menu {
105+
float: right;
108106
}
109107

110-
#hide_menu {
111-
display: none;
108+
#nav_main > div {
109+
overflow: hidden;
110+
}
111+
112+
#nav_main > div ul {
113+
float: left;
114+
height: 40px;
112115
}
113116

114117
nav li {
@@ -278,11 +281,12 @@ nav li h1 a:after {
278281
display: none;
279282
}
280283

281-
nav li.nav_intro h1 a:after { content: 'i'; font-style: italic; }
282-
#object:after, nav li.nav_object h1 a:after { content: '{ }'; }
283-
#array:after, nav li.nav_array h1 a:after { content: '[ ]'; }
284-
#types:after, nav li.nav_types h1 a:after { content: '='; font-weight: bold; }
285-
#core:after, nav li.nav_core h1 a:after { content: 'js'; }
284+
nav li.nav_intro h1 a:after { content: 'i'; font-style: italic; }
285+
#object:after, nav li.nav_object h1 a:after { content: '{ }'; }
286+
#array:after, nav li.nav_array h1 a:after { content: '[ ]'; }
287+
#types:after, nav li.nav_types h1 a:after { content: '='; font-weight: bold; }
288+
#core:after, nav li.nav_core h1 a:after { content: 'js'; }
289+
#appendix:after, nav li.nav_appendix h1 a:after { content: '*'; }
286290

287291
#function:after, nav li.nav_function h1 a:after {
288292
content: 'f(x)';
@@ -421,6 +425,7 @@ a abbr {
421425
}
422426

423427
section, footer {
428+
font-size: inherit;
424429
margin-left: 30px;
425430
margin-right: 0;
426431
}
@@ -451,24 +456,27 @@ a abbr {
451456

452457
#nav_main li h1 a {
453458
background-image: none;
454-
height: 70px;
455-
padding: 20px 0 30px;
459+
height: 5em;
460+
padding: 1.5em 0 2em;
456461
}
457462

458463
#nav_main li h1 a:after {
459464
display: block;
460465
font-family: Georgia;
461-
font-size: 40px;
466+
font-size: 3em;
462467
font-weight: normal;
463468
margin-top: 10px;
464469
}
465470

466-
#nav_main > div ul {
467-
height: auto;
471+
#nav_main > div {
468472
overflow: hidden;
469473
border-bottom: 1px solid rgba(255, 255, 255, 0.3);
470474
}
471475

476+
#nav_main > div ul {
477+
height: auto;
478+
}
479+
472480
nav a:hover,
473481
nav li.active,
474482
nav li.active a {
@@ -477,9 +485,6 @@ a abbr {
477485

478486
#hide_menu {
479487
display: block;
480-
position: absolute;
481-
top: 0;
482-
right: 45px;
483488
}
484489

485490
#nav_mobile {
@@ -500,14 +505,14 @@ a abbr {
500505
}
501506

502507
#nav_next_section, #nav_prev_section {
503-
font-size: 10px;
508+
font-size: 0.55em;
504509
text-transform: uppercase;
505510
}
506511

507512
#nav_next_section .nav_section_name,
508513
#nav_prev_section .nav_section_name {
509514
display: block;
510-
font-size: 14px;
515+
font-size: 1.5em;
511516
margin-top: 3px;
512517
font-weight: bold;
513518
line-height: 1.3em;
@@ -556,15 +561,11 @@ screen and (-webkit-min-device-pixel-ratio: 2) {
556561
aside {
557562
position: static;
558563
width: auto;
559-
margin: 30px;
560-
padding: 0.6em 1em 0.625em;
564+
margin: 1em;
565+
padding: 0.6em 0.8em 0.625em;
561566
border-top: 1px solid #9eabb7;
562567
opacity: 0.85;
563568
}
564-
565-
aside p {
566-
font-size: 13px;
567-
}
568569

569570
#nav_main > ul > li {
570571
width: 25%;
@@ -574,8 +575,7 @@ screen and (-webkit-min-device-pixel-ratio: 2) {
574575
width: 160px;
575576
}
576577

577-
#nav_next_section .nav_section_name,
578-
#nav_prev_section .nav_section_name {
579-
font-size: 13px;
578+
aside.es5:after {
579+
display: none;
580580
}
581581
}

0 commit comments

Comments
 (0)