diff --git a/assets/js/customizer.js b/assets/js/customizer.js index a97caff..e5c5a36 100644 --- a/assets/js/customizer.js +++ b/assets/js/customizer.js @@ -20,66 +20,4 @@ }); }); - // Site layouts. - wp.customize( 'site_layouts', function( value ) { - value.bind( function( to ) { - if ( 'sidebar-right' === to ) { - if ($('#primary').hasClass('col-md-push-4')) {$('#primary').removeClass('col-md-push-4')} // Case sidebar-left to sidebar-right - $( '#primary' ).addClass( 'col-md-8' ).removeClass( 'col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1' ); - if ($('#secondary').hasClass('col-md-pull-8')) {$('#secondary').removeClass('col-md-pull-8');} // Case sidebar-left to sidebar-right - $( '#secondary' ).show(); // show() the .sidebar in the customize preview iframe @see the-clean-blog.js - Site layout - } else if ( 'sidebar-left' === to ) { - if($('#primary').is(':not(.col-md-8)')) {$('#primary').addClass('col-md-8')} // Case fullwidth to sidebar-left - $( '#primary' ).addClass( 'col-md-push-4' ).removeClass( 'col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1' ); // Case sidebar-right to sidebar-left or fullwidth to sidebar-left - $('#secondary').addClass('col-md-pull-8'); // Case sidebar-right to sidebar-left or fullwidth to sidebar-left - $( '#secondary' ).show(); // show() the .sidebar in the customize preview iframe @see the-clean-blog.js - Site layout - } else { // ( 'fullwidth' === to ) - if($('#primary').hasClass('col-md-push-4')) {$('#primary').removeClass('col-md-push-4')} // Case sidebar-left to fullwidth - $( '#primary' ).removeClass( 'col-md-8' ).addClass( 'col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1' ); // Case sidebar-left to fullwidth or sidebar-right to fullwidth - $( '#secondary' ).hide(); // hide() the .sidebar from the customize preview iframe @see the-clean-blog.js - Site layout - } - } ); - } ); - - // Posts layouts. - wp.customize( 'posts_layouts', function( value ) { - value.bind( function( to ) { - if ( 'sidebar-right-posts' === to ) { - if ($('#primary').hasClass('col-md-push-4')) {$('#primary').removeClass('col-md-push-4')} // Case sidebar-left to sidebar-right - $( '#primary' ).addClass( 'col-md-8' ).removeClass( 'col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1' ); - if ($('#secondary').hasClass('col-md-pull-8')) {$('#secondary').removeClass('col-md-pull-8');} // Case sidebar-left to sidebar-right - $( '#secondary' ).show(); // show() the .sidebar in the customize preview iframe @see the-clean-blog.js - Site layout - } else if ( 'sidebar-left-posts' === to ) { - if($('#primary').is(':not(.col-md-8)')) {$('#primary').addClass('col-md-8')} // Case fullwidth to sidebar-left - $( '#primary' ).addClass( 'col-md-push-4' ).removeClass( 'col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1' ); // Case sidebar-right to sidebar-left or fullwidth to sidebar-left - $('#secondary').addClass('col-md-pull-8'); // Case sidebar-right to sidebar-left or fullwidth to sidebar-left - $( '#secondary' ).show(); // show() the .sidebar in the customize preview iframe @see the-clean-blog.js - Site layout - } else { // ( 'fullwidth-posts' === to ) - if($('#primary').hasClass('col-md-push-4')) {$('#primary').removeClass('col-md-push-4')} // Case sidebar-left to fullwidth - $( '#primary' ).removeClass( 'col-md-8' ).addClass( 'col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1' ); // Case sidebar-left to fullwidth or sidebar-right to fullwidth - $( '#secondary' ).hide(); // hide() the .sidebar from the customize preview iframe @see the-clean-blog.js - Site layout - } - } ); - } ); - - // Pages layouts. - wp.customize( 'pages_layouts', function( value ) { - value.bind( function( to ) { - if ( 'sidebar-right-pages' === to ) { - if ($('#primary').hasClass('col-md-push-4')) {$('#primary').removeClass('col-md-push-4')} // Case sidebar-left to sidebar-right - $( '#primary' ).addClass( 'col-md-8' ).removeClass( 'col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1' ); - if ($('#secondary').hasClass('col-md-pull-8')) {$('#secondary').removeClass('col-md-pull-8');} // Case sidebar-left to sidebar-right - $( '#secondary' ).show(); // show() the .sidebar in the customize preview iframe @see the-clean-blog.js - Site layout - } else if ( 'sidebar-left-pages' === to ) { - if($('#primary').is(':not(.col-md-8)')) {$('#primary').addClass('col-md-8')} // Case fullwidth to sidebar-left - $( '#primary' ).addClass( 'col-md-push-4' ).removeClass( 'col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1' ); // Case sidebar-right to sidebar-left or fullwidth to sidebar-left - $('#secondary').addClass('col-md-pull-8'); // Case sidebar-right to sidebar-left or fullwidth to sidebar-left - $( '#secondary' ).show(); // show() the .sidebar in the customize preview iframe @see the-clean-blog.js - Site layout - } else { // ( 'fullwidth-pages' === to ) - if($('#primary').hasClass('col-md-push-4')) {$('#primary').removeClass('col-md-push-4')} // Case sidebar-left to fullwidth - $( '#primary' ).removeClass( 'col-md-8' ).addClass( 'col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1' ); // Case sidebar-left to fullwidth or sidebar-right to fullwidth - $( '#secondary' ).hide(); // hide() the .sidebar from the customize preview iframe @see the-clean-blog.js - Site layout - } - } ); - } ); })(jQuery); \ No newline at end of file diff --git a/assets/js/the-clean-blog.js b/assets/js/the-clean-blog.js index 15784ec..2e88ff3 100644 --- a/assets/js/the-clean-blog.js +++ b/assets/js/the-clean-blog.js @@ -342,62 +342,9 @@ jQuery(document).ready(function ($) { }); //End 11. - //12. Site, Posts and Pages layout - var siteLayoutName = thecleanblog_set.thecleanblog_site_layouts; - var postsLayoutName = thecleanblog_set.thecleanblog_posts_layouts; - var pagesLayoutName = thecleanblog_set.thecleanblog_pages_layouts; - if ($('body').hasClass('page-template-generic-full-template') || $('body').hasClass('post-template-generic-full-template')){ - $('#secondary').hide(); // hide() the .sidebar from the live site - } else if ($('body').hasClass('page-template-generic-left-template') || $('body').hasClass('post-template-generic-left-template')) { - $('#primary').addClass('col-md-push-4'); - $('#secondary').addClass('col-md-pull-8'); - $('#secondary').show(); // show() the .sidebar in the live site - } else if ($('body').hasClass('page-template-generic-rigth-template') || $('body').hasClass('post-template-generic-rigth-template')) { - $('#primary').removeClass('col-md-push-4'); - $('#secondary').removeClass('col-md-pull-8'); - $('#secondary').show(); // show() the .sidebar in the live site - } else if ($('body').hasClass('post-template-default')){ - if(postsLayoutName == 'fullwidth-posts') { - $('#secondary').hide(); // hide() the .sidebar from the live site @see customizer.js - Posts layouts. - } else if (postsLayoutName == 'sidebar-left-posts') { - $('#primary').addClass('col-md-push-4'); - $('#secondary').addClass('col-md-pull-8'); - $('#secondary').show(); // show() the .sidebar in the live site @see customizer.js - Posts layouts. - } else { //(postsLayoutName == 'sidebar-right-posts') - $('#primary').removeClass('col-md-push-4'); - $('#secondary').removeClass('col-md-pull-8'); - $('#secondary').show(); // show() the .sidebar in the live site @see customizer.js - Posts layouts. - } - } else if ($('body').hasClass('page-template-default')){ - if(pagesLayoutName == 'fullwidth-pages') { - $('#secondary').hide(); // hide() the .sidebar from the live site @see customizer.js - Pages layouts. - } else if (pagesLayoutName == 'sidebar-left-pages') { - $('#primary').addClass('col-md-push-4'); - $('#secondary').addClass('col-md-pull-8'); - $('#secondary').show(); // show() the .sidebar in the live site @see customizer.js - Pages layouts. - } else { //(pagesLayoutName == 'sidebar-right-pages') - $('#primary').removeClass('col-md-push-4'); - $('#secondary').removeClass('col-md-pull-8'); - $('#secondary').show(); // show() the .sidebar in the live site @see customizer.js - Pages layouts. - } - } else { - if(siteLayoutName == 'fullwidth') { - $('#secondary').hide(); // hide() the .sidebar from the live site @see customizer.js - Site layout - } else if (siteLayoutName == 'sidebar-left') { - $('#primary').addClass('col-md-push-4'); - $('#secondary').addClass('col-md-pull-8'); - $('#secondary').show(); // show() the .sidebar in the live site @see customizer.js - Site layout - } else { //(siteLayoutName == 'sidebar-right') - $('#primary').removeClass('col-md-push-4'); - $('#secondary').removeClass('col-md-pull-8'); - $('#secondary').show(); // show() the .sidebar in the live site @see customizer.js - Site layout - } - } - //End 12. - - //13. Some styles for the calendar widget + //12. Some styles for the calendar widget // Modified linear-gradient to work in IE and Edge. $('.widget_calendar #today').parent().prevAll().children(':not(.pad)').css('background-image', 'linear-gradient(to right bottom, transparent 49%, red 50%, transparent 51%)'); $('.widget_calendar #today').prevAll().css('background-image', 'linear-gradient(to right bottom, transparent 49%, red 50%, transparent 51%)'); - //End 13. + //End 12. }); \ No newline at end of file diff --git a/components/main/main-template.php b/components/main/main-template.php index 7ab08c4..af5a5e1 100644 --- a/components/main/main-template.php +++ b/components/main/main-template.php @@ -16,11 +16,11 @@ ?>