aboutsummaryrefslogtreecommitdiff
path: root/.themes/classic/source/javascripts
diff options
context:
space:
mode:
Diffstat (limited to '.themes/classic/source/javascripts')
-rw-r--r--.themes/classic/source/javascripts/octopress.js12
1 files changed, 11 insertions, 1 deletions
diff --git a/.themes/classic/source/javascripts/octopress.js b/.themes/classic/source/javascripts/octopress.js
index 680cb76b..c26a21f3 100644
--- a/.themes/classic/source/javascripts/octopress.js
+++ b/.themes/classic/source/javascripts/octopress.js
@@ -9,7 +9,8 @@ function getNav(){
});
}
function addSidebarToggler() {
- $('#articles').before('<a href="#" class="toggle-sidebar">&raquo;</a>').previous().bind('click', function(e){
+ $('#content').prepend('<a href="#" class="toggle-sidebar">&raquo;</a>');
+ $('.toggle-sidebar').bind('click', function(e){
e.preventDefault();
if($('body').hasClass('collapse-sidebar')){
$('body').removeClass('collapse-sidebar');
@@ -19,6 +20,15 @@ function addSidebarToggler() {
e.target.innerHTML = '&laquo;';
}
});
+ sections = $('aside[role=sidebar] > section')
+ if(sections.length >= 3){ $('aside[role=sidebar]').addClass('thirds') }
+ sections.each(function(section, index){
+ if ((sections.length >= 3) && index % 3 == 0) {
+ $(section).addClass("first");
+ }
+ count = ((index +1) % 2) ? "odd" : "even";
+ $(section).addClass(count);
+ });
}
function testFeatures() {
var features = ['maskImage'];