From 26fad2f537bb1bc21441f9cc278c6a852906de01 Mon Sep 17 00:00:00 2001 From: Hardeep Asrani Date: Thu, 1 Sep 2016 19:21:35 +0530 Subject: [PATCH 01/10] Fixed post order bug Fixed the bug with masonry which was loading blog posts in wrong order. Close https://github.com/Codeinwp/oblique/issues/31 --- js/masonry-init.js | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/js/masonry-init.js b/js/masonry-init.js index 8535677..51455d0 100644 --- a/js/masonry-init.js +++ b/js/masonry-init.js @@ -43,4 +43,36 @@ jQuery(function($) { }); }); -}); \ No newline at end of file +}); + +Masonry.prototype._getItemLayoutPosition = function(item) { + item.getSize(); + // how many columns does this brick span + var remainder = item.size.outerWidth % this.columnWidth; + var mathMethod = remainder && remainder < 1 ? 'round' : 'ceil'; + // round if off by 1 pixel, otherwise use ceil + var colSpan = Math[mathMethod](item.size.outerWidth / this.columnWidth); + colSpan = Math.min(colSpan, this.cols); + + var colGroup = this._getColGroup(colSpan); + // get the minimum Y value from the columns + //var minimumY = Math.min.apply( Math, colGroup ); + //var shortColIndex = colGroup.indexOf( minimumY ); + var shortColIndex = this.items.indexOf(item) % this.cols; + var minimumY = colGroup[shortColIndex]; + + // position the brick + var position = { + x: this.columnWidth * shortColIndex, + y: minimumY + }; + + // apply setHeight to necessary columns + var setHeight = minimumY + item.size.outerHeight; + var setSpan = this.cols + 1 - colGroup.length; + for (var i = 0; i < setSpan; i++) { + this.colYs[shortColIndex + i] = setHeight; + } + + return position; +}; \ No newline at end of file From 29b910c285bb4799691e0a77fc35d5268cb9b42f Mon Sep 17 00:00:00 2001 From: Buruiana Claudiu Date: Thu, 1 Sep 2016 17:49:12 +0300 Subject: [PATCH 02/10] #37 Update tags --- style.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/style.css b/style.css index bfe0e7e..5f42da6 100644 --- a/style.css +++ b/style.css @@ -8,7 +8,7 @@ Version: 1.13 License: GNU General Public License v2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Text Domain: oblique -Tags: dark, fluid-layout, responsive-layout, custom-colors, custom-background, custom-menu, custom-header, featured-images, sticky-post, theme-options, threaded-comments, translation-ready +Tags: custom-colors, custom-background, custom-menu, custom-header, featured-images, sticky-post, theme-options, threaded-comments, translation-ready This theme, like WordPress, is licensed under the GPL. Use it to make something cool, have fun, and share what you've learned with others. From 1b98fade7edfd4d8edbec3fc0990b0837ebc46b2 Mon Sep 17 00:00:00 2001 From: Rodica-Elena Andronache Date: Mon, 5 Sep 2016 12:34:22 +0300 Subject: [PATCH 03/10] Update style.css --- style.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/style.css b/style.css index 5f42da6..641a4d4 100644 --- a/style.css +++ b/style.css @@ -4,7 +4,7 @@ Theme URI: http://themeisle.com/themes/oblique Author: Themeisle Author URI: http://themeisle.com/ Description: Oblique is a creative masonry theme that works great for fashion or general bloggers. Amongst the features you will find a a parallax header image, full color control with unlimited color variations, easy access to all Google Fonts, responsive design etc. -Version: 1.13 +Version: 1.14 License: GNU General Public License v2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Text Domain: oblique From 66b86ba2b399c042b81606166253bbb9053f33f2 Mon Sep 17 00:00:00 2001 From: claudiuvertistudio Date: Mon, 5 Sep 2016 17:52:37 +0300 Subject: [PATCH 04/10] #30 Add an upsell section in customizer --- css/customizer.css | 13 ++++++++++++- images/gray-lines.png | Bin 0 -> 124 bytes inc/customizer.php | 37 ++++++++++++++++++++++++++++++++++++- js/oblique_customizer.js | 8 ++++++++ 4 files changed, 56 insertions(+), 2 deletions(-) create mode 100644 images/gray-lines.png diff --git a/css/customizer.css b/css/customizer.css index c178fbc..20cb548 100644 --- a/css/customizer.css +++ b/css/customizer.css @@ -20,4 +20,15 @@ .customizer-review-link span { font-size: 12px; width: 12px; -} \ No newline at end of file +} + +#accordion-section-oblique_extra_options .accordion-section-title, +#accordion-section-oblique_extra_options .accordion-section-title, +#accordion-section-oblique_extra_options .accordion-section-title { + background-image:url(../images/gray-lines.png); + background-repeat:repeat; +} + +#accordion-section-oblique_extra_options .accordion-section-title:after { + content: "\f160"; +} diff --git a/images/gray-lines.png b/images/gray-lines.png new file mode 100644 index 0000000000000000000000000000000000000000..048877a86bb758f8abcfb95176abb25c054d6c50 GIT binary patch literal 124 zcmeAS@N?(olHy`uVBq!ia0vp^tRT$73?%Cvt*-$o=>VS)*AE}ReE9U`6)!vzUSt?0yhzAQ$oP_x!0|SNfx+I4 V%{Qu0_y|xPgQu&X%Q~loCIADAG@Jkc literal 0 HcmV?d00001 diff --git a/inc/customizer.php b/inc/customizer.php index 79f25db..682b4df 100644 --- a/inc/customizer.php +++ b/inc/customizer.php @@ -7,6 +7,11 @@ function oblique_customize_register( $wp_customize ) { + class Oblique_Theme_Support extends WP_Customize_Control { + public function render_content() { + } + } + $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; $wp_customize->remove_control( 'header_textcolor' ); @@ -796,6 +801,36 @@ public function render_content() { ) ) ); + + + + + + + + + //Extra options + $wp_customize->add_section( 'oblique_extra_options', array( + 'title' => 'Extra options', + 'priority' => 29 + )); + + $wp_customize->add_setting( 'oblique_extra_options', array( + 'sanitize_callback' => 'sanitize_text_field' + )); + + $wp_customize->add_control( new Oblique_Theme_Support( $wp_customize, 'oblique_extra_options', array( + 'section' => 'oblique_extra_options', + ))); + + + + + + + + + //Social icons $wp_customize->add_setting( 'social_color', @@ -914,4 +949,4 @@ function oblique_asking_for_reviews_script() { 'ask' => $oblique_review, 'ajaxurl' => admin_url( 'admin-ajax.php' ), ) ); -} \ No newline at end of file +} diff --git a/js/oblique_customizer.js b/js/oblique_customizer.js index 84fd62d..33f513d 100644 --- a/js/oblique_customizer.js +++ b/js/oblique_customizer.js @@ -22,4 +22,12 @@ jQuery(document).ready(function() { } jQuery('.preview-notice').append('{pro}'.replace('{pro}',obliqueCustomizerObject.pro)); + + //Locked sections + jQuery('#accordion-section-oblique_extra_options').click(function() { + jQuery('.wp-full-overlay').removeClass('section-open'); + jQuery('#accordion-section-oblique_extra_options, #accordion-section-zerif_videobackground_in_pro_section').removeClass('open'); + window.location.href = "http://themeisle.com/themes/oblique-pro/"; + }); + }); From 3506afc3c9f7c71f1a0934f4820228c7a1e66216 Mon Sep 17 00:00:00 2001 From: Rodica-Elena Andronache Date: Mon, 12 Sep 2016 12:37:20 +0300 Subject: [PATCH 05/10] #30 remove unused code --- css/customizer.css | 2 -- 1 file changed, 2 deletions(-) diff --git a/css/customizer.css b/css/customizer.css index 20cb548..e13dfce 100644 --- a/css/customizer.css +++ b/css/customizer.css @@ -22,8 +22,6 @@ width: 12px; } -#accordion-section-oblique_extra_options .accordion-section-title, -#accordion-section-oblique_extra_options .accordion-section-title, #accordion-section-oblique_extra_options .accordion-section-title { background-image:url(../images/gray-lines.png); background-repeat:repeat; From abf3b19a1494ef7219cb48a02e80cbd528b8f431 Mon Sep 17 00:00:00 2001 From: Buruiana Claudiu Date: Mon, 12 Sep 2016 18:51:46 +0300 Subject: [PATCH 06/10] #20 Bind customizer options to respective elements in jQuery --- header.php | 35 +++++++-------- inc/customizer.php | 16 ++++--- inc/styles.php | 2 +- js/customizer.js | 109 ++++++++++++++++++++++++++++++++++++++++++++- style.css | 4 ++ 5 files changed, 139 insertions(+), 27 deletions(-) diff --git a/header.php b/header.php index 17c4e9a..0a36b58 100644 --- a/header.php +++ b/header.php @@ -28,11 +28,12 @@
@@ -41,10 +42,10 @@ 'social', 'link_before' => '', 'link_after' => '', 'menu_class' => 'menu clearfix', 'fallback_cb' => false ) ); ?> - - + +
"> + +
@@ -55,16 +56,14 @@
- - - - -

