Skip to content

Commit

Permalink
Merge pull request #235 from FameThemes/development
Browse files Browse the repository at this point in the history
Fix header issue
  • Loading branch information
shrimp2t authored Aug 30, 2017
2 parents 9acae93 + 57390ed commit b852d5c
Show file tree
Hide file tree
Showing 7 changed files with 58 additions and 24 deletions.
8 changes: 6 additions & 2 deletions assets/js/theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,12 @@ jQuery( document ).ready( function( $ ) {
topbar = 0;
}
}

if( st > p_to_top && st > 0 ) {
// if( st > p_to_top && st > 0 ) {
var post_check = 1;
if ( topbar ) {
post_check = 0;
}
if( st > post_check ) {
$wrap.addClass( 'is-fixed').removeClass( 'no-scroll' );
header_fixed.addClass('header-fixed');
header_fixed.css( 'top', topbar+'px' );
Expand Down
21 changes: 18 additions & 3 deletions assets/sass/_structure.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,26 @@
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;
}
}

.sticky-header {
&.no-header-transparent {
.site-header-wrapper {
display: block;
height: 75px;
}
}
}


.no-sticky-header.header-transparent .site-header {
#nav-toggle {
span {
Expand Down
2 changes: 1 addition & 1 deletion assets/sass/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
5 changes: 4 additions & 1 deletion inc/extras.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}
Expand Down
2 changes: 1 addition & 1 deletion inc/template-tags.php
Original file line number Diff line number Diff line change
Expand Up @@ -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: #<?php echo $header_bg_color; ?>;
border-bottom: 0px none;
}
Expand Down
41 changes: 25 additions & 16 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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) {
Expand All @@ -69,6 +69,7 @@ body {
background: #ffffff;
height: 100%;
}

.site {
background: #FFFFFF;
position: relative;
Expand Down Expand Up @@ -641,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;
}
}
Expand All @@ -656,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 {
Expand All @@ -668,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 {
Expand All @@ -693,7 +694,15 @@ 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;
}

.sticky-header.no-header-transparent .site-header-wrapper {
display: block;
height: 75px;
}
Expand Down Expand Up @@ -1573,7 +1582,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: "";
Expand Down Expand Up @@ -2529,7 +2538,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;
Expand Down Expand Up @@ -2866,7 +2875,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;
Expand All @@ -2887,7 +2896,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;
Expand All @@ -2909,7 +2918,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;
Expand All @@ -2930,7 +2939,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;
Expand All @@ -2952,7 +2961,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;
Expand All @@ -2973,7 +2982,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;
Expand Down Expand Up @@ -3221,7 +3230,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;
Expand Down Expand Up @@ -3736,7 +3745,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 */
Expand Down

0 comments on commit b852d5c

Please sign in to comment.