mirror of
https://github.com/woocommerce/storefront.git
synced 2025-10-04 14:11:16 +08:00
Integration with AJAX layered nav. closes #41
This commit is contained in:
parent
f88b9fe6cf
commit
6c88803dc0
8 changed files with 131 additions and 6 deletions
|
@ -61,6 +61,7 @@ module.exports = function( grunt ) {
|
|||
'inc/woocommerce/css/bookings.css': 'inc/woocommerce/css/bookings.scss',
|
||||
'inc/woocommerce/css/brands.css': 'inc/woocommerce/css/brands.scss',
|
||||
'inc/woocommerce/css/wishlists.css': 'inc/woocommerce/css/wishlists.scss',
|
||||
'inc/woocommerce/css/ajax-layered-nav.css': 'inc/woocommerce/css/ajax-layered-nav.scss',
|
||||
'inc/woocommerce/css/woocommerce.css': 'inc/woocommerce/css/woocommerce.scss'
|
||||
}]
|
||||
}
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
|
||||
=====
|
||||
|
||||
### *2014.10.16* - 1.1.0
|
||||
* **New** - Integration with AJAX Layered Navigation extension.
|
||||
|
||||
### *2014.10.15* - 1.0.3
|
||||
* **Fix** - Comment date link color.
|
||||
* **Fix** - Comment reply link color.
|
||||
|
|
1
inc/woocommerce/css/ajax-layered-nav.css
Normal file
1
inc/woocommerce/css/ajax-layered-nav.css
Normal file
|
@ -0,0 +1 @@
|
|||
.widget_layered_nav ul.colors li a{display:block}.widget_layered_nav ul.colors li .box{border:0;display:inline-block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;border-radius:.202em;height:1.618em;width:1.618em}.widget_layered_nav ul.colors li.chosen a{opacity:1}.widget_layered_nav ul.colors li.chosen a:hover{opacity:.5}.widget_layered_nav ul.checkboxes li input{margin-right:.618em}.widget_layered_nav ul.sizes li a{opacity:1}.widget_layered_nav ul.sizes li .size-filter{font-size:1em;height:1.618em;min-width:1.618em;text-align:center;line-height:1.618;background-color:#fff;border:0;opacity:.5;font-weight:700;border-radius:.202em}.widget_layered_nav ul.sizes li .size-filter:hover,.widget_layered_nav ul.sizes li.chosen .size-filter{opacity:1}.widget_layered_nav ul.sizes li.chosen .size-filter:hover{opacity:.5}.widget_layered_nav ul.checkboxes li.chosen:before,.widget_layered_nav ul.colors li.chosen:before,.widget_layered_nav ul.sizes li.chosen:before{display:none}.widget_layered_nav ul.checkboxes li.show-count a,.widget_layered_nav ul.colors li.show-count a,.widget_layered_nav ul.sizes li.show-count a{display:inline-block}.widget_layered_nav ul.checkboxes li.show-count .count,.widget_layered_nav ul.colors li.show-count .count,.widget_layered_nav ul.sizes li.show-count .count{float:right;line-height:1.618;font-size:1em}
|
107
inc/woocommerce/css/ajax-layered-nav.scss
Normal file
107
inc/woocommerce/css/ajax-layered-nav.scss
Normal file
|
@ -0,0 +1,107 @@
|
|||
/**
|
||||
* WooCommerce AJAX Layered Nav
|
||||
*/
|
||||
|
||||
/**
|
||||
* Imports
|
||||
*/
|
||||
@import 'bourbon';
|
||||
@import '../../../sass/modules/variables';
|
||||
@import '../../../sass/modules/mixins';
|
||||
@import '../../../sass/vendor/gridset';
|
||||
|
||||
.widget_layered_nav {
|
||||
ul.colors {
|
||||
li {
|
||||
a {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.box {
|
||||
border: 0;
|
||||
display: inline-block;
|
||||
@include box-sizing(border-box);
|
||||
border-radius: .202em;
|
||||
height: 1.618em;
|
||||
width: 1.618em;
|
||||
}
|
||||
|
||||
&.chosen {
|
||||
a {
|
||||
opacity: 1;
|
||||
|
||||
&:hover {
|
||||
opacity: 0.5;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ul.checkboxes {
|
||||
li {
|
||||
input {
|
||||
margin-right: .618em;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ul.sizes {
|
||||
li {
|
||||
a {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.size-filter {
|
||||
font-size: 1em;
|
||||
height: 1.618em;
|
||||
min-width: 1.618em;
|
||||
text-align: center;
|
||||
line-height: 1.618;
|
||||
background-color: #fff;
|
||||
border: 0;
|
||||
opacity: 0.5;
|
||||
font-weight: 700;
|
||||
border-radius: .202em;
|
||||
|
||||
&:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
&.chosen {
|
||||
.size-filter {
|
||||
opacity: 1;
|
||||
|
||||
&:hover {
|
||||
opacity: 0.5;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ul.colors,
|
||||
ul.checkboxes,
|
||||
ul.sizes {
|
||||
li {
|
||||
&.chosen {
|
||||
&:before {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
&.show-count {
|
||||
a {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.count {
|
||||
float: right;
|
||||
line-height: 1.618;
|
||||
font-size: 1em;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -59,4 +59,12 @@ add_filter( 'add_to_cart_fragments', 'storefront_cart_link_fragment' );
|
|||
add_filter( 'woocommerce_product_thumbnails_columns', 'storefront_thumbnail_columns' );
|
||||
add_filter( 'woocommerce_output_related_products_args', 'storefront_related_products_args' );
|
||||
add_filter( 'loop_shop_per_page', 'storefront_products_per_page' );
|
||||
add_filter( 'loop_shop_columns', 'storefront_loop_columns' );
|
||||
add_filter( 'loop_shop_columns', 'storefront_loop_columns' );
|
||||
|
||||
/**
|
||||
* Integrations
|
||||
* @see storefront_woocommerce_integrations_scripts()
|
||||
* @see storefront_add_bookings_customizer_css()
|
||||
*/
|
||||
add_action( 'wp_enqueue_scripts', 'storefront_woocommerce_integrations_scripts' );
|
||||
add_action( 'wp_head', 'storefront_add_bookings_customizer_css' );
|
|
@ -30,8 +30,14 @@ function storefront_woocommerce_integrations_scripts() {
|
|||
if ( class_exists( 'WC_Wishlists_Wishlist' ) ) {
|
||||
wp_enqueue_style( 'storefront-woocommerce-wishlists-style', get_template_directory_uri() . '/inc/woocommerce/css/wishlists.css' );
|
||||
}
|
||||
|
||||
/**
|
||||
* AJAX Layered Nav
|
||||
*/
|
||||
if ( class_exists( 'SOD_Widget_Ajax_Layered_Nav' ) ) {
|
||||
wp_enqueue_style( 'storefront-woocommerce-ajax-layered-nav-style', get_template_directory_uri() . '/inc/woocommerce/css/ajax-layered-nav.css' );
|
||||
}
|
||||
}
|
||||
add_action( 'wp_enqueue_scripts', 'storefront_woocommerce_integrations_scripts' );
|
||||
|
||||
/**
|
||||
* Add CSS in <head> for integration styles handled by the theme customizer
|
||||
|
@ -76,5 +82,4 @@ if ( ! function_exists( 'storefront_add_bookings_customizer_css' ) ) {
|
|||
</style>
|
||||
<?php }
|
||||
}
|
||||
}
|
||||
add_action( 'wp_head', 'storefront_add_bookings_customizer_css' );
|
||||
}
|
|
@ -4,7 +4,7 @@ Theme URI: http://woothemes.com/storefront
|
|||
Author: WooThemes
|
||||
Author URI: http://woothemes.com
|
||||
Description: Storefront is the perfect theme for your next eCommerce project. Designed and developed by WooThemes, it features a deep integration with our market leading WooCommerce plugin, several layout & color options to personalise your shop, multiple widget regions, a responsive design and much more. Developers will love it's lean and extensible codebase making it a joy to customise and extend.
|
||||
Version: 1.0.3
|
||||
Version: 1.1.0
|
||||
License: GNU General Public License v2 or later
|
||||
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
Text Domain: storefront
|
||||
|
|
|
@ -4,7 +4,7 @@ Theme URI: http://woothemes.com/storefront
|
|||
Author: WooThemes
|
||||
Author URI: http://woothemes.com
|
||||
Description: Storefront is the perfect theme for your next eCommerce project. Designed and developed by WooThemes, it features a deep integration with our market leading WooCommerce plugin, several layout & color options to personalise your shop, multiple widget regions, a responsive design and much more. Developers will love it's lean and extensible codebase making it a joy to customise and extend.
|
||||
Version: 1.0.3
|
||||
Version: 1.1.0
|
||||
License: GNU General Public License v2 or later
|
||||
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
Text Domain: storefront
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue