Skip to content

Commit

Permalink
Merge branch 'release/1.0.18'
Browse files Browse the repository at this point in the history
  • Loading branch information
Misplon committed Dec 14, 2017
2 parents aa72161 + 137d0cf commit 7391bdf
Show file tree
Hide file tree
Showing 7 changed files with 203 additions and 54 deletions.
3 changes: 3 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
== Changelog ==

= 1.0.18 - 14 December 2017 =
* Resolved WooCommerce PayPal logo issue impacting child themes.

= 1.0.17 - 26 November 2017 =
* Fixed featured image setting on single post page.
* Minor style fixes for menu mini-cart.
Expand Down
4 changes: 2 additions & 2 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function polestar_setup() {
/*
* Enable support for the custom logo.
*/
add_theme_support( 'custom-logo' );
add_theme_support( 'custom-logo' );

// This theme uses wp_nav_menu() in two locations.
register_nav_menus( array(
Expand Down Expand Up @@ -106,7 +106,7 @@ function polestar_content_width() {
add_action( 'after_setup_theme', 'polestar_content_width', 0 );

/**
* Register widget area.
* Register widget areas.
*
* @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar
*/
Expand Down
112 changes: 61 additions & 51 deletions header.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,70 +29,80 @@
<?php polestar_woocommerce_demo_store(); ?>
</div><!-- #topbar -->
<?php endif; ?>

<header id="masthead" class="site-header<?php if ( get_theme_mod( 'header_layout' ) == 'centered' ) echo ' centered'; if ( get_theme_mod( 'sticky_header', true ) ) echo ' sticky'; if ( get_theme_mod( 'tagline' ) && get_bloginfo( 'description' ) ) echo ' tagline'; if ( get_theme_mod( 'mobile_menu', true ) ) echo ' mobile-menu'; ?>" <?php if ( get_theme_mod( 'sticky_header_scaling' ) ) echo 'data-scale-logo="true"' ?> >

<div class="polestar-container">

<div class="site-header-inner">

<div class="site-branding">
<?php polestar_display_logo(); ?>
</div><!-- .site-branding -->

<nav id="site-navigation" class="main-navigation">
<?php if ( is_active_sidebar( 'sidebar-header' ) ) : ?>
<?php $polestar_header_sidebars = wp_get_sidebars_widgets(); ?>
<div class="widgets widgets-<?php echo count( $polestar_header_sidebars['sidebar-header'] ) ?>" aria-label="<?php esc_attr_e( 'Header Widgets', 'polestar' ); ?>">
<?php dynamic_sidebar( 'sidebar-header' ); ?>
</div>
<?php else : ?>

<?php if ( puro_page_setting( 'layout' ) !== 'stripped' ) : ?>
<div class="site-header-inner">

<div class="site-branding">
<?php polestar_display_logo(); ?>
</div><!-- .site-branding -->

<?php $mega_menu_active = function_exists( 'ubermenu' ) || function_exists( 'max_mega_menu_is_enabled' ) && max_mega_menu_is_enabled( 'menu-1' ); ?>
<nav id="site-navigation" class="main-navigation">

<?php if ( get_theme_mod( 'mobile_menu', true ) && ! $mega_menu_active ) : ?>
<a href="#menu" id="mobile-menu-button">
<?php polestar_display_icon( 'menu' ); ?>
<span class="screen-reader-text"><?php esc_html_e( 'Menu', 'polestar' ); ?></span>
</a>
<?php endif; ?>

<?php if ( get_theme_mod( 'header_menu', true ) ) : ?>
<?php wp_nav_menu( array( 'theme_location' => 'menu-1', 'menu_id' => 'primary-menu' ) ); ?>
<?php endif; ?>
<?php if ( puro_page_setting( 'layout' ) !== 'stripped' ) : ?>

<?php $mega_menu_active = function_exists( 'ubermenu' ) || function_exists( 'max_mega_menu_is_enabled' ) && max_mega_menu_is_enabled( 'menu-1' ); ?>

<?php if ( get_theme_mod( 'mini_cart', false ) && ! $mega_menu_active ) polestar_mini_cart(); ?>
<?php if ( get_theme_mod( 'mobile_menu', true ) && ! $mega_menu_active ) : ?>
<a href="#menu" id="mobile-menu-button">
<?php polestar_display_icon( 'menu' ); ?>
<span class="screen-reader-text"><?php esc_html_e( 'Menu', 'polestar' ); ?></span>
</a>
<?php endif; ?>

<?php if ( get_theme_mod( 'header_menu', true ) ) : ?>
<?php wp_nav_menu( array( 'theme_location' => 'menu-1', 'menu_id' => 'primary-menu' ) ); ?>
<?php endif; ?>

<?php if ( get_theme_mod( 'mini_cart', false ) && ! $mega_menu_active ) polestar_mini_cart(); ?>

<?php if ( get_theme_mod( 'menu_search', true ) && ! $mega_menu_active ) : ?>
<button class="search-icon">
<label class="screen-reader-text"><?php esc_html_e( 'Open search bar', 'polestar' ); ?></label>
<?php polestar_display_icon( 'search' ); ?>
</button>
<?php endif; ?>

<?php if ( get_theme_mod( 'menu_search', true ) && ! $mega_menu_active ) : ?>
<button class="search-icon">
<label class="screen-reader-text"><?php esc_html_e( 'Open search bar', 'polestar' ); ?></label>
<?php polestar_display_icon( 'search' ); ?>
</button>
<?php endif; ?>

<?php if ( puro_page_setting( 'layout' ) == 'stripped' ) : ?>
<ul>
<li>
<a href="" class="stripped-backlink" onclick="window.history.go( -1 ); return false;">
<?php esc_html_e( 'Go back', 'polestar' ); ?>
</a>
</li>
</ul>
<?php endif; ?>

</nav><!-- #site-navigation -->

<?php if ( get_theme_mod( 'menu_search', true ) ) : ?>
<div id="header-search">
<div class="polestar-container">
<label for='s' class='screen-reader-text'><?php esc_html_e( 'Search for:', 'polestar' ); ?></label>
<?php get_search_form() ?>
<a id="close-search">
<span class="screen-reader-text"><?php esc_html_e( 'Close search bar', 'polestar' ); ?></span>
<?php polestar_display_icon( 'close' ); ?>
</a>
</div>
</div><!-- #header-search -->
<?php endif; ?>

<?php if ( puro_page_setting( 'layout' ) == 'stripped' ) : ?>
<ul>
<li>
<a href="" class="stripped-backlink" onclick="window.history.go( -1 ); return false;">
<?php esc_html_e( 'Go back', 'polestar' ); ?>
</a>
</li>
</ul>
<?php endif; ?>

</nav><!-- #site-navigation -->

<?php if ( get_theme_mod( 'menu_search', true ) ) : ?>
<div id="header-search">
<div class="polestar-container">
<label for='s' class='screen-reader-text'><?php esc_html_e( 'Search for:', 'polestar' ); ?></label>
<?php get_search_form() ?>
<a id="close-search">
<span class="screen-reader-text"><?php esc_html_e( 'Close search bar', 'polestar' ); ?></span>
<?php polestar_display_icon( 'close' ); ?>
</a>
</div>
</div><!-- #header-search -->
<?php endif; ?>

</div><!-- .site-header-inner -->
</div><!-- .site-header-inner -->

<?php endif; // is_active_sidebar ?>

</div><!-- .polestar-container -->

Expand Down
4 changes: 4 additions & 0 deletions sass/navigation/_menus.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
.main-navigation {
text-align: right;

&.widget_nav_menu {
text-align: initial;
}

> div {
display: inline-block;
Expand Down
70 changes: 70 additions & 0 deletions sass/site/_header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,76 @@
}
}
}

.widgets {
-ms-flex-align: center;
-webkit-align-items: center;
-webkit-box-align: center;
align-items: center;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
-webkit-justify-content: space-between;
justify-content: space-between;
width: 100%;

@media (max-width: 768px) {
flex-direction: column;
}

@for $i from 1 through 10 {
$margin: ($i - 1) * 2.75;
&.widgets-#{$i} .widget {
width: (100% - $margin) / $i;
}
}

.widget {
box-sizing: content-box;
margin: 0 2.75% 0 0;

&:last-of-type {
margin-right: 0;
}

@media (max-width: 768px) {
margin-bottom: 5%;
text-align: center;
width: 100% !important;

&:last-of-type {
margin-bottom: 0;
}
}

.widget-title {
font-size: 16px;
margin: 0 0 5px;

// Set the font size of elements below the widget title to 14px.
~ * {
font-size: 14px;
}
}

.textwidget {
font-size: 14px;
}

p:only-of-type,
p:last-of-type {
margin-bottom: 0;
}

ul {
margin-bottom: 0;
}

input[type="search"] {
font-size: 14px;
}
}
}
}

// Sticky header sentinel.
Expand Down
62 changes: 62 additions & 0 deletions style.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion woocommerce/template-tags.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ function polestar_woocommerce_description_title() {
* Add a consistent PayPal icon.
*/
function polestar_woocommerce_paypal_icon( $url ) {
return get_stylesheet_directory_uri() . '/woocommerce/images/paypal-icon.png';
return get_template_directory_uri() . '/woocommerce/images/paypal-icon.png';
}
endif;
add_filter( 'woocommerce_paypal_icon', 'polestar_woocommerce_paypal_icon' );
Expand Down

0 comments on commit 7391bdf

Please sign in to comment.