Тема сайта КРИЛ
Go to file
koenemann 3652f71632 Merge remote-tracking branch 'origin/master'
# Conflicts:
#	css/child-theme.min.css
2016-06-24 08:13:29 +02:00
css Merge remote-tracking branch 'origin/master' 2016-06-24 08:13:29 +02:00
fonts Updating dependencies and recompile 2016-06-24 08:12:53 +02:00
js Adding slider_settings.js to child theme too 2016-06-02 16:19:57 +02:00
sass Load child theme variable sat first so that they overwrites anything else if necessary 2016-05-25 20:04:25 +02:00
src Merge remote-tracking branch 'origin/master' 2016-06-24 08:13:29 +02:00
.gitignore Adding infos to read about renaming the parent zip folder 2016-05-17 18:25:27 +02:00
bower.json Updating dependencies and recompile 2016-06-24 08:12:53 +02:00
functions.php Adding slider_settings.js to child theme too 2016-06-02 16:19:57 +02:00
gulpfile.js Updating dependencies and recompile 2016-06-24 08:12:53 +02:00
package.json Updating dependencies and recompile 2016-06-24 08:12:53 +02:00
README.md Adding infos to read about renaming the parent zip folder 2016-05-17 18:25:27 +02:00
screenshot.png revert to last version 2016-03-23 10:18:13 +01:00
style.css Switch to BS4 and recompile 2016-04-29 09:04:49 +02:00

understrap-child

Basic Child Theme for UnderStrap Theme Framework: https://github.com/holger1411/understrap

How it works

It shares with the parent theme all PHP files and adds its own functions.php on top of the UnderStrap parent themes functions.php.

IT DIT NOT LOAD THE PARENT THEMES CSS FILE(S)! Instead it uses the UnderStrap Parent Theme as dependency via Bower and compiles its own CSS file from it.

Uses the Enqueue method the load and sort the CSS file the right way instead of the old @import methode

Installation

  1. Install the parent theme UnderStrap first: https://github.com/holger1411/understrap
  • IMPORTANT: If you download it from GitHub make sure you rename the "understrap-master.zip" file just to "understrap.zip" or you might have problems using this child themes !!
  1. Just upload the understrap-child folder to your wp-content/themes directory
  2. Go into your WP admin backend
  3. Go to "Appearance -> Themes"
  4. Activate the UnderStrap Child theme

Editing

Add your own CSS styles to /sass/theme/_child_theme.scss ot import you own files into /sass/theme/understrap-child.scss

To overwrite Bootstrap or UnderStraps base variables just add your own value to: /sass/theme/_child_theme_variables.scss

For example: the "$brand-primary" variable is used by both, Bootstrap and UnderStrap. Add your own color like: $brand-primary: #ff6600; in /sass/theme/_child_theme_variables.scss to overwrite it. That will change automatically all elements who use this variable. It will be outputted into: /css/understrap-child.min.css and /css/understrap-child.css

So you have one clean CSS file at the end and just one request.

Developing With NPM, Bower, Gulp, SASS and Browser Sync

Installing Dependencies

  • Make sure you have installed Node.js, Bower, and Browser-Sync [1] on your computer globally
  • Then open your terminal and browse to the location of your UnderStrap copy
  • Run: $ npm install then: $ bower install and finally: $ gulp copy-assets

Running

To work and compile your Sass files on the fly start:

  • $ gulp watch

Or, to run with Browser-Sync:

  • First change the browser-sync options to reflect your environment in the file /gulpfile.js in the beginning of the file:
var browserSyncOptions = {
    proxy: "localhost/theme_test/", // <----- CHANGE HERE
    notify: false
};
  • then run: $ gulp watch-bs

[1] Visit http://browsersync.io for more information on Browser Sync