mirror of
https://github.com/moparisthebest/android.moparisthebest.org
synced 2024-12-25 00:48:53 -05:00
fixed sidebar columnization
This commit is contained in:
parent
eba8e7f5f7
commit
b0a610095f
@ -19,7 +19,7 @@ body {
|
|||||||
max-width: $max-width;
|
max-width: $max-width;
|
||||||
position: relative;
|
position: relative;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
> header, > nav, > footer, #content > article, #content > div > article {
|
> header, > nav, > footer, #content > article, #content > div > article, #content > div > nav {
|
||||||
@extend .group;
|
@extend .group;
|
||||||
padding-left: $pad-min;
|
padding-left: $pad-min;
|
||||||
padding-right: $pad-min;
|
padding-right: $pad-min;
|
||||||
@ -89,7 +89,10 @@ body {
|
|||||||
background: none;
|
background: none;
|
||||||
float: left;
|
float: left;
|
||||||
margin: 0 -100% 0 0;
|
margin: 0 -100% 0 0;
|
||||||
section, section.even { width: auto; margin: 0; }
|
section {
|
||||||
|
width: auto; margin-left: 0;
|
||||||
|
&.odd, &.even { float: none; width: auto; margin-left: 0; }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.collapse-sidebar & {
|
.collapse-sidebar & {
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
|
@ -21,7 +21,7 @@ function addSidebarToggler() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
sections = $('aside[role=sidebar] > section')
|
sections = $('aside[role=sidebar] > section')
|
||||||
if(sections.length >= 3){ $('aside[role=sidebar]').addClass('thirds') }
|
if(sections.length > 1){
|
||||||
sections.each(function(section, index){
|
sections.each(function(section, index){
|
||||||
if ((sections.length >= 3) && index % 3 == 0) {
|
if ((sections.length >= 3) && index % 3 == 0) {
|
||||||
$(section).addClass("first");
|
$(section).addClass("first");
|
||||||
@ -29,6 +29,8 @@ function addSidebarToggler() {
|
|||||||
count = ((index +1) % 2) ? "odd" : "even";
|
count = ((index +1) % 2) ? "odd" : "even";
|
||||||
$(section).addClass(count);
|
$(section).addClass(count);
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
if(sections.length >= 3){ $('aside[role=sidebar]').addClass('thirds') }
|
||||||
}
|
}
|
||||||
function testFeatures() {
|
function testFeatures() {
|
||||||
var features = ['maskImage'];
|
var features = ['maskImage'];
|
||||||
|
Loading…
Reference in New Issue
Block a user