Skip to content

Commit

Permalink
Minor tweaks. Also, added credit for iScroll - http://cubiq.org/iscroll
Browse files Browse the repository at this point in the history
  • Loading branch information
nathansmith committed Jul 13, 2010
1 parent 04144de commit 004392b
Show file tree
Hide file tree
Showing 7 changed files with 60 additions and 35 deletions.
3 changes: 3 additions & 0 deletions README.txt
Expand Up @@ -33,6 +33,9 @@ http://www.gnu.org/licenses/gpl.html
Icons courtesy of Glyphish.
http://glyphish.com/

iPad scrolling via iScroll JS.
http://cubiq.org/iscroll

----------

What's with the name?
Expand Down
41 changes: 21 additions & 20 deletions assets/javascripts/master.js
@@ -1,20 +1,20 @@
//
// Automatically calls all functions in APP.init
// Automatically calls all functions in SLAB.init
//
jQuery(document).ready(function() {
APP.go();
SLAB.go();
});

//
// Module pattern:
// http://yuiblog.com/blog/2007/06/12/module-pattern/
//
var APP = (function($, window, undefined) {
// Expose contents of APP.
var SLAB = (function($, window, undefined) {
// Expose contents of SLAB.
return {
go: function() {
for (var i in APP.init) {
APP.init[i]();
for (var i in SLAB.init) {
SLAB.init[i]();
}
},
init: {
Expand Down Expand Up @@ -107,7 +107,7 @@ var APP = (function($, window, undefined) {
}
});

$('#sidebar_menu a').click(function() {
$('#sidebar_menu a').live('click', function() {
var el = $(this);
var li = $(this).parent('li');
var ul = li.find('ul:first');
Expand Down Expand Up @@ -135,19 +135,6 @@ var APP = (function($, window, undefined) {
}
});
},
scroll: function() {
if (!$('#main_content_inner, #sidebar_content_inner').length) {
return;
}

$(document).bind('touchmove', function() {
return false;
});

if (typeof iScroll !== 'undefined') {
var main_content_inner = new iScroll('main_content_inner');
}
},
size_content_areas: function() {
if (!$('#main_content, #sidebar_content').length) {
return;
Expand Down Expand Up @@ -194,6 +181,20 @@ var APP = (function($, window, undefined) {
});
}
});
},
touch_scroll: function() {
if (!$('#main_content_inner, #sidebar_content_inner').length) {
return;
}

$(document).bind('touchmove', function() {
return false;
});

if (typeof iScroll !== 'undefined') {
var main_content_inner = new iScroll('main_content_inner');
// var sidebar_content_inner = new iScroll('sidebar_content_inner');
}
}
}
};
Expand Down
2 changes: 1 addition & 1 deletion assets/stylesheets/form.css
Expand Up @@ -50,7 +50,7 @@ input[type=text],
input[type=time],
input[type=url],
input[type=week] {
background: #fff url(../images/input_shadow.png) repeat-x;
background: #fff url(../images/ui/input_shadow.png) repeat-x;
border: 1px solid;
border-color: #848484 #c1c1c1 #e1e1e1;
color: #000;
Expand Down
16 changes: 11 additions & 5 deletions assets/stylesheets/site.css
Expand Up @@ -74,6 +74,14 @@ ul ol {
padding-right: 8px;
}

.gutter_left {
padding-left: 20px;
}

.gutter_right {
padding-right: 20px;
}

/* `Data Table
----------------------------------------------------------------------------------------------------*/

Expand Down Expand Up @@ -146,11 +154,11 @@ table.horiz tr td:first-child {
}

.button.float_right {
margin-left: 7px;
margin-right: 7px;
}

.button.float_left {
margin-right: 7px;
margin-left: 7px;
}

/* `Chrome
Expand Down Expand Up @@ -207,7 +215,6 @@ table.horiz tr td:first-child {
.footer_lower {
line-height: 45px;
overflow: hidden;
padding: 0 7px;
text-align: center;
left: 0;
right: 0;
Expand Down Expand Up @@ -357,8 +364,7 @@ table.horiz tr td:first-child {

#nav_arrow,
.is_portrait #sidebar,
.is_portrait #sidebar .header_upper,
.is_portrait #sidebar .footer_lower {
.is_portrait #sidebar .header_upper {
display: none;
}

Expand Down
11 changes: 8 additions & 3 deletions dark.html
Expand Up @@ -379,10 +379,11 @@ <h1>
<a href="#" class="float_left button">
Foo
</a>
<a href="#">View full site</a>
<a href="#" class="float_right button">
<a href="#" class="float_left button">
Bar
</a>
<a href="#" class="icon icon_bird float_right"></a>
<a href="#">View full site</a>
</div>
</div>
<div id="sidebar" class="abs">
Expand All @@ -399,6 +400,9 @@ <h1>
<li id="sidebar_menu_home" class="active">
<a href="#"><span class="abs"></span>Home</a>
</li>
<li>
<a href="#">Link Without Sub-links</a>
</li>
<li>
<a href="#">Primary Link Title Here</a>
<ul>
Expand Down Expand Up @@ -3053,7 +3057,8 @@ <h1>
</div>
</div>
<div class="abs footer_lower chrome_dark">
Descriptive text here
<a href="#" class="icon icon_gear2 float_left"></a>
<span class="float_right gutter_right">Some descriptive text here</span>
</div>
</div>
</body>
Expand Down
11 changes: 8 additions & 3 deletions light.html
Expand Up @@ -379,10 +379,11 @@ <h1>
<a href="#" class="float_left button">
Foo
</a>
<a href="#">View full site</a>
<a href="#" class="float_right button">
<a href="#" class="float_left button">
Bar
</a>
<a href="#" class="icon icon_bird float_right"></a>
<a href="#">View full site</a>
</div>
</div>
<div id="sidebar" class="abs">
Expand All @@ -399,6 +400,9 @@ <h1>
<li id="sidebar_menu_home" class="active">
<a href="#"><span class="abs"></span>Home</a>
</li>
<li>
<a href="#">Link Without Sub-links</a>
</li>
<li>
<a href="#">Primary Link Title Here</a>
<ul>
Expand Down Expand Up @@ -3053,7 +3057,8 @@ <h1>
</div>
</div>
<div class="abs footer_lower chrome_light">
Descriptive text here
<a href="#" class="icon icon_gear2 float_left"></a>
<span class="float_right gutter_right">Some descriptive text here</span>
</div>
</div>
</body>
Expand Down
11 changes: 8 additions & 3 deletions mixed.html
Expand Up @@ -379,10 +379,11 @@ <h1>
<a href="#" class="float_left button">
Foo
</a>
<a href="#">View full site</a>
<a href="#" class="float_right button">
<a href="#" class="float_left button">
Bar
</a>
<a href="#" class="icon icon_bird float_right"></a>
<a href="#">View full site</a>
</div>
</div>
<div id="sidebar" class="abs">
Expand All @@ -399,6 +400,9 @@ <h1>
<li id="sidebar_menu_home" class="active">
<a href="#"><span class="abs"></span>Home</a>
</li>
<li>
<a href="#">Link Without Sub-links</a>
</li>
<li>
<a href="#">Primary Link Title Here</a>
<ul>
Expand Down Expand Up @@ -3053,7 +3057,8 @@ <h1>
</div>
</div>
<div class="abs footer_lower chrome_light">
Descriptive text here
<a href="#" class="icon icon_gear2 float_left"></a>
<span class="float_right gutter_right">Some descriptive text here</span>
</div>
</div>
</body>
Expand Down

0 comments on commit 004392b

Please sign in to comment.