Skip to content

Commit a275c8c

Browse files
committed
revise misc indentation and coding style in garden.js and garden.jade
1 parent 31fbff7 commit a275c8c

File tree

2 files changed

+19
-20
lines changed

2 files changed

+19
-20
lines changed

garden.jade

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ html(lang=language)
2424
// Navigation
2525
nav(id='nav_main')
2626
div
27-
ul
27+
ul
2828
- each lang in languages
2929
li(class=lang.id === language ? 'active' : '')
3030
- if (lang.id === baseLanguage)
@@ -54,7 +54,7 @@ html(lang=language)
5454

5555
a(id='nav_next_section', href='#') next section
5656
span(class='nav_section_name') section name
57-
57+
5858
a(id='show_menu') show menu
5959

6060
// Sections
@@ -78,19 +78,18 @@ html(lang=language)
7878
// Footer
7979
footer
8080
p Copyright ©. Built with
81-
|
82-
a(href='http://nodejs.org/') Node.js
83-
| using a
84-
a(href='https://github.com/visionmedia/jade/') jade
85-
| template.
81+
|
82+
a(href='http://nodejs.org/') Node.js
83+
| using a
84+
a(href='https://github.com/visionmedia/jade/') jade
85+
| template.
8686

8787
script(src='//ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js')
88-
88+
8989
- if (language === baseLanguage)
9090
script(src='javascript/prettify.js')
9191
script(src='javascript/garden.js')
92-
92+
9393
- else
9494
script(src='../javascript/prettify.js')
9595
script(src='../javascript/garden.js')
96-

site/javascript/garden.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -60,18 +60,18 @@ Sections.prototype = {
6060
}
6161
},
6262

63-
expand: function (sectionName) {
63+
expand: function(sectionName) {
6464
var nav = this.page.nav,
6565
index = nav.find('a[href=#' + sectionName + ']')
6666
.closest('nav > ul > li').index();
6767

6868
var height = this.page.window.height()
6969
- $('nav > div').height()
70-
- (33 * this.heights.length),
70+
- (33 * this.heights.length);
7171

72-
sections = [],
73-
currentHeight = 0,
74-
distance = 0;
72+
var sections = [],
73+
currentHeight = 0,
74+
distance = 0;
7575

7676
while ((currentHeight + this.heights[index]) < height) {
7777
sections.push(index);
@@ -135,7 +135,7 @@ function Page() {
135135
section: null,
136136
articule: null
137137
});
138-
138+
139139
this.sections = new Sections(this);
140140
this.init();
141141
}
@@ -149,11 +149,11 @@ Page.prototype = {
149149
scrollLast: 0,
150150
resizeTimeout: null
151151
});
152-
152+
153153
this.window.scroll(function() {
154154
that.onScroll();
155155
});
156-
156+
157157
this.window.resize(function() {
158158
that.onResize();
159159
});
@@ -164,12 +164,12 @@ Page.prototype = {
164164
}, 10);
165165

166166
// Show menu for tablets and smart phones
167-
$('#show_menu').click(function (){
167+
$('#show_menu').click(function() {
168168
$mainNav.slideDown(300);
169169
return false;
170170
});
171171

172-
$mainNav.click(function(){
172+
$mainNav.click(function() {
173173
if(that.window.width() < 1000)
174174
$mainNav.slideUp(300, function() { $mainNav.removeAttr('style'); });
175175
});

0 commit comments

Comments
 (0)