Skip to content

Commit

Permalink
Merge pull request #160 from FameThemes/development
Browse files Browse the repository at this point in the history
Update version to 1.2.8
  • Loading branch information
shrimp2t committed Nov 2, 2016
2 parents 0e299b4 + 0577e5f commit 21ca400
Show file tree
Hide file tree
Showing 7 changed files with 103 additions and 11 deletions.
30 changes: 25 additions & 5 deletions assets/js/theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,6 @@ var isMobile = {
})();






/**
* Sticky header when scroll.
*/
Expand Down Expand Up @@ -176,15 +172,39 @@ var isMobile = {
* Smooth scroll for navigation and other elements
*/
( function( $ ) {
var mobile_max_width = 1140; // Media max width for mobile
var main_navigation = jQuery('.main-navigation .onepress-menu');
var stite_header = $( '.site-header' );

// Initialise Menu Toggle
jQuery('#nav-toggle').on('click', function(event){
event.preventDefault();
jQuery('#nav-toggle').toggleClass('nav-is-visible');
jQuery('.main-navigation .onepress-menu').toggleClass("onepress-menu-mobile");
main_navigation.toggleClass("onepress-menu-mobile");
jQuery('.header-widget').toggleClass("header-widget-mobile");
if ( main_navigation.hasClass( 'onepress-menu-mobile' ) && $( window).width() <= mobile_max_width ) {
var h = $( window).height( ) - stite_header.height();
main_navigation.css( {
height: h,
overflow: 'auto',
});
} else {
main_navigation.removeAttr( 'style' );
}
});

$( window).resize( function(){
if ( main_navigation.hasClass( 'onepress-menu-mobile' ) && $( window).width() <= mobile_max_width ) {
var h = $( window).height( ) - stite_header.height();
main_navigation.css( {
height: h,
overflow: 'auto',
});
} else {
main_navigation.removeAttr( 'style' );
}
} );

jQuery('.onepress-menu li.menu-item-has-children, .onepress-menu li.page_item_has_children').each( function() {
jQuery(this).prepend('<div class="nav-toggle-subarrow"><i class="fa fa-angle-down"></i></div>');
});
Expand Down
12 changes: 12 additions & 0 deletions assets/sass/_sections.scss
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,18 @@
}
}

.header-transparent {
#hero {
.container {
.hero__content {
margin-top: 70px;
}

}
}
}


/* Text Rotator */
.morphext > .animated {
display: inline-block;
Expand Down
16 changes: 16 additions & 0 deletions assets/sass/_structure.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,22 @@
display: block;
}

.no-sticky-header.header-transparent .site-header{
#nav-toggle {
span {
background-color: #ffffff;
&::before, &::after {
background-color: #ffffff;
}
}
&.nav-is-visible {
span {
background-color: transparent;
}
}
}
}

.header-transparent .no-scroll .site-header{
background: transparent;
position: fixed;
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.2.7
Version: 1.2.8
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: onepress
Expand Down
12 changes: 12 additions & 0 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,18 @@ function onepress_widgets_init() {
'after_title' => '</h2>',
) );

if ( class_exists( 'WooCommerce' ) ) {
register_sidebar( array(
'name' => esc_html__( 'WooCommerce Sidebar', 'onepress' ),
'id' => 'sidebar-shop',
'description' => '',
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
'after_widget' => '</aside>',
'before_title' => '<h2 class="widget-title">',
'after_title' => '</h2>',
) );
}

}
add_action( 'widgets_init', 'onepress_widgets_init' );

Expand Down
18 changes: 17 additions & 1 deletion 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.2.7
Version: 1.2.8
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 @@ -713,6 +713,18 @@ h6, p, ul, ol, dl, blockquote, pre {
display: block;
}

.no-sticky-header.header-transparent .site-header #nav-toggle span {
background-color: #ffffff;
}

.no-sticky-header.header-transparent .site-header #nav-toggle span::before, .no-sticky-header.header-transparent .site-header #nav-toggle span::after {
background-color: #ffffff;
}

.no-sticky-header.header-transparent .site-header #nav-toggle.nav-is-visible span {
background-color: transparent;
}

.header-transparent .no-scroll .site-header {
background: transparent;
position: fixed;
Expand Down Expand Up @@ -2480,6 +2492,10 @@ h6, p, ul, ol, dl, blockquote, pre {
box-shadow: none;
}

.header-transparent #hero .container .hero__content {
margin-top: 70px;
}

/* Text Rotator */
.morphext > .animated {
display: inline-block;
Expand Down
24 changes: 20 additions & 4 deletions woocommerce.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
* @package OnePress
*/

get_header(); ?>
get_header();


$is_active_sidebar = is_active_sidebar( 'sidebar-shop' );
?>

<div id="content" class="site-content">

Expand All @@ -17,15 +21,27 @@

<?php echo onepress_breadcrumb(); ?>

<div id="content-inside" class="container no-sidebar">
<div id="content-inside" class="container <?php echo ( $is_active_sidebar ) ? 'right-sidebar' : 'no-sidebar'; ?>">
<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">

<?php woocommerce_content(); ?>

</main><!-- #main -->
</div><!-- #primary -->
<?php if ( $is_active_sidebar ) {
?>
<div id="secondary" class="widget-area sidebar" role="complementary">
<?php dynamic_sidebar( 'sidebar-shop' ); ?>
</div><!-- #secondary -->
<?php
} ?>
</div><!--#content-inside -->

<?php


?>


</div><!-- #content -->

<?php get_footer(); ?>

0 comments on commit 21ca400

Please sign in to comment.