diff --git a/css/style.css b/css/style.css index b34a678..bee5bd9 100644 --- a/css/style.css +++ b/css/style.css @@ -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; diff --git a/js/theme_option.js b/js/theme_option.js index a5d568b..80f22fd 100644 --- a/js/theme_option.js +++ b/js/theme_option.js @@ -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(); diff --git a/sass/base/_var.sass b/sass/base/_var.sass index 36f5d61..fbe0b12 100644 --- a/sass/base/_var.sass +++ b/sass/base/_var.sass @@ -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 diff --git a/sass/layout/_postboard.sass b/sass/layout/_postboard.sass index 8cb19a7..558c4ae 100755 --- a/sass/layout/_postboard.sass +++ b/sass/layout/_postboard.sass @@ -49,6 +49,9 @@ h2, .postboard-news display: none + &.large + width: $postboardLargeWidth + .postboard-posts position: relative z-index: 1 diff --git a/sass/layout/_wrapper.sass b/sass/layout/_wrapper.sass index 595ca69..320e00d 100644 --- a/sass/layout/_wrapper.sass +++ b/sass/layout/_wrapper.sass @@ -1,6 +1,3 @@ - - - /* Wrapper and blocks */ .wrapper width: $site-width