-

- -

-

- + + " title=""> + + + +

">

+

">

+
diff --git a/inc/customizer.php b/inc/customizer.php index 682b4df..9fcd6c6 100644 --- a/inc/customizer.php +++ b/inc/customizer.php @@ -50,6 +50,7 @@ public function render_content() { array( 'sanitize_callback' => 'oblique_sanitize_checkbox', 'default' => 0, + 'transport' => 'postMessage', ) ); $wp_customize->add_control( @@ -67,6 +68,7 @@ public function render_content() { 'menu_text', array( 'sanitize_callback' => 'oblique_sanitize_text', + 'transport' => 'postMessage', ) ); $wp_customize->add_control( @@ -93,6 +95,7 @@ public function render_content() { array( 'default-image' => '', 'sanitize_callback' => 'esc_url_raw', + 'transport' => 'postMessage' ) ); @@ -137,6 +140,7 @@ public function render_content() { array( 'default' => 'hide-title', 'sanitize_callback' => 'oblique_sanitize_logo_style', + 'transport' => 'postMessage', ) ); $wp_customize->add_control( @@ -159,6 +163,7 @@ public function render_content() { array( 'sanitize_callback' => 'absint', 'default' => '150', + 'transport' => 'postMessage', ) ); $wp_customize->add_control( 'branding_padding', array( @@ -180,6 +185,7 @@ public function render_content() { array( 'sanitize_callback' => 'absint', 'default' => '100', + 'transport' => 'postMessage', ) ); $wp_customize->add_control( 'branding_padding_1024', array( @@ -626,6 +632,7 @@ public function render_content() { array( 'default' => '#23B6B6', 'sanitize_callback' => 'sanitize_hex_color', + 'transport' => 'postMessage', ) ); $wp_customize->add_control( @@ -788,6 +795,7 @@ public function render_content() { array( 'default' => '#17191B', 'sanitize_callback' => 'sanitize_hex_color', + 'transport' => 'postMessage', ) ); $wp_customize->add_control( @@ -824,19 +832,13 @@ public function render_content() { ))); - - - - - - - //Social icons $wp_customize->add_setting( 'social_color', array( 'default' => '#ffffff', 'sanitize_callback' => 'sanitize_hex_color', + 'transport' => 'postMessage', ) ); $wp_customize->add_control( diff --git a/inc/styles.php b/inc/styles.php index 13a6d9d..c4ca248 100644 --- a/inc/styles.php +++ b/inc/styles.php @@ -106,7 +106,7 @@ function oblique_custom_styles($custom) { $custom .= ".svg-block { fill:#" . esc_attr($background_color) . ";}"."\n"; //Footer background $footer_background = get_theme_mod( 'footer_background', '#17191B' ); - $custom .= ".footer-svg.svg-block { fill:" . esc_attr($footer_background) . "!important;}"."\n"; + $custom .= ".footer-svg.svg-block { fill:" . esc_attr($footer_background) . ";}"."\n"; $custom .= ".site-footer { background-color:" . esc_attr($footer_background) . ";}"."\n"; //Body $body_text = get_theme_mod( 'body_text_color', '#50545C' ); diff --git a/js/customizer.js b/js/customizer.js index a1be45c..bdacf80 100644 --- a/js/customizer.js +++ b/js/customizer.js @@ -24,6 +24,13 @@ $('.svg-block').css('fill', newval ); } ); }); + // Primary color + wp.customize('primary_color',function( value ) { + value.bind( function( newval ) { + console.log(newval); + $('.read-more, button, .button, input[type="button"], input[type="reset"], input[type="submit"], .entry-thumb:after').css('background-color', newval); + }); + }); // Font sizes wp.customize('site_title_size',function( value ) { value.bind( function( newval ) { @@ -118,6 +125,106 @@ value.bind( function( newval ) { $('.widget-area, .widget-area a').css('color', newval ); } ); - }); + }); + + // Footer background + wp.customize( 'footer_background', function( value ) { + value.bind( function( newval ) { + $( '.footer-svg' ).css( 'fill', newval ); + $( '.site-footer' ).css( 'background-color', newval ); + } ); + }); + + // Social color + wp.customize( 'social_color', function( value ) { + value.bind( function( newval ) { + $( '#menu-social a' ).css( 'color', newval ); + } ); + }); + + // Search form - General + wp.customize('search_toggle',function( value ) { + value.bind( function() { + var item = $('.header-search'); + if( item.hasClass('oblique-only-customizer') ) { + item.removeClass('oblique-only-customizer'); + } else { + item.addClass('oblique-only-customizer'); + } + } ); + }); + + // Menu toggle - General + wp.customize( 'menu_text', function( value ) { + value.bind( function( newval ) { + var item = $( '.sidebar-toggle' ); + if( '' !== newval ) { + item.find( '.fa-bars' ).addClass( 'oblique-only-customizer' ); + item.find( 'span' ).removeClass( 'oblique-only-customizer' ); + item.find( 'span' ).text( newval ); + } else { + item.find( '.fa-bars' ).removeClass( 'oblique-only-customizer' ); + item.find( 'span' ).addClass( 'oblique-only-customizer' ); + item.find( 'span' ).text( newval ); + } + } ); + }); + + // Logo - Header + wp.customize( 'site_logo', function( value ) { + value.bind( function( val ) { + var logo = $( '.site-logo' ), + logo_wrap = $( '.site-branding > a' ), + title = $( '.site-branding .site-title, .site-branding .site-description' ); + + logo.attr( 'src', val ); + if( '' !== val ) { + logo_wrap.removeClass( 'oblique-only-customizer' ); + } else { + logo_wrap.addClass( 'oblique-only-customizer' ); + } + } ); + }); + + // Logo style - Header + wp.customize( 'logo_style', function( value ) { + value.bind( function( val ) { + var title = $( '.site-branding .site-title, .site-branding .site-description' ), + logo_wrap = $( '.site-branding > a' ); + if( 'hide-title' === val && !logo_wrap.hasClass( 'oblique-only-customizer' ) ) { + title.addClass( 'oblique-only-customizer' ); + } else { + title.removeClass( 'oblique-only-customizer' ); + } + } ); + }); + + // Padding - Header + wp.customize( 'branding_padding', function( value ) { + value.bind( function( val ) { + console.log( val ); + if( window.innerWidth > 1024 ) { + console.log( val ); + $( '.site-branding' ).css( { + 'padding-top': val + 'px', + 'padding-bottom': val + 'px' + }); + } + } ); + }); + + // Padding < 1024 - Header + wp.customize( 'branding_padding_1024', function( value ) { + value.bind( function( val ) { + console.log( val ); + if( window.innerWidth <= 1024 ) { + console.log( val ); + $( '.site-branding' ).css({ + 'padding-top': val + 'px', + 'padding-bottom': val + 'px' + }); + } + } ); + }); } )( jQuery ); diff --git a/style.css b/style.css index 5f42da6..10484e8 100644 --- a/style.css +++ b/style.css @@ -1074,6 +1074,10 @@ Top bar .header-search .search-field:focus { color: #fff; } +.oblique-only-customizer { + display: none !important; +} + /*-------------------------------------------------------------- Responsive --------------------------------------------------------------*/ From f35963abbf1e1c949b983303eac47950c98ff613 Mon Sep 17 00:00:00 2001 From: claudiuvertistudio Date: Wed, 14 Sep 2016 13:11:43 +0300 Subject: [PATCH 07/10] #45 Slow loading of posts in mansonry --- js/masonry-init.js | 3 +++ style.css | 3 +++ 2 files changed, 6 insertions(+) diff --git a/js/masonry-init.js b/js/masonry-init.js index 8535677..9236f0f 100644 --- a/js/masonry-init.js +++ b/js/masonry-init.js @@ -9,6 +9,9 @@ jQuery(function($) { if ( !$container ) { return; } + + $container.show(); + // init Masonry $container.imagesLoaded( function() { $container.masonry({ diff --git a/style.css b/style.css index 5f42da6..d888129 100644 --- a/style.css +++ b/style.css @@ -1074,6 +1074,9 @@ Top bar .header-search .search-field:focus { color: #fff; } +.grid-layout { + display: none; +} /*-------------------------------------------------------------- Responsive --------------------------------------------------------------*/ From 7038cb9fdf826731c9ad0fd58658b98af4e4f092 Mon Sep 17 00:00:00 2001 From: claudiuvertistudio Date: Fri, 16 Sep 2016 11:16:11 +0300 Subject: [PATCH 08/10] !!! #20 Checked if the title is hidden --- header.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/header.php b/header.php index 0a36b58..4769c27 100644 --- a/header.php +++ b/header.php @@ -56,7 +56,7 @@
- + " title=""> From cd30876ef225d24148d399f07084986e5b987c3c Mon Sep 17 00:00:00 2001 From: claudiuvertistudio Date: Fri, 16 Sep 2016 17:03:51 +0300 Subject: [PATCH 09/10] #49 Fix font size control --- inc/customizer.php | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/inc/customizer.php b/inc/customizer.php index 9fcd6c6..c108c78 100644 --- a/inc/customizer.php +++ b/inc/customizer.php @@ -131,7 +131,6 @@ public function render_content() { 'min' => 50, 'max' => 600, 'step' => 5, - 'style' => 'margin-bottom: 15px; padding: 15px;', ), ) ); //Logo style @@ -176,7 +175,6 @@ public function render_content() { 'min' => 20, 'max' => 350, 'step' => 5, - 'style' => 'padding: 15px;', ), ) ); //Padding @@ -198,7 +196,6 @@ public function render_content() { 'min' => 20, 'max' => 350, 'step' => 5, - 'style' => 'padding: 15px;', ), ) ); @@ -230,7 +227,6 @@ public function render_content() { 'min' => 0, 'max' => 200, 'step' => 5, - 'style' => 'padding: 15px;', ), ) ); //Hide meta @@ -453,7 +449,6 @@ public function render_content() { 'min' => 10, 'max' => 90, 'step' => 1, - 'style' => 'margin-bottom: 15px; padding: 10px;', ), ) ); // Site description @@ -474,7 +469,6 @@ public function render_content() { 'min' => 10, 'max' => 50, 'step' => 1, - 'style' => 'margin-bottom: 15px; padding: 10px;', ), ) ); //H1 size @@ -495,7 +489,6 @@ public function render_content() { 'min' => 10, 'max' => 60, 'step' => 1, - 'style' => 'margin-bottom: 15px; padding: 10px;', ), ) ); //H2 size @@ -516,7 +509,6 @@ public function render_content() { 'min' => 10, 'max' => 60, 'step' => 1, - 'style' => 'margin-bottom: 15px; padding: 10px;', ), ) ); //H3 size @@ -537,7 +529,6 @@ public function render_content() { 'min' => 10, 'max' => 60, 'step' => 1, - 'style' => 'margin-bottom: 15px; padding: 10px;', ), ) ); //H4 size @@ -558,7 +549,6 @@ public function render_content() { 'min' => 10, 'max' => 60, 'step' => 1, - 'style' => 'margin-bottom: 15px; padding: 10px;', ), ) ); //H5 size @@ -579,7 +569,6 @@ public function render_content() { 'min' => 10, 'max' => 60, 'step' => 1, - 'style' => 'margin-bottom: 15px; padding: 10px;', ), ) ); //H6 size @@ -600,7 +589,6 @@ public function render_content() { 'min' => 10, 'max' => 60, 'step' => 1, - 'style' => 'margin-bottom: 15px; padding: 10px;', ), ) ); //Body @@ -621,7 +609,6 @@ public function render_content() { 'min' => 10, 'max' => 24, 'step' => 1, - 'style' => 'margin-bottom: 15px; padding: 10px;', ), ) ); From b2188055881e11da07945dd6c7ae5c96e46eb15e Mon Sep 17 00:00:00 2001 From: Rodica-Elena Andronache Date: Mon, 19 Sep 2016 12:29:16 +0300 Subject: [PATCH 10/10] Fixed issues with logo --- header.php | 19 ++++++++++++------- inc/customizer.php | 5 +---- js/customizer.js | 29 ----------------------------- 3 files changed, 13 insertions(+), 40 deletions(-) diff --git a/header.php b/header.php index 4769c27..a9e8611 100644 --- a/header.php +++ b/header.php @@ -56,13 +56,18 @@
- - " title=""> - - - -

">

-

">

+ + + + + + + +

+

+ +

+

diff --git a/inc/customizer.php b/inc/customizer.php index c108c78..f5b57f6 100644 --- a/inc/customizer.php +++ b/inc/customizer.php @@ -94,9 +94,7 @@ public function render_content() { 'site_logo', array( 'default-image' => '', - 'sanitize_callback' => 'esc_url_raw', - 'transport' => 'postMessage' - + 'sanitize_callback' => 'esc_url_raw' ) ); $wp_customize->add_control( @@ -139,7 +137,6 @@ public function render_content() { array( 'default' => 'hide-title', 'sanitize_callback' => 'oblique_sanitize_logo_style', - 'transport' => 'postMessage', ) ); $wp_customize->add_control( diff --git a/js/customizer.js b/js/customizer.js index bdacf80..71bf926 100644 --- a/js/customizer.js +++ b/js/customizer.js @@ -170,35 +170,6 @@ } ); }); - // Logo - Header - wp.customize( 'site_logo', function( value ) { - value.bind( function( val ) { - var logo = $( '.site-logo' ), - logo_wrap = $( '.site-branding > a' ), - title = $( '.site-branding .site-title, .site-branding .site-description' ); - - logo.attr( 'src', val ); - if( '' !== val ) { - logo_wrap.removeClass( 'oblique-only-customizer' ); - } else { - logo_wrap.addClass( 'oblique-only-customizer' ); - } - } ); - }); - - // Logo style - Header - wp.customize( 'logo_style', function( value ) { - value.bind( function( val ) { - var title = $( '.site-branding .site-title, .site-branding .site-description' ), - logo_wrap = $( '.site-branding > a' ); - if( 'hide-title' === val && !logo_wrap.hasClass( 'oblique-only-customizer' ) ) { - title.addClass( 'oblique-only-customizer' ); - } else { - title.removeClass( 'oblique-only-customizer' ); - } - } ); - }); - // Padding - Header wp.customize( 'branding_padding', function( value ) { value.bind( function( val ) {