Browse Source

disable right col if modules are empty

nin-v2
myleneb 9 years ago
parent
commit
0235eea6e2
  1. 3
      css/style.css
  2. 35
      js/theme_option.js
  3. 5
      sass/base/_var.sass
  4. 3
      sass/layout/_postboard.sass
  5. 3
      sass/layout/_wrapper.sass

3
css/style.css

@ -1247,6 +1247,9 @@ button.light:hover, .light.show-more-followers:hover, a.button.light:hover { @@ -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;

35
js/theme_option.js

@ -3,6 +3,12 @@ $(window).resize(function() @@ -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() @@ -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() @@ -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();

5
sass/base/_var.sass

@ -3,10 +3,13 @@ @@ -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 @@ -15,7 +18,7 @@ $space : 1rem
// colors
// colors
$light-grey: #C3C3C3
$color-green: #A1B775
$color-red: #EF5D43

3
sass/layout/_postboard.sass

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

3
sass/layout/_wrapper.sass

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

Loading…
Cancel
Save