├── .gitignore ├── .jshintrc ├── Gruntfile.js ├── assets └── js │ ├── storechild.js │ └── storechild.min.js ├── changelog.txt ├── functions.php ├── inc ├── class-storechild-customizer.php ├── class-storechild-integrations.php ├── class-storechild.php ├── plugged.php ├── storechild-template-functions.php └── storechild-template-hooks.php ├── package.json ├── readme.md ├── screenshot.png ├── style-rtl.css ├── style.css ├── style.scss └── theme_info.txt /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | 3 | # Sass 4 | .sass-cache 5 | 6 | # Grunt 7 | /node_modules/ 8 | npm-debug.log -------------------------------------------------------------------------------- /.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "boss": true, 3 | "curly": true, 4 | "eqeqeq": true, 5 | "eqnull": true, 6 | "es3": true, 7 | "expr": true, 8 | "immed": true, 9 | "noarg": true, 10 | "onevar": true, 11 | "quotmark": "single", 12 | "trailing": true, 13 | "undef": true, 14 | "unused": true, 15 | 16 | "browser": true, 17 | 18 | "globals": { 19 | "_": false, 20 | "Backbone": false, 21 | "jQuery": false, 22 | "wp": false 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Gruntfile.js: -------------------------------------------------------------------------------- 1 | /* jshint node:true */ 2 | module.exports = function( grunt ) { 3 | 'use strict'; 4 | 5 | grunt.initConfig({ 6 | 7 | // JavaScript linting with JSHint. 8 | jshint: { 9 | options: { 10 | jshintrc: '.jshintrc' 11 | }, 12 | all: [ 13 | 'Gruntfile.js', 14 | 'assets/js/*.js', 15 | '!assets/js/*.min.js' 16 | ] 17 | }, 18 | 19 | // Minify .js files. 20 | uglify: { 21 | options: { 22 | preserveComments: 'some' 23 | }, 24 | main: { 25 | files: [{ 26 | expand: true, 27 | cwd: 'assets/js/', 28 | src: [ 29 | '*.js', 30 | '!*.min.js' 31 | ], 32 | dest: 'assets/js/', 33 | ext: '.min.js' 34 | }] 35 | } 36 | }, 37 | 38 | // Compile all .scss files. 39 | sass: { 40 | dist: { 41 | options: { 42 | require: 'susy', 43 | sourcemap: 'none', 44 | includePaths: ['node_modules/susy/sass'].concat( require( 'node-bourbon' ).includePaths ) 45 | }, 46 | files: [{ 47 | 'style.css': 'style.scss' 48 | }] 49 | } 50 | }, 51 | 52 | // Watch changes for assets. 53 | watch: { 54 | css: { 55 | files: [ 56 | 'style.scss' 57 | ], 58 | tasks: [ 59 | 'sass' 60 | ] 61 | } 62 | }, 63 | 64 | // RTLCSS 65 | rtlcss: { 66 | options: { 67 | config: { 68 | swapLeftRightInUrl: false, 69 | swapLtrRtlInUrl: false, 70 | autoRename: false, 71 | preserveDirectives: true 72 | } 73 | }, 74 | main: { 75 | expand: true, 76 | ext: '-rtl.css', 77 | src: [ 78 | 'style.css' 79 | ] 80 | } 81 | }, 82 | 83 | // makepot 84 | makepot: { 85 | target: { 86 | options: { 87 | domainPath: '/languages', 88 | type: 'wp-theme', 89 | } 90 | } 91 | } 92 | }); 93 | 94 | // Load NPM tasks to be used here 95 | grunt.loadNpmTasks( 'grunt-contrib-jshint' ); 96 | grunt.loadNpmTasks( 'grunt-contrib-uglify' ); 97 | grunt.loadNpmTasks( 'grunt-sass' ); 98 | grunt.loadNpmTasks( 'grunt-contrib-watch' ); 99 | grunt.loadNpmTasks( 'grunt-rtlcss' ); 100 | grunt.loadNpmTasks( 'grunt-wp-i18n' ); 101 | 102 | // Register tasks 103 | grunt.registerTask( 'default', [ 104 | 'css', 105 | 'jshint', 106 | 'uglify' 107 | ]); 108 | 109 | grunt.registerTask( 'css', [ 110 | 'sass', 111 | 'rtlcss' 112 | ] ); 113 | }; -------------------------------------------------------------------------------- /assets/js/storechild.js: -------------------------------------------------------------------------------- 1 | /* storechild.js */ 2 | 3 | (function() { 4 | 5 | }).call( this ); -------------------------------------------------------------------------------- /assets/js/storechild.min.js: -------------------------------------------------------------------------------- 1 | (function(){}).call(this); -------------------------------------------------------------------------------- /changelog.txt: -------------------------------------------------------------------------------- 1 | *** Storechild Changelog *** 2 | 3 | 20XX.XX.XX - version 1.0.0 4 | * Initial release. -------------------------------------------------------------------------------- /functions.php: -------------------------------------------------------------------------------- 1 | get_setting( 'storefront_header_text_color' )->transport = 'refresh'; 55 | } 56 | 57 | /** 58 | * Add CSS using settings obtained from the theme options. 59 | * 60 | * @return void 61 | */ 62 | public function add_customizer_css() { 63 | $header_text_color = get_theme_mod( 'storefront_header_text_color' ); 64 | 65 | $style = ' 66 | .site-header { 67 | color: ' . $header_text_color . '; 68 | }'; 69 | 70 | wp_add_inline_style( 'storefront-child-style', $style ); 71 | } 72 | } 73 | } 74 | 75 | return new Storechild_Customizer(); 76 | -------------------------------------------------------------------------------- /inc/class-storechild-integrations.php: -------------------------------------------------------------------------------- 1 | remove_control( 'sd_header_layout' ); 42 | $wp_customize->remove_control( 'sd_button_flat' ); 43 | $wp_customize->remove_control( 'sd_button_shadows' ); 44 | $wp_customize->remove_control( 'sd_button_background_style' ); 45 | $wp_customize->remove_control( 'sd_button_rounded' ); 46 | $wp_customize->remove_control( 'sd_button_size' ); 47 | $wp_customize->remove_control( 'sd_header_layout_divider_after' ); 48 | $wp_customize->remove_control( 'sd_button_divider_1' ); 49 | $wp_customize->remove_control( 'sd_button_divider_2' ); 50 | } 51 | } 52 | } 53 | 54 | return new Storechild_Integrations(); 55 | -------------------------------------------------------------------------------- /inc/class-storechild.php: -------------------------------------------------------------------------------- 1 | 'Alegreya:400,400italic,700,900', 58 | 'alegreya-sans' => 'Alegreya+Sans:400,400italic,700,900', 59 | ); 60 | 61 | return $fonts; 62 | } 63 | } 64 | } 65 | 66 | return new Storechild(); 67 | -------------------------------------------------------------------------------- /inc/plugged.php: -------------------------------------------------------------------------------- 1 | =0.10.0", 12 | "npm": ">=1.1.0" 13 | }, 14 | "devDependencies": { 15 | "grunt": "~0.4.5", 16 | "grunt-contrib-jshint": "^0.11.2", 17 | "grunt-contrib-uglify": "~0.9.1", 18 | "grunt-contrib-watch": "~0.6.1", 19 | "grunt-wp-i18n": "^0.5.2", 20 | "grunt-rtlcss": "~1.6.0", 21 | "grunt-sass": "^1.0.0", 22 | "node-sass": "^3.2.0", 23 | "susy": "^2.2.5", 24 | "node-bourbon": "~4.2.3" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | ## Storechild 2 | 3 | Child theme starter for [Storefront](https://www.woothemes.com/storefront/). 4 | 5 | --- 6 | 7 | The following things are configured in the child theme: 8 | 9 | * Script loading 10 | * Frontend JavaScript detection 11 | * Default values / Initial configuration of Storechild and it's integrations with the Storefront Extensions. 12 | * Child theme Javascript file 13 | 14 | ### Default Storefront and Extension values 15 | 16 | Storechild filters `storefront_setting_default_values` to set some defaults for you in the customizer. See `Storechild_Customizer::storechild_defaults()` and use it as an example to set defaults for any settings you want 17 | to change. 18 | 19 | ### Grunt 20 | Storechild uses [Grunt](http://gruntjs.com/) to fulfill various tasks such as; 21 | 22 | * Sass compilation into CSS 23 | * RTL CSS generation 24 | * Javascript minification + linting 25 | * .pot file generation 26 | 27 | This can all be done automatically using the `watch` task. `cd` into the `storechild` directory in terminal then run 28 | `grunt watch`. This will monitor the files in the theme and compile / minify etc as and when they're modified. Remember 29 | to install the project dependencies first with `npm install`. 30 | 31 | #### New to Grunt? 32 | There's a great getting started guide on the [Grunt web site](http://gruntjs.com/getting-started). You will also need 33 | install [Node](https://nodejs.org/) if you haven't already. There's information on how to do that [here](https://docs.npmjs.com/getting-started/installing-node). -------------------------------------------------------------------------------- /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woocommerce/storechild/e00d2521318d128803ee5820470512869b07b178/screenshot.png -------------------------------------------------------------------------------- /style-rtl.css: -------------------------------------------------------------------------------- 1 | /* 2 | Theme Name: Storechild 3 | Theme URI: http://www.woothemes.com/products/storechild/ 4 | Description: A storefront child theme starter. 5 | Author: WooThemes 6 | Author URI: http://woothemes.com 7 | Template: storefront 8 | Version: 1.0.0 9 | License: GNU General Public License v2 or later 10 | License URI: http://www.gnu.org/licenses/gpl-2.0.html 11 | Tags: light, dark, two-columns, right-sidebar, left-sidebar, responsive-layout, accessibility-ready 12 | Text Domain: storechild 13 | */ 14 | body, 15 | button, 16 | input, 17 | select, 18 | textarea { 19 | font-family: "Alegreya", serif; } 20 | 21 | h1, 22 | h2, 23 | h3, 24 | h4, 25 | h5, 26 | h6 { 27 | font-family: "Alegreya Sans", sans-serif; 28 | font-weight: 900; } 29 | -------------------------------------------------------------------------------- /style.css: -------------------------------------------------------------------------------- 1 | /* 2 | Theme Name: Storechild 3 | Theme URI: http://www.woothemes.com/products/storechild/ 4 | Description: A storefront child theme starter. 5 | Author: WooThemes 6 | Author URI: http://woothemes.com 7 | Template: storefront 8 | Version: 1.0.0 9 | License: GNU General Public License v2 or later 10 | License URI: http://www.gnu.org/licenses/gpl-2.0.html 11 | Tags: light, dark, two-columns, right-sidebar, left-sidebar, responsive-layout, accessibility-ready 12 | Text Domain: storechild 13 | */ 14 | body, 15 | button, 16 | input, 17 | select, 18 | textarea { 19 | font-family: "Alegreya", serif; } 20 | 21 | h1, 22 | h2, 23 | h3, 24 | h4, 25 | h5, 26 | h6 { 27 | font-family: "Alegreya Sans", sans-serif; 28 | font-weight: 900; } 29 | -------------------------------------------------------------------------------- /style.scss: -------------------------------------------------------------------------------- 1 | /* 2 | Theme Name: Storechild 3 | Theme URI: http://www.woothemes.com/products/storechild/ 4 | Description: A storefront child theme starter. 5 | Author: WooThemes 6 | Author URI: http://woothemes.com 7 | Template: storefront 8 | Version: 1.0.0 9 | License: GNU General Public License v2 or later 10 | License URI: http://www.gnu.org/licenses/gpl-2.0.html 11 | Tags: light, dark, two-columns, right-sidebar, left-sidebar, responsive-layout, accessibility-ready 12 | Text Domain: storechild 13 | */ 14 | 15 | @import 'bourbon'; 16 | @import 'susy'; 17 | @import '../storefront/assets/sass/utils/variables'; 18 | @import '../storefront/assets/sass/vendors/font-awesome/variables'; 19 | @import '../storefront/assets/sass/vendors/font-awesome/mixins'; 20 | 21 | $font_headings: 'Alegreya Sans', sans-serif; 22 | $font_body: 'Alegreya', serif; 23 | 24 | body, 25 | button, 26 | input, 27 | select, 28 | textarea { 29 | font-family: $font_body; 30 | } 31 | 32 | h1, 33 | h2, 34 | h3, 35 | h4, 36 | h5, 37 | h6 { 38 | font-family: $font_headings; 39 | font-weight: 900; 40 | } -------------------------------------------------------------------------------- /theme_info.txt: -------------------------------------------------------------------------------- 1 | 887931 2 | 2429c1dde521031cd053886b15844bbf 3 | storechild/style.css --------------------------------------------------------------------------------