disable right col if modules are empty

This commit is contained in:
myleneb 2015-08-10 05:56:39 +02:00
parent 15d6ea4102
commit 0235eea6e2
5 changed files with 35 additions and 14 deletions

View File

@ -1247,6 +1247,9 @@ button.light:hover, .light.show-more-followers:hover, a.button.light:hover {
.postboard h2, .postboard .postboard-news {
display: none;
}
.postboard.large {
width: 1032px;
}
.postboard-posts {
position: relative;

View File

@ -3,6 +3,12 @@ $(window).resize(function()
reAppendModules();
});
$(window).load(function()
{
testRightSide();
});
$(document).ready(function()
{
var windowHeight = $(window).height();
@ -10,9 +16,8 @@ $(document).ready(function()
// make right modules expendables
//slideUpModules();
reOrganizeTemplates()
reOrganizeTemplates();
testRightSide();
$( '.userMenu-home.current a' ).on( 'click', function() {
$('html, body').animate({scrollTop:0},300);
@ -58,18 +63,28 @@ $(document).ready(function()
});
function slideUpModules() {
$(document).on( 'click', 'h3', function() {
var thisList = $(this).parents('.module').find('ol');
var thisListTitle = $(this).parents('.module').find('h4');
if (thisList.css('display') === 'none') {thisList.slideDown();thisListTitle.slideDown()}
else {thisList.slideUp();thisListTitle.slideUp()}
});
function testRightSide() { // if rightside is empty, don't show it and engarge postboard
if( ( $('.toptrends').html() == '' ) && ($('.who-to-follow').html() == '') && ( $('.twistday-reminder').html() == '' ) ){
$('.dashboard.right').css('display: none');
$('.wrapper .postboard').addClass('large');
}
else {
$('.dashboard.right').css('display: block');
$('.wrapper .postboard').removeClass('large');
}
}
function reOrganizeTemplates() { // for nin's templating
reAppendModules();

View File

@ -3,10 +3,13 @@
$site-width : 1200px
$gut : 18px
$postboardWidth : 670px
$miniProfileWidth : $site-width/8
$leftWidth : $miniProfileWidth + $gut
$rightWidth : $site-width - ($leftWidth + $postboardWidth)
$postboardLargeWidth : $postboardWidth + $rightWidth
$micro-usr-img : 36px
$mini-usr-img : 48px
$usr-img : 64px
@ -15,7 +18,7 @@ $space : 1rem
// colors
// colors
$light-grey: #C3C3C3
$color-green: #A1B775
$color-red: #EF5D43

View File

@ -49,6 +49,9 @@
h2, .postboard-news
display: none
&.large
width: $postboardLargeWidth
.postboard-posts
position: relative
z-index: 1

View File

@ -1,6 +1,3 @@
/* Wrapper and blocks */
.wrapper
width: $site-width