mirror of
https://github.com/twisterarmy/theme_nin.git
synced 2025-02-06 12:04:32 +00:00
disable right col if modules are empty
This commit is contained in:
parent
15d6ea4102
commit
0235eea6e2
@ -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;
|
||||
|
@ -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();
|
||||
|
@ -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
|
||||
|
@ -49,6 +49,9 @@
|
||||
h2, .postboard-news
|
||||
display: none
|
||||
|
||||
&.large
|
||||
width: $postboardLargeWidth
|
||||
|
||||
.postboard-posts
|
||||
position: relative
|
||||
z-index: 1
|
||||
|
@ -1,6 +1,3 @@
|
||||
|
||||
|
||||
|
||||
/* Wrapper and blocks */
|
||||
.wrapper
|
||||
width: $site-width
|
||||
|
Loading…
x
Reference in New Issue
Block a user