From 5d1d04c52c014171b911c3d7c23108e64f0ee9df Mon Sep 17 00:00:00 2001 From: Brandon Mathis Date: Tue, 12 Jul 2011 19:40:57 -0400 Subject: 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. --- .themes/classic/source/javascripts/octopress.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to '.themes/classic/source/javascripts') 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('»').previous().bind('click', function(e){ + $('#content').prepend('»'); + $('.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']; -- cgit v1.2.1