some dev ^^

This commit is contained in:
James Koster 2014-08-28 18:25:08 +01:00
parent 1e0515155e
commit fa49cfb9a9
15 changed files with 456 additions and 372 deletions

View file

@ -88,5 +88,5 @@ get_header(); ?>
</main><!-- #main -->
</section><!-- #primary -->
<?php get_sidebar(); ?>
<?php do_action( 'storefront_sidebar' ); ?>
<?php get_footer(); ?>

View file

@ -462,28 +462,6 @@
"outputStyle": 1,
"syntaxCheckerStyle": 1
},
"\/js\/modernizr.js": {
"fileType": 64,
"ignore": 0,
"ignoreWasSetByUser": 0,
"inputAbbreviatedPath": "\/js\/modernizr.js",
"outputAbbreviatedPath": "\/js\/min\/modernizr-min.js",
"outputPathIsOutsideProject": 0,
"outputPathIsSetByUser": 0,
"outputStyle": 1,
"syntaxCheckerStyle": 1
},
"\/js\/modernizr.min.js": {
"fileType": 64,
"ignore": 0,
"ignoreWasSetByUser": 0,
"inputAbbreviatedPath": "\/js\/modernizr.min.js",
"outputAbbreviatedPath": "\/js\/min\/modernizr.min-min.js",
"outputPathIsOutsideProject": 0,
"outputPathIsSetByUser": 0,
"outputStyle": 1,
"syntaxCheckerStyle": 1
},
"\/js\/navigation.js": {
"fileType": 64,
"ignore": 0,

View file

@ -29,6 +29,7 @@ if ( ! function_exists( 'storefront_customize_register' ) ) {
'label' => 'Link / accent color',
'section' => 'colors',
'settings' => 'storefront_accent_color',
'priority' => 20,
) ) );
/**
@ -43,6 +44,7 @@ if ( ! function_exists( 'storefront_customize_register' ) ) {
'label' => 'Text color',
'section' => 'colors',
'settings' => 'storefront_text_color',
'priority' => 30,
) ) );
/**
@ -57,6 +59,7 @@ if ( ! function_exists( 'storefront_customize_register' ) ) {
'label' => 'Heading color',
'section' => 'colors',
'settings' => 'storefront_heading_color',
'priority' => 40,
) ) );
/**
@ -129,6 +132,7 @@ if ( ! function_exists( 'storefront_customize_register' ) ) {
'label' => 'Background color',
'section' => 'storefront_buttons',
'settings' => 'storefront_button_background_color',
'priority' => 10,
) ) );
/**
@ -143,6 +147,7 @@ if ( ! function_exists( 'storefront_customize_register' ) ) {
'label' => 'Text color',
'section' => 'storefront_buttons',
'settings' => 'storefront_button_text_color',
'priority' => 20,
) ) );
/**
@ -157,6 +162,7 @@ if ( ! function_exists( 'storefront_customize_register' ) ) {
'label' => 'Alternate button background color',
'section' => 'storefront_buttons',
'settings' => 'storefront_button_alt_background_color',
'priority' => 30,
) ) );
/**
@ -171,6 +177,7 @@ if ( ! function_exists( 'storefront_customize_register' ) ) {
'label' => 'Alternate button text color',
'section' => 'storefront_buttons',
'settings' => 'storefront_button_alt_text_color',
'priority' => 40,
) ) );
/**
@ -247,13 +254,13 @@ if ( ! function_exists( 'storefront_add_customizer_css' ) ) {
$heading_color = storefront_sanitize_hex_color( get_theme_mod( 'storefront_heading_color' ) );
$button_background_color = storefront_sanitize_hex_color( get_theme_mod( 'storefront_button_background_color' ) );
$button_text_color = storefront_sanitize_hex_color( get_theme_mod( 'storefront_button_text_color' ) );
$alt_button_background_color = storefront_sanitize_hex_color( get_theme_mod( 'storefront_button_alt_background_color' ) );
$alt_button_text_color = storefront_sanitize_hex_color( get_theme_mod( 'storefront_button_alt_text_color' ) );
$button_alt_background_color = storefront_sanitize_hex_color( get_theme_mod( 'storefront_button_alt_background_color' ) );
$button_alt_text_color = storefront_sanitize_hex_color( get_theme_mod( 'storefront_button_alt_text_color' ) );
$brighten_factor = apply_filters( 'wcheme_brighten_factor', 25 );
$brighten_factor = apply_filters( 'storefront_brighten_factor', 25 );
$darken_factor = apply_filters( 'storefront_darken_factor', -25 );
?>
<!-- column customizer CSS -->
<!-- storefront customizer CSS -->
<style>
<?php if ( isset( $$accent_color ) ) { ?>
@ -343,13 +350,13 @@ if ( ! function_exists( 'storefront_add_customizer_css' ) ) {
}
button.alt, input[type="button"].alt, input[type="reset"].alt, input[type="submit"].alt, .button.alt, .added_to_cart.alt, .widget-area .widget a.button.alt, .added_to_cart {
background-color: <?php echo $alt_button_background_color; ?>;
color: <?php echo $alt_button_text_color; ?>;
background-color: <?php echo $button_alt_background_color; ?>;
color: <?php echo $button_alt_text_color; ?>;
}
button.alt:hover, input[type="button"].alt:hover, input[type="reset"].alt:hover, input[type="submit"].alt:hover, .button.alt:hover, .added_to_cart.alt:hover, .widget-area .widget a.button.alt:hover, .added_to_cart:hover {
background-color: <?php echo storefront_adjust_color_brightness( $alt_button_background_color, $darken_factor ); ?>;
color: <?php echo $alt_button_text_color; ?>;
background-color: <?php echo storefront_adjust_color_brightness( $button_alt_background_color, $darken_factor ); ?>;
color: <?php echo $button_alt_text_color; ?>;
}
@media screen and ( min-width: 768px ) {

View file

@ -62,7 +62,7 @@ function storefront_setup() {
// Setup the WordPress core custom background feature.
add_theme_support( 'custom-background', apply_filters( 'storefront_custom_background_args', array(
'default-color' => 'fcfcfc',
'default-color' => apply_filters( 'storefront_default_background_color', 'fcfcfc' ),
'default-image' => '',
) ) );

View file

@ -11,11 +11,14 @@
* @see storefront_widgets_init()
* @see storefront_scripts()
* @see storefront_header_widget_region()
* @see storefront_get_sidebar()
*/
add_action( 'after_setup_theme', 'storefront_setup' );
add_action( 'widgets_init', 'storefront_widgets_init' );
add_action( 'wp_enqueue_scripts', 'storefront_scripts', 10 );
add_action( 'storefront_before_content', 'storefront_header_widget_region', 10 );
remove_action( 'woocommerce_sidebar', 'woocommerce_get_sidebar', 10 );
add_action( 'storefront_sidebar', 'storefront_get_sidebar', 10 );
/**
* Header

View file

@ -155,4 +155,15 @@ if ( ! function_exists( 'storefront_social_icons' ) ) {
echo '</div>';
}
}
}
if ( ! function_exists( 'storefront_get_sidebar' ) ) {
/**
* Display storefront sidebar
* @uses get_sidebar()
* @since 1.0.0
*/
function storefront_get_sidebar() {
get_sidebar();
}
}

