diff options
author | Brandon Mathis <brandon@imathis.com> | 2011-07-12 19:40:57 -0400 |
---|---|---|
committer | Brandon Mathis <brandon@imathis.com> | 2011-07-12 19:40:57 -0400 |
commit | 5d1d04c52c014171b911c3d7c23108e64f0ee9df (patch) | |
tree | 21a58dcdfb8def51d69d4f180fce134cf4ecc9ec /.themes/classic/source/javascripts | |
parent | 67c5edb2f6eb8747a659109fe160b4c54f6e2917 (diff) | |
download | my_new_personal_website-5d1d04c52c014171b911c3d7c23108e64f0ee9df.tar.xz my_new_personal_website-5d1d04c52c014171b911c3d7c23108e64f0ee9df.zip |
1. Made default layout more generic.
2. Added a page layout and improved html on post layout.
3. Improved flexibility of stylesheets for different layout types.
4. Collapsing sidebar now moves it to the bottom of the page and floats
content into columns.
5. Improved sharing settings, added Google plus one.
Diffstat (limited to '.themes/classic/source/javascripts')
-rw-r--r-- | .themes/classic/source/javascripts/octopress.js | 12 |
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">»</a>').previous().bind('click', function(e){ + $('#content').prepend('<a href="#" class="toggle-sidebar">»</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 = '«'; } }); + 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']; |