From b37ac5c4311cf3ee9807324fc1b76e241cf78e66 Mon Sep 17 00:00:00 2001 From: TruongSa Date: Wed, 30 Aug 2017 10:35:17 +0700 Subject: [PATCH 1/9] Fixed #234 , header issue --- assets/sass/_structure.scss | 12 +++++++++--- style.css | 33 ++++++++++++++++++--------------- 2 files changed, 27 insertions(+), 18 deletions(-) diff --git a/assets/sass/_structure.scss b/assets/sass/_structure.scss index 8851803a..f17eb589 100644 --- a/assets/sass/_structure.scss +++ b/assets/sass/_structure.scss @@ -12,11 +12,17 @@ transition: all .5s ease-out; } -.site-header-wrapper { - display: block; - height: 75px; +.no-sticky-header { + .site-header-wrapper { + display: block; + height: 75px; + } + .site-header { + background: transparent; + } } + .no-sticky-header.header-transparent .site-header { #nav-toggle { span { diff --git a/style.css b/style.css index dafd9eeb..00c750b3 100644 --- a/style.css +++ b/style.css @@ -51,7 +51,7 @@ html, body { html { box-sizing: border-box; - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); + -webkit-tap-highlight-color: transparent; font-size: 16px; } @media (max-width: 991px) { @@ -642,7 +642,7 @@ h6, p, ul, ol, dl, blockquote, pre { } @media screen and (min-width: 940px) { .sidebar { - width: 25.2252252252%; + width: 25.22523%; float: left; } } @@ -657,7 +657,7 @@ h6, p, ul, ol, dl, blockquote, pre { padding-left: 39px; border-left: 1px solid #e9e9e9; margin-right: 1px; - width: 74.7747747748%; + width: 74.77477%; } .left-sidebar .sidebar { @@ -669,7 +669,7 @@ h6, p, ul, ol, dl, blockquote, pre { .right-sidebar .content-area { padding-right: 39px; border-right: 1px solid #e9e9e9; - width: 74.7747747748%; + width: 74.77477%; } .right-sidebar .sidebar { @@ -694,10 +694,13 @@ h6, p, ul, ol, dl, blockquote, pre { transition: all .5s ease-out; } -.site-header-wrapper { +.no-sticky-header .site-header-wrapper { display: block; height: 75px; } +.no-sticky-header .site-header { + background: transparent; +} .no-sticky-header.header-transparent .site-header #nav-toggle span { background-color: #ffffff; @@ -1574,7 +1577,7 @@ h6, p, ul, ol, dl, blockquote, pre { position: relative; } #comments .comment .comment-wrapper:before { - border-color: rgba(0, 0, 0, 0) #f6f7f9 rgba(0, 0, 0, 0) rgba(0, 0, 0, 0); + border-color: transparent #f6f7f9 transparent transparent; border-style: solid; border-width: 0 10px 10px 0; content: ""; @@ -2530,7 +2533,7 @@ section > .customize-partial-edit-shortcut button { clear: left; } .team-members.row.team-layout-3 .team-member { - width: 33.3333333333%; + width: 33.33333%; } .team-members.row.team-layout-3 .team-member:nth-child(3n+1) { clear: left; @@ -2867,7 +2870,7 @@ div.wpcf7-response-output { } .g-col-3 .g-item { - width: 33.3333333333%; + width: 33.33333%; } .g-col-3 .g-item:nth-child(3n+1) { clear: left; @@ -2888,7 +2891,7 @@ div.wpcf7-response-output { } .g-col-6 .g-item { - width: 16.6666666667%; + width: 16.66667%; } .g-col-6 .g-item:nth-child(6n+1) { clear: left; @@ -2910,7 +2913,7 @@ div.wpcf7-response-output { } .g-col-3 .g-item { - width: 33.3333333333%; + width: 33.33333%; } .g-col-3 .g-item:nth-child(3n+1) { clear: left; @@ -2931,7 +2934,7 @@ div.wpcf7-response-output { } .g-col-6 .g-item { - width: 16.6666666667%; + width: 16.66667%; } .g-col-6 .g-item:nth-child(6n+1) { clear: left; @@ -2953,7 +2956,7 @@ div.wpcf7-response-output { } .g-col-3 .g-item { - width: 33.3333333333%; + width: 33.33333%; } .g-col-3 .g-item:nth-child(3n+1) { clear: left; @@ -2974,7 +2977,7 @@ div.wpcf7-response-output { } .g-col-6 .g-item { - width: 16.6666666667%; + width: 16.66667%; } .g-col-6 .g-item:nth-child(6n+1) { clear: left; @@ -3222,7 +3225,7 @@ button::-moz-focus-inner { padding: 0; width: 90px; height: 110px; - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); + -webkit-tap-highlight-color: transparent; } .mfp-arrow:active { margin-top: -54px; @@ -3737,7 +3740,7 @@ img.mfp-img { -moz-user-select: none; -ms-user-select: none; user-select: none; - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); + -webkit-tap-highlight-color: transparent; } /* fix */ From 3199344660046e64bfca2394733917a68ef018c4 Mon Sep 17 00:00:00 2001 From: TruongSa Date: Wed, 30 Aug 2017 10:56:41 +0700 Subject: [PATCH 2/9] Update version and changlog --- assets/sass/_structure.scss | 1 - assets/sass/style.scss | 2 +- changelog.md | 3 +++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/assets/sass/_structure.scss b/assets/sass/_structure.scss index f17eb589..e926d19e 100644 --- a/assets/sass/_structure.scss +++ b/assets/sass/_structure.scss @@ -22,7 +22,6 @@ } } - .no-sticky-header.header-transparent .site-header { #nav-toggle { span { diff --git a/assets/sass/style.scss b/assets/sass/style.scss index a3275083..ff4959be 100644 --- a/assets/sass/style.scss +++ b/assets/sass/style.scss @@ -4,7 +4,7 @@ Theme URI: https://www.famethemes.com/themes/onepress/ Author: FameThemes Author URI: http://www.famethemes.com Description: OnePress is an outstanding creative and flexible WordPress one page theme well suited for business website, portfolio, digital agency, product showcase, freelancers and everyone else who appreciate good design. The theme overall is an elegant and classic one, a fine example of Bootstrap 4 WordPress theme which compatibility with latest version of WooCommerce. (Live preview : http://www.famethemes.com/preview/?theme=OnePress) -Version: 1.4.2 +Version: 1.4.3 License: GNU General Public License v2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Text Domain: onepress diff --git a/changelog.md b/changelog.md index 2189c52f..a023ce81 100644 --- a/changelog.md +++ b/changelog.md @@ -1,6 +1,9 @@ ==================================================================== CHANGELOG ==================================================================== +## 1.4.3 +* Fix header issue. + ## 1.4.2 * Improve front page sections. * Fix an issue incorrect section position for first menu item is clicked. From 2ff5e30f4333d6d3e01c527adf21cdd07e7981c7 Mon Sep 17 00:00:00 2001 From: TruongSa Date: Wed, 30 Aug 2017 11:07:26 +0700 Subject: [PATCH 3/9] Update header --- assets/js/theme.js | 4 ++-- inc/extras.php | 5 ++++- style.css | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/assets/js/theme.js b/assets/js/theme.js index ef126d74..bdc64d7f 100644 --- a/assets/js/theme.js +++ b/assets/js/theme.js @@ -141,8 +141,8 @@ jQuery( document ).ready( function( $ ) { topbar = 0; } } - - if( st > p_to_top && st > 0 ) { + // if( st > p_to_top && st > 0 ) { + if( st > 1 ) { $wrap.addClass( 'is-fixed').removeClass( 'no-scroll' ); header_fixed.addClass('header-fixed'); header_fixed.css( 'top', topbar+'px' ); diff --git a/inc/extras.php b/inc/extras.php index e2cc47cb..a14ed79c 100644 --- a/inc/extras.php +++ b/inc/extras.php @@ -26,12 +26,15 @@ function onepress_body_classes( $classes ) { $classes[] = 'no-sticky-header'; } // onepress_header_transparent + $transparent = 'no-header-transparent'; if ( is_front_page() && is_page_template( 'template-frontpage.php' ) ) { if ( get_theme_mod( 'onepress_header_transparent' ) ) { - $classes[] = 'header-transparent'; + $transparent = 'header-transparent'; } } + $classes[] = $transparent; + if ( is_customize_preview() ) { $classes[ ] = 'is-customize-preview'; } diff --git a/style.css b/style.css index 00c750b3..d973b9b0 100644 --- a/style.css +++ b/style.css @@ -4,7 +4,7 @@ Theme URI: https://www.famethemes.com/themes/onepress/ Author: FameThemes Author URI: http://www.famethemes.com Description: OnePress is an outstanding creative and flexible WordPress one page theme well suited for business website, portfolio, digital agency, product showcase, freelancers and everyone else who appreciate good design. The theme overall is an elegant and classic one, a fine example of Bootstrap 4 WordPress theme which compatibility with latest version of WooCommerce. (Live preview : http://www.famethemes.com/preview/?theme=OnePress) -Version: 1.4.2 +Version: 1.4.3 License: GNU General Public License v2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Text Domain: onepress From 7ccee69aaf87323028e9c380430d99bf5fbe96ca Mon Sep 17 00:00:00 2001 From: TruongSa Date: Wed, 30 Aug 2017 11:15:20 +0700 Subject: [PATCH 4/9] Update header --- assets/js/theme.js | 6 +++++- assets/sass/_structure.scss | 5 +++++ style.css | 4 ++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/assets/js/theme.js b/assets/js/theme.js index bdc64d7f..6e003f24 100644 --- a/assets/js/theme.js +++ b/assets/js/theme.js @@ -142,7 +142,11 @@ jQuery( document ).ready( function( $ ) { } } // if( st > p_to_top && st > 0 ) { - if( st > 1 ) { + var post_check = 1; + if ( topbar ) { + post_check = -1; + } + if( st > post_check ) { $wrap.addClass( 'is-fixed').removeClass( 'no-scroll' ); header_fixed.addClass('header-fixed'); header_fixed.css( 'top', topbar+'px' ); diff --git a/assets/sass/_structure.scss b/assets/sass/_structure.scss index e926d19e..b103107a 100644 --- a/assets/sass/_structure.scss +++ b/assets/sass/_structure.scss @@ -20,8 +20,13 @@ .site-header { background: transparent; } + &.sticky-header { + display: block; + height: 75px; + } } + .no-sticky-header.header-transparent .site-header { #nav-toggle { span { diff --git a/style.css b/style.css index d973b9b0..5e7c8aae 100644 --- a/style.css +++ b/style.css @@ -701,6 +701,10 @@ h6, p, ul, ol, dl, blockquote, pre { .no-sticky-header .site-header { background: transparent; } +.no-sticky-header.sticky-header { + display: block; + height: 75px; +} .no-sticky-header.header-transparent .site-header #nav-toggle span { background-color: #ffffff; From ea9ae080417952b336a42b5ba81f01a1805b9ebd Mon Sep 17 00:00:00 2001 From: TruongSa Date: Wed, 30 Aug 2017 11:18:10 +0700 Subject: [PATCH 5/9] Update header --- assets/sass/_structure.scss | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/assets/sass/_structure.scss b/assets/sass/_structure.scss index b103107a..b7d11502 100644 --- a/assets/sass/_structure.scss +++ b/assets/sass/_structure.scss @@ -21,8 +21,11 @@ background: transparent; } &.sticky-header { - display: block; - height: 75px; + .site-header-wrapper { + display: block; + height: 75px; + } + } } From 1d612cb6dc1d316d99f52c3722bc09e04fff4cc8 Mon Sep 17 00:00:00 2001 From: TruongSa Date: Wed, 30 Aug 2017 11:18:26 +0700 Subject: [PATCH 6/9] Update css --- style.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/style.css b/style.css index 5e7c8aae..1a1ba4fc 100644 --- a/style.css +++ b/style.css @@ -701,7 +701,7 @@ h6, p, ul, ol, dl, blockquote, pre { .no-sticky-header .site-header { background: transparent; } -.no-sticky-header.sticky-header { +.no-sticky-header.sticky-header .site-header-wrapper { display: block; height: 75px; } From 1d011f03a2a3af8a64e62a148d76fb473d68344b Mon Sep 17 00:00:00 2001 From: TruongSa Date: Wed, 30 Aug 2017 11:20:03 +0700 Subject: [PATCH 7/9] Update css --- assets/sass/_structure.scss | 6 ++++-- style.css | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/assets/sass/_structure.scss b/assets/sass/_structure.scss index b7d11502..9f3bf3f1 100644 --- a/assets/sass/_structure.scss +++ b/assets/sass/_structure.scss @@ -20,12 +20,14 @@ .site-header { background: transparent; } - &.sticky-header { +} + +.sticky-header { + &.no-header-transparent { .site-header-wrapper { display: block; height: 75px; } - } } diff --git a/style.css b/style.css index 1a1ba4fc..3e661055 100644 --- a/style.css +++ b/style.css @@ -701,7 +701,8 @@ h6, p, ul, ol, dl, blockquote, pre { .no-sticky-header .site-header { background: transparent; } -.no-sticky-header.sticky-header .site-header-wrapper { + +.sticky-header.no-header-transparent .site-header-wrapper { display: block; height: 75px; } From bbd9c71eb53aee892fb6dbede86068e1413fe37d Mon Sep 17 00:00:00 2001 From: TruongSa Date: Wed, 30 Aug 2017 11:21:18 +0700 Subject: [PATCH 8/9] Update js --- assets/js/theme.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/js/theme.js b/assets/js/theme.js index 6e003f24..170e846f 100644 --- a/assets/js/theme.js +++ b/assets/js/theme.js @@ -144,7 +144,7 @@ jQuery( document ).ready( function( $ ) { // if( st > p_to_top && st > 0 ) { var post_check = 1; if ( topbar ) { - post_check = -1; + post_check = 0; } if( st > post_check ) { $wrap.addClass( 'is-fixed').removeClass( 'no-scroll' ); From 57390ed8bfb20be239bc0cac10284a2d24ee69fe Mon Sep 17 00:00:00 2001 From: TruongSa Date: Wed, 30 Aug 2017 11:24:12 +0700 Subject: [PATCH 9/9] Update custom css --- inc/template-tags.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/template-tags.php b/inc/template-tags.php index ee287cb6..5c26463d 100644 --- a/inc/template-tags.php +++ b/inc/template-tags.php @@ -398,7 +398,7 @@ function onepress_custom_inline_style( ) { $header_bg_color = get_theme_mod( 'onepress_header_bg_color' ); if ( $header_bg_color ) { ?> - .site-header { + .site-header, .no-sticky-header.no-header-transparent .site-header { background: #; border-bottom: 0px none; }