aboutsummaryrefslogtreecommitdiff
path: root/.themes/classic/source
diff options
context:
space:
mode:
authorBrandon Mathis <brandon@imathis.com>2011-07-13 11:57:44 -0400
committerBrandon Mathis <brandon@imathis.com>2011-07-13 11:57:44 -0400
commitb0a610095fd80f51c21ff49ddbe7aa98ea434ebc (patch)
tree03ea1be4a83165c886d5f5812dab25db59755da9 /.themes/classic/source
parenteba8e7f5f7db9e1fa47cd5e415efe7aec61610cd (diff)
downloadmy_new_personal_website-b0a610095fd80f51c21ff49ddbe7aa98ea434ebc.tar.xz
my_new_personal_website-b0a610095fd80f51c21ff49ddbe7aa98ea434ebc.zip
fixed sidebar columnization
Diffstat (limited to '.themes/classic/source')
-rw-r--r--.themes/classic/source/javascripts/octopress.js16
1 files changed, 9 insertions, 7 deletions
diff --git a/.themes/classic/source/javascripts/octopress.js b/.themes/classic/source/javascripts/octopress.js
index c26a21f3..949f7a03 100644
--- a/.themes/classic/source/javascripts/octopress.js
+++ b/.themes/classic/source/javascripts/octopress.js
@@ -21,14 +21,16 @@ function addSidebarToggler() {
}
});
sections = $('aside[role=sidebar] > section')
+ if(sections.length > 1){
+ sections.each(function(section, index){
+ if ((sections.length >= 3) && index % 3 == 0) {
+ $(section).addClass("first");
+ }
+ count = ((index +1) % 2) ? "odd" : "even";
+ $(section).addClass(count);
+ });
+ }
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'];