View file

@ -806,8 +806,15 @@ dl.variation {
/**
* Full width content area product layout
*/
.page-template-template-fullwidth-php .site-main .columns-1 ul.products li.product,
.page-template-template-homepage-php .site-main .columns-1 ul.products li.product,
.storefront-full-width-content .site-main .columns-1 ul.products li.product {
width: 100%;
margin-right: 0;
float: none; }
.page-template-template-fullwidth-php .site-main .columns-2 ul.products li.product,
.page-template-template-homepage-php .site-main .columns-2 ul.products li.product {
.page-template-template-homepage-php .site-main .columns-2 ul.products li.product,
.storefront-full-width-content .site-main .columns-2 ul.products li.product {
display: block;
float: left;
margin-left: 0;
@ -818,7 +825,8 @@ dl.variation {
margin-left: 0;
margin-right: 4%; }
.page-template-template-fullwidth-php .site-main .columns-3 ul.products li.product,
.page-template-template-homepage-php .site-main .columns-3 ul.products li.product {
.page-template-template-homepage-php .site-main .columns-3 ul.products li.product,
.storefront-full-width-content .site-main .columns-3 ul.products li.product {
display: block;
float: left;
margin-left: 0;
@ -829,7 +837,8 @@ dl.variation {
margin-left: 0;
margin-right: 4%; }
.page-template-template-fullwidth-php .site-main .columns-4 ul.products li.product,
.page-template-template-homepage-php .site-main .columns-4 ul.products li.product {
.page-template-template-homepage-php .site-main .columns-4 ul.products li.product,
.storefront-full-width-content .site-main .columns-4 ul.products li.product {
display: block;
float: left;
margin-left: 0;
@ -839,10 +848,22 @@ dl.variation {
float: left;
margin-left: 0;
margin-right: 4%; }
.page-template-template-fullwidth-php .site-main .columns-5 ul.products li.product,
.page-template-template-homepage-php .site-main .columns-5 ul.products li.product,
.storefront-full-width-content .site-main .columns-5 ul.products li.product {
width: 16.9%;
margin-right: 3.8%; }
/**
* Main content area (adjacent to sidebar) product layout
*/
.site-main .columns-1 ul.products li.product {
width: 100%;
margin-right: 0;
float: none; }
.site-main .columns-2 ul.products li.product {
width: 48%;
margin-right: 3.8%; }
.site-main .columns-3 ul.products li.product {
display: block;
float: left;
@ -854,6 +875,12 @@ dl.variation {
margin-left: 0;
margin-right: 4%;
margin-right: 5.40541%; }
.site-main .columns-4 ul.products li.product {
width: 22.05%;
margin-right: 3.8%; }
.site-main .columns-5 ul.products li.product {
width: 16.9%;
margin-right: 3.8%; }
.site-main ul.products li.product {
display: block;
float: left;
@ -909,6 +936,57 @@ dl.variation {
.single-product div.product .woocommerce-tabs {
clear: both; }
.storefront-full-width-content.single-product div.product .images {
display: block;
float: left;
margin-left: 0;
margin-right: -100%;
width: 30.66667%;
clear: none;
float: left;
margin-left: 0;
margin-right: 4%;
margin-right: 4%;
margin-bottom: 3.631em; }
.storefront-full-width-content.single-product div.product .images .thumbnails a.zoom {
display: block;
float: left;
margin-left: 0;
margin-right: -100%;
width: 15.21739%;
clear: none;
float: left;
margin-left: 0;
margin-right: 4%;
margin-right: 13.04348%; }
.storefront-full-width-content.single-product div.product .images .thumbnails a.zoom.last {
margin-right: 0; }
.storefront-full-width-content.single-product div.product .summary {
display: block;
float: left;
margin-left: 34.66667%;
margin-right: -100%;
width: 65.33333%;
clear: none;
float: left;
margin-left: 0;
margin-right: 4%;
margin-right: 0;
margin-bottom: 3.631em; }
.storefront-full-width-content.single-product div.product .woocommerce-tabs {
clear: both; }
.storefront-full-width-content.single-product .related ul.products li.product,
.storefront-full-width-content.single-product .upsells ul.products li.product {
display: block;
float: left;
margin-left: 0;
margin-right: -100%;
width: 30.66667%;
clear: none;
float: left;
margin-left: 0;
margin-right: 4%; }
.woocommerce .page-description {
display: block;
float: left;
@ -1235,6 +1313,30 @@ dl.variation {
margin-left: 0;
margin-right: 4%; }
.storefront-full-width-content .woocommerce-tabs ul.tabs {
display: block;
float: left;
margin-left: 0;
margin-right: -100%;
width: 30.66667%;
clear: none;
float: left;
margin-left: 0;
margin-right: 4%;
margin-right: 4%; }
.storefront-full-width-content .woocommerce-tabs .panel {
display: block;
float: left;
margin-left: 34.66667%;
margin-right: -100%;
width: 65.33333%;
clear: none;
float: left;
margin-left: 0;
margin-right: 4%;
margin-right: 0;
margin-bottom: 3.631em; }
.woocommerce-tabs {
margin-bottom: 2.618em;
padding-top: 2.618em;

View file

@ -1159,8 +1159,19 @@ dl.variation {
* Full width content area product layout
*/
.page-template-template-fullwidth-php,
.page-template-template-homepage-php {
.page-template-template-homepage-php,
.storefront-full-width-content {
.site-main {
.columns-1 {
ul.products {
li.product {
width: 100%;
margin-right: 0;
float: none;
}
}
}
.columns-2 {
ul.products {
li.product {
@ -1187,6 +1198,16 @@ dl.variation {
}
}
}
// The grid wont work for 5 columns :-(
.columns-5 {
ul.products {
li.product {
width: 16.9%;
margin-right: 3.8%;
}
}
}
}
}
@ -1194,6 +1215,26 @@ dl.variation {
* Main content area (adjacent to sidebar) product layout
*/
.site-main {
.columns-1 {
ul.products {
li.product {
width: 100%;
margin-right: 0;
float: none;
}
}
}
// The grid wont work for 2 columns :-(
.columns-2 {
ul.products {
li.product {
width: 48%;
margin-right: 3.8%;
}
}
}
.columns-3 {
ul.products {
li.product {
@ -1204,6 +1245,26 @@ dl.variation {
}
}
// The grid wont work for 4 columns :-(
.columns-4 {
ul.products {
li.product {
width: 22.05%;
margin-right: 3.8%;
}
}
}
// The grid wont work for 5 columns :-(
.columns-5 {
ul.products {
li.product {
width: 16.9%;
margin-right: 3.8%;
}
}
}
ul.products {
li.product {
@include gs-span(c, 1, 3, (1, 9));
@ -1250,6 +1311,51 @@ dl.variation {
}
}
// Full width single product
.storefront-full-width-content.single-product {
div.product {
.images {
@include gs-span(c, 1, 4);
@include gs-float(c, left);
margin-right: gs-gutter(c, false, true);
margin-bottom: 3.631em;
.thumbnails {
a.zoom {
@include gs-span(c, 1, 1, (1, 4));
@include gs-float(c, left);
margin-right: gs-adjust(c, gs-gutter(c), (1, 4), true);
&.last {
margin-right: 0;
}
}
}
}
.summary {
@include gs-span(c, 5, 12);
@include gs-float(c, left);
margin-right: 0;
margin-bottom: 3.631em;
}
.woocommerce-tabs {
clear: both;
}
}
.related,
.upsells {
ul.products {
li.product {
@include gs-span(c, 1, 4); // This specifies the columns
@include gs-float(c, left); // This specifies to float this column left
}
}
}
}
.woocommerce .page-description {
@include gs-span(c, 1, 6, (1, 9));
@include gs-float(c, left);
@ -1508,6 +1614,23 @@ dl.variation {
}
}
.storefront-full-width-content {
.woocommerce-tabs {
ul.tabs {
@include gs-span(c, 1, 4);
@include gs-float(c, left);
margin-right: gs-gutter(c, false, true);
}
.panel {
@include gs-span(c, 5, 12);
@include gs-float(c, left);
margin-right: 0;
margin-bottom: 3.631em;
}
}
}
.woocommerce-tabs {
@include clearfix;
margin-bottom: 2.618em;

View file

@ -32,7 +32,7 @@ if ( ! function_exists( 'storefront_after_content' ) ) {
</main><!-- #main -->
</div><!-- #primary -->
<?php get_sidebar();
<?php do_action( 'storefront_sidebar' );
}
}
@ -42,7 +42,7 @@ if ( ! function_exists( 'storefront_after_content' ) ) {
* @since 1.0.0
*/
function storefront_loop_columns() {
return 3; // 3 products per row
return apply_filters( 'storefront_loop_columns', 3 ); // 3 products per row
}
/**
@ -116,7 +116,7 @@ function storefront_thumbnail_columns() {
* @since 1.0.0
*/
function storefront_products_per_page() {
return 12;
return apply_filters( 'storefront_products_per_page', 12 );
}
/**

View file

@ -29,5 +29,5 @@ get_header(); ?>
</main><!-- #main -->
</div><!-- #primary -->
<?php get_sidebar(); ?>
<?php do_action( 'storefront_sidebar' ); ?>
<?php get_footer(); ?>

View file

@ -35,5 +35,5 @@ get_header(); ?>
</main><!-- #main -->
</div><!-- #primary -->
<?php get_sidebar(); ?>
<?php do_action( 'storefront_sidebar' ); ?>
<?php get_footer(); ?>

View file

@ -129,6 +129,14 @@
}
}
.storefront-full-width-content {
.content-area {
margin-left: 0;
margin-right: 0;
width: 100%;
}
}
.content-area,
.widget-area {
margin-bottom: 2.618em;

View file

@ -27,5 +27,5 @@ get_header(); ?>
</main><!-- #main -->
</section><!-- #primary -->
<?php get_sidebar(); ?>
<?php do_action( 'storefront_sidebar' ); ?>
<?php get_footer(); ?>

View file

@ -28,5 +28,5 @@ get_header(); ?>
</main><!-- #main -->
</div><!-- #primary -->
<?php get_sidebar(); ?>
<?php do_action( 'storefront_sidebar' ); ?>
<?php get_footer(); ?>

510
style.css

File diff suppressed because it is too large Load diff