Обновил описание

This commit is contained in:
Alexander Yakovlev 2018-08-14 15:44:46 +07:00
parent 382a1f3f3d
commit c603ddf686

View file

@ -1,59 +1,23 @@
# understrap-child
Basic Child Theme for UnderStrap Theme Framework: https://github.com/holger1411/understrap
# Тема для сайта КРИЛ
## How it works
Understrap Child Theme shares with the parent theme all PHP files and adds its own functions.php on top of the UnderStrap parent theme's functions.php.
Тема для сайта конкурса [КРИЛ](http://kril.ifiction.ru)
**IT DOES NOT LOAD THE PARENT THEMES CSS FILE(S)!** Instead it uses the UnderStrap Parent Theme as a dependency via npm and compiles its own CSS file from it.
Основана на UnderStrap Theme Framework: https://github.com/holger1411/understrap
Understrap Child Theme uses the Enqueue method to load and sort the CSS file the right way instead of the old @import method.
## Установка из git
1. Сначала установите родительскую тему UnderStrap: `https://github.com/holger1411/understrap`
1. Создайте папку `wp-content/themes/kril` и залейте туда этот реп
1. Активируйте тему в WP админке
## Installation
1. Install the parent theme UnderStrap first: `https://github.com/holger1411/understrap`
- IMPORTANT: If you download UnderStrap from GitHub make sure you rename the "understrap-master.zip" file to "understrap.zip" or you might have problems using this child theme!
1. Upload the understrap-child folder to your wp-content/themes directory
1. Go into your WP admin backend
1. Go to "Appearance -> Themes"
1. Activate the UnderStrap Child theme
## Разработка
## Editing
Add your own CSS styles to `/sass/theme/_child_theme.scss`
or import you own files into `/sass/theme/understrap-child.scss`
Нужно будет поставить node.js, gulp и browsersync. По порядку:
To overwrite Bootstrap's or UnderStrap's base variables just add your own value to:
`/sass/theme/_child_theme_variables.scss`
- `$ npm install`
- `$ gulp copy-assets`
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. This change will automatically apply to all elements that use the $brand-primary 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, Gulp, SASS and Browser Sync
### Installing Dependencies
- Make sure you have installed Node.js, Gulp, and Browser-Sync [1] on your computer globally
- Open your terminal and browse to the location of your UnderStrap copy
- Run: `$ npm install` then: `$ gulp copy-assets`
### Running
To work and compile your Sass files on the fly start:
Чтобы скомпилировать CSS и обновлять при изменении:
- `$ gulp watch`
Or, to run with Browser-Sync:
- First change the browser-sync options to reflect your environment in the file `/gulpconfig.json` in the beginning of the file:
```javascript
"browserSyncOptions" : {
"proxy": "localhost/wordpress/",
"notify": false
}
};
```
- then run: `$ gulp watch-bs`
[1] Visit [https://browsersync.io/](https://browsersync.io/) for more information on Browser Sync
ну или можно отредактировать `gulpconfig.json` и вызвать `gulp watch-bs`, это ещё и автообновление страниц.