mirror of
https://github.com/twisterarmy/theme_nin.git
synced 2025-02-06 20:15:01 +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 {
|
.postboard h2, .postboard .postboard-news {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
.postboard.large {
|
||||||
|
width: 1032px;
|
||||||
|
}
|
||||||
|
|
||||||
.postboard-posts {
|
.postboard-posts {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
@ -3,6 +3,12 @@ $(window).resize(function()
|
|||||||
reAppendModules();
|
reAppendModules();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$(window).load(function()
|
||||||
|
{
|
||||||
|
testRightSide();
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
$(document).ready(function()
|
$(document).ready(function()
|
||||||
{
|
{
|
||||||
var windowHeight = $(window).height();
|
var windowHeight = $(window).height();
|
||||||
@ -10,9 +16,8 @@ $(document).ready(function()
|
|||||||
// make right modules expendables
|
// make right modules expendables
|
||||||
//slideUpModules();
|
//slideUpModules();
|
||||||
|
|
||||||
reOrganizeTemplates()
|
reOrganizeTemplates();
|
||||||
|
testRightSide();
|
||||||
|
|
||||||
|
|
||||||
$( '.userMenu-home.current a' ).on( 'click', function() {
|
$( '.userMenu-home.current a' ).on( 'click', function() {
|
||||||
$('html, body').animate({scrollTop:0},300);
|
$('html, body').animate({scrollTop:0},300);
|
||||||
@ -58,18 +63,28 @@ $(document).ready(function()
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
function slideUpModules() {
|
|
||||||
|
|
||||||
$(document).on( 'click', 'h3', function() {
|
function testRightSide() { // if rightside is empty, don't show it and engarge postboard
|
||||||
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()}
|
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
|
function reOrganizeTemplates() { // for nin's templating
|
||||||
|
|
||||||
reAppendModules();
|
reAppendModules();
|
||||||
|
@ -3,10 +3,13 @@
|
|||||||
$site-width : 1200px
|
$site-width : 1200px
|
||||||
$gut : 18px
|
$gut : 18px
|
||||||
$postboardWidth : 670px
|
$postboardWidth : 670px
|
||||||
|
|
||||||
$miniProfileWidth : $site-width/8
|
$miniProfileWidth : $site-width/8
|
||||||
$leftWidth : $miniProfileWidth + $gut
|
$leftWidth : $miniProfileWidth + $gut
|
||||||
$rightWidth : $site-width - ($leftWidth + $postboardWidth)
|
$rightWidth : $site-width - ($leftWidth + $postboardWidth)
|
||||||
|
|
||||||
|
$postboardLargeWidth : $postboardWidth + $rightWidth
|
||||||
|
|
||||||
$micro-usr-img : 36px
|
$micro-usr-img : 36px
|
||||||
$mini-usr-img : 48px
|
$mini-usr-img : 48px
|
||||||
$usr-img : 64px
|
$usr-img : 64px
|
||||||
@ -15,7 +18,7 @@ $space : 1rem
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
// colors
|
// colors
|
||||||
$light-grey: #C3C3C3
|
$light-grey: #C3C3C3
|
||||||
$color-green: #A1B775
|
$color-green: #A1B775
|
||||||
$color-red: #EF5D43
|
$color-red: #EF5D43
|
||||||
|
@ -49,6 +49,9 @@
|
|||||||
h2, .postboard-news
|
h2, .postboard-news
|
||||||
display: none
|
display: none
|
||||||
|
|
||||||
|
&.large
|
||||||
|
width: $postboardLargeWidth
|
||||||
|
|
||||||
.postboard-posts
|
.postboard-posts
|
||||||
position: relative
|
position: relative
|
||||||
z-index: 1
|
z-index: 1
|
||||||
|
@ -1,6 +1,3 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Wrapper and blocks */
|
/* Wrapper and blocks */
|
||||||
.wrapper
|
.wrapper
|
||||||
width: $site-width
|
width: $site-width
|
||||||
|
Loading…
x
Reference in New Issue
Block a user