mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-01-23 15:54:12 +03:00
Automatic recompilation of Bootstrap with user-defined variables (#1181)
Allow for dynamic bootstrap compilation Exclude sublime artifacts Make custom bootstrap vars file Add custom bootstrap compilation Add cookiecutter option Use the right name for the file Add explanation to generated README Add self to contributors Remove sublime exclusion
This commit is contained in:
parent
d34aa71038
commit
4aff5971d1
|
@ -56,6 +56,7 @@ Listed in alphabetical order.
|
|||
Areski Belaid `@areski`_
|
||||
Ashley Camba
|
||||
Barclay Gauld `@yunti`_
|
||||
Ben Warren `@bwarren2`
|
||||
Ben Lopatin
|
||||
Benjamin Abel
|
||||
Bo Lopker `@blopker`_
|
||||
|
|
|
@ -21,5 +21,6 @@
|
|||
"postgresql_version": ["9.6", "9.5", "9.4", "9.3", "9.2"],
|
||||
"js_task_runner": ["Gulp", "Grunt", "None"],
|
||||
"use_lets_encrypt": "n",
|
||||
"custom_bootstrap_compilation": "n",
|
||||
"open_source_license": ["MIT", "BSD", "GPLv3", "Apache Software License 2.0", "Not open source"]
|
||||
}
|
||||
|
|
|
@ -60,6 +60,9 @@ module.exports = function (grunt) {
|
|||
dev: {
|
||||
options: {
|
||||
outputStyle: 'nested',
|
||||
{% if cookiecutter.custom_bootstrap_compilation == 'y' %}
|
||||
includePaths: ['bower_components/bootstrap-sass/assets/stylesheets/bootstrap/'],
|
||||
{% endif %}
|
||||
sourceMap: false,
|
||||
precision: 10
|
||||
},
|
||||
|
@ -70,6 +73,9 @@ module.exports = function (grunt) {
|
|||
dist: {
|
||||
options: {
|
||||
outputStyle: 'compressed',
|
||||
{% if cookiecutter.custom_bootstrap_compilation == 'y' %}
|
||||
includePaths: ['bower_components/bootstrap-sass/assets/stylesheets/bootstrap/'],
|
||||
{% endif %}
|
||||
sourceMap: false,
|
||||
precision: 10
|
||||
},
|
||||
|
|
|
@ -145,3 +145,12 @@ See detailed `cookiecutter-django Elastic Beanstalk documentation`_.
|
|||
.. _`cookiecutter-django Docker documentation`: http://cookiecutter-django.readthedocs.io/en/latest/deployment-with-elastic-beanstalk.html
|
||||
|
||||
{% endif %}
|
||||
{% if cookiecutter.custom_bootstrap_compilation == "y" %}
|
||||
Custom Bootstrap Compilation
|
||||
^^^^^^
|
||||
|
||||
To get automatic Bootstrap recompilation with variables of your choice, install bootstrap sass (`bower install bootstrap-sass`) and tweak your variables in `static/sass/custom_bootstrap_vars`.
|
||||
|
||||
(You can find a list of available variables [in the bootstrap-sass source](https://github.com/twbs/bootstrap-sass/blob/master/assets/stylesheets/bootstrap/_variables.scss), or get explanations on them in the [Bootstrap docs](https://getbootstrap.com/customize/).)
|
||||
|
||||
{% endif %}
|
||||
|
|
|
@ -1,3 +1,57 @@
|
|||
{% if cookiecutter.custom_bootstrap_compilation == 'y' %}
|
||||
@import "variables";
|
||||
@import "custom_bootstrap_vars";
|
||||
@import "mixins";
|
||||
|
||||
// Reset and dependencies
|
||||
@import "normalize";
|
||||
@import "print";
|
||||
@import "glyphicons";
|
||||
|
||||
// Core CSS
|
||||
@import "scaffolding";
|
||||
@import "type";
|
||||
@import "code";
|
||||
@import "grid";
|
||||
@import "tables";
|
||||
@import "forms";
|
||||
@import "buttons";
|
||||
|
||||
// Components
|
||||
@import "component-animations";
|
||||
@import "dropdowns";
|
||||
@import "button-groups";
|
||||
@import "input-groups";
|
||||
@import "navs";
|
||||
@import "navbar";
|
||||
@import "breadcrumbs";
|
||||
@import "pagination";
|
||||
@import "pager";
|
||||
@import "labels";
|
||||
@import "badges";
|
||||
@import "jumbotron";
|
||||
@import "thumbnails";
|
||||
@import "alerts";
|
||||
@import "progress-bars";
|
||||
@import "media";
|
||||
@import "list-group";
|
||||
@import "panels";
|
||||
@import "responsive-embed";
|
||||
@import "wells";
|
||||
@import "close";
|
||||
|
||||
// Components w/ JavaScript
|
||||
@import "modals";
|
||||
@import "tooltip";
|
||||
@import "popovers";
|
||||
@import "carousel";
|
||||
|
||||
// Utility classes
|
||||
@import "utilities";
|
||||
@import "responsive-utilities";
|
||||
{% endif %}
|
||||
|
||||
|
||||
|
||||
// project specific CSS goes here
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user