├── .editorconfig ├── .eslintrc.js ├── .gitignore ├── .stylelintrc.js ├── .travis.yml ├── AUTHORS.rst ├── CHANGELOG.rst ├── Dockerfile ├── LICENSE.txt ├── README.rst ├── boilerplate.json ├── browserslist ├── docs ├── Makefile ├── _static │ ├── editor-wysiwyg.png │ ├── toolbar-page-types.png │ └── toolbar-templates.png ├── codestyle │ ├── index.rst │ ├── javascript.rst │ └── styles.rst ├── conf.py ├── contribution │ └── index.rst ├── general │ ├── basic_usage.rst │ ├── configuration.rst │ ├── index.rst │ ├── installation.rst │ └── whatsinside.rst ├── guidelines │ ├── comments.rst │ ├── general.rst │ ├── index.rst │ ├── javascript.rst │ ├── markup.rst │ └── styles.rst ├── index.rst ├── requirements.txt ├── structure │ ├── general.rst │ ├── index.rst │ ├── private.rst │ ├── static.rst │ └── templates.rst └── tips │ └── index.rst ├── gulpfile.js ├── package.json ├── private ├── js │ ├── .babelrc │ ├── addons │ │ └── utils.js │ ├── base.js │ ├── cms.js │ ├── libs │ │ ├── bootstrap.js │ │ └── outdatedBrowser.min.js │ └── webpack.config.js ├── sass │ ├── base.scss │ ├── components │ │ ├── _all.scss │ │ ├── _browser.scss │ │ ├── _buttons.scss │ │ ├── _cms.scss │ │ ├── _fonts.scss │ │ ├── _forms.scss │ │ ├── _helpers.scss │ │ ├── _icons.scss │ │ └── _print.scss │ ├── libs │ │ ├── _all.scss │ │ └── _bootstrap.scss │ ├── mixins │ │ ├── _all.scss │ │ ├── _functions.scss │ │ ├── _other.scss │ │ └── _zindex.scss │ └── settings │ │ ├── _all.scss │ │ ├── _bootstrap.scss │ │ └── _custom.scss └── svg │ ├── .empty │ └── icons │ └── circle.svg ├── static ├── favicon.ico ├── favicon.png ├── iconset.json ├── img │ └── .empty ├── js │ └── addons │ │ └── ckeditor.wysiwyg.js └── sprites │ └── icons.svg ├── templates ├── 404.html ├── 500.html ├── base.html ├── content.html └── includes │ ├── analytics.html │ ├── browser.html │ ├── icon.html │ └── messages.html └── tools ├── build ├── install.sh ├── node-alpine.sh └── node-debian.sh └── tasks ├── icons ├── json.js └── svgsprite.js ├── lint ├── javascript.js └── sass.js ├── optimise ├── images.js └── svg.js ├── sass ├── compile.js ├── critical.js ├── inline.js └── rest.js └── webpack └── compile.js /.editorconfig: -------------------------------------------------------------------------------- 1 | # editorconfig.org 2 | 3 | root = true 4 | 5 | [*] 6 | indent_style = space 7 | indent_size = 4 8 | end_of_line = lf 9 | charset = utf-8 10 | trim_trailing_whitespace = true 11 | insert_final_newline = true 12 | max_line_length = 80 13 | 14 | [*.{html,js}] 15 | max_line_length = 120 16 | 17 | [*.yml] 18 | indent_size = 2 19 | 20 | [Makefile] 21 | indent_style = tab 22 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = { 4 | // documentation about rules can be found on http://eslint.org/docs/user-guide/configuring 5 | // based on http://eslint.org/docs/user-guide/configuring 6 | 'extends': 'eslint:recommended', 7 | // http://eslint.org/docs/user-guide/configuring.html#specifying-environments 8 | 'env': { 9 | 'browser': true, 10 | 'node': true, 11 | 'jquery': true, 12 | 'es6': true, 13 | }, 14 | 'parser': 'babel-eslint', 15 | 'parserOptions': { 16 | 'sourceType': 'module', 17 | }, 18 | 'rules': { 19 | // 0 = ignore, 1 = warning, 2 = error 20 | 'indent': [2, 4], 21 | 'quotes': [1, 'single'], 22 | 'comma-dangle': [1, 'always-multiline'], 23 | }, 24 | } 25 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Include your project-specific ignores in this file 2 | # Read about how to use .gitignore: https://help.github.com/articles/ignoring-files 3 | 4 | # # Warning: text inside the DEFAULT tags is auto-generated on Divio Cloud. Manual changes will be overwritten. 5 | # OS generated 6 | .DS_Store 7 | .DS_Store? 8 | ._* 9 | .Spotlight-V100 10 | .Trashes 11 | ehthumbs.db 12 | Thumbs.db 13 | *~ 14 | 15 | # Python 16 | *.pyc 17 | *.pyo 18 | 19 | # Aldryn 20 | /.env 21 | /.env-local 22 | .aldryn 23 | /data 24 | /data.tar.gz 25 | /static_collected 26 | /node_modules 27 | # 28 | 29 | .sass-cache 30 | .eyeglass_cache 31 | 32 | /tmp 33 | /env 34 | /docs/_build 35 | /docs/env 36 | 37 | /src/settings_local*.py 38 | /requirements_local*.txt 39 | 40 | /bower_components 41 | npm-debug.log 42 | *.css.map 43 | /static/css/ 44 | /static/vendor 45 | /static/docs/ 46 | /static/js/dist/ 47 | 48 | /tests/coverage 49 | /tests/integration/index.bundle.js 50 | 51 | Gemfile.lock 52 | .bundle/ 53 | 54 | /tools/server/env 55 | -------------------------------------------------------------------------------- /.stylelintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | // documentation about rules can be found on https://stylelint.io/user-guide/rules/ 3 | // based on https://github.com/stylelint/stylelint-config-standard/blob/master/index.js 4 | // configurator avaialble https://maximgatilin.github.io/stylelint-config/ 5 | 'rules': { 6 | 'at-rule-empty-line-before': [ 'always', { 7 | except: [ 8 | 'blockless-after-same-name-blockless', 9 | 'first-nested', 10 | ], 11 | ignore: ['after-comment', 'inside-block'], 12 | } ], 13 | 'at-rule-name-case': 'lower', 14 | 'at-rule-name-space-after': 'always-single-line', 15 | 'at-rule-semicolon-newline-after': 'always', 16 | 'block-closing-brace-empty-line-before': 'never', 17 | 'block-closing-brace-newline-after': 'always', 18 | 'block-closing-brace-newline-before': 'always-multi-line', 19 | 'block-closing-brace-space-before': 'always-single-line', 20 | 'block-no-empty': true, 21 | 'block-opening-brace-newline-after': 'always-multi-line', 22 | 'block-opening-brace-space-after': 'always-single-line', 23 | 'block-opening-brace-space-before': 'always', 24 | 'color-hex-case': 'lower', 25 | 'color-hex-length': 'short', 26 | 'color-no-invalid-hex': true, 27 | // 'comment-empty-line-before': ['never'], 28 | 'comment-no-empty': true, 29 | 'comment-whitespace-inside': 'always', 30 | 'custom-property-empty-line-before': [ 'always', { 31 | except: [ 32 | 'after-custom-property', 33 | 'first-nested', 34 | ], 35 | ignore: [ 36 | 'after-comment', 37 | 'inside-single-line-block', 38 | ], 39 | } ], 40 | 'declaration-bang-space-after': 'never', 41 | 'declaration-bang-space-before': 'always', 42 | 'declaration-block-no-duplicate-properties': [ true, { 43 | ignore: ['consecutive-duplicates-with-different-values'], 44 | } ], 45 | 'declaration-block-no-redundant-longhand-properties': true, 46 | 'declaration-block-no-shorthand-property-overrides': true, 47 | 'declaration-block-semicolon-newline-after': 'always-multi-line', 48 | 'declaration-block-semicolon-space-after': 'always-single-line', 49 | 'declaration-block-semicolon-space-before': 'never', 50 | 'declaration-block-single-line-max-declarations': 1, 51 | 'declaration-block-trailing-semicolon': 'always', 52 | 'declaration-colon-newline-after': 'always-multi-line', 53 | 'declaration-colon-space-after': 'always-single-line', 54 | 'declaration-colon-space-before': 'never', 55 | 'declaration-empty-line-before': [ 'always', { 56 | except: [ 57 | 'after-declaration', 58 | 'first-nested', 59 | ], 60 | ignore: [ 61 | 'after-comment', 62 | 'inside-single-line-block', 63 | ], 64 | } ], 65 | 'font-family-no-duplicate-names': true, 66 | 'function-calc-no-unspaced-operator': true, 67 | 'function-comma-newline-after': 'always-multi-line', 68 | 'function-comma-space-after': 'always-single-line', 69 | 'function-comma-space-before': 'never', 70 | 'function-linear-gradient-no-nonstandard-direction': true, 71 | 'function-max-empty-lines': 0, 72 | 'function-name-case': 'lower', 73 | 'function-parentheses-newline-inside': 'always-multi-line', 74 | 'function-parentheses-space-inside': 'never-single-line', 75 | 'function-whitespace-after': 'always', 76 | 'indentation': 4, 77 | 'keyframe-declaration-no-important': true, 78 | 'length-zero-no-unit': true, 79 | 'max-empty-lines': 1, 80 | 'media-feature-colon-space-after': 'always', 81 | 'media-feature-colon-space-before': 'never', 82 | 'media-feature-name-case': 'lower', 83 | 'media-feature-name-no-unknown': true, 84 | 'media-feature-parentheses-space-inside': 'never', 85 | 'media-feature-range-operator-space-after': 'always', 86 | 'media-feature-range-operator-space-before': 'always', 87 | 'media-query-list-comma-newline-after': 'always-multi-line', 88 | 'media-query-list-comma-space-after': 'always-single-line', 89 | 'media-query-list-comma-space-before': 'never', 90 | 'no-empty-source': true, 91 | 'no-eol-whitespace': true, 92 | 'no-extra-semicolons': true, 93 | 'no-invalid-double-slash-comments': true, 94 | 'no-missing-end-of-source-newline': true, 95 | 'number-leading-zero': 'always', 96 | 'number-no-trailing-zeros': true, 97 | 'property-case': 'lower', 98 | 'property-no-unknown': true, 99 | 'rule-empty-line-before': [ 'always-multi-line', { 100 | except: ['first-nested'], 101 | ignore: ['after-comment'], 102 | } ], 103 | 'selector-attribute-brackets-space-inside': 'never', 104 | 'selector-attribute-operator-space-after': 'never', 105 | 'selector-attribute-operator-space-before': 'never', 106 | 'selector-combinator-space-after': 'always', 107 | 'selector-combinator-space-before': 'always', 108 | 'selector-descendant-combinator-no-non-space': true, 109 | 'selector-list-comma-newline-after': 'always', 110 | 'selector-list-comma-space-before': 'never', 111 | 'selector-max-empty-lines': 0, 112 | 'selector-pseudo-class-case': 'lower', 113 | 'selector-pseudo-class-no-unknown': true, 114 | 'selector-pseudo-class-parentheses-space-inside': 'never', 115 | 'selector-pseudo-element-case': 'lower', 116 | 'selector-pseudo-element-colon-notation': 'single', 117 | 'selector-pseudo-element-no-unknown': true, 118 | 'selector-max-type': 0, 119 | 'selector-no-vendor-prefix': true, 120 | 'selector-max-universal': 0, 121 | 'selector-type-case': 'lower', 122 | 'selector-type-no-unknown': true, 123 | 'shorthand-property-no-redundant-values': true, 124 | 'string-no-newline': true, 125 | 'unit-case': 'lower', 126 | 'unit-no-unknown': true, 127 | 'value-list-comma-newline-after': 'always-multi-line', 128 | 'value-list-comma-space-after': 'always-single-line', 129 | 'value-list-comma-space-before': 'never', 130 | 'value-list-max-empty-lines': 0, 131 | }, 132 | }; 133 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | 3 | node_js: 4 | - 6 5 | 6 | sudo: false 7 | 8 | env: 9 | global: 10 | # encrypted Sauce Labs sub-account user name 11 | - secure: ghtK6PdDy13ruL+HGT4doVcUkl8pyzukY1gkHbkIAL8BrOc0eQdGBnAxKpPGZJv/8upWyul69DgXKg26cbS633Gfp0NjM/YPUh6wEgTg46Zjirw1ejX7xmqsQUGukZXOXNsll7/Syql+KEn8ao+JOAh+gjkFfNY2mxD6Oxs56Sc= 12 | # encrypted Sauce Labs sub-account token 13 | - secure: LJw6Cd29/2EdavwQyALzgteQM5+tasvJu0FpS9HJnJPw77HAEl+u8HhRzV2V+/4n2ZMOG9lvDjS1ON+crAolXvo8FO607QNxKFfaMRU2ESynr7+A+itLD/4x3ljPXh72Mypw4Sh0geeVYyZ613jfjzXwKK6lazE/ZhzfcyD4hYk= 14 | 15 | before_script: 16 | - npm install -g gulp 17 | 18 | script: 19 | - gulp lint 20 | -------------------------------------------------------------------------------- /AUTHORS.rst: -------------------------------------------------------------------------------- 1 | ####### 2 | Authors 3 | ####### 4 | 5 | Thanks to all the developers for the excellent contribution to this boilerplate 6 | and the boilerplate it is based on - `aldryn-boilerplate-bootstrap3 7 | `_. 8 | 9 | 10 | *************** 11 | Core Developers 12 | *************** 13 | 14 | * Angelo Dini 15 | * Vadim Sikora 16 | 17 | 18 | ************ 19 | Contributors 20 | ************ 21 | 22 | Please refere to the section within 23 | `GitHub `_ if outdated: 24 | 25 | * Ales Kocjancic 26 | * Angelo Dini 27 | * Daniele Procida 28 | * Dario Albanesi 29 | * Dmytro Shpakovskyi 30 | * Ivan Kubrakov 31 | * Lionardo Mendonça 32 | * Loriana Indelicato 33 | * Mateusz Dereniowski 34 | * Stefan Foulis 35 | * Tom Berger 36 | * Vadim Sikora 37 | * Vanessa Hänni 38 | -------------------------------------------------------------------------------- /CHANGELOG.rst: -------------------------------------------------------------------------------- 1 | ############################# 2 | djangocms-boilerplate-webpack 3 | ############################# 4 | 5 | 2.0.3 6 | ===== 7 | 8 | - Update build process for Debian Stretch compatibility 9 | 10 | 11 | 2.0.2 12 | ===== 13 | 14 | - Fixed data attributes for correct messages consumption in django CMS 3.5 15 | - Added example for preoading fonts in ``base.html`` template 16 | - Added json generation for icons plugins 17 | - Changed the names of the icons generated (iconset prefix is always added) 18 | - Fixed CKEditor styles menu 19 | 20 | 21 | 2.0.1 22 | ===== 23 | 24 | - Added an example of using web fonts 25 | - Removed leftover FontAwesome references 26 | - Fixed a problem with bundle splitting and IE11 27 | - Added minification to sass files by default 28 | 29 | 30 | 2.0.0 31 | ===== 32 | 33 | - Upgraded to Node 6.10 34 | - Upgraded to latest Webpack version 35 | - Complete overhaul to the gulp tasks and structure 36 | - Simplified the ``private/sass`` structure 37 | - Moved javascript to ``private/js`` and updated structure 38 | - Deprecated font icons in favour of svg 39 | - Updated linting tools now using ESLint and Stylelint 40 | - Updated documentation 41 | - Removed testing framework from boilerplate 42 | 43 | 44 | 1.2.1 45 | ===== 46 | 47 | - Inherited gitignore from Divio Cloud 48 | 49 | 50 | 1.2.0 51 | ===== 52 | 53 | - Add boilerplate-specific Dockerfile with node installation 54 | 55 | 56 | 1.1.2 57 | ===== 58 | 59 | - Pinned ``exports-loader`` package for compatibility 60 | 61 | 62 | 1.1.1 63 | ===== 64 | 65 | - Fixed an issue with ``404.html`` inheriting from ``fullwidth.html`` 66 | - Removed ``fullwidth.html`` references from documentation 67 | 68 | 69 | 1.1.0 70 | ===== 71 | 72 | - Fixed a bug when lint error could prevent other gulp tasks from running 73 | - Load bootstrap and jquery from node modules, both for JavaScript and Sass 74 | - Removed standard templates ``fullwidth.html``, ``sidebar_left.html``, 75 | ``sidebar_right.html`` and ``tpl_home.html`` and use ``base.html`` instead 76 | 77 | 78 | 1.0.1 79 | ===== 80 | 81 | - Switch webpack to polling inside Aldryn Docker containers 82 | 83 | 84 | 1.0.0 85 | ===== 86 | 87 | - Initial release 88 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | # 2 | # 3 | 4 | # 5 | ADD tools/build /stack/boilerplate 6 | 7 | ENV NODE_VERSION=8.9.4 \ 8 | NPM_VERSION=5.4.0 9 | 10 | RUN sh /stack/boilerplate/install.sh 11 | ENV NODE_PATH=$NVM_DIR/versions/node/v$NODE_VERSION/lib/node_modules \ 12 | PATH=$NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH 13 | # 14 | 15 | # 16 | # 17 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013, Divio AG 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | * Redistributions of source code must retain the above copyright 7 | notice, this list of conditions and the following disclaimer. 8 | * Redistributions in binary form must reproduce the above copyright 9 | notice, this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | * Neither the name of Divio AG nor the 12 | names of its contributors may be used to endorse or promote products 13 | derived from this software without specific prior written permission. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 16 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | DISCLAIMED. IN NO EVENT SHALL DIVIO AG BE LIABLE FOR ANY 19 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | -------------------------------------------------------------------------------- /README.rst: -------------------------------------------------------------------------------- 1 | ============================== 2 | django CMS webpack boilerplate 3 | ============================== 4 | 5 | |Build Status| |Coverage Status| 6 | 7 | The django CMS Boilerplate Webpack is the most complete **django CMS** based 8 | Boilerplate for rapid development. It uses the full potential of 9 | `ES2015+ `_, `Webpack `_ and 10 | the `Bootstrap `_ framework for developing responsive, 11 | mobile-first projects on the web, and implements various best practices from 12 | within the front-end community. 13 | 14 | This Boilerplate can be used with standalone django CMS websites as well as 15 | on the `Divio Cloud `_ platform. 16 | 17 | 18 | Documentation 19 | ============= 20 | 21 | A full documentation can be found on `Read the Docs `_. 22 | 23 | 24 | Contribution 25 | ============ 26 | 27 | You are very welcome improving this boilerplate for Aldryn and your everyday use, especially the documentation always 28 | needs love. Feel free to fork and send us pull requests and checkout the 29 | `contribution guide `_ within our documentation. 30 | 31 | 32 | .. |Build Status| image:: https://travis-ci.org/divio/djangocms-boilerplate-webpack.svg?branch=master 33 | :target: https://travis-ci.org/divio/djangocms-boilerplate-webpack 34 | .. |Coverage Status| image:: https://coveralls.io/repos/divio/djangocms-boilerplate-webpack/badge.svg?branch=master&service=github 35 | :target: https://coveralls.io/github/divio/djangocms-boilerplate-webpack?branch=master 36 | -------------------------------------------------------------------------------- /boilerplate.json: -------------------------------------------------------------------------------- 1 | { 2 | "identifier": "bootstrap3", 3 | "package-name": "djangocms-boilerplate-webpack", 4 | "version": "2.0.3", 5 | "templates": [ 6 | ["content.html", "Content"] 7 | ], 8 | "excluded": [ 9 | "docs", 10 | "node_modules", 11 | "tests", 12 | "tools/server", 13 | "tools/release.sh", 14 | ".travis.yml", 15 | "*.rst", 16 | "LICENSE.txt" 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /browserslist: -------------------------------------------------------------------------------- 1 | # Browsers that we support 2 | 3 | last 2 versions 4 | safari >= 8 5 | ie >= 9 6 | -------------------------------------------------------------------------------- /docs/Makefile: -------------------------------------------------------------------------------- 1 | ######################################################################################################################## 2 | ##### CUSTOM CONFIGURATION 3 | VENV = env/bin/activate 4 | PORT = 8000 5 | # CORE COMMANDS 6 | install: 7 | ##### setup virtualenv 8 | virtualenv env 9 | . $(VENV); pip install -r requirements.txt 10 | . $(VENV); sphinx-build . _build/html 11 | ##### done 12 | 13 | run: 14 | . $(VENV); sphinx-autobuild $(ALLSPHINXOPTS) _build/html --host 0.0.0.0 --port $(PORT) 15 | 16 | ######################################################################################################################## 17 | # Makefile for Sphinx documentation 18 | # 19 | 20 | # You can set these variables from the command line. 21 | SPHINXOPTS = 22 | SPHINXBUILD = sphinx-build 23 | PAPER = 24 | BUILDDIR = _build 25 | 26 | # Internal variables. 27 | PAPEROPT_a4 = -D latex_paper_size=a4 28 | PAPEROPT_letter = -D latex_paper_size=letter 29 | ALLSPHINXOPTS = -n -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . 30 | # the i18n builder cannot share the environment and doctrees with the others 31 | I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . 32 | 33 | .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext 34 | 35 | help: 36 | @echo "Please use \`make ' where is one of" 37 | @echo " html to make standalone HTML files" 38 | @echo " dirhtml to make HTML files named index.html in directories" 39 | @echo " singlehtml to make a single large HTML file" 40 | @echo " pickle to make pickle files" 41 | @echo " json to make JSON files" 42 | @echo " htmlhelp to make HTML files and a HTML help project" 43 | @echo " qthelp to make HTML files and a qthelp project" 44 | @echo " devhelp to make HTML files and a Devhelp project" 45 | @echo " epub to make an epub" 46 | @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" 47 | @echo " latexpdf to make LaTeX files and run them through pdflatex" 48 | @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" 49 | @echo " text to make text files" 50 | @echo " man to make manual pages" 51 | @echo " texinfo to make Texinfo files" 52 | @echo " info to make Texinfo files and run them through makeinfo" 53 | @echo " gettext to make PO message catalogs" 54 | @echo " changes to make an overview of all changed/added/deprecated items" 55 | @echo " xml to make Docutils-native XML files" 56 | @echo " pseudoxml to make pseudoxml-XML files for display purposes" 57 | @echo " linkcheck to check all external links for integrity" 58 | @echo " doctest to run all doctests embedded in the documentation (if enabled)" 59 | 60 | clean: 61 | rm -rf $(BUILDDIR)/* 62 | 63 | html: 64 | $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html 65 | @echo 66 | @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." 67 | 68 | dirhtml: 69 | $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml 70 | @echo 71 | @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." 72 | 73 | singlehtml: 74 | $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml 75 | @echo 76 | @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." 77 | 78 | pickle: 79 | $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle 80 | @echo 81 | @echo "Build finished; now you can process the pickle files." 82 | 83 | json: 84 | $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json 85 | @echo 86 | @echo "Build finished; now you can process the JSON files." 87 | 88 | htmlhelp: 89 | $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp 90 | @echo 91 | @echo "Build finished; now you can run HTML Help Workshop with the" \ 92 | ".hhp project file in $(BUILDDIR)/htmlhelp." 93 | 94 | qthelp: 95 | $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp 96 | @echo 97 | @echo "Build finished; now you can run "qcollectiongenerator" with the" \ 98 | ".qhcp project file in $(BUILDDIR)/qthelp, like this:" 99 | @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/WebpackBoilerplateStandard.qhcp" 100 | @echo "To view the help file:" 101 | @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/WebpackBoilerplateStandard.qhc" 102 | 103 | devhelp: 104 | $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp 105 | @echo 106 | @echo "Build finished." 107 | @echo "To view the help file:" 108 | @echo "# mkdir -p $$HOME/.local/share/devhelp/WebpackBoilerplateStandard" 109 | @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/WebpackBoilerplateStandard" 110 | @echo "# devhelp" 111 | 112 | epub: 113 | $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub 114 | @echo 115 | @echo "Build finished. The epub file is in $(BUILDDIR)/epub." 116 | 117 | latex: 118 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 119 | @echo 120 | @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." 121 | @echo "Run \`make' in that directory to run these through (pdf)latex" \ 122 | "(use \`make latexpdf' here to do that automatically)." 123 | 124 | latexpdf: 125 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 126 | @echo "Running LaTeX files through pdflatex..." 127 | $(MAKE) -C $(BUILDDIR)/latex all-pdf 128 | @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." 129 | 130 | latexpdfja: 131 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 132 | @echo "Running LaTeX files through platex and dvipdfmx..." 133 | $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja 134 | @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." 135 | 136 | text: 137 | $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text 138 | @echo 139 | @echo "Build finished. The text files are in $(BUILDDIR)/text." 140 | 141 | man: 142 | $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man 143 | @echo 144 | @echo "Build finished. The manual pages are in $(BUILDDIR)/man." 145 | 146 | texinfo: 147 | $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo 148 | @echo 149 | @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." 150 | @echo "Run \`make' in that directory to run these through makeinfo" \ 151 | "(use \`make info' here to do that automatically)." 152 | 153 | info: 154 | $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo 155 | @echo "Running Texinfo files through makeinfo..." 156 | make -C $(BUILDDIR)/texinfo info 157 | @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." 158 | 159 | gettext: 160 | $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale 161 | @echo 162 | @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." 163 | 164 | changes: 165 | $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes 166 | @echo 167 | @echo "The overview file is in $(BUILDDIR)/changes." 168 | 169 | linkcheck: 170 | $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck 171 | @echo 172 | @echo "Link check complete; look for any errors in the above output " \ 173 | "or in $(BUILDDIR)/linkcheck/output.txt." 174 | 175 | doctest: 176 | $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest 177 | @echo "Testing of doctests in the sources finished, look at the " \ 178 | "results in $(BUILDDIR)/doctest/output.txt." 179 | 180 | xml: 181 | $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml 182 | @echo 183 | @echo "Build finished. The XML files are in $(BUILDDIR)/xml." 184 | 185 | pseudoxml: 186 | $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml 187 | @echo 188 | @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." 189 | -------------------------------------------------------------------------------- /docs/_static/editor-wysiwyg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/divio/djangocms-boilerplate-webpack/d8b4a9fe2504ff4ceaecd0991b61f8ddac5b6ee7/docs/_static/editor-wysiwyg.png -------------------------------------------------------------------------------- /docs/_static/toolbar-page-types.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/divio/djangocms-boilerplate-webpack/d8b4a9fe2504ff4ceaecd0991b61f8ddac5b6ee7/docs/_static/toolbar-page-types.png -------------------------------------------------------------------------------- /docs/_static/toolbar-templates.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/divio/djangocms-boilerplate-webpack/d8b4a9fe2504ff4ceaecd0991b61f8ddac5b6ee7/docs/_static/toolbar-templates.png -------------------------------------------------------------------------------- /docs/codestyle/index.rst: -------------------------------------------------------------------------------- 1 | Coding Style 2 | ############ 3 | 4 | .. note:: 5 | 6 | Compare to the :doc:`/guidelines/index` and the :doc:`/structure/index` 7 | we offer many more coding conventions, most of them are being covered by 8 | certain linting tools such as ESLint and CSS Lint. You will also find good 9 | practice and common sense here. Yet note that these are conventions and 10 | eventually will make their way to the guidelines. 11 | 12 | .. toctree:: 13 | :maxdepth: 3 14 | 15 | javascript 16 | styles 17 | -------------------------------------------------------------------------------- /docs/codestyle/styles.rst: -------------------------------------------------------------------------------- 1 | ****** 2 | Styles 3 | ****** 4 | 5 | 6 | General 7 | ======= 8 | 9 | Formatting, nesting, ordering and everything else is covered by 10 | `Guidelines <../guidelines/styles>`_ 11 | 12 | 13 | Main problem with CSS 14 | --------------------- 15 | 16 | There are two types of problems in CSS: cosmetic problems and architectural 17 | problems. Cosmetic problems—issues like vertical centering or equal-height 18 | columns—usually engender the most vocal complaints, but they’re almost 19 | never showstoppers. They’re annoying, sure, but they don’t break the build. 20 | 21 | Philip Walton `Side Effects in CSS `_ 22 | 23 | Since CSS is global, every rule you write or override has the potential to 24 | break completely unrelated things. With that in mind, try to avoid selectors 25 | that are too unspecific (e.g. 26 | `type selectors `_ 27 | or overly specific selectors, like ``.nav > ul > li > a``. That selector 28 | is going to be extremely painful to extend and override if there's going to be 29 | a "special" list item for example. That also brings us to 30 | 31 | 32 | Selector performance 33 | -------------------- 34 | 35 | It is always said that css selectors performance is not that important and 36 | there are no "easy-to-follow" rules for fixing it. But just to reiterate, main points: 37 | 38 | - If your project is sufficiently big and complex or really dynamic, css 39 | selector performance may play a major role in the perceived rendering performance. 40 | 41 | - Selectors are interpreted by the browser from right to left, meaning 42 | ``.my-class > *`` will select all the elements on the page all the time and 43 | check if their immediate parent has a class ``my-class``. If there would be 44 | no ``>`` it would traverse the tree all the way up for every element, which 45 | is not very good. It is true that browsers do optimize things like this, but 46 | you should always check for yourself. 47 | 48 | 49 | JS selectors 50 | ------------ 51 | 52 | We use ``js-`` prefixed selectors for referencing DOM Nodes from javascript. 53 | That means that these classes have a pure functional purpose and styles should 54 | **never** be applied to them. Same type of widget could be easily represented 55 | by completely different sets of markup. 56 | 57 | 58 | Magic numbers 59 | ------------- 60 | 61 | Tend not to use magic numbers in CSS. Let's say you want to position an element 62 | in a specific place. Try to be agnostic of the environment and don't use values 63 | that are too specific. 64 | 65 | .. code-block:: scss 66 | 67 | .nav { 68 | height: 30px; 69 | } 70 | 71 | // bad 72 | .dropdown { 73 | // it works, but imagine we are going to change 74 | // the height of the nav. we'll need to go all over the css and change 75 | // the value now 76 | top: 35px; 77 | } 78 | 79 | // good 80 | .dropdown { 81 | top: 100%; 82 | margin-top: 5px; 83 | } 84 | 85 | Another example of magic numbers could be computed values. Let's say you have a 86 | component that is created on top of existing component, like a bootstrap styled 87 | select. 88 | 89 | .. code-block:: scss 90 | 91 | // bad 92 | .custom-select { 93 | height: 38px; 94 | padding: 14px 17px; 95 | } 96 | 97 | // much better 98 | .custom-select { 99 | height: $input-height-base - 2px; 100 | padding: ($padding-base-vertical - 1px) ($padding-base-horizontal - 1px); 101 | } 102 | 103 | 104 | `Avoid magic numbers like the plague. `_. 105 | 106 | 107 | Sass 108 | ==== 109 | 110 | 111 | Sass or SCSS 112 | ------------ 113 | 114 | That one is a no-brainer. We use SCSS flavor because it is closer to CSS and 115 | easier to pick up for everyone. It also resolves subtle issues with indentation. 116 | 117 | 118 | Nesting 119 | ------- 120 | 121 | Optimal nesting level is 2. You can go up to 4 levels (scss-lint rule), but try 122 | not to. Overused nesting usually means that something is wrong with the code. 123 | 124 | 125 | Extends 126 | ------- 127 | 128 | In general, try to avoid extend unless you know exactly what you are doing. 129 | Only use @extend when the rulesets that you are trying to DRY out are inherently 130 | and thematically related. 131 | 132 | Do not force relationships that do not exist: to do so will create unusual 133 | groupings in your project, as well as negatively impacting the source order 134 | of your code. 135 | 136 | http://csswizardry.com/2014/11/when-to-use-extend-when-to-use-a-mixin/ 137 | 138 | 139 | Color manipulation 140 | ------------------ 141 | 142 | When using alpha transparent colors keep in mind that ``rgba`` supports passing 143 | colors, so you can do things like this: 144 | 145 | .. code-block:: scss 146 | 147 | // bad 148 | color: rgba(0, 0, 0, 0.85); 149 | 150 | // good 151 | color: rgba(black, 0.85); 152 | color: rgba(#000, 0.85); 153 | color: rgba($color, 0.85); 154 | 155 | 156 | Autoprefixer 157 | ------------ 158 | 159 | For generating vendor prefixes one should use Autoprefixer instead of relying 160 | on mixins. That way we reduce sass compilation time and ensure that we have only 161 | prefixes that we actually need. As a good side effect we will use actual 162 | standard CSS syntax. 163 | 164 | 165 | Bootstrap 166 | ========= 167 | 168 | When using ``settings/_bootstrap.scss`` make sure that you have all the 169 | variables overwritten in the file, because overriding only some of them can 170 | lead to subtle bugs like `this `_: 171 | 172 | .. code-block:: scss 173 | 174 | // this is what happens in the bootstrap/_variables.scss 175 | $line-height-computed: 20px !default; 176 | $padding-base-vertical: 6px !default; 177 | 178 | // and this is a computed property from bootstrap, 34px by default 179 | $input-height-base: ($line-height-computed + ($padding-base-vertical * 2) + 2) !default; 180 | 181 | // now what we want to do is to override line-height-computed in our settings file 182 | $line-height-computed: 23px; 183 | 184 | Now we would expect that ``$input-height-base`` will be 37px, but it will be 185 | still 34px because computed properties are already calculated and won't 186 | be changed. Since bootstrap components dimensions are all interconnected 187 | to these computed variables we should always have the full settings file. 188 | Order matters too. 189 | 190 | 191 | Media queries 192 | ------------- 193 | 194 | In general when using media queries with bootstrap variables, use appropriate 195 | values for appropriate type of a query. 196 | 197 | .. code-block:: scss 198 | 199 | // bad 200 | @media (min-width: $screen-sm-max) { 201 | ... 202 | } 203 | 204 | @media (max-width: $screen-sm-min) { 205 | ... 206 | } 207 | 208 | // good 209 | @media (min-width: $screen-md-min) { 210 | ... 211 | } 212 | 213 | @media (max-width: $screen-xs-max) { 214 | ... 215 | } 216 | 217 | These values differ only by 1 pixel, but it's a very important one. 218 | 219 | 220 | Open for discussion 221 | ------------------- 222 | 223 | - Screenshot regression testing 224 | - autoprefixer implementation 225 | -------------------------------------------------------------------------------- /docs/conf.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # django CMS Boilerplate Webpack documentation build configuration file, created by 4 | # sphinx-quickstart on Fri Dec 19 09:53:47 2014. 5 | # 6 | # This file is execfile()d with the current directory set to its 7 | # containing dir. 8 | # 9 | # Note that not all possible configuration values are present in this 10 | # autogenerated file. 11 | # 12 | # All configuration values have a default; values that are commented out 13 | # serve to show the default. 14 | 15 | import sys 16 | import os 17 | 18 | # If extensions (or modules to document with autodoc) are in another directory, 19 | # add these directories to sys.path here. If the directory is relative to the 20 | # documentation root, use os.path.abspath to make it absolute, like shown here. 21 | #sys.path.insert(0, os.path.abspath('.')) 22 | 23 | # -- General configuration ------------------------------------------------ 24 | 25 | # If your documentation needs a minimal Sphinx version, state it here. 26 | #needs_sphinx = '1.0' 27 | 28 | # Add any Sphinx extension module names here, as strings. They can be 29 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom 30 | # ones. 31 | extensions = [ 32 | 'sphinx.ext.autodoc', 33 | 'sphinx.ext.doctest', 34 | 'sphinx.ext.intersphinx', 35 | 'sphinx.ext.todo', 36 | 'sphinx.ext.coverage', 37 | 'sphinx.ext.mathjax', 38 | 'sphinx.ext.ifconfig', 39 | ] 40 | 41 | # Add any paths that contain templates here, relative to this directory. 42 | templates_path = ['_templates'] 43 | 44 | # The suffix of source filenames. 45 | source_suffix = '.rst' 46 | 47 | # The encoding of source files. 48 | #source_encoding = 'utf-8-sig' 49 | 50 | # The master toctree document. 51 | master_doc = 'index' 52 | 53 | # General information about the project. 54 | project = u'django CMS webpack boilerplate' 55 | copyright = u'2014, Divio AG' 56 | 57 | # The version info for the project you're documenting, acts as replacement for 58 | # |version| and |release|, also used in various other places throughout the 59 | # built documents. 60 | # 61 | # The short X.Y version. 62 | version = '1.0.0' 63 | # The full version, including alpha/beta/rc tags. 64 | release = '1.0.0' 65 | 66 | # The language for content autogenerated by Sphinx. Refer to documentation 67 | # for a list of supported languages. 68 | #language = None 69 | 70 | # There are two options for replacing |today|: either, you set today to some 71 | # non-false value, then it is used: 72 | #today = '' 73 | # Else, today_fmt is used as the format for a strftime call. 74 | #today_fmt = '%B %d, %Y' 75 | 76 | # List of patterns, relative to source directory, that match files and 77 | # directories to ignore when looking for source files. 78 | exclude_patterns = ['_build', 'env'] 79 | 80 | # The reST default role (used for this markup: `text`) to use for all 81 | # documents. 82 | #default_role = None 83 | 84 | # If true, '()' will be appended to :func: etc. cross-reference text. 85 | #add_function_parentheses = True 86 | 87 | # If true, the current module name will be prepended to all description 88 | # unit titles (such as .. function::). 89 | #add_module_names = True 90 | 91 | # If true, sectionauthor and moduleauthor directives will be shown in the 92 | # output. They are ignored by default. 93 | #show_authors = False 94 | 95 | # The name of the Pygments (syntax highlighting) style to use. 96 | pygments_style = 'sphinx' 97 | 98 | # A list of ignored prefixes for module index sorting. 99 | #modindex_common_prefix = [] 100 | 101 | # If true, keep warnings as "system message" paragraphs in the built documents. 102 | #keep_warnings = False 103 | 104 | 105 | # -- Options for HTML output ---------------------------------------------- 106 | 107 | # The theme to use for HTML and HTML Help pages. See the documentation for 108 | # a list of builtin themes. 109 | html_theme = 'default' 110 | 111 | # Theme options are theme-specific and customize the look and feel of a theme 112 | # further. For a list of options available for each theme, see the 113 | # documentation. 114 | #html_theme_options = {} 115 | 116 | # Add any paths that contain custom themes here, relative to this directory. 117 | #html_theme_path = [] 118 | 119 | # The name for this set of Sphinx documents. If None, it defaults to 120 | # " v documentation". 121 | #html_title = None 122 | 123 | # A shorter title for the navigation bar. Default is the same as html_title. 124 | #html_short_title = None 125 | 126 | # The name of an image file (relative to this directory) to place at the top 127 | # of the sidebar. 128 | #html_logo = None 129 | 130 | # The name of an image file (within the static path) to use as favicon of the 131 | # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 132 | # pixels large. 133 | #html_favicon = None 134 | 135 | # Add any paths that contain custom static files (such as style sheets) here, 136 | # relative to this directory. They are copied after the builtin static files, 137 | # so a file named "default.css" will overwrite the builtin "default.css". 138 | html_static_path = ['_static'] 139 | 140 | # Add any extra paths that contain custom files (such as robots.txt or 141 | # .htaccess) here, relative to this directory. These files are copied 142 | # directly to the root of the documentation. 143 | #html_extra_path = [] 144 | 145 | # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, 146 | # using the given strftime format. 147 | #html_last_updated_fmt = '%b %d, %Y' 148 | 149 | # If true, SmartyPants will be used to convert quotes and dashes to 150 | # typographically correct entities. 151 | #html_use_smartypants = True 152 | 153 | # Custom sidebar templates, maps document names to template names. 154 | #html_sidebars = {} 155 | 156 | # Additional templates that should be rendered to pages, maps page names to 157 | # template names. 158 | #html_additional_pages = {} 159 | 160 | # If false, no module index is generated. 161 | #html_domain_indices = True 162 | 163 | # If false, no index is generated. 164 | #html_use_index = True 165 | 166 | # If true, the index is split into individual pages for each letter. 167 | #html_split_index = False 168 | 169 | # If true, links to the reST sources are added to the pages. 170 | #html_show_sourcelink = True 171 | 172 | # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. 173 | #html_show_sphinx = True 174 | 175 | # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. 176 | #html_show_copyright = True 177 | 178 | # If true, an OpenSearch description file will be output, and all pages will 179 | # contain a tag referring to it. The value of this option must be the 180 | # base URL from which the finished HTML is served. 181 | #html_use_opensearch = '' 182 | 183 | # This is the file name suffix for HTML files (e.g. ".xhtml"). 184 | #html_file_suffix = None 185 | 186 | # Output file base name for HTML help builder. 187 | htmlhelp_basename = 'WebpackBoilerplateStandarddoc' 188 | 189 | 190 | # -- Options for LaTeX output --------------------------------------------- 191 | 192 | latex_elements = { 193 | # The paper size ('letterpaper' or 'a4paper'). 194 | #'papersize': 'letterpaper', 195 | 196 | # The font size ('10pt', '11pt' or '12pt'). 197 | #'pointsize': '10pt', 198 | 199 | # Additional stuff for the LaTeX preamble. 200 | #'preamble': '', 201 | } 202 | 203 | # Grouping the document tree into LaTeX files. List of tuples 204 | # (source start file, target name, title, 205 | # author, documentclass [howto, manual, or own class]). 206 | latex_documents = [ 207 | ('index', 'WebpackBoilerplateStandard.tex', u'django CMS Boilerplate Webpack Documentation', 208 | u'Divio AG', 'manual'), 209 | ] 210 | 211 | # The name of an image file (relative to this directory) to place at the top of 212 | # the title page. 213 | #latex_logo = None 214 | 215 | # For "manual" documents, if this is true, then toplevel headings are parts, 216 | # not chapters. 217 | #latex_use_parts = False 218 | 219 | # If true, show page references after internal links. 220 | #latex_show_pagerefs = False 221 | 222 | # If true, show URL addresses after external links. 223 | #latex_show_urls = False 224 | 225 | # Documents to append as an appendix to all manuals. 226 | #latex_appendices = [] 227 | 228 | # If false, no module index is generated. 229 | #latex_domain_indices = True 230 | 231 | 232 | # -- Options for manual page output --------------------------------------- 233 | 234 | # One entry per manual page. List of tuples 235 | # (source start file, name, description, authors, manual section). 236 | man_pages = [ 237 | ('index', 'webpackboilerplatestandard', u'django CMS Boilerplate Webpack Documentation', 238 | [u'Divio AG'], 1) 239 | ] 240 | 241 | # If true, show URL addresses after external links. 242 | #man_show_urls = False 243 | 244 | 245 | # -- Options for Texinfo output ------------------------------------------- 246 | 247 | # Grouping the document tree into Texinfo files. List of tuples 248 | # (source start file, target name, title, author, 249 | # dir menu entry, description, category) 250 | texinfo_documents = [ 251 | ('index', 'WebpackBoilerplateStandard', u'django CMS Boilerplate Webpack Documentation', 252 | u'Divio AG', 'WebpackBoilerplateStandard', 'One line description of project.', 253 | 'Miscellaneous'), 254 | ] 255 | 256 | # Documents to append as an appendix to all manuals. 257 | #texinfo_appendices = [] 258 | 259 | # If false, no module index is generated. 260 | #texinfo_domain_indices = True 261 | 262 | # How to display URL addresses: 'footnote', 'no', or 'inline'. 263 | #texinfo_show_urls = 'footnote' 264 | 265 | # If true, do not generate a @detailmenu in the "Top" node's menu. 266 | #texinfo_no_detailmenu = False 267 | 268 | 269 | # Example configuration for intersphinx: refer to the Python standard library. 270 | intersphinx_mapping = {'http://docs.python.org/': None} 271 | 272 | # READ THE DOCS THEME 273 | # on_rtd is whether we are on readthedocs.org, this line of code grabbed from docs.readthedocs.org 274 | on_rtd = os.environ.get('READTHEDOCS', None) == 'True' 275 | 276 | if not on_rtd: # only import and set the theme if we're building docs locally 277 | import sphinx_rtd_theme 278 | html_theme = 'sphinx_rtd_theme' 279 | html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] 280 | 281 | # otherwise, readthedocs.org uses their theme by default, so no need to specify it 282 | -------------------------------------------------------------------------------- /docs/contribution/index.rst: -------------------------------------------------------------------------------- 1 | ############ 2 | Contribution 3 | ############ 4 | 5 | .. note:: 6 | 7 | You are very welcome improving this boilerplate for Divio Cloud and your 8 | everyday use, especially the documentation always needs love. Feel free to 9 | fork and send us pull requests and follow the guidelines from within this 10 | section. 11 | 12 | 13 | *************** 14 | Code of Conduct 15 | *************** 16 | 17 | - Ensure code validates against or own guidelines 18 | - Write documentation about what you are doing 19 | 20 | 21 | ************* 22 | Documentation 23 | ************* 24 | 25 | To extend and run the documentation, you will need 26 | `Python `_ and 27 | `Virtualenv `_ 28 | installed on your computer. You also need 29 | `Git `_ 30 | and a GitHub account obviously. 31 | 32 | In addition, follow the steps underneath to get them running: 33 | 34 | #. clone the repository using ``git clone 35 | https://github.com/divio/djangocms-boilerplate-webpack.git`` 36 | #. navigate to the documentation through ``cd djangocms-boilerplate-webpack/docs`` 37 | #. run ``make install`` to install additional requirements 38 | #. run ``make run`` to let the server run 39 | 40 | Now you can open **http://localhost:8000** on your favourite browser and start 41 | changing the rst files within ``docs/``. 42 | 43 | You need to be aware of 44 | `reStructuredText `_ 45 | to format the documentation properly. 46 | 47 | .. admonition:: Guidelines 48 | :class: `important` 49 | 50 | - Always start paths with a ``/`` and leave the trailing slash. 51 | - Leave two spaces before a title. 52 | - Write "Django", "django CMS" or "Divio Cloud". 53 | - Write names properly: Sass, Bootstrap, JavaScript instead of sass (or SASS), bootstrap and javascript. 54 | - Additional guidelines from `django CMS 55 | `_ apply. 56 | 57 | 58 | ************* 59 | Pull Requests 60 | ************* 61 | 62 | Before starting to work on issues or features, please mind the branching model: 63 | 64 | - **master** is used for hotfix releases (1.1.x) 65 | - **develop** is used for features and issues (1.x.x) 66 | 67 | Everything that is merged to *develop* will be released within the next proper 68 | release (1.x.x). Major releases (x.0.0) will have their own branches but are 69 | always merged to *develop* before releasing to master. 70 | 71 | A pull request needs the consent of two developers familiar with this repository 72 | to be merged. 73 | 74 | 75 | ******** 76 | Releases 77 | ******** 78 | 79 | - Adapt the `CHANGELOG.rst `_ 80 | - Adapt `AUTHORS.rst `_ if required 81 | - Bump version in `boilerplate.json `_ 82 | - Create a `GitHub tag `_ 83 | - Add the release notes on the `GitHub tag `_ 84 | - Build new tag on `readthedocs.org `_ 85 | - Run ``bash tools/release.sh`` before release on `Divio Cloud `_ 86 | - Run ``divio boilerplate upload`` to release on `Divio Cloud `_ 87 | - Test, inform, present 88 | -------------------------------------------------------------------------------- /docs/general/basic_usage.rst: -------------------------------------------------------------------------------- 1 | ########### 2 | Basic usage 3 | ########### 4 | 5 | Once installed in a Divio Cloud or django CMS project, 6 | django CMS Boilerplate Webpack is ready to use. 7 | 8 | 9 | =============== 10 | In your project 11 | =============== 12 | 13 | See :doc:`/structure/templates` for guidelines on how to set up your project 14 | templates so that they take advantage of what it has to offer. 15 | 16 | Fundamentally, if your project's templates inherit from the 17 | `base.html `_ 18 | template, they'll be furnished with the classes, elements, hooks and other 19 | things they need. 20 | 21 | 22 | ==================== 23 | In your applications 24 | ==================== 25 | 26 | Your applications, if they are aware of django CMS Boilerplate Webpack, can 27 | also take advantage of it. 28 | 29 | You could simply make your application assume that django CMS Boilerplate Webpack 30 | will be available. That's not ideal though, because it will be 31 | off-putting to people who don't want to have to use it. A reusable application 32 | should have requirements that are as generic as possible, not based on a 33 | particular frontend framework. 34 | 35 | So, although it means a little more work for you, you should **also** provide 36 | more generic frontend (templates, CSS etc) support for the application, and if 37 | you like, for other Boilerplates too. 38 | 39 | At the very least, the developers who use your application will find it easier 40 | to create templates and static file for it that support their own frontend 41 | conventions if they can start with simple ones. 42 | 43 | 44 | Divio Cloud Boilerplates 45 | ======================== 46 | 47 | To make this easier, use the 48 | `Aldryn Boilerplates `_ 49 | application. 50 | 51 | This provides support for multiple Boilerplates, allowing you to offer rich 52 | frontend machinery compatible with django CMS Boilerplate Webpack for those who 53 | want it, and generic frontend files for those who don't, in a way that the 54 | correct set will automatically be chosen. 55 | 56 | You can also add support for *other* Boilerplates, by adding the frontend 57 | files to namespaced directories in your application. This example of an 58 | application named `djangocms_addon` mentions only templates for sake of simplicity, 59 | but the same principle applies to static files:: 60 | 61 | djangocms_addon 62 | ├─ templates/ # the generic templates 63 | │ ├─ djangocms_addon/ 64 | │ └─ base.html 65 | ├─ boilerplates/ # templates for particular Boilerplates 66 | │ └─ bootstrap3/ 67 | │ └─ templates/ 68 | │ ├─ djangocms_addon/ 69 | │ └─ base.html 70 | └─ some_other_boilerplate/ 71 | └─ templates/ 72 | ├─ djangocms_addon/ 73 | └─ base.html 74 | 75 | See `Aldryn Boilerplates `_ 76 | for more. 77 | -------------------------------------------------------------------------------- /docs/general/configuration.rst: -------------------------------------------------------------------------------- 1 | ************* 2 | Configuration 3 | ************* 4 | 5 | .. note:: 6 | 7 | The Boilerplate ships pre-configured and runs out of the box if the 8 | :doc:`installation` steps are followed properly. However most components 9 | can be freely configured. 10 | 11 | 12 | WYSIWYG 13 | ======= 14 | 15 | The CMS allows for custom style sets within the editor. This ables the user 16 | to choose certain presets or colours. We already added the general Bootstrap 17 | utilities for you. The file can be found at: 18 | ``/static/js/addons/ckeditor.wysiwyg.js``. 19 | 20 | .. image:: /_static/editor-wysiwyg.png 21 | 22 | 23 | Custom Icons 24 | ============ 25 | 26 | We added support for custom svg-icon generation through Gulp. There are some 27 | configuration steps required if you want to use them: 28 | 29 | #. Add your SVG fonts to ``/private/svg``. Gulp gets all SVG files from 30 | the ``/private/svg/**/*.svg`` pattern and generates the fonts for you. 31 | #. Run ``gulp icons`` to generate the svg-sprite 32 | #. Uncomment ``// @import icons;`` from 33 | ``/private/sass/components/_all.scss`` to include it in your gulp build 34 | 35 | The ``gulp icons`` command will automatically generate the 36 | ``/private/sass/components/_icon.scss`` file where you find the class 37 | reference and mixins for all icons. 38 | 39 | The generated svg-icons will use the ``.icon`` css namespace for all 40 | custom icons. We recommend using the ``icon(*)`` mixin instead of 41 | ``@extend .icon-*``. 42 | -------------------------------------------------------------------------------- /docs/general/index.rst: -------------------------------------------------------------------------------- 1 | ####### 2 | General 3 | ####### 4 | 5 | .. note:: 6 | 7 | Welcome to the starting point of this documentation. Throughout each 8 | section we familiarise you with the :doc:`/guidelines/index`, 9 | :doc:`/structure/index`, :doc:`/testing/index` and other essential modules 10 | for our front-end code. The goal is to create a common coding ground for 11 | all developers. 12 | 13 | .. toctree:: 14 | :maxdepth: 2 15 | 16 | whatsinside 17 | installation 18 | configuration 19 | basic_usage 20 | -------------------------------------------------------------------------------- /docs/general/installation.rst: -------------------------------------------------------------------------------- 1 | ************ 2 | Installation 3 | ************ 4 | 5 | .. note:: 6 | 7 | The following dependencies should be installed on your system in order to 8 | work with this Boilerplate. 9 | 10 | - Node JS: http://nodejs.org/ 11 | - Gulp: http://gulpjs.com/ 12 | 13 | You can find most installation steps within 14 | `osx-bootstrap `_ but in short: 15 | 16 | #. run ``brew install node`` when using `Homebrew `_ 17 | #. run ``curl -L https://npmjs.org/install.sh | sh`` 18 | #. run ``npm install -g gulp`` 19 | 20 | At last make sure you correctly configured your 21 | `paths `_. 22 | 23 | 24 | Setup 25 | ===== 26 | 27 | Run the following command to install all requirements from within the root of the package: 28 | 29 | - ``npm install`` to install the requirements from ``package.json`` 30 | 31 | 32 | Gulp Commands 33 | ============= 34 | 35 | All front-end related tasks are handled via the `Gulp `_ 36 | task runner: 37 | 38 | - ``gulp sass`` compiles sass and splits critical from non-critical css 39 | - ``gulp lint`` starts all linting services using ``.eslintrc.js`` and ``.stylelintrc.js`` 40 | - ``gulp webpack`` compiles javascript 41 | - ``gulp icons`` generates an svg-sprite 42 | - ``gulp optimise`` optimises images within ``/static/img`` and svgs within ``/private/svg`` 43 | 44 | For generic usage use: 45 | 46 | - ``gulp default`` runs the default gulp commands 47 | - ``gulp watch`` runs the gulp watch defaults 48 | - ``gulp build`` this is the command that is also run on Divio Cloud when deploying 49 | 50 | .. note:: 51 | 52 | You can append ``--debug`` to almost all of the commands to enable debugging, 53 | sourcemaps, disable minification and more. 54 | 55 | For a full set of commands checkout the tasks inside the ``Gulpfile.js``. 56 | 57 | We love code over configuration. 58 | -------------------------------------------------------------------------------- /docs/general/whatsinside.rst: -------------------------------------------------------------------------------- 1 | ************* 2 | What's inside 3 | ************* 4 | 5 | .. note:: 6 | 7 | This Boilerplate includes and configures a number of components. 8 | 9 | 10 | Webpack & Babel 11 | =============== 12 | 13 | For JavaScript bundling and preprocessing we use `Webpack 14 | `_, `Babel `_ with ES2015 preset 15 | and some essential plugins for smaller builds and easier testing. 16 | 17 | We use Gulp as a wrapper around Webpack for consistency. 18 | 19 | Sass 20 | ==== 21 | 22 | For CSS pre-processing, we use `Sass `_. 23 | In particular, we use: 24 | 25 | * `LibSass `_ for fast SASS compilation 26 | * `Gulp JS `_ and the `gulp-sass 27 | `_ plugin to compile SASS files 28 | * the official `Sass port `_ of 29 | Bootstrap 30 | 31 | All styles should be created in ``/private/sass``, and will be compiled to 32 | ``/static/css``. 33 | 34 | .. Note:: 35 | 36 | We do not use Webpack capabilities for bundling CSS by default, but it is 37 | not forbidden. 38 | 39 | Bootstrap 40 | ========= 41 | 42 | The full `Bootstrap library `_ is imported via the 43 | `Sass component `_ 44 | and the `JavaScript component `_. 45 | 46 | .. note:: 47 | 48 | django CMS Boilerplate Webpack uses the default 12 column based grid setting. 49 | You can change this setting in ``private/sass/settings/_bootstrap.scss``. 50 | 51 | 52 | The `Glyhpicon `_ icon set has 53 | been `disabled `_ 54 | in favour of the custom icon set that can be built with ``gulp icons``. 55 | 56 | 57 | JavaScript 58 | ========== 59 | 60 | We are implementing the latest **3.x.x** versions of 61 | `jQuery `_ as they are released. 62 | 63 | - http://jquery.com 64 | 65 | In addition several commonly-used shims are available to you including: 66 | 67 | - `The HTML5 Shiv `_ 68 | - `Outdated Browser `_ 69 | - `console.log wrapper `_ 70 | 71 | 72 | Gulp 73 | ---- 74 | 75 | We use `Gulp `_ to manage our frontend workflow. 76 | 77 | 78 | Template Language 79 | ================= 80 | 81 | As this is a django CMS based boilerplate, naturally we are using the 82 | `Django template language 83 | `_. 84 | 85 | In order to implements assets efficiently, 86 | `django-sekizai `_ and 87 | `aldryn-snake `_ are implemented within 88 | the ``base_root.html`` template. This gives you the 89 | ``{% addtoblock "js" %}{% endaddtoblock %}`` and 90 | ``{% addtoblock "css" %}{% endaddtoblock %}`` template tags in addition to the 91 | django defaults. 92 | 93 | 94 | Example 95 | ------- 96 | 97 | .. code-block:: django 98 | 99 | {% load sekizai_tags %} 100 | {% addtoblock "css" %}{% endaddtoblock %} 101 | {% addtoblock "js" %}{% endaddtoblock %} 102 | 103 | - http://docs.django-cms.org 104 | 105 | 106 | Configuration 107 | ============= 108 | 109 | There are several **configuration files** included such as: 110 | 111 | - `EditorConfig `_ within ``.editorconfig`` 112 | - `ESLint `_ within ``.eslintrc.json`` 113 | - `Stylelint `_ within ``.stylelintrc.json`` 114 | 115 | Please mind that they are ignored if your editor doesn't support them. 116 | -------------------------------------------------------------------------------- /docs/guidelines/comments.rst: -------------------------------------------------------------------------------- 1 | ******** 2 | Comments 3 | ******** 4 | 5 | .. note:: 6 | 7 | If peppering your code with lots of comments is good, then having zillions 8 | of comments in your code must be great, right? Not quite. It doesn't make 9 | sense to comment every step your code makes, or to comment on things that 10 | don't need to be explained. 11 | 12 | Comments in code should describe: 13 | 14 | - **what** is being done 15 | - **why** it's being done 16 | 17 | They do not need to describe: 18 | 19 | - **how** it is being done (the code already shows this) 20 | - what you are thinking about 21 | 22 | 23 | Section Comments 24 | ================ 25 | 26 | In addition to the regular comments, we introduced the *section comment*. Use 27 | this style to separate large chungs of logic (which you should generally avoid). 28 | The line is exactly 80 characters long:: 29 | 30 | // ############################################################################# 31 | // NAME 32 | 33 | 34 | Inline Comments 35 | =============== 36 | 37 | When using comments inline, make use of the appropriate formats: 38 | 39 | - ``{# ... #}`` or ``{% comment %} ... {% endcomment %}`` for Django templates 40 | and **never** ```` 41 | - ``// ...`` and ``/* ... */`` for Sass and JavaScript 42 | 43 | 44 | Notes 45 | ----- 46 | 47 | We also use several comment helpers which, if configured in your editor, 48 | add additional highlighting to your code: 49 | 50 | | **FIXME:** 51 | | to annotate problems with the code 52 | | 53 | 54 | .. code-block:: javascript 55 | 56 | function Calculator() { 57 | // FIXME: shouldn't use a global here 58 | total = 0; 59 | ... 60 | } 61 | 62 | | **TODO:** 63 | | to annotate solutions to problems with the code 64 | | 65 | 66 | .. code-block:: javascript 67 | 68 | function Calculator() { 69 | // TODO: total should be configurable by an options param 70 | this.total = 0; 71 | ... 72 | } 73 | 74 | | **DOCS:** 75 | | provides a simple docs link 76 | | 77 | 78 | .. code-block:: javascript 79 | 80 | // DOCS: https://django-cms.readthedocs.org/en/latest/ 81 | 82 | 83 | Formatting 84 | ========== 85 | 86 | .. admonition:: Comments 87 | :class: `important` 88 | 89 | - Add proper whitespace. 90 | - In general use lowercases except for the *Notes*. 91 | 92 | .. code-block:: javascript 93 | 94 | bad 95 | //TODO: THIS NEEDS ADDITIONAL REVIEW 96 | // 97 | // square root of n with Newton-Raphson approximation 98 | /** 99 | * Contains various helpers, feel free to extend and adapt 100 | */ 101 | 102 | .. code-block:: javascript 103 | 104 | good 105 | // TODO: this needs additional review 106 | // square root of n with Newton-Raphson approximation 107 | /** 108 | * Contains various helpers, feel free to extend and adapt 109 | * 110 | * @class Utils 111 | * @namespace Cl 112 | */ 113 | 114 | 115 | YUIDoc 116 | ====== 117 | 118 | In 3.3.0 we introduced `YUIDoc `_ which uses 119 | syntax similar to JSDoc in order to further improve JavaScript documentation. 120 | We encourage using this style within your code, as shown in 121 | ``/static/js/addons/cl.utils.js``. 122 | -------------------------------------------------------------------------------- /docs/guidelines/general.rst: -------------------------------------------------------------------------------- 1 | ******* 2 | General 3 | ******* 4 | 5 | .. note:: 6 | There are global guidelines which affect every single language, file or 7 | folder. 8 | 9 | 10 | Standards 11 | ========= 12 | 13 | .. important:: 14 | 15 | - **Validate** your code through the `W3C validators `_. 16 | - There is something called `Accessibility `_. 17 | - Don't forget about **HiDPI**, **Retina** and **High Resolutions** displays. 18 | - Proper fallbacks should be available if a connection is slow or features are disabled. 19 | - Progressive enhancement, graceful degradation and responsive design are buzzwords you care about. 20 | - Develop with modularity and extensibility in mind. 21 | - Documentation is your friend. 22 | 23 | 24 | Spacing 25 | ======= 26 | 27 | .. important:: 28 | 29 | - Use **4 spaces** for indentation. 30 | 31 | Not 2, 3 or 8 – no tabs – if you are able to do 3 :sup:`3/4`, that's good enough 32 | 33 | 34 | Line Length 35 | =========== 36 | 37 | .. important:: 38 | 39 | - Don't breach **120 characters** per line. 40 | 41 | *Not even for HTML.* We even encourage you to use 80 characters per line. Yes, 42 | screens have got much bigger over the last few years, but your brain hasn't. 43 | Better to use screen estate for splits, anyway. 44 | 45 | 46 | Naming 47 | ====== 48 | 49 | .. important:: 50 | 51 | - **lowercase**, **camelCase** or **hyphened separation** are all good; use 52 | **no special characters** except for underscore ``_``. 53 | - Use dashes ``-`` for file naming, unless expressly counterindicated (e.g. in HTML template names). 54 | - Always use full words instead of abbreviations: ``number`` is better than ``nr``. 55 | - `BEM `_ is a nice methodology to be aware of. 56 | 57 | “There are only two hard things in Computer Science: 58 | cache invalidation and naming things" 59 | – Phil Karlton 60 | 61 | 62 | Quotes 63 | ====== 64 | 65 | .. important:: 66 | 67 | - We always use **double** ``"."`` quotes for everything, 68 | *except in JavaScript*, where we use **single** ``'.'`` quotes. 69 | -------------------------------------------------------------------------------- /docs/guidelines/index.rst: -------------------------------------------------------------------------------- 1 | ########## 2 | Guidelines 3 | ########## 4 | 5 | .. note:: 6 | 7 | This section describes guidelines for several front-end related 8 | technologies. We advise you to follow them. However it is sometimes 9 | necessary to `break the rules `_ 10 | in which case you have to watch `this video `_ 11 | and **leave a comment** describing why this was necessary. 12 | 13 | .. toctree:: 14 | :maxdepth: 2 15 | 16 | general 17 | comments 18 | markup 19 | styles 20 | javascript 21 | -------------------------------------------------------------------------------- /docs/guidelines/javascript.rst: -------------------------------------------------------------------------------- 1 | ********** 2 | JavaScript 3 | ********** 4 | 5 | .. note:: 6 | 7 | In addition to the :doc:`general` guidelines, the following sections 8 | describe JavaScript specific rules. 9 | `Code Conventions for the JavaScript Programming Language `_ 10 | should be your Bible. 11 | 12 | 13 | Naming 14 | ====== 15 | 16 | .. important:: 17 | 18 | - Use **dot** annotation ``test.base.js`` for JavaScript file naming. 19 | - Use a library's prefix, such as ``cl.xplorer.js`` or ``jquery.tablesorter.js``, for file naming. 20 | - Name ``variablesLikeThis``, ``ClassesLikeThis``, ``CONSTANTS_LIKE_THIS`` and ``events-like-this``. 21 | - Use the ``js-`` prefix when working with JS-related selectors and do not add styling to it. 22 | - Never use comma separation for variable declarations like ``var a, b, c;``. 23 | - Never use $ for variable names such as ``var $el = $('.el');``. 24 | - We are using the ``Cl.`` singleton for all custom JavaScript code. 25 | 26 | When using jQuery to refer to a DOM instance, always use the ``js-`` 27 | prefix to separate styles from JavaScript functionality. For example: 28 | ````. 29 | 30 | In this example, *addon* and *addon-gallery* have styles attached to them, 31 | *js-plugin-gallery* refers to the JavaScript functionality attached to the DOM 32 | element. 33 | 34 | Even when removing the JS class (or just waiting for JavaScript to kick in), 35 | the addon should still look good. 36 | 37 | 38 | .. code-block:: javascript 39 | 40 | // bad 41 | CL.Utils.js, jquery_tooltip.js, testWebsiteCreateNew.js 42 | 43 | var $jquery, current_state; 44 | var test-website-create-new; 45 | 46 | .. code-block:: javascript 47 | 48 | // good 49 | cl.utils.js, jquery.tooltip.js or test.website.create.new.js 50 | 51 | var jquery; 52 | var currentState; 53 | var nextIndexValue; 54 | 55 | 56 | Formatting 57 | ========== 58 | 59 | .. important:: 60 | 61 | - Always declare variables on top of the functions and not in between. 62 | - Always use `semicolons `_ 63 | and full brackets, except in shorthand like 64 | ``var i = (true) ? 'yes' : 'no';``. 65 | - Use proper spaces for ``if (true) {} else {}`` or ``function () {}``. 66 | 67 | .. code-block:: javascript 68 | 69 | // bad 70 | function(cont){ 71 | var c = $(cont); 72 | if(c.length) { 73 | // do something 74 | } 75 | else 76 | { 77 | // so something else 78 | } 79 | } 80 | 81 | .. code-block:: javascript 82 | 83 | // good 84 | function (container) { 85 | var container = $(container); 86 | if (container.length) { 87 | // do something 88 | } else { 89 | // so something else 90 | } 91 | } 92 | 93 | 94 | Implementation 95 | ============== 96 | 97 | .. important:: 98 | 99 | - Keep `` 111 | {% endaddtoblock %} 112 | 113 | {% addtoblock "js" %} 114 | 121 | {% endaddtoblock "js" %} 122 | 123 | .. code-block:: django 124 | 125 | // good 126 |
...
127 | 128 | {% addtoblock "js" %}{% endaddtoblock %} 129 | 130 | 131 | Patterns 132 | ======== 133 | 134 | .. important:: 135 | 136 | - Use the 137 | `singleton pattern `_ 138 | to avoid globals. 139 | - Use the `module pattern `_ 140 | to structure code. 141 | - Avoid the `functional pattern `_ 142 | 143 | -------------------------------------------------------------------------------- /docs/guidelines/markup.rst: -------------------------------------------------------------------------------- 1 | ****** 2 | Markup 3 | ****** 4 | 5 | .. note:: 6 | 7 | In addition to the :doc:`general` guidelines, the following sections 8 | describe markup specific rules. 9 | 10 | 11 | Naming 12 | ====== 13 | 14 | .. important:: 15 | 16 | - Use **underscores** for HTML file naming. 17 | - Use lowercase for **all** attributes. 18 | 19 | .. code-block:: html 20 | 21 | // bad 22 | two_column-template.html, tpl-master.html, askForAdditionalInformation.html 23 | 24 |
...
25 | 26 | .. code-block:: html 27 | 28 | // good 29 | two_column_template.html, tpl_master.html or ask_for_additional_information.html 30 | 31 |
...
32 | 33 | 34 | Indentation 35 | =========== 36 | 37 | .. important:: 38 | 39 | - Always add an indent after Django tags such as ``{% if %}``, ``{% forloop %}``, ``{% block %}`` and so on. 40 | - Use single lines within ``{% addtoblock %}`` for **files** and multilines for ````. 41 | It is important because of how sekizai works. Basically if two scripts are 42 | added through ``addtoblock`` and the contents of the block are the same 43 | they are merged. That way you never have duplicate jQuery's on the page. 44 | The caveat than is that the whitespace around that script tag must match. 45 | To avoid mistakes we always do them in single line. 46 | - **Code readability** always wins. 47 | 48 | .. code-block:: django 49 | 50 | // bad 51 | {% block content %} 52 |
{% if true %}

Hello World

{% endif %}
53 | {% endblock content %} 54 | 55 | {% addtoblock "js" %} 56 | 57 | {% endaddtoblock %} 58 | {% addtoblock "js" %} 59 | 64 | {% endaddtoblock %} 65 | 66 | .. code-block:: django 67 | 68 | // good 69 | {% block content %} 70 |
71 | {% if true %} 72 |

Hello World

73 | {% endif %} 74 |
75 | {% endblock content %} 76 | 77 | {% addtoblock "js" %}{% endaddtoblock %} 78 | {% addtoblock "js" %} 79 | 84 | {% endaddtoblock %} 85 | 86 | 87 | IDs vs Classes 88 | ============== 89 | 90 | .. important:: 91 | 92 | - Avoid IDs wherever possible. 93 | - Where it's necessary to use IDs, always use **unique names**. 94 | 95 | You should **always** use classes instead of IDs where you can. Classes 96 | represent a more OOP approach to adding and removing style sets like 97 | ``box box-wide box-hint``. 98 | 99 | Try to avoid declaring ID's at all. They should only be used to reference form 100 | elements or for in-page navigation in which case you need to make the name 101 | **absolutely unique**. 102 | 103 | .. code-block:: html 104 | 105 | // bad 106 |
...
107 | 108 |
109 | 110 | 111 | 112 | 113 | .. code-block:: html 114 | 115 | // good 116 |
...
117 | 118 |
119 | 120 | 121 | 122 | 123 | 124 | Modularity 125 | ========== 126 | 127 | .. important:: 128 | 129 | Try to keep HTML structure simple, avoiding unnecessary elements. 130 | It is sometimes easier to use a single div with a 131 | single class rather than multiple divs with multiple classes. 132 | 133 | For example, lets take a look at the following code snippet: 134 | 135 | .. code-block:: html 136 | 137 |
138 |

My Blog

139 |

Hello World

140 |
141 | 142 | We should build modular HTML, and take pains to avoid type selectors. 143 | Add additional classes for lead, content, author, meta info, tags and so on. 144 | The content section itself can then contain the usual HTML code: 145 | 146 | .. code-block:: html 147 | 148 |
149 |

My Blog

150 |

Hello World

151 |
152 |

Details

153 |

More

154 |

Content

155 |
156 |
Dummy Man
157 | 162 |
163 | -------------------------------------------------------------------------------- /docs/guidelines/styles.rst: -------------------------------------------------------------------------------- 1 | ****** 2 | Styles 3 | ****** 4 | 5 | .. note:: 6 | 7 | In addition to the :doc:`general` guidelines, the following sections 8 | describe stylesheet-specific rules. 9 | 10 | 11 | Naming 12 | ====== 13 | 14 | .. important:: 15 | 16 | - Use **lowercase** in SCSS file names. 17 | - Use only **dashes** in class/ID names. 18 | 19 | .. code-block:: text 20 | 21 | // bad 22 | Search.scss, marketingSite.scss or theme-dark-blog.scss 23 | 24 | class="blog blogItem blog_item__featured" 25 | 26 | .. code-block:: text 27 | 28 | // good 29 | search.scss, marketing_site.scss or theme_dark_blog.scss 30 | 31 | class="blog blog-item blog-item-featured" 32 | 33 | 34 | Nesting 35 | ======= 36 | 37 | .. important:: 38 | 39 | - Don't overuse nesting; nest elements to a maximum of **4 indents**. 40 | 41 | With great power comes great responsibility (just wanted to throw that in here). 42 | When writing in **Sass** or **Less** laziness can have performance implications. 43 | While nesting is very powerful, we should avoid unnecessary levels or 44 | blocks that can be simplified. 45 | 46 | .. code-block:: scss 47 | 48 | // bad 49 | .nav-main { 50 | ul { 51 | @extend list-reset; 52 | li { 53 | padding: 5px 10px; 54 | a { 55 | color: red; 56 | } 57 | } 58 | } 59 | } 60 | 61 | .. code-block:: scss 62 | 63 | // good 64 | .nav-main { 65 | ul { 66 | @extend list-reset; 67 | } 68 | li { 69 | padding: 5px 10px; 70 | } 71 | a { 72 | color: red; 73 | } 74 | } 75 | 76 | 77 | Formatting 78 | ========== 79 | 80 | .. important:: 81 | 82 | - Always add a space after the colon ``:``. 83 | - Only write one CSS property per line. 84 | - Avoid using selectors such as ``div.container`` or ``ul > li > a`` (i.e. ad-hoc, non-namespaced) to determine 85 | `specificity `_. 86 | - Write colour values in lowercase and avoid colour names. 87 | 88 | .. code-block:: css 89 | 90 | // bad 91 | article.item { 92 | color: white; 93 | padding: 10px; margin-left: 0; margin-top: 0; margin-bottom: 10px; 94 | background-repeat: no-repeat; 95 | background-position: left top; 96 | } 97 | 98 | .. code-block:: css 99 | 100 | // good 101 | .item { 102 | color: #fff; 103 | padding: 10px; 104 | margin: 0 0 10px 0; 105 | background: no-repeat left top; 106 | } 107 | 108 | 109 | Ordering 110 | ======== 111 | 112 | .. important:: 113 | 114 | - Use block-style, and group elements below. 115 | - See ``scss-lint.json`` for a comprehensive ordering example. 116 | 117 | #. includes (mixins) 118 | #. extending 119 | #. visibility, position 120 | #. color, font-size, line-height, font-* (font relevant data) 121 | #. width, height, padding, margin (box model relevant date) 122 | #. border, background (box style data) 123 | #. media, print (media queries) 124 | #. :after, :before, :active (pseudo elements) 125 | #. nested elements or parent referencing selectors 126 | 127 | .. note:: 128 | 129 | Combine attributes such as background-image, background-color, 130 | background-repeat into a single line ``background: 131 | #fff url("image.png") no-repeat left top;`` when it makes sense. 132 | But remember, that a shorthand like ``background`` cannot be overridden 133 | with just ``background-image``, so use wisely! 134 | 135 | 136 | Example 137 | ------- 138 | 139 | .. code-block:: css 140 | 141 | .addon-blog { 142 | // mixins 143 | @include border-radius(3px); 144 | @include box-shadow(0 0 2px #eee); 145 | // extending 146 | @extend .list-unstyled; 147 | // styles 148 | display: inline; 149 | position: relative; 150 | z-index: 1; 151 | color: white; 152 | font-size: 16px; 153 | line-height: 20px; 154 | width: 80%; 155 | height: 80%; 156 | padding: 5px; 157 | margin: 0 auto; 158 | border: 2px solid #ccc; 159 | background: #ddd; 160 | // desktop and up 161 | @media (min-width: $screen-md-min) { 162 | display: block; 163 | } 164 | // pseudo elements 165 | &:active, 166 | &:hover { 167 | color: black; 168 | } 169 | } 170 | -------------------------------------------------------------------------------- /docs/index.rst: -------------------------------------------------------------------------------- 1 | ####### 2 | Welcome 3 | ####### 4 | 5 | The django CMS Boilerplate Webpack is the most complete **django CMS** based 6 | Boilerplate for rapid development. It uses the full potential of 7 | `ES2015+ `_, `Webpack `_ and 8 | the `Bootstrap `_ framework for developing responsive, 9 | mobile-first projects on the web, and implements various best practices from 10 | within the front-end community. 11 | 12 | This Boilerplate can be used with standalone django CMS websites as well as 13 | on the `Divio Cloud `_ platform. 14 | 15 | The latest stable version is available on GitHub - 16 | https://github.com/divio/djangocms-boilerplate-webpack. 17 | 18 | 19 | ############# 20 | Documentation 21 | ############# 22 | 23 | .. toctree:: 24 | :maxdepth: 2 25 | 26 | general/index 27 | guidelines/index 28 | structure/index 29 | codestyle/index 30 | tips/index 31 | contribution/index 32 | -------------------------------------------------------------------------------- /docs/requirements.txt: -------------------------------------------------------------------------------- 1 | -f http://simple.crate.io/ 2 | MarkupSafe==0.23 3 | Pygments==2.0.2 4 | Sphinx==1.3.1 5 | 6 | sphinx-autobuild==0.5.0 7 | sphinx_rtd_theme # always use latest version of the theme 8 | -------------------------------------------------------------------------------- /docs/structure/general.rst: -------------------------------------------------------------------------------- 1 | ******* 2 | General 3 | ******* 4 | 5 | .. note:: 6 | 7 | Let's cover the core structure of this Boilerplate consisting of the 8 | main folders: 9 | 10 | .. code-block:: text 11 | 12 | docs/ 13 | private/ 14 | static/ 15 | templates/ 16 | 17 | The starting point for each entry is always named "base"``", with the 18 | appropriate file extension. For HTML ``base.html``, Sass ``base.scss``, 19 | JavaScript ``base.js`` – you get the idea. This way you always know which file 20 | you should look after **first**. Lets take a closer look at each individual 21 | folder: 22 | 23 | 24 | private/ 25 | ======== 26 | 27 | .. important:: 28 | This folder is **not published**, nor touched by preprocessing or other 29 | build libraries. Anything in here should be and remain safe. 30 | 31 | This folder is intended for storing preprocessing library code (Sass, Less, 32 | Coffee, HAML, etc). Simply create a folder within ``/private`` with appropriate 33 | name: ``/sass``, ``/less`` or ``/haml`` and so on as required. Always place 34 | required configuration files within the ``/private`` root. 35 | 36 | .. code-block:: text 37 | 38 | private/ 39 | └─ sass/ 40 | └─ base.sass 41 | 42 | .. hint:: 43 | We are using ``/sass`` as folder name and not ``/scss`` as the language 44 | itself is called `Sass `_. Always use the full 45 | written acronym. 46 | 47 | 48 | static/ 49 | ======= 50 | 51 | .. important:: 52 | This folder is publicly available, all files can be accessed via 53 | ``http://yourwebserver/static/``. 54 | 55 | The default folder layout looks as follows: 56 | 57 | .. code-block:: text 58 | 59 | static/ 60 | ├─ css/ 61 | ├─ fonts/ 62 | ├─ img/ 63 | ├─ js/ 64 | ├─ swf/ 65 | └─ ... 66 | 67 | If folders are not required, just simply remove them. When a folder reaches a 68 | certain file count, make use of grouping and create additional sub-directories 69 | such as ``/static/img/icons`` or ``/static/js/addons/jquery``. 70 | 71 | 72 | templates/ 73 | ========== 74 | 75 | All django templates should be allocated within the ``/templates`` folder. 76 | This also applies for apps or inclusion files. When using 77 | `Haml `_, set your configuration so templates get compiled 78 | into ``/templates``. 79 | 80 | The default *index.html* is always ``/templates/base.html``. 81 | 82 | Global inclusion files are placed within ``/templates/includes``. 83 | Addons normally have their own */includes* folder so they are not overcrowding 84 | the structure. 85 | -------------------------------------------------------------------------------- /docs/structure/index.rst: -------------------------------------------------------------------------------- 1 | ######### 2 | Structure 3 | ######### 4 | 5 | .. note:: 6 | 7 | This section covers naming conventions for folders and sub-directories. 8 | The correct placing of files is imperative for a common shared structure. 9 | It is easier to find code when you already know where it's going to be. 10 | 11 | .. toctree:: 12 | :maxdepth: 2 13 | 14 | general 15 | private 16 | static 17 | templates 18 | -------------------------------------------------------------------------------- /docs/structure/private.rst: -------------------------------------------------------------------------------- 1 | ******* 2 | Private 3 | ******* 4 | 5 | .. note:: 6 | 7 | Let's have a closer look at the **Sass** setup within ``/private`` and 8 | explain how we structured the code in there. These principles can be 9 | expanded to other preprocessors options such as **Less** or **HAML**. 10 | 11 | Every folder within ``/private/sass`` has a file called **_all.scss**. 12 | This file ultimately gets imported by ``/private/sass/base.scss`` which gets 13 | compiled into ``/static/css/base.css``. Update the *_all.scss* file to include 14 | additional modules. To keep the file simple, do not include files directly 15 | within *base.scss*. 16 | 17 | Let's cover the folders individually: 18 | 19 | 20 | components/ 21 | =========== 22 | 23 | If a component is plug-and-playable, it probably belongs in here. Good examples 24 | are jQuery plugins or django CMS addons. Sometimes larger application such as a 25 | shop might also be pluggable. 26 | 27 | 28 | libs/ 29 | ===== 30 | 31 | All independent files are placed within this folder. This implies that the 32 | order of inclusion does not matter within ``/sass/libs/_all.scss``. 33 | 34 | .. hint:: 35 | 36 | Libraries are, in their very core, plug-and-playable. The main difference 37 | between libraries and other plug-and-play components is, that if a 38 | library is removed, things will break. 39 | 40 | 41 | mixins/ 42 | ======= 43 | 44 | This folder is used to store additional functions or mixins which are not part 45 | of the default bootstrap eco-system. 46 | 47 | We provide already some helper functions such as ``em(12px, 16px)`` that 48 | calculates the pixel values from a given size in relation to the parent size. 49 | 50 | Additionally we have mixins for managing `z-index` layers and `hide-content`. 51 | 52 | 53 | settings/ 54 | ========= 55 | 56 | It is very useful to store values, that are used more than twice, within their 57 | own variable. We even encourage storing **all colour values** within the 58 | settings. **Don't repeat yourself**. Create a sub-structure, similar to 59 | ``/sites`` if the structure becomes more complex. 60 | 61 | .. warning:: 62 | 63 | Do **not** add additional variables to ``/private/sass/settings/_bootstrap.scss``. 64 | This file is reserved for **Bootstrap-only** variables. Use 65 | ``/private/sass/settings/_custom.scss`` instead. 66 | -------------------------------------------------------------------------------- /docs/structure/static.rst: -------------------------------------------------------------------------------- 1 | ****** 2 | Static 3 | ****** 4 | 5 | .. note:: 6 | 7 | As ``/static`` is publicly accessible, avoid adding sensitive files into 8 | this directory. 9 | 10 | Keep the **root path** of ``/static`` simple and clean. Only favicons should be 11 | placed there. They ultimately get picked up by the ``base_root.html`` template. 12 | 13 | 14 | css/ 15 | ==== 16 | 17 | CSS gets automatically compiled via ``/private/config.rb`` into this folder. 18 | You can add additional files such as ``*.htc`` if required. But **always 19 | add CSS files through Sass**. 20 | 21 | 22 | fonts/ 23 | ====== 24 | 25 | All fonts should be placed here including icon fonts. You can create 26 | sub-directories to create a better overview. This folder might not be required 27 | if you are implementing fonts via services such as 28 | `Google Fonts `_ or `fonts.com `_. 29 | 30 | 31 | img/ 32 | ==== 33 | 34 | Demo images (which might be later integrated as media files via Filer) 35 | should be placed within ``/static/img/dummy``. This folder will be ignored by 36 | the ``gulp preprocess`` and ``gulp images`` commands. 37 | 38 | Make use of grouping and create additional sub-directories such as 39 | ``/static/img/icons`` or ``/static/img/visuals`` if the file count seems to 40 | be excessive. 41 | 42 | 43 | js/ 44 | === 45 | 46 | The same structure approach as described within :doc:`private` is applied to 47 | the JS directory. jQuery is an essential part and should be 48 | treated the same as the Bootstrap component. 49 | -------------------------------------------------------------------------------- /docs/structure/templates.rst: -------------------------------------------------------------------------------- 1 | ********* 2 | Templates 3 | ********* 4 | 5 | .. note:: 6 | 7 | django CMS Boilerplate Webpack follows django CMS good practices, and 8 | provides three layers of site template inheritance using ``{% extends %}``. 9 | See `Django template engine `_. 10 | 11 | From the top down the three layers are: 12 | 13 | - *user-selectable page templates* (``base.html``), which inherit from: 14 | - ``base_root.html`` 15 | 16 | 17 | ============== 18 | ``base.html`` 19 | ============= 20 | 21 | ``base.html`` sets up the components that will rarely if ever need to be 22 | changed, and that you want to keep out of sight and out of mind as much as 23 | possible. 24 | 25 | It contains fundamental HTML elements (```` ```` and so on) so that 26 | these don't need to be managed in inheriting templates. 27 | 28 | It is also intended to be almost wholly content-agnostic - it doesn't know or 29 | care about how your site's pages are going to be structured, and shouldn't 30 | need to. To this end it provides an empty ``{% block extend_root %}{% endblock %}``, 31 | that inheriting templates will override to provide the page's content. 32 | 33 | In addition, Addons such as `Aldryn News & Blog `_ 34 | in the Divio Cloud Collection family of applications are designed to use the same 35 | JavaScript frameworks throughout, so there is no need for references to them 36 | to be made anywhere else than ``base_root.html``. 37 | 38 | 39 | ================ 40 | ``content.html`` 41 | ================ 42 | 43 | ``content.html`` is the template that *designers* will be most interested in. 44 | It fills in the bare HTML elements of ``base.html``, and allows page 45 | content structures and layouts (headings, ``divs``, navigation menus and so on) 46 | to be created within ``{% block extend_root %}``. 47 | 48 | ``content.html`` contains an *empty* ``{% block content %}``, that - in templates 49 | that extend it - is filled with ``{% placeholder content %}`` as well as width 50 | cues for images etc. 51 | 52 | 53 | ============================== 54 | User-selectable page templates 55 | ============================== 56 | 57 | Finally, users can select templates that inherit from ``base.html``. 58 | Even if your project has one 'standard' template and some minor variations, 59 | it is wise for *all* of them to inherit from a ``base.html``, so that they 60 | can all be edited independently. Even if your 'standard' template changes 61 | nothing in ``base.html``, you should not be tempted to make ``base.html`` 62 | selectable by the user. 63 | 64 | 65 | The following templates are always required: 66 | 67 | - ``404.html`` for 404 error handling. You are not obliged to construct an 68 | elaborate and hilarious tribute to some trope in popular culture, because you are an adult. 69 | - ``500.html`` for critical errors, **only add generic html without template tags** 70 | - ``base.html`` as entry point for ``{% extends %}`` 71 | 72 | 73 | ========= 74 | includes/ 75 | ========= 76 | 77 | Global inclusion files should be added here, for example the 78 | `navigation `_, 79 | `django messages `_ 80 | or tracking codes. Create additional */include* folders within addons to avoid 81 | overcrowding this directory. 82 | 83 | 84 | ============== 85 | Page Templates 86 | ============== 87 | 88 | django CMS allows you to set 89 | `CMS_TEMPLATES `_ 90 | which can be chosen within the CMS by the user. 91 | 92 | .. image:: ../_static/toolbar-templates.png 93 | 94 | 95 | ========== 96 | Page Types 97 | ========== 98 | 99 | You can save a CMS page as "Page Type" and re-use it later when creating a 100 | new page. Simply select *Page > Save as Page Type ..* and choose a name. 101 | You can create a new page by selecting *Page > Add Page > New Page* and choose 102 | the "Page type" you want to use. That drop down does not show up if there are 103 | no page types saved. 104 | 105 | Page types are listed separately within the menu tree underneath *Page Types*. 106 | This allows you to change or delete them at any time if required. 107 | 108 | .. image:: ../_static/toolbar-page-types.png 109 | 110 | 111 | ======================= 112 | Blocks and Placeholders 113 | ======================= 114 | 115 | The content block ``{% block content %}{% endblock %}`` and placeholder 116 | ``{% placeholder content %}`` always need to be present within page templates. 117 | -------------------------------------------------------------------------------- /docs/tips/index.rst: -------------------------------------------------------------------------------- 1 | ############### 2 | Tips and Tricks 3 | ############### 4 | 5 | .. note:: 6 | 7 | There are several tips & tricks we found over the time that are worth 8 | mentioning. 9 | 10 | 11 | ******** 12 | Floating 13 | ******** 14 | 15 | When using ``float: left;``, ``display: block;`` is not required anymore as 16 | **every** element which is floated automatically gets the **block** state. 17 | This does not apply to sub-elements. 18 | 19 | 20 | **************** 21 | Hidden Attribute 22 | **************** 23 | 24 | With modern HTML5 we can use the ``hidden="hidden"`` attribute which is a 25 | **softer** version of ``display: none;``. This state can easily be overwritten 26 | using CSS or JavaScript. As such the attribute is ideal for hiding elements 27 | which are later displayed through JavaScript to prevent jumping behaviours. 28 | But be aware of the `current support `_. 29 | 30 | 31 | ****************** 32 | Image Optimisation 33 | ****************** 34 | 35 | Images are the number one source of optimisation when it comes to file size. 36 | Optimise images using tools like `CodeKit `_, 37 | `ImageOptim `_ or our internal 38 | `Gulp `_ command: ``gulp images``. 39 | -------------------------------------------------------------------------------- /gulpfile.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, Divio AG 3 | * Licensed under BSD 4 | * http://github.com/divio/djangocms-boilerplate-webpack 5 | */ 6 | 7 | // INFO: 8 | // - The minimatch/graceful-fs warnings are from gulp, needs upgrade to 4.0 once released. 9 | 10 | // ############################################################################# 11 | // IMPORTS 12 | const argv = require('minimist')(process.argv.slice(2)); 13 | const gulp = require('gulp'); 14 | 15 | // ############################################################################# 16 | // SETTINGS 17 | const PROJECT_ROOT = __dirname; 18 | const PROJECT_PATH = { 19 | css: PROJECT_ROOT + '/static/css', 20 | html: PROJECT_ROOT + '/templates', 21 | images: PROJECT_ROOT + '/static/img', 22 | sass: PROJECT_ROOT + '/private/sass', 23 | sprites: PROJECT_ROOT + '/static/sprites', 24 | svg: PROJECT_ROOT + '/private/svg', 25 | js: PROJECT_ROOT + '/static/js', 26 | webpack: PROJECT_ROOT + '/private/js', 27 | }; 28 | const PROJECT_PATTERNS = { 29 | css: [ 30 | PROJECT_PATH.css + '/*base*.css', 31 | '!' + PROJECT_PATH.css + '/*-critical.css', 32 | ], 33 | images: [ 34 | PROJECT_PATH.images + '/**/*', 35 | ], 36 | js: [ 37 | '*.js', 38 | './tools/tasks/**/*.js', 39 | PROJECT_PATH.webpack + '*.config.js', 40 | PROJECT_PATH.webpack + '/**/*.js', 41 | '!' + PROJECT_PATH.webpack + '/*.min.js', 42 | '!' + PROJECT_PATH.webpack + '/**/*.min.js', 43 | ], 44 | sass: [ 45 | PROJECT_PATH.sass + '/**/*.{scss,sass}', 46 | '!' + PROJECT_PATH.sass + '/libs/_svgsprite.scss', 47 | ], 48 | svg: { 49 | icons: [PROJECT_PATH.svg + '/icons/**/*.svg'], 50 | // Uncomment in order to have multiple icon sets 51 | // other: [PROJECT_PATH.svg + '/other/**/*.svg'], 52 | }, 53 | }; 54 | 55 | /** 56 | * Generic utility to import gulp tasks and pass options to them 57 | * 58 | * @param {String} id - task name 59 | * @param {Object} [extra] - optional options to pass 60 | * @returns {Function} - task definition 61 | */ 62 | function task(id, extra) { 63 | return require('./tools/tasks/' + id)( 64 | gulp, 65 | Object.assign( 66 | { 67 | PROJECT_ROOT: PROJECT_ROOT, 68 | PROJECT_PATH: PROJECT_PATH, 69 | PROJECT_PATTERNS: PROJECT_PATTERNS, 70 | argv: argv, 71 | }, 72 | extra 73 | ) 74 | ); 75 | } 76 | 77 | 78 | // ############################################################################# 79 | // TASKS 80 | 81 | /** 82 | * WARNING: postcss-critical-split is considered experimental and may be buggy, so it's disabled by default 83 | * 84 | * Usage: 85 | * - "gulp sass" (generates sass, splits the files, and injects the code) 86 | * - "gulp sass --debug" (to generate unminified css with sourcemaps) 87 | * - "gulp sass:compile" (just generates the base.css out of sass, handy to skip critical css) 88 | * - "gulp sass:critical" (splits the base.css with the critical css) 89 | * - "gulp sass:rest" (splits the base.css with the remaining "rest" css) 90 | * - "gulp sass:inline" (injects the base-critical.css as inline css into the template) 91 | */ 92 | // gulp.task('sass', ['sass:critical', 'sass:rest', 'sass:inline']); 93 | gulp.task('sass', ['sass:compile']); 94 | gulp.task('sass:compile', task('sass/compile')); 95 | // gulp.task('sass:critical', ['sass:compile'], task('sass/critical')); 96 | // gulp.task('sass:rest', ['sass:compile'], task('sass/rest')); 97 | // gulp.task('sass:inline', ['sass:critical'], task('sass/inline')); 98 | 99 | /** 100 | * Usage: 101 | * - "gulp lint" (runs sass and js linter) 102 | * - "gulp lint --debug" (switches linters to verbose mode) 103 | * - "gulp lint:sass" (runs the linter for sass) 104 | * - "gulp lint:javascript" (runs the linter for javascript) 105 | */ 106 | gulp.task('lint', ['lint:sass', 'lint:javascript']); 107 | gulp.task('lint:sass', task('lint/sass')); 108 | gulp.task('lint:javascript', task('lint/javascript')); 109 | 110 | /** 111 | * Usage: 112 | * - "gulp webpack" (compiles javascript) 113 | * - "gulp webpack --debug" (disables compressions and adds sourcemaps) 114 | * - "gulp webpack:watch" (separately watch js instead of simply running `gulp`) 115 | * - "gulp webpack:compile" (compiles javascript) 116 | */ 117 | gulp.task('webpack', ['webpack:compile']); 118 | gulp.task('webpack:compile', task('webpack/compile')); 119 | gulp.task('webpack:watch', task('webpack/compile', { watch: true })); 120 | 121 | /** 122 | * Usage: 123 | * - "gulp icons" (compiles to sprites) 124 | */ 125 | gulp.task('icons', ['icons:sprite:icons:json']); 126 | gulp.task('icons:sprite:icons', task('icons/svgsprite', { svg: 'icons' })); 127 | 128 | /** 129 | * Used as part of `gulp icons` - creates iconset.json that can be used for icon plugins, e.g. aldryn-bootstrap3 or 130 | * djangocms-bootstrap4 icon plugins, as well as for generating iconography page in styleguide 131 | */ 132 | gulp.task('icons:sprite:icons:json', ['icons:sprite:icons'], task('icons/json', { svg: 'icons' })) 133 | // Uncomment in order to have multiple icon sets 134 | // gulp.task('icons:sprite:other', task('icons/svgsprite', { svg: 'other' })); 135 | 136 | /** 137 | * Usage: 138 | * - "gulp optimise" (runs various optimisation tools) 139 | * - "gulp optimise:svg" (ensures svg files are minified and optimised) 140 | * - "gulp optimise:images" (ensures images files are optimised) 141 | */ 142 | gulp.task('optimise', ['optimise:svg']); 143 | gulp.task('optimise:svg', task('optimise/svg')); 144 | gulp.task('optimise:images', task('optimise/images')); 145 | 146 | /** 147 | * process.env.GULP_MODE === 'production' means we have a limited 148 | * subset of tasks to speed up the deployment / installation process. 149 | */ 150 | gulp.task('default', ['sass', 'webpack', 'lint', 'watch']); 151 | 152 | gulp.task('watch', function () { 153 | gulp.start('webpack:watch'); 154 | gulp.watch(PROJECT_PATTERNS.sass, ['sass', 'lint:sass']); 155 | gulp.watch(PROJECT_PATTERNS.js, ['lint:javascript']); 156 | }); 157 | // used on the cloud 158 | gulp.task('build', ['sass', 'webpack']); 159 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package", 3 | "private": true, 4 | "dependencies": { 5 | "autoprefixer": "^6.7.7", 6 | "babel-core": "^6.24.0", 7 | "babel-eslint": "^7.2.1", 8 | "babel-loader": "^7.1.0", 9 | "babel-plugin-lodash": "^3.2.11", 10 | "babel-plugin-transform-runtime": "^6.23.0", 11 | "babel-preset-env": "^1.3.2", 12 | "babel-runtime": "^6.23.0", 13 | "bootstrap-sass": "^3.3.7", 14 | "exports-loader": "^0.6.4", 15 | "eyeglass": "^0.7.1", 16 | "gulp": "^3.9.1", 17 | "gulp-check-filesize": "^2.0.1", 18 | "gulp-clean-css": "^3.0.4", 19 | "gulp-concat-util": "^0.5.5", 20 | "gulp-eslint": "^3.0.1", 21 | "gulp-file": "^0.3.0", 22 | "gulp-if": "^2.0.2", 23 | "gulp-imagemin": "^3.2.0", 24 | "gulp-postcss": "^6.4.0", 25 | "gulp-rename": "^1.2.2", 26 | "gulp-sass": "^3.1.0", 27 | "gulp-sourcemaps": "^2.4.1", 28 | "gulp-stylelint": "^3.9.0", 29 | "gulp-svg-sprites": "^4.1.1", 30 | "gutil": "^1.6.4", 31 | "imports-loader": "^0.7.1", 32 | "jquery": "^3.2.1", 33 | "lodash": "^4.17.4", 34 | "minimist": "^1.2.0", 35 | "postcss-critical-split": "^2.5.0", 36 | "svg4everybody": "^2.1.8", 37 | "webpack": "^3.0.0", 38 | "webpack2-polyfill-plugin": "0.0.2" 39 | }, 40 | "devDependencies": {} 41 | } 42 | -------------------------------------------------------------------------------- /private/js/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["env", { 4 | "modules": false 5 | }] 6 | ], 7 | "plugins": ["transform-runtime"], 8 | "env": { 9 | "production": { 10 | "plugins": [ 11 | "lodash" 12 | ] 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /private/js/addons/utils.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, Divio AG 3 | * Licensed under BSD 4 | * http://github.com/divio/djangocms-boilerplate-webpack 5 | */ 6 | 7 | import $ from 'jquery'; 8 | 9 | /** 10 | * Localstorage shim from Modernizr 11 | * 12 | * @property {Boolean} isStorageSupported localstorage availability 13 | */ 14 | export const isStorageSupported = /*#__PURE__*/(function localStorageCheck () { 15 | var mod = 'modernizr'; 16 | 17 | try { 18 | localStorage.setItem(mod, mod); 19 | localStorage.removeItem(mod); 20 | return true; 21 | } catch (e) { 22 | return false; 23 | } 24 | })(); 25 | 26 | /** 27 | * Document setup for no javascript fallbacks and logging 28 | * 29 | * @method noscript 30 | * @private 31 | */ 32 | export function noscript () { 33 | // remove no-js class if javascript is activated 34 | $(document.body).removeClass('no-js'); 35 | } 36 | 37 | /** 38 | * Simple redirection 39 | * 40 | * @method redirectTo 41 | * @param {String} url - URL string 42 | */ 43 | export function redirectTo (url) { 44 | window.location.href = url; 45 | } 46 | 47 | /** 48 | * Save information within local storage 49 | * 50 | * @method setStorage 51 | * @param {String} token - namespace 52 | * @param {String} value - storage value 53 | * @returns {Boolean|String} item value or negative result 54 | */ 55 | export function setStorage (token, value) { 56 | if (token && value && isStorageSupported) { 57 | localStorage.setItem(token, value); 58 | return value; 59 | } 60 | return false; 61 | } 62 | 63 | /** 64 | * Retrieve information from local storage 65 | * 66 | * @method getStorage 67 | * @param {String} token - namespace 68 | * @returns {Object|Boolean} localStorage item or negative result 69 | */ 70 | export function getStorage (token) { 71 | if (token && isStorageSupported) { 72 | return localStorage.getItem(token); 73 | } 74 | return false; 75 | } 76 | -------------------------------------------------------------------------------- /private/js/base.js: -------------------------------------------------------------------------------- 1 | import $ from 'jquery'; 2 | // better to include relevant modules directly in modules you are using them, 3 | // but this is also ok 4 | import 'libs/bootstrap'; 5 | import outdatedBrowser from 'outdatedbrowser'; 6 | import { noscript } from 'addons/utils'; 7 | import svg4everybody from 'svg4everybody'; 8 | 9 | svg4everybody(); 10 | 11 | $(() => { 12 | noscript(); 13 | outdatedBrowser({ 14 | languagePath: '', 15 | lowerThan: 'boxShadow', 16 | }); 17 | }); 18 | -------------------------------------------------------------------------------- /private/js/cms.js: -------------------------------------------------------------------------------- 1 | /* global CMS */ 2 | import $ from 'jquery'; 3 | 4 | // The event fires on successful reloads of the content mode when 5 | // editing a page with the cms 6 | // If your js module doesn't reload correctly - you may want to reinitialize it here. 7 | CMS.$(window).on('cms-content-refresh', () => { 8 | // e.g. initMySlider(); 9 | 10 | // SVGs for some reason don't like DOM diffing, probably related to creation of elements 11 | // with incorrect namespace, but no time to look into it now ¯\_(ツ)_/¯ 12 | $('svg').each((i, el) => { 13 | $(el).replaceWith($(el).clone().wrap('
').parent().html()); 14 | }); 15 | }); 16 | -------------------------------------------------------------------------------- /private/js/libs/bootstrap.js: -------------------------------------------------------------------------------- 1 | // pick what you want, but order is important 2 | import 'bootstrap-sass/assets/javascripts/bootstrap/transition'; 3 | import 'bootstrap-sass/assets/javascripts/bootstrap/alert'; 4 | import 'bootstrap-sass/assets/javascripts/bootstrap/button'; 5 | import 'bootstrap-sass/assets/javascripts/bootstrap/carousel'; 6 | import 'bootstrap-sass/assets/javascripts/bootstrap/collapse'; 7 | import 'bootstrap-sass/assets/javascripts/bootstrap/dropdown'; 8 | import 'bootstrap-sass/assets/javascripts/bootstrap/modal'; 9 | import 'bootstrap-sass/assets/javascripts/bootstrap/tab'; 10 | import 'bootstrap-sass/assets/javascripts/bootstrap/affix'; 11 | import 'bootstrap-sass/assets/javascripts/bootstrap/scrollspy'; 12 | import 'bootstrap-sass/assets/javascripts/bootstrap/tooltip'; 13 | import 'bootstrap-sass/assets/javascripts/bootstrap/popover'; 14 | -------------------------------------------------------------------------------- /private/js/libs/outdatedBrowser.min.js: -------------------------------------------------------------------------------- 1 | /*!-------------------------------------------------------------------- 2 | JAVASCRIPT "Outdated Browser" 3 | Version: 1.1.2 - 2015 4 | author: Burocratik 5 | website: http://www.burocratik.com 6 | * @preserve 7 | -----------------------------------------------------------------------*/ 8 | var outdatedBrowser=function(t){function o(t){s.style.opacity=t/100,s.style.filter="alpha(opacity="+t+")"}function e(t){o(t),1==t&&(s.style.display="block"),100==t&&(u=!0)}function r(){var t=document.getElementById("btnCloseUpdateBrowser"),o=document.getElementById("btnUpdateBrowser");s.style.backgroundColor=bkgColor,s.style.color=txtColor,s.children[0].style.color=txtColor,s.children[1].style.color=txtColor,o.style.color=txtColor,o.style.borderColor&&(o.style.borderColor=txtColor),t.style.color=txtColor,t.onmousedown=function(){return s.style.display="none",!1},o.onmouseover=function(){this.style.color=bkgColor,this.style.backgroundColor=txtColor},o.onmouseout=function(){this.style.color=txtColor,this.style.backgroundColor=bkgColor}}function l(){var t=!1;if(window.XMLHttpRequest)t=new XMLHttpRequest;else if(window.ActiveXObject)try{t=new ActiveXObject("Msxml2.XMLHTTP")}catch(o){try{t=new ActiveXObject("Microsoft.XMLHTTP")}catch(o){t=!1}}return t}function a(t){var o=l();return o&&(o.onreadystatechange=function(){n(o)},o.open("GET",t,!0),o.send(null)),!1}function n(t){var o=document.getElementById("outdated");return 4==t.readyState&&(o.innerHTML=200==t.status||304==t.status?t.responseText:d,r()),!1}var s=document.getElementById("outdated");this.defaultOpts={bgColor:"#f25648",color:"#ffffff",lowerThan:"transform",languagePath:"../outdatedbrowser/lang/en.html"},t?("IE8"==t.lowerThan||"borderSpacing"==t.lowerThan?t.lowerThan="borderSpacing":"IE9"==t.lowerThan||"boxShadow"==t.lowerThan?t.lowerThan="boxShadow":"IE10"==t.lowerThan||"transform"==t.lowerThan||""==t.lowerThan||"undefined"==typeof t.lowerThan?t.lowerThan="transform":("IE11"==t.lowerThan||"borderImage"==t.lowerThan)&&(t.lowerThan="borderImage"),this.defaultOpts.bgColor=t.bgColor,this.defaultOpts.color=t.color,this.defaultOpts.lowerThan=t.lowerThan,this.defaultOpts.languagePath=t.languagePath,bkgColor=this.defaultOpts.bgColor,txtColor=this.defaultOpts.color,cssProp=this.defaultOpts.lowerThan,languagePath=this.defaultOpts.languagePath):(bkgColor=this.defaultOpts.bgColor,txtColor=this.defaultOpts.color,cssProp=this.defaultOpts.lowerThan,languagePath=this.defaultOpts.languagePath);var u=!0,i=function(){var t=document.createElement("div"),o="Khtml Ms O Moz Webkit".split(" "),e=o.length;return function(r){if(r in t.style)return!0;for(r=r.replace(/^[a-z]/,function(t){return t.toUpperCase()});e--;)if(o[e]+r in t.style)return!0;return!1}}();if(!i(""+cssProp)){if(u&&"1"!==s.style.opacity){u=!1;for(var c=1;100>=c;c++)setTimeout(function(t){return function(){e(t)}}(c),8*c)}" "===languagePath||0==languagePath.length?r():a(languagePath);var d='
Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×

'}}; 9 | -------------------------------------------------------------------------------- /private/js/webpack.config.js: -------------------------------------------------------------------------------- 1 | const argv = require('minimist')(process.argv.slice(2)); 2 | const WebpackPolyfillPlugin = require('webpack2-polyfill-plugin'); 3 | const plugins = []; 4 | const webpack = require('webpack'); 5 | const path = require('path'); 6 | 7 | 8 | // TODO check if polling is still required https://github.com/divio/djangocms-boilerplate-webpack/blob/master/webpack.config.debug.js#L16 9 | 10 | process.env.NODE_ENV = (argv.debug) ? 'development' : 'production'; 11 | 12 | plugins.push( 13 | new WebpackPolyfillPlugin() 14 | ); 15 | 16 | // Bundle splitting. Don't forget to {% addtoblock "js" %} afterwards 17 | plugins.push( 18 | new webpack.optimize.CommonsChunkPlugin({ 19 | name: 'base', 20 | chunks: ['base', 'cms'], 21 | }) 22 | ); 23 | 24 | // add plugins depending on if we are debugging or not 25 | if (argv.debug) { 26 | plugins.push( 27 | new webpack.LoaderOptionsPlugin({ 28 | minimize: false, 29 | debug: true, 30 | }) 31 | ); 32 | plugins.push( 33 | new webpack.DefinePlugin({ 34 | DEBUG: 'true', 35 | }) 36 | ); 37 | } else { 38 | plugins.push(new webpack.optimize.ModuleConcatenationPlugin()); 39 | plugins.push(new webpack.optimize.OccurrenceOrderPlugin()); 40 | plugins.push( 41 | new webpack.LoaderOptionsPlugin({ 42 | minimize: true, 43 | debug: false, 44 | }) 45 | ); 46 | plugins.push( 47 | new webpack.DefinePlugin({ 48 | DEBUG: 'false', 49 | }) 50 | ); 51 | plugins.push( 52 | new webpack.optimize.UglifyJsPlugin({ 53 | beautify: false, 54 | mangle: { 55 | screw_ie8: true, 56 | keep_fnames: true, 57 | }, 58 | compress: { 59 | screw_ie8: true, 60 | }, 61 | comments: false, 62 | }) 63 | ); 64 | } 65 | 66 | module.exports = { 67 | devtool: argv.debug ? 'cheap-module-eval-source-map' : false, 68 | entry: { 69 | base: path.join(__dirname, 'base.js'), 70 | cms: path.join(__dirname, 'cms.js'), 71 | // detail: path.join(__dirname, 'detail.js'), 72 | }, 73 | output: { 74 | path: path.join(__dirname, '..', '..', 'static', 'js', 'dist'), 75 | filename: '[name].bundle.js', 76 | publicPath: '/static/', 77 | }, 78 | plugins: plugins, 79 | resolve: { 80 | modules: [__dirname, 'node_modules'], 81 | alias: { 82 | // make sure that we always use our jquery when loading 3rd party plugins 83 | jquery: require.resolve('jquery'), 84 | outdatedbrowser: path.join(__dirname, 'libs', 'outdatedBrowser.min.js'), 85 | }, 86 | }, 87 | module: { 88 | rules: [ 89 | { 90 | test: /\.js$/, 91 | use: [{ 92 | loader: 'babel-loader', 93 | options: { 94 | retainLines: true, 95 | }, 96 | }], 97 | exclude: /(node_modules|vendor|libs|addons\/jquery.*)/, 98 | include: __dirname, 99 | }, 100 | { 101 | test: /outdatedBrowser/, 102 | use: [{ 103 | loader: 'exports-loader', 104 | options: { 105 | outdatedBrowser: true, 106 | }, 107 | }], 108 | 109 | }, 110 | { 111 | test: /bootstrap-sass/, 112 | use: [{ 113 | loader: 'imports-loader', 114 | options: { 115 | jQuery: 'jquery', 116 | }, 117 | }], 118 | }, 119 | ], 120 | }, 121 | } 122 | 123 | // disable DeprecationWarning: loaderUtils.parseQuery() DeprecationWarning 124 | process.noDeprecation = true 125 | -------------------------------------------------------------------------------- /private/sass/base.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | /* 3 | * Copyright (c) 2013, Divio AG 4 | * Licensed under BSD 5 | * http://github.com/divio/djangocms-boilerplate-webpack 6 | */ 7 | 8 | // ############################################################################# 9 | // IMPORTS 10 | @import "settings/all"; 11 | 12 | // importin mixins 13 | @import "mixins/all"; 14 | 15 | // importing frameworks 16 | @import "libs/all"; 17 | 18 | // importing components 19 | @import "components/all"; 20 | -------------------------------------------------------------------------------- /private/sass/components/_all.scss: -------------------------------------------------------------------------------- 1 | // ############################################################################# 2 | // AUTOIMPORTS 3 | // this folder contains required variables for colors, sizes, styles and more 4 | // add additional files for encapsulated settings 5 | 6 | @import "fonts"; 7 | @import "browser"; 8 | @import "icons"; 9 | @import "buttons"; 10 | @import "forms"; 11 | @import "helpers"; 12 | @import "cms"; 13 | @import "print"; 14 | -------------------------------------------------------------------------------- /private/sass/components/_browser.scss: -------------------------------------------------------------------------------- 1 | // ############################################################################# 2 | // OUTDATED BROWSER 3 | // this addon adds modified styles to the outdated browser script found 4 | // on outdatedbrowser.com we specifically added changes to class names and 5 | // removed id references to be more compliant 6 | /* stylelint-disable selector-max-type, selector-max-universal */ 7 | 8 | .browser-outdated { 9 | display: none; 10 | position: fixed; 11 | bottom: 0; 12 | left: 0; 13 | z-index: 9999; 14 | color: #fff; 15 | text-align: center; 16 | text-transform: uppercase; 17 | // do not add paddings or margins on the container 18 | width: 100%; 19 | height: auto; 20 | background-color: $brand-danger; 21 | 22 | h3, 23 | p { 24 | color: #fff; 25 | } 26 | 27 | .btn-outline { 28 | color: #fff; 29 | border: 2px solid #fff; 30 | 31 | &:hover { 32 | color: $brand-danger; 33 | background: #fff; 34 | } 35 | } 36 | 37 | .last { 38 | position: absolute; 39 | top: $line-height-computed / 2; 40 | right: $line-height-computed; 41 | 42 | a { 43 | display: inline-block; 44 | color: #fff; 45 | font-size: 36px; 46 | line-height: 1; 47 | text-decoration: none; 48 | } 49 | } 50 | 51 | // add spacer in order for cross styling between noscript and out-of-date 52 | .btn-outline, 53 | noscript h3 { 54 | margin-bottom: $line-height-computed; 55 | } 56 | } 57 | 58 | // additionally also implement a warning when JavaScript is disabled 59 | .noscript .browser-outdated { 60 | display: block; 61 | 62 | p, 63 | h3 { 64 | display: none; 65 | } 66 | 67 | noscript h3 { 68 | display: block; 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /private/sass/components/_buttons.scss: -------------------------------------------------------------------------------- 1 | // ############################################################################# 2 | // BUTTONS 3 | // all styles related to the button system should be declared within this file 4 | // apply the "sites/" nesting described within the documentation if the file is 5 | // getting to large 6 | 7 | // BUTTONS/animation 8 | .btn { 9 | transition: background $speed-base; 10 | } 11 | 12 | %btn-outline { 13 | border: 1px solid transparent; 14 | background: transparent; 15 | } 16 | 17 | // BUTTONS/outline 18 | .btn-outline { 19 | &-default { 20 | @extend %btn-outline; 21 | @include button-variant-outline($btn-default-color, $btn-default-border); 22 | } 23 | 24 | &-primary { 25 | @extend %btn-outline; 26 | @include button-variant-outline($btn-primary-bg, $btn-primary-border); 27 | } 28 | 29 | &-success { 30 | @extend %btn-outline; 31 | @include button-variant-outline($btn-success-bg, $btn-success-border); 32 | } 33 | 34 | &-info { 35 | @extend %btn-outline; 36 | @include button-variant-outline($btn-info-bg, $btn-info-border); 37 | } 38 | 39 | &-warning { 40 | @extend %btn-outline; 41 | @include button-variant-outline($btn-warning-bg, $btn-warning-border); 42 | } 43 | 44 | &-danger { 45 | @extend %btn-outline; 46 | @include button-variant-outline($btn-danger-bg, $btn-danger-border); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /private/sass/components/_cms.scss: -------------------------------------------------------------------------------- 1 | $cms-condensed-structure-width: 402px; 2 | 3 | .cms-toolbar-expanded { 4 | margin-top: 0 !important; 5 | padding-top: 46px; 6 | } 7 | 8 | @media (min-width: ($screen-lg + $cms-condensed-structure-width)) { 9 | .cms-structure-mode-structure { 10 | width: calc(100% - #{$cms-condensed-structure-width}); 11 | } 12 | 13 | .cms-structure-mode-structure .navbar-fixed-top { 14 | right: $cms-condensed-structure-width; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /private/sass/components/_fonts.scss: -------------------------------------------------------------------------------- 1 | // ############################################################################# 2 | // FONTS 3 | 4 | // there are two options to choose from when integrating fonts: 5 | // "OPTION 1": importing fonts from an external resource 6 | // "OPTION 2": hosting the files yourself 7 | 8 | // OPTION 1 9 | // @import url("https://fonts.googleapis.com/css?family=Lobster"); 10 | 11 | // OPTION 2 12 | // @font-face { 13 | // font-family: "ClearSans"; 14 | // font-weight: 200; 15 | // src: url("../fonts/clearsans/ClearSans-Light.eot?#iefix"); 16 | // src: url("../fonts/clearsans/ClearSans-Light.eot?#iefix") format("eot"), 17 | // url("../fonts/clearsans/ClearSans-Light.woff") format("woff"), 18 | // url("../fonts/clearsans/ClearSans-Light.ttf") format("truetype"), 19 | // url("../fonts/clearsans/ClearSans-Light.svg#ClearSans-Light") format("svg"); 20 | // } 21 | // 22 | // @font-face { 23 | // font-family: "ClearSans"; 24 | // font-weight: 400; 25 | // src: url("../fonts/clearsans/ClearSans-Regular.eot?#iefix"); 26 | // src: url("../fonts/clearsans/ClearSans-Regular.eot?#iefix") format("eot"), 27 | // url("../fonts/clearsans/ClearSans-Regular.woff") format("woff"), 28 | // url("../fonts/clearsans/ClearSans-Regular.ttf") format("truetype"), 29 | // url("../fonts/clearsans/ClearSans-Regular.svg#ClearSans-Light") format("svg"); 30 | // } 31 | // @font-face { 32 | // font-family: "ClearSans"; 33 | // font-weight: 600; 34 | // src: url("../fonts/clearsans/ClearSans-Medium.eot?#iefix"); 35 | // src: url("../fonts/clearsans/ClearSans-Medium.eot?#iefix") format("eot"), 36 | // url("../fonts/clearsans/ClearSans-Medium.woff") format("woff"), 37 | // url("../fonts/clearsans/ClearSans-Medium.ttf") format("truetype"), 38 | // url("../fonts/clearsans/ClearSans-Medium.svg#ClearSans-Light") format("svg"); 39 | // } 40 | -------------------------------------------------------------------------------- /private/sass/components/_forms.scss: -------------------------------------------------------------------------------- 1 | // ############################################################################# 2 | // FORMS 3 | // all styles related to the global forms should be declared within this file 4 | // apply the "sites/" nesting described within the documentation if the file 5 | // is getting to large 6 | 7 | // FORMS/fieldset 8 | // DOCS: http://getbootstrap.com/css/#tables-responsive 9 | @-moz-document url-prefix() { 10 | fieldset { // stylelint-disable 11 | display: table-cell; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /private/sass/components/_helpers.scss: -------------------------------------------------------------------------------- 1 | // ############################################################################# 2 | // HELPERS 3 | // helper classes for the general layout 4 | 5 | // HELPERS/spacer 6 | .spacer { 7 | margin-top: $line-height-computed; 8 | margin-bottom: $line-height-computed; 9 | } 10 | 11 | .spacer-xs { 12 | margin-top: $line-height-computed / 2; 13 | margin-bottom: $line-height-computed / 2; 14 | } 15 | 16 | .spacer-sm { 17 | margin-top: $line-height-computed / 1.5; 18 | margin-bottom: $line-height-computed / 1.5; 19 | } 20 | 21 | .spacer-md { 22 | @extend .spacer; 23 | } 24 | 25 | .spacer-lg { 26 | margin-top: $line-height-computed * 2; 27 | margin-bottom: $line-height-computed * 2; 28 | } 29 | 30 | .spacer-zero { 31 | margin: 0; 32 | } 33 | 34 | .spacer:after, 35 | .spacer-xs:after, 36 | .spacer-sm:after, 37 | .spacer-md:after, 38 | .spacer-lg:after, 39 | .spacer-zero:after { 40 | content: ""; 41 | display: table; 42 | clear: both; 43 | } 44 | 45 | // HELPERS/accessibility 46 | .skip-links { 47 | @extend .list-unstyled; 48 | 49 | position: absolute; 50 | top: $navbar-height; 51 | right: 0; 52 | left: 0; 53 | z-index: 9999; 54 | 55 | // stylelint-disable-next-line 56 | a { 57 | @extend .sr-only; 58 | @extend .sr-only-focusable; 59 | } 60 | } 61 | 62 | // HELPERS/colors 63 | @include bg-variant(".brand-primary", $brand-primary); 64 | @include bg-variant(".brand-success", $brand-success); 65 | @include bg-variant(".brand-info", $brand-info); 66 | @include bg-variant(".brand-warning", $brand-warning); 67 | @include bg-variant(".brand-danger", $brand-danger); 68 | @include bg-variant(".brand-muted", $text-muted); 69 | @include bg-variant(".brand-gray-darker", $gray-darker); 70 | @include bg-variant(".brand-gray-dark", $gray-dark); 71 | @include bg-variant(".brand-gray", $gray); 72 | @include bg-variant(".brand-gray-light", $gray-light); 73 | @include bg-variant(".brand-gray-lighter", $gray-lighter); 74 | -------------------------------------------------------------------------------- /private/sass/components/_icons.scss: -------------------------------------------------------------------------------- 1 | /* stylelint-disable */ 2 | 3 | $svg-colors: ( 4 | "brand-primary": $brand-primary, 5 | "brand-danger": $brand-danger, 6 | "brand-warning": $brand-warning, 7 | "brand-info": $brand-info, 8 | "brand-success": $brand-success, 9 | "gray-darker": $gray-darker, 10 | "gray-dark": $gray-dark, 11 | "gray": $gray, 12 | "gray-light": $gray-light, 13 | "gray-lighter": $gray-lighter, 14 | "white": white, 15 | "black": black, 16 | ); 17 | 18 | .icon { 19 | display: inline-block; 20 | vertical-align: top; 21 | width: 1em; 22 | height: 1em; 23 | 24 | svg { 25 | display: block; 26 | width: 100%; 27 | height: 100%; 28 | } 29 | } 30 | 31 | @each $key in map-keys($svg-colors) { 32 | .icon-#{$key} { 33 | color: map-get($svg-colors, $key); 34 | 35 | svg { 36 | fill: map-get($svg-colors, $key); 37 | } 38 | } 39 | } 40 | 41 | svg path { 42 | fill: inherit; 43 | } 44 | -------------------------------------------------------------------------------- /private/sass/components/_print.scss: -------------------------------------------------------------------------------- 1 | // ############################################################################# 2 | // PRINT 3 | // this file is intended for all print styles and rules 4 | // to ensure your website also works when printed 5 | /* stylelint-disable selector-max-type */ 6 | 7 | @media print { 8 | 9 | // Defaults 10 | a[href]:after { 11 | content: ""; 12 | } 13 | 14 | #cms_toolbar, 15 | .browser-outdated { 16 | display: none !important; 17 | } 18 | 19 | // Custom 20 | .navbar-head { 21 | display: block; 22 | } 23 | 24 | .navbar-main { 25 | display: none; 26 | } 27 | 28 | .navbar-head .navbar-brand a { 29 | text-indent: 0; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /private/sass/libs/_all.scss: -------------------------------------------------------------------------------- 1 | // ############################################################################# 2 | // AUTOIMPORTS 3 | // this folder is for additional independent libraries such as 960gs or 4 | // twitter bootstrap these libraries do not depend on other elements 5 | 6 | @import "bootstrap"; 7 | -------------------------------------------------------------------------------- /private/sass/libs/_bootstrap.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v3.3.7 (http://getbootstrap.com) 3 | * Copyright 2011-2015 Twitter, Inc. 4 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 5 | */ 6 | 7 | // Core variables and mixins 8 | 9 | @import "bootstrap-sass/bootstrap/variables"; 10 | @import "bootstrap-sass/bootstrap/mixins"; 11 | @import "bootstrap-sass/bootstrap/normalize"; 12 | @import "bootstrap-sass/bootstrap/print"; 13 | @import "bootstrap-sass/bootstrap/scaffolding"; 14 | @import "bootstrap-sass/bootstrap/type"; 15 | @import "bootstrap-sass/bootstrap/code"; 16 | @import "bootstrap-sass/bootstrap/grid"; 17 | @import "bootstrap-sass/bootstrap/tables"; 18 | @import "bootstrap-sass/bootstrap/forms"; 19 | @import "bootstrap-sass/bootstrap/buttons"; 20 | 21 | // Components 22 | @import "bootstrap-sass/bootstrap/component-animations"; 23 | @import "bootstrap-sass/bootstrap/dropdowns"; 24 | @import "bootstrap-sass/bootstrap/button-groups"; 25 | @import "bootstrap-sass/bootstrap/input-groups"; 26 | @import "bootstrap-sass/bootstrap/navs"; 27 | @import "bootstrap-sass/bootstrap/navbar"; 28 | @import "bootstrap-sass/bootstrap/breadcrumbs"; 29 | @import "bootstrap-sass/bootstrap/pagination"; 30 | @import "bootstrap-sass/bootstrap/pager"; 31 | @import "bootstrap-sass/bootstrap/labels"; 32 | @import "bootstrap-sass/bootstrap/badges"; 33 | @import "bootstrap-sass/bootstrap/jumbotron"; 34 | @import "bootstrap-sass/bootstrap/thumbnails"; 35 | @import "bootstrap-sass/bootstrap/alerts"; 36 | @import "bootstrap-sass/bootstrap/progress-bars"; 37 | @import "bootstrap-sass/bootstrap/media"; 38 | @import "bootstrap-sass/bootstrap/list-group"; 39 | @import "bootstrap-sass/bootstrap/panels"; 40 | @import "bootstrap-sass/bootstrap/responsive-embed"; 41 | @import "bootstrap-sass/bootstrap/wells"; 42 | @import "bootstrap-sass/bootstrap/close"; 43 | 44 | // Components w/ JavaScript 45 | @import "bootstrap-sass/bootstrap/modals"; 46 | @import "bootstrap-sass/bootstrap/tooltip"; 47 | @import "bootstrap-sass/bootstrap/popovers"; 48 | @import "bootstrap-sass/bootstrap/carousel"; 49 | 50 | // Utility classes 51 | @import "bootstrap-sass/bootstrap/utilities"; 52 | @import "bootstrap-sass/bootstrap/responsive-utilities"; 53 | -------------------------------------------------------------------------------- /private/sass/mixins/_all.scss: -------------------------------------------------------------------------------- 1 | // ############################################################################# 2 | // AUTOIMPORTS 3 | // this folder is for additional mixins 4 | // each mixin should be its own maintained file 5 | 6 | @import "functions"; 7 | @import "zindex"; 8 | @import "other"; 9 | -------------------------------------------------------------------------------- /private/sass/mixins/_functions.scss: -------------------------------------------------------------------------------- 1 | // ############################################################################# 2 | // FUNCTIONS 3 | // basic mathematical functions that are helpful 4 | 5 | // em calculation 6 | @function em($target, $context: $font-size) { 7 | @if $target == 0 { 8 | @return 0; 9 | } 10 | 11 | @return $target / $context + em; 12 | } 13 | -------------------------------------------------------------------------------- /private/sass/mixins/_other.scss: -------------------------------------------------------------------------------- 1 | // ############################################################################# 2 | // OTHER 3 | 4 | // hides text in an element so you can see the background. 5 | // INFO: conflicts otherwise with hide-text from bootstrap 6 | @mixin hide-content() { 7 | $approximate-em-value: 12px / 1em; 8 | $wider-than-any-screen: -9999em; 9 | 10 | text-indent: $wider-than-any-screen * $approximate-em-value; 11 | overflow: hidden; 12 | text-align: left; 13 | } 14 | 15 | // outline button mixin which extends bootstrap button-variant 16 | @mixin button-variant-outline($color, $border, $color-hover: #fff) { 17 | @include button-variant($color, transparent, $border); 18 | 19 | &:hover, 20 | &:active, 21 | &.active, 22 | &:focus, 23 | .open > &.dropdown-toggle { 24 | color: $color-hover; 25 | background-color: $border; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /private/sass/mixins/_zindex.scss: -------------------------------------------------------------------------------- 1 | // ############################################################################# 2 | // ZINDEX 3 | 4 | // handle z-index mor easily 5 | // DOCS: http://www.sitepoint.com/better-solution-managing-z-index-sass/ 6 | @function map-has-nested-keys($map, $keys...) { 7 | @each $key in $keys { 8 | @if not map-has-key($map, $key) { 9 | @return false; 10 | } 11 | $map: map-get($map, $key); 12 | } 13 | 14 | @return true; 15 | } 16 | 17 | @function map-deep-get($map, $keys...) { 18 | @each $key in $keys { 19 | $map: map-get($map, $key); 20 | } 21 | 22 | @return $map; 23 | } 24 | 25 | @function z($layers...) { 26 | @if not map-has-nested-keys($z-layers, $layers...) { 27 | @error "No layer found for `#{inspect($layers...)}` 28 | in $z-layers map. Property omitted."; 29 | } 30 | 31 | @return map-deep-get($z-layers, $layers...); 32 | } 33 | -------------------------------------------------------------------------------- /private/sass/settings/_all.scss: -------------------------------------------------------------------------------- 1 | // ############################################################################# 2 | // AUTOIMPORTS 3 | // this folder contains required variables for colors, sizes, styles and more 4 | // add additional files for encapsulated settings 5 | 6 | @import "bootstrap"; 7 | @import "custom"; 8 | -------------------------------------------------------------------------------- /private/sass/settings/_bootstrap.scss: -------------------------------------------------------------------------------- 1 | // ############################################################################# 2 | // GLOBAL IMPORTS 3 | // using https://github.com/twbs/bootstrap-sass 4 | // Override Bootstrap variables 5 | 6 | // a flag to toggle asset pipeline / compass integration 7 | // defaults to true if twbs-font-path function is present 8 | // (no function => twbs-font-path('') parsed as string == right side) 9 | // in Sass 3.3 this can be improved with: function-exists(twbs-font-path) 10 | // $bootstrap-sass-asset-helper: 11 | // (twbs-font-path("") != unquote('twbs-font-path("")')) 12 | 13 | // copied directly from _variables.scss 14 | // updated from Bootstrap v3.3.7 (http://getbootstrap.com) 15 | 16 | /* stylelint-disable */ 17 | 18 | $bootstrap-sass-asset-helper: false; 19 | // 20 | // Variables 21 | // -------------------------------------------------- 22 | 23 | 24 | //== Colors 25 | // 26 | //## Gray and brand colors for use across Bootstrap. 27 | 28 | $gray-base: #000; 29 | $gray-darker: lighten($gray-base, 13.5%); // #222 30 | $gray-dark: lighten($gray-base, 20%); // #333 31 | $gray: lighten($gray-base, 33.5%); // #555 32 | $gray-light: lighten($gray-base, 46.7%); // #777 33 | $gray-lighter: lighten($gray-base, 93.5%); // #eee 34 | 35 | $brand-primary: darken(#428bca, 6.5%); // #337ab7 36 | $brand-success: #5cb85c; 37 | $brand-info: #5bc0de; 38 | $brand-warning: #f0ad4e; 39 | $brand-danger: #d9534f; 40 | 41 | 42 | //== Scaffolding 43 | // 44 | //## Settings for some of the most global styles. 45 | 46 | //** Background color for ``. 47 | $body-bg: #fff; 48 | //** Global text color on ``. 49 | $text-color: $gray-dark; 50 | 51 | //** Global textual link color. 52 | $link-color: $brand-primary; 53 | //** Link hover color set via `darken()` function. 54 | $link-hover-color: darken($link-color, 15%); 55 | //** Link hover decoration. 56 | $link-hover-decoration: underline; 57 | 58 | 59 | //== Typography 60 | // 61 | //## Font, line-height, and color for body text, headings, and more. 62 | 63 | $font-family-sans-serif: "Helvetica Neue", Helvetica, Arial, sans-serif; 64 | $font-family-serif: Georgia, "Times New Roman", Times, serif; 65 | //** Default monospace fonts for ``, ``, and `
`.
 66 | $font-family-monospace:   Menlo, Monaco, Consolas, "Courier New", monospace;
 67 | $font-family-base:        $font-family-sans-serif;
 68 | 
 69 | $font-size-base:          14px;
 70 | $font-size-large:         ceil(($font-size-base * 1.25)); // ~18px
 71 | $font-size-small:         ceil(($font-size-base * 0.85)); // ~12px
 72 | 
 73 | $font-size-h1:            floor(($font-size-base * 2.6)); // ~36px
 74 | $font-size-h2:            floor(($font-size-base * 2.15)); // ~30px
 75 | $font-size-h3:            ceil(($font-size-base * 1.7)); // ~24px
 76 | $font-size-h4:            ceil(($font-size-base * 1.25)); // ~18px
 77 | $font-size-h5:            $font-size-base;
 78 | $font-size-h6:            ceil(($font-size-base * 0.85)); // ~12px
 79 | 
 80 | //** Unit-less `line-height` for use in components like buttons.
 81 | $line-height-base:        1.428571429; // 20/14
 82 | //** Computed "line-height" (`font-size` * `line-height`) for use with `margin`, `padding`, etc.
 83 | $line-height-computed:    floor(($font-size-base * $line-height-base)); // ~20px
 84 | 
 85 | //** By default, this inherits from the ``.
 86 | $headings-font-family:    inherit;
 87 | $headings-font-weight:    500;
 88 | $headings-line-height:    1.1;
 89 | $headings-color:          inherit;
 90 | 
 91 | 
 92 | //== Iconography
 93 | //
 94 | //## Specify custom location and filename of the included Glyphicons icon font. Useful for those including Bootstrap via Bower.
 95 | 
 96 | //** Load fonts from this directory.
 97 | 
 98 | // [converter] If $bootstrap-sass-asset-helper if used, provide path relative to the assets load path.
 99 | // [converter] This is because some asset helpers, such as Sprockets, do not work with file-relative paths.
100 | // $icon-font-path: if($bootstrap-sass-asset-helper, "bootstrap/", "../fonts/bootstrap/");
101 | 
102 | //** File name for all font files.
103 | // $icon-font-name:          "glyphicons-halflings-regular";
104 | //** Element ID within SVG icon file.
105 | // $icon-font-svg-id:        "glyphicons_halflingsregular";
106 | 
107 | 
108 | //== Components
109 | //
110 | //## Define common padding and border radius sizes and more. Values based on 14px text and 1.428 line-height (~20px to start).
111 | 
112 | $padding-base-vertical:     6px;
113 | $padding-base-horizontal:   12px;
114 | 
115 | $padding-large-vertical:    10px;
116 | $padding-large-horizontal:  16px;
117 | 
118 | $padding-small-vertical:    5px;
119 | $padding-small-horizontal:  10px;
120 | 
121 | $padding-xs-vertical:       1px;
122 | $padding-xs-horizontal:     5px;
123 | 
124 | $line-height-large:         1.3333333; // extra decimals for Win 8.1 Chrome
125 | $line-height-small:         1.5;
126 | 
127 | $border-radius-base:        4px;
128 | $border-radius-large:       6px;
129 | $border-radius-small:       3px;
130 | 
131 | //** Global color for active items (e.g., navs or dropdowns).
132 | $component-active-color:    #fff;
133 | //** Global background color for active items (e.g., navs or dropdowns).
134 | $component-active-bg:       $brand-primary;
135 | 
136 | //** Width of the `border` for generating carets that indicate dropdowns.
137 | $caret-width-base:          4px;
138 | //** Carets increase slightly in size for larger components.
139 | $caret-width-large:         5px;
140 | 
141 | 
142 | //== Tables
143 | //
144 | //## Customizes the `.table` component with basic values, each used across all table variations.
145 | 
146 | //** Padding for ``s and ``s.
147 | $table-cell-padding:            8px;
148 | //** Padding for cells in `.table-condensed`.
149 | $table-condensed-cell-padding:  5px;
150 | 
151 | //** Default background color used for all tables.
152 | $table-bg:                      transparent;
153 | //** Background color used for `.table-striped`.
154 | $table-bg-accent:               #f9f9f9;
155 | //** Background color used for `.table-hover`.
156 | $table-bg-hover:                #f5f5f5;
157 | $table-bg-active:               $table-bg-hover;
158 | 
159 | //** Border color for table and cell borders.
160 | $table-border-color:            #ddd;
161 | 
162 | 
163 | //== Buttons
164 | //
165 | //## For each of Bootstrap's buttons, define text, background and border color.
166 | 
167 | $btn-font-weight:                normal;
168 | 
169 | $btn-default-color:              #333;
170 | $btn-default-bg:                 #fff;
171 | $btn-default-border:             #ccc;
172 | 
173 | $btn-primary-color:              #fff;
174 | $btn-primary-bg:                 $brand-primary;
175 | $btn-primary-border:             darken($btn-primary-bg, 5%);
176 | 
177 | $btn-success-color:              #fff;
178 | $btn-success-bg:                 $brand-success;
179 | $btn-success-border:             darken($btn-success-bg, 5%);
180 | 
181 | $btn-info-color:                 #fff;
182 | $btn-info-bg:                    $brand-info;
183 | $btn-info-border:                darken($btn-info-bg, 5%);
184 | 
185 | $btn-warning-color:              #fff;
186 | $btn-warning-bg:                 $brand-warning;
187 | $btn-warning-border:             darken($btn-warning-bg, 5%);
188 | 
189 | $btn-danger-color:               #fff;
190 | $btn-danger-bg:                  $brand-danger;
191 | $btn-danger-border:              darken($btn-danger-bg, 5%);
192 | 
193 | $btn-link-disabled-color:        $gray-light;
194 | 
195 | // Allows for customizing button radius independently from global border radius
196 | $btn-border-radius-base:         $border-radius-base;
197 | $btn-border-radius-large:        $border-radius-large;
198 | $btn-border-radius-small:        $border-radius-small;
199 | 
200 | 
201 | //== Forms
202 | //
203 | //##
204 | 
205 | //** `` background color
206 | $input-bg:                       #fff;
207 | //** `` background color
208 | $input-bg-disabled:              $gray-lighter;
209 | 
210 | //** Text color for ``s
211 | $input-color:                    $gray;
212 | //** `` border color
213 | $input-border:                   #ccc;
214 | 
215 | // TODO: Rename `$input-border-radius` to `$input-border-radius-base` in v4
216 | //** Default `.form-control` border radius
217 | // This has no effect on ``s in CSS.
218 | $input-border-radius:            $border-radius-base;
219 | //** Large `.form-control` border radius
220 | $input-border-radius-large:      $border-radius-large;
221 | //** Small `.form-control` border radius
222 | $input-border-radius-small:      $border-radius-small;
223 | 
224 | //** Border color for inputs on focus
225 | $input-border-focus:             #66afe9;
226 | 
227 | //** Placeholder text color
228 | $input-color-placeholder:        #999;
229 | 
230 | //** Default `.form-control` height
231 | $input-height-base:              ($line-height-computed + ($padding-base-vertical * 2) + 2);
232 | //** Large `.form-control` height
233 | $input-height-large:             (ceil($font-size-large * $line-height-large) + ($padding-large-vertical * 2) + 2);
234 | //** Small `.form-control` height
235 | $input-height-small:             (floor($font-size-small * $line-height-small) + ($padding-small-vertical * 2) + 2);
236 | 
237 | //** `.form-group` margin
238 | $form-group-margin-bottom:       15px;
239 | 
240 | $legend-color:                   $gray-dark;
241 | $legend-border-color:            #e5e5e5;
242 | 
243 | //** Background color for textual input addons
244 | $input-group-addon-bg:           $gray-lighter;
245 | //** Border color for textual input addons
246 | $input-group-addon-border-color: $input-border;
247 | 
248 | //** Disabled cursor for form controls and buttons.
249 | $cursor-disabled:                not-allowed;
250 | 
251 | 
252 | //== Dropdowns
253 | //
254 | //## Dropdown menu container and contents.
255 | 
256 | //** Background for the dropdown menu.
257 | $dropdown-bg:                    #fff;
258 | //** Dropdown menu `border-color`.
259 | $dropdown-border:                rgba(0,0,0,.15);
260 | //** Dropdown menu `border-color` **for IE8**.
261 | $dropdown-fallback-border:       #ccc;
262 | //** Divider color for between dropdown items.
263 | $dropdown-divider-bg:            #e5e5e5;
264 | 
265 | //** Dropdown link text color.
266 | $dropdown-link-color:            $gray-dark;
267 | //** Hover color for dropdown links.
268 | $dropdown-link-hover-color:      darken($gray-dark, 5%);
269 | //** Hover background for dropdown links.
270 | $dropdown-link-hover-bg:         #f5f5f5;
271 | 
272 | //** Active dropdown menu item text color.
273 | $dropdown-link-active-color:     $component-active-color;
274 | //** Active dropdown menu item background color.
275 | $dropdown-link-active-bg:        $component-active-bg;
276 | 
277 | //** Disabled dropdown menu item background color.
278 | $dropdown-link-disabled-color:   $gray-light;
279 | 
280 | //** Text color for headers within dropdown menus.
281 | $dropdown-header-color:          $gray-light;
282 | 
283 | //** Deprecated `$dropdown-caret-color` as of v3.1.0
284 | $dropdown-caret-color:           #000;
285 | 
286 | 
287 | //-- Z-index master list
288 | //
289 | // Warning: Avoid customizing these values. They're used for a bird's eye view
290 | // of components dependent on the z-axis and are designed to all work together.
291 | //
292 | // Note: These variables are not generated into the Customizer.
293 | 
294 | $zindex-navbar:            1000;
295 | $zindex-dropdown:          1000;
296 | $zindex-popover:           1060;
297 | $zindex-tooltip:           1070;
298 | $zindex-navbar-fixed:      1030;
299 | $zindex-modal-background:  1040;
300 | $zindex-modal:             1050;
301 | 
302 | 
303 | //== Media queries breakpoints
304 | //
305 | //## Define the breakpoints at which your layout will change, adapting to different screen sizes.
306 | 
307 | // Extra small screen / phone
308 | //** Deprecated `$screen-xs` as of v3.0.1
309 | $screen-xs:                  480px;
310 | //** Deprecated `$screen-xs-min` as of v3.2.0
311 | $screen-xs-min:              $screen-xs;
312 | //** Deprecated `$screen-phone` as of v3.0.1
313 | $screen-phone:               $screen-xs-min;
314 | 
315 | // Small screen / tablet
316 | //** Deprecated `$screen-sm` as of v3.0.1
317 | $screen-sm:                  768px;
318 | $screen-sm-min:              $screen-sm;
319 | //** Deprecated `$screen-tablet` as of v3.0.1
320 | $screen-tablet:              $screen-sm-min;
321 | 
322 | // Medium screen / desktop
323 | //** Deprecated `$screen-md` as of v3.0.1
324 | $screen-md:                  992px;
325 | $screen-md-min:              $screen-md;
326 | //** Deprecated `$screen-desktop` as of v3.0.1
327 | $screen-desktop:             $screen-md-min;
328 | 
329 | // Large screen / wide desktop
330 | //** Deprecated `$screen-lg` as of v3.0.1
331 | $screen-lg:                  1200px;
332 | $screen-lg-min:              $screen-lg;
333 | //** Deprecated `$screen-lg-desktop` as of v3.0.1
334 | $screen-lg-desktop:          $screen-lg-min;
335 | 
336 | // So media queries don't overlap when required, provide a maximum
337 | $screen-xs-max:              ($screen-sm-min - 1);
338 | $screen-sm-max:              ($screen-md-min - 1);
339 | $screen-md-max:              ($screen-lg-min - 1);
340 | 
341 | 
342 | //== Grid system
343 | //
344 | //## Define your custom responsive grid.
345 | 
346 | //** Number of columns in the grid.
347 | $grid-columns:              12;
348 | //** Padding between columns. Gets divided in half for the left and right.
349 | $grid-gutter-width:         30px;
350 | // Navbar collapse
351 | //** Point at which the navbar becomes uncollapsed.
352 | $grid-float-breakpoint:     $screen-sm-min;
353 | //** Point at which the navbar begins collapsing.
354 | $grid-float-breakpoint-max: ($grid-float-breakpoint - 1);
355 | 
356 | 
357 | //== Container sizes
358 | //
359 | //## Define the maximum width of `.container` for different screen sizes.
360 | 
361 | // Small screen / tablet
362 | $container-tablet:             (720px + $grid-gutter-width);
363 | //** For `$screen-sm-min` and up.
364 | $container-sm:                 $container-tablet;
365 | 
366 | // Medium screen / desktop
367 | $container-desktop:            (940px + $grid-gutter-width);
368 | //** For `$screen-md-min` and up.
369 | $container-md:                 $container-desktop;
370 | 
371 | // Large screen / wide desktop
372 | $container-large-desktop:      (1140px + $grid-gutter-width);
373 | //** For `$screen-lg-min` and up.
374 | $container-lg:                 $container-large-desktop;
375 | 
376 | 
377 | //== Navbar
378 | //
379 | //##
380 | 
381 | // Basics of a navbar
382 | $navbar-height:                    50px;
383 | $navbar-margin-bottom:             $line-height-computed;
384 | $navbar-border-radius:             $border-radius-base;
385 | $navbar-padding-horizontal:        floor(($grid-gutter-width / 2));
386 | $navbar-padding-vertical:          (($navbar-height - $line-height-computed) / 2);
387 | $navbar-collapse-max-height:       340px;
388 | 
389 | $navbar-default-color:             #777;
390 | $navbar-default-bg:                #f8f8f8;
391 | $navbar-default-border:            darken($navbar-default-bg, 6.5%);
392 | 
393 | // Navbar links
394 | $navbar-default-link-color:                #777;
395 | $navbar-default-link-hover-color:          #333;
396 | $navbar-default-link-hover-bg:             transparent;
397 | $navbar-default-link-active-color:         #555;
398 | $navbar-default-link-active-bg:            darken($navbar-default-bg, 6.5%);
399 | $navbar-default-link-disabled-color:       #ccc;
400 | $navbar-default-link-disabled-bg:          transparent;
401 | 
402 | // Navbar brand label
403 | $navbar-default-brand-color:               $navbar-default-link-color;
404 | $navbar-default-brand-hover-color:         darken($navbar-default-brand-color, 10%);
405 | $navbar-default-brand-hover-bg:            transparent;
406 | 
407 | // Navbar toggle
408 | $navbar-default-toggle-hover-bg:           #ddd;
409 | $navbar-default-toggle-icon-bar-bg:        #888;
410 | $navbar-default-toggle-border-color:       #ddd;
411 | 
412 | 
413 | //=== Inverted navbar
414 | // Reset inverted navbar basics
415 | $navbar-inverse-color:                      lighten($gray-light, 15%);
416 | $navbar-inverse-bg:                         #222;
417 | $navbar-inverse-border:                     darken($navbar-inverse-bg, 10%);
418 | 
419 | // Inverted navbar links
420 | $navbar-inverse-link-color:                 lighten($gray-light, 15%);
421 | $navbar-inverse-link-hover-color:           #fff;
422 | $navbar-inverse-link-hover-bg:              transparent;
423 | $navbar-inverse-link-active-color:          $navbar-inverse-link-hover-color;
424 | $navbar-inverse-link-active-bg:             darken($navbar-inverse-bg, 10%);
425 | $navbar-inverse-link-disabled-color:        #444;
426 | $navbar-inverse-link-disabled-bg:           transparent;
427 | 
428 | // Inverted navbar brand label
429 | $navbar-inverse-brand-color:                $navbar-inverse-link-color;
430 | $navbar-inverse-brand-hover-color:          #fff;
431 | $navbar-inverse-brand-hover-bg:             transparent;
432 | 
433 | // Inverted navbar toggle
434 | $navbar-inverse-toggle-hover-bg:            #333;
435 | $navbar-inverse-toggle-icon-bar-bg:         #fff;
436 | $navbar-inverse-toggle-border-color:        #333;
437 | 
438 | 
439 | //== Navs
440 | //
441 | //##
442 | 
443 | //=== Shared nav styles
444 | $nav-link-padding:                          10px 15px;
445 | $nav-link-hover-bg:                         $gray-lighter;
446 | 
447 | $nav-disabled-link-color:                   $gray-light;
448 | $nav-disabled-link-hover-color:             $gray-light;
449 | 
450 | //== Tabs
451 | $nav-tabs-border-color:                     #ddd;
452 | 
453 | $nav-tabs-link-hover-border-color:          $gray-lighter;
454 | 
455 | $nav-tabs-active-link-hover-bg:             $body-bg;
456 | $nav-tabs-active-link-hover-color:          $gray;
457 | $nav-tabs-active-link-hover-border-color:   #ddd;
458 | 
459 | $nav-tabs-justified-link-border-color:            #ddd;
460 | $nav-tabs-justified-active-link-border-color:     $body-bg;
461 | 
462 | //== Pills
463 | $nav-pills-border-radius:                   $border-radius-base;
464 | $nav-pills-active-link-hover-bg:            $component-active-bg;
465 | $nav-pills-active-link-hover-color:         $component-active-color;
466 | 
467 | 
468 | //== Pagination
469 | //
470 | //##
471 | 
472 | $pagination-color:                     $link-color;
473 | $pagination-bg:                        #fff;
474 | $pagination-border:                    #ddd;
475 | 
476 | $pagination-hover-color:               $link-hover-color;
477 | $pagination-hover-bg:                  $gray-lighter;
478 | $pagination-hover-border:              #ddd;
479 | 
480 | $pagination-active-color:              #fff;
481 | $pagination-active-bg:                 $brand-primary;
482 | $pagination-active-border:             $brand-primary;
483 | 
484 | $pagination-disabled-color:            $gray-light;
485 | $pagination-disabled-bg:               #fff;
486 | $pagination-disabled-border:           #ddd;
487 | 
488 | 
489 | //== Pager
490 | //
491 | //##
492 | 
493 | $pager-bg:                             $pagination-bg;
494 | $pager-border:                         $pagination-border;
495 | $pager-border-radius:                  15px;
496 | 
497 | $pager-hover-bg:                       $pagination-hover-bg;
498 | 
499 | $pager-active-bg:                      $pagination-active-bg;
500 | $pager-active-color:                   $pagination-active-color;
501 | 
502 | $pager-disabled-color:                 $pagination-disabled-color;
503 | 
504 | 
505 | //== Jumbotron
506 | //
507 | //##
508 | 
509 | $jumbotron-padding:              30px;
510 | $jumbotron-color:                inherit;
511 | $jumbotron-bg:                   $gray-lighter;
512 | $jumbotron-heading-color:        inherit;
513 | $jumbotron-font-size:            ceil(($font-size-base * 1.5));
514 | $jumbotron-heading-font-size:    ceil(($font-size-base * 4.5));
515 | 
516 | 
517 | //== Form states and alerts
518 | //
519 | //## Define colors for form feedback states and, by default, alerts.
520 | 
521 | $state-success-text:             #3c763d;
522 | $state-success-bg:               #dff0d8;
523 | $state-success-border:           darken(adjust-hue($state-success-bg, -10), 5%);
524 | 
525 | $state-info-text:                #31708f;
526 | $state-info-bg:                  #d9edf7;
527 | $state-info-border:              darken(adjust-hue($state-info-bg, -10), 7%);
528 | 
529 | $state-warning-text:             #8a6d3b;
530 | $state-warning-bg:               #fcf8e3;
531 | $state-warning-border:           darken(adjust-hue($state-warning-bg, -10), 5%);
532 | 
533 | $state-danger-text:              #a94442;
534 | $state-danger-bg:                #f2dede;
535 | $state-danger-border:            darken(adjust-hue($state-danger-bg, -10), 5%);
536 | 
537 | 
538 | //== Tooltips
539 | //
540 | //##
541 | 
542 | //** Tooltip max width
543 | $tooltip-max-width:           200px;
544 | //** Tooltip text color
545 | $tooltip-color:               #fff;
546 | //** Tooltip background color
547 | $tooltip-bg:                  #000;
548 | $tooltip-opacity:             .9;
549 | 
550 | //** Tooltip arrow width
551 | $tooltip-arrow-width:         5px;
552 | //** Tooltip arrow color
553 | $tooltip-arrow-color:         $tooltip-bg;
554 | 
555 | 
556 | //== Popovers
557 | //
558 | //##
559 | 
560 | //** Popover body background color
561 | $popover-bg:                          #fff;
562 | //** Popover maximum width
563 | $popover-max-width:                   276px;
564 | //** Popover border color
565 | $popover-border-color:                rgba(0,0,0,.2);
566 | //** Popover fallback border color
567 | $popover-fallback-border-color:       #ccc;
568 | 
569 | //** Popover title background color
570 | $popover-title-bg:                    darken($popover-bg, 3%);
571 | 
572 | //** Popover arrow width
573 | $popover-arrow-width:                 10px;
574 | //** Popover arrow color
575 | $popover-arrow-color:                 $popover-bg;
576 | 
577 | //** Popover outer arrow width
578 | $popover-arrow-outer-width:           ($popover-arrow-width + 1);
579 | //** Popover outer arrow color
580 | $popover-arrow-outer-color:           fade_in($popover-border-color, 0.05);
581 | //** Popover outer arrow fallback color
582 | $popover-arrow-outer-fallback-color:  darken($popover-fallback-border-color, 20%);
583 | 
584 | 
585 | //== Labels
586 | //
587 | //##
588 | 
589 | //** Default label background color
590 | $label-default-bg:            $gray-light;
591 | //** Primary label background color
592 | $label-primary-bg:            $brand-primary;
593 | //** Success label background color
594 | $label-success-bg:            $brand-success;
595 | //** Info label background color
596 | $label-info-bg:               $brand-info;
597 | //** Warning label background color
598 | $label-warning-bg:            $brand-warning;
599 | //** Danger label background color
600 | $label-danger-bg:             $brand-danger;
601 | 
602 | //** Default label text color
603 | $label-color:                 #fff;
604 | //** Default text color of a linked label
605 | $label-link-hover-color:      #fff;
606 | 
607 | 
608 | //== Modals
609 | //
610 | //##
611 | 
612 | //** Padding applied to the modal body
613 | $modal-inner-padding:         15px;
614 | 
615 | //** Padding applied to the modal title
616 | $modal-title-padding:         15px;
617 | //** Modal title line-height
618 | $modal-title-line-height:     $line-height-base;
619 | 
620 | //** Background color of modal content area
621 | $modal-content-bg:                             #fff;
622 | //** Modal content border color
623 | $modal-content-border-color:                   rgba(0,0,0,.2);
624 | //** Modal content border color **for IE8**
625 | $modal-content-fallback-border-color:          #999;
626 | 
627 | //** Modal backdrop background color
628 | $modal-backdrop-bg:           #000;
629 | //** Modal backdrop opacity
630 | $modal-backdrop-opacity:      .5;
631 | //** Modal header border color
632 | $modal-header-border-color:   #e5e5e5;
633 | //** Modal footer border color
634 | $modal-footer-border-color:   $modal-header-border-color;
635 | 
636 | $modal-lg:                    900px;
637 | $modal-md:                    600px;
638 | $modal-sm:                    300px;
639 | 
640 | 
641 | //== Alerts
642 | //
643 | //## Define alert colors, border radius, and padding.
644 | 
645 | $alert-padding:               15px;
646 | $alert-border-radius:         $border-radius-base;
647 | $alert-link-font-weight:      bold;
648 | 
649 | $alert-success-bg:            $state-success-bg;
650 | $alert-success-text:          $state-success-text;
651 | $alert-success-border:        $state-success-border;
652 | 
653 | $alert-info-bg:               $state-info-bg;
654 | $alert-info-text:             $state-info-text;
655 | $alert-info-border:           $state-info-border;
656 | 
657 | $alert-warning-bg:            $state-warning-bg;
658 | $alert-warning-text:          $state-warning-text;
659 | $alert-warning-border:        $state-warning-border;
660 | 
661 | $alert-danger-bg:             $state-danger-bg;
662 | $alert-danger-text:           $state-danger-text;
663 | $alert-danger-border:         $state-danger-border;
664 | 
665 | 
666 | //== Progress bars
667 | //
668 | //##
669 | 
670 | //** Background color of the whole progress component
671 | $progress-bg:                 #f5f5f5;
672 | //** Progress bar text color
673 | $progress-bar-color:          #fff;
674 | //** Variable for setting rounded corners on progress bar.
675 | $progress-border-radius:      $border-radius-base;
676 | 
677 | //** Default progress bar color
678 | $progress-bar-bg:             $brand-primary;
679 | //** Success progress bar color
680 | $progress-bar-success-bg:     $brand-success;
681 | //** Warning progress bar color
682 | $progress-bar-warning-bg:     $brand-warning;
683 | //** Danger progress bar color
684 | $progress-bar-danger-bg:      $brand-danger;
685 | //** Info progress bar color
686 | $progress-bar-info-bg:        $brand-info;
687 | 
688 | 
689 | //== List group
690 | //
691 | //##
692 | 
693 | //** Background color on `.list-group-item`
694 | $list-group-bg:                 #fff;
695 | //** `.list-group-item` border color
696 | $list-group-border:             #ddd;
697 | //** List group border radius
698 | $list-group-border-radius:      $border-radius-base;
699 | 
700 | //** Background color of single list items on hover
701 | $list-group-hover-bg:           #f5f5f5;
702 | //** Text color of active list items
703 | $list-group-active-color:       $component-active-color;
704 | //** Background color of active list items
705 | $list-group-active-bg:          $component-active-bg;
706 | //** Border color of active list elements
707 | $list-group-active-border:      $list-group-active-bg;
708 | //** Text color for content within active list items
709 | $list-group-active-text-color:  lighten($list-group-active-bg, 40%);
710 | 
711 | //** Text color of disabled list items
712 | $list-group-disabled-color:      $gray-light;
713 | //** Background color of disabled list items
714 | $list-group-disabled-bg:         $gray-lighter;
715 | //** Text color for content within disabled list items
716 | $list-group-disabled-text-color: $list-group-disabled-color;
717 | 
718 | $list-group-link-color:         #555;
719 | $list-group-link-hover-color:   $list-group-link-color;
720 | $list-group-link-heading-color: #333;
721 | 
722 | 
723 | //== Panels
724 | //
725 | //##
726 | 
727 | $panel-bg:                    #fff;
728 | $panel-body-padding:          15px;
729 | $panel-heading-padding:       10px 15px;
730 | $panel-footer-padding:        $panel-heading-padding;
731 | $panel-border-radius:         $border-radius-base;
732 | 
733 | //** Border color for elements within panels
734 | $panel-inner-border:          #ddd;
735 | $panel-footer-bg:             #f5f5f5;
736 | 
737 | $panel-default-text:          $gray-dark;
738 | $panel-default-border:        #ddd;
739 | $panel-default-heading-bg:    #f5f5f5;
740 | 
741 | $panel-primary-text:          #fff;
742 | $panel-primary-border:        $brand-primary;
743 | $panel-primary-heading-bg:    $brand-primary;
744 | 
745 | $panel-success-text:          $state-success-text;
746 | $panel-success-border:        $state-success-border;
747 | $panel-success-heading-bg:    $state-success-bg;
748 | 
749 | $panel-info-text:             $state-info-text;
750 | $panel-info-border:           $state-info-border;
751 | $panel-info-heading-bg:       $state-info-bg;
752 | 
753 | $panel-warning-text:          $state-warning-text;
754 | $panel-warning-border:        $state-warning-border;
755 | $panel-warning-heading-bg:    $state-warning-bg;
756 | 
757 | $panel-danger-text:           $state-danger-text;
758 | $panel-danger-border:         $state-danger-border;
759 | $panel-danger-heading-bg:     $state-danger-bg;
760 | 
761 | 
762 | //== Thumbnails
763 | //
764 | //##
765 | 
766 | //** Padding around the thumbnail image
767 | $thumbnail-padding:           4px;
768 | //** Thumbnail background color
769 | $thumbnail-bg:                $body-bg;
770 | //** Thumbnail border color
771 | $thumbnail-border:            #ddd;
772 | //** Thumbnail border radius
773 | $thumbnail-border-radius:     $border-radius-base;
774 | 
775 | //** Custom text color for thumbnail captions
776 | $thumbnail-caption-color:     $text-color;
777 | //** Padding around the thumbnail caption
778 | $thumbnail-caption-padding:   9px;
779 | 
780 | 
781 | //== Wells
782 | //
783 | //##
784 | 
785 | $well-bg:                     #f5f5f5;
786 | $well-border:                 darken($well-bg, 7%);
787 | 
788 | 
789 | //== Badges
790 | //
791 | //##
792 | 
793 | $badge-color:                 #fff;
794 | //** Linked badge text color on hover
795 | $badge-link-hover-color:      #fff;
796 | $badge-bg:                    $gray-light;
797 | 
798 | //** Badge text color in active nav link
799 | $badge-active-color:          $link-color;
800 | //** Badge background color in active nav link
801 | $badge-active-bg:             #fff;
802 | 
803 | $badge-font-weight:           bold;
804 | $badge-line-height:           1;
805 | $badge-border-radius:         10px;
806 | 
807 | 
808 | //== Breadcrumbs
809 | //
810 | //##
811 | 
812 | $breadcrumb-padding-vertical:   8px;
813 | $breadcrumb-padding-horizontal: 15px;
814 | //** Breadcrumb background color
815 | $breadcrumb-bg:                 #f5f5f5;
816 | //** Breadcrumb text color
817 | $breadcrumb-color:              #ccc;
818 | //** Text color of current page in the breadcrumb
819 | $breadcrumb-active-color:       $gray-light;
820 | //** Textual separator for between breadcrumb elements
821 | $breadcrumb-separator:          "/";
822 | 
823 | 
824 | //== Carousel
825 | //
826 | //##
827 | 
828 | $carousel-text-shadow:                        0 1px 2px rgba(0,0,0,.6);
829 | 
830 | $carousel-control-color:                      #fff;
831 | $carousel-control-width:                      15%;
832 | $carousel-control-opacity:                    .5;
833 | $carousel-control-font-size:                  20px;
834 | 
835 | $carousel-indicator-active-bg:                #fff;
836 | $carousel-indicator-border-color:             #fff;
837 | 
838 | $carousel-caption-color:                      #fff;
839 | 
840 | 
841 | //== Close
842 | //
843 | //##
844 | 
845 | $close-font-weight:           bold;
846 | $close-color:                 #000;
847 | $close-text-shadow:           0 1px 0 #fff;
848 | 
849 | 
850 | //== Code
851 | //
852 | //##
853 | 
854 | $code-color:                  #c7254e;
855 | $code-bg:                     #f9f2f4;
856 | 
857 | $kbd-color:                   #fff;
858 | $kbd-bg:                      #333;
859 | 
860 | $pre-bg:                      #f5f5f5;
861 | $pre-color:                   $gray-dark;
862 | $pre-border-color:            #ccc;
863 | $pre-scrollable-max-height:   340px;
864 | 
865 | 
866 | //== Type
867 | //
868 | //##
869 | 
870 | //** Horizontal offset for forms and lists.
871 | $component-offset-horizontal: 180px;
872 | //** Text muted color
873 | $text-muted:                  $gray-light;
874 | //** Abbreviations and acronyms border color
875 | $abbr-border-color:           $gray-light;
876 | //** Headings small color
877 | $headings-small-color:        $gray-light;
878 | //** Blockquote small color
879 | $blockquote-small-color:      $gray-light;
880 | //** Blockquote font size
881 | $blockquote-font-size:        ($font-size-base * 1.25);
882 | //** Blockquote border color
883 | $blockquote-border-color:     $gray-lighter;
884 | //** Page header border color
885 | $page-header-border-color:    $gray-lighter;
886 | //** Width of horizontal description list titles
887 | $dl-horizontal-offset:        $component-offset-horizontal;
888 | //** Point at which .dl-horizontal becomes horizontal
889 | $dl-horizontal-breakpoint:    $grid-float-breakpoint;
890 | //** Horizontal line color.
891 | $hr-border:                   $gray-lighter;
892 | 


--------------------------------------------------------------------------------
/private/sass/settings/_custom.scss:
--------------------------------------------------------------------------------
 1 | // #############################################################################
 2 | // CUSTOM SETTINGS
 3 | // this setting file is intended for additional variables not defined within the bootstrap default
 4 | // feel free to create additional files if settings get cluttered
 5 | 
 6 | $speed-base: 200ms;
 7 | 
 8 | // Z-INDEX
 9 | // DOCS: http://www.sitepoint.com/better-solution-managing-z-index-sass/
10 | // http://sassmeister.com/gist/341c052928c956c1a751
11 | // use case: header { z-index: z("modal", "header"); }
12 | 
13 | /*
14 | $z-layers: (
15 |     "goku":            9001,
16 |     "shoryuken":       8000,
17 |     "modal": (
18 |         "base":         500,
19 |         "close":        100,
20 |         "header":        50,
21 |         "footer":        10
22 |     ),
23 |     "default":            1,
24 |     "below":             -1,
25 |     "bottomless-pit": -9000
26 | );
27 | */
28 | 


--------------------------------------------------------------------------------
/private/svg/.empty:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/divio/djangocms-boilerplate-webpack/d8b4a9fe2504ff4ceaecd0991b61f8ddac5b6ee7/private/svg/.empty


--------------------------------------------------------------------------------
/private/svg/icons/circle.svg:
--------------------------------------------------------------------------------
1 | 
2 |   
3 |     
4 | 


--------------------------------------------------------------------------------
/static/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/divio/djangocms-boilerplate-webpack/d8b4a9fe2504ff4ceaecd0991b61f8ddac5b6ee7/static/favicon.ico


--------------------------------------------------------------------------------
/static/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/divio/djangocms-boilerplate-webpack/d8b4a9fe2504ff4ceaecd0991b61f8ddac5b6ee7/static/favicon.png


--------------------------------------------------------------------------------
/static/iconset.json:
--------------------------------------------------------------------------------
 1 | 
 2 |             {
 3 |                 "svg": true,
 4 |                 "spritePath": "sprites/icons.svg",
 5 |                 "iconClass": "icon",
 6 |                 "iconClassFix": "icon-",
 7 |                 "icons": [
 8 |                     "icon-circle"
 9 |                 ]
10 |             }
11 |         


--------------------------------------------------------------------------------
/static/img/.empty:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/divio/djangocms-boilerplate-webpack/d8b4a9fe2504ff4ceaecd0991b61f8ddac5b6ee7/static/img/.empty


--------------------------------------------------------------------------------
/static/js/addons/ckeditor.wysiwyg.js:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright (c) 2013, Divio AG
 3 |  * Licensed under BSD
 4 |  * http://github.com/divio/djangocms-boilerplate-webpack
 5 |  */
 6 | 
 7 | // #############################################################################
 8 | // CKEDITOR
 9 | /**
10 |  * Default CKEDITOR Styles
11 |  * Added within src/settings.py CKEDITOR_SETTINGS.stylesSet
12 |  *
13 |  * @module CKEDITOR
14 |  */
15 | /* global CKEDITOR */
16 | 
17 | CKEDITOR.allElements = ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'div'];
18 | CKEDITOR.stylesSet.add('default', [
19 |     /* Block Styles */
20 |     { name: 'Text Lead', element: 'p', attributes: { class: 'lead' } },
21 |     { name: 'Text NoWrap', element: 'p', attributes: { class: 'text-nowrap' } },
22 | 
23 |     { name: 'Spacer', element: 'div', attributes: { class: 'spacer' } },
24 |     { name: 'Spacer Small', element: 'div', attributes: { class: 'spacer-xs' } },
25 |     { name: 'Spacer Large', element: 'div', attributes: { class: 'spacer-lg' } },
26 |     { name: 'Spacer Zero', element: 'div', attributes: { class: 'spacer-zero' } },
27 | 
28 |     { name: 'List Unstyled', element: 'ul', attributes: { class: 'list-unstyled' } },
29 |     { name: 'List Inline', element: 'ul', attributes: { class: 'list-inline' } },
30 |     { name: 'Horizontal Description', element: 'dl', attributes: { class: 'dl-horizontal' } },
31 | 
32 |     { name: 'Table', element: 'table', attributes: { class: 'table' } },
33 |     { name: 'Table Responsive', element: 'table', attributes: { class: 'table table-responsive' } },
34 |     { name: 'Table Striped', element: 'table', attributes: { class: 'table table-striped' } },
35 |     { name: 'Table Bordered', element: 'table', attributes: { class: 'table table-bordered' } },
36 |     { name: 'Table Hover', element: 'table', attributes: { class: 'table table-hover' } },
37 |     { name: 'Table Condensed', element: 'table', attributes: { class: 'table table-condensed' } },
38 | 
39 |     { name: 'Table Cell Active', element: 'td', attributes: { class: 'active' } },
40 |     { name: 'Table Cell Success', element: 'td', attributes: { class: 'success' } },
41 |     { name: 'Table Cell Warning', element: 'td', attributes: { class: 'warning' } },
42 |     { name: 'Table Cell Danger', element: 'td', attributes: { class: 'danger' } },
43 |     { name: 'Table Cell Info', element: 'td', attributes: { class: 'info' } },
44 | 
45 |     /* Inline Styles */
46 |     { name: 'Text Primary', element: 'span', attributes: { class: 'text-primary' } },
47 |     { name: 'Text Success', element: 'span', attributes: { class: 'text-success' } },
48 |     { name: 'Text Info', element: 'span', attributes: { class: 'text-info' } },
49 |     { name: 'Text Warning', element: 'span', attributes: { class: 'text-warning' } },
50 |     { name: 'Text Danger', element: 'span', attributes: { class: 'text-danger' } },
51 |     { name: 'Text Muted', element: 'span', attributes: { class: 'text-muted' } },
52 | 
53 |     { name: 'Image Responsive', element: 'img', attributes: { class: 'img-responsive' } },
54 |     { name: 'Image Rounded', element: 'img', attributes: { class: 'img-rounded' } },
55 |     { name: 'Image Circle', element: 'img', attributes: { class: 'img-circle' } },
56 |     { name: 'Image Thumbnail', element: 'img', attributes: { class: 'img-thumbnail' } },
57 | 
58 |     { name: 'Pull Left', element: 'div', attributes: { class: 'pull-left' } },
59 |     { name: 'Pull Right', element: 'div', attributes: { class: 'pull-right' } },
60 | 
61 |     { name: 'Blockquote Reverse', element: 'blockquote', attributes: { class: 'blockquote-reverse' } },
62 | ]);
63 | 
64 | /*
65 |  * Extend ckeditor default settings
66 |  * DOCS: http://docs.ckeditor.com/#!/api/CKEDITOR.dtd
67 |  */
68 | CKEDITOR.dtd.$removeEmpty.span = 0;
69 | 


--------------------------------------------------------------------------------
/static/sprites/icons.svg:
--------------------------------------------------------------------------------
1 | 
2 | 	
3 | 		
4 | 			
5 | 		
6 | 	
7 | 
8 | 


--------------------------------------------------------------------------------
/templates/404.html:
--------------------------------------------------------------------------------
 1 | {% extends "base.html" %}
 2 | {% load i18n %}
 3 | 
 4 | {% block body_class %}tpl-404{% endblock %}
 5 | 
 6 | {% block title %}{% trans "404 - Page not found" %}{% endblock %}
 7 | 
 8 | {% block content %}
 9 |     
10 |

{% trans "404 - Page not found" %}

11 |

{% trans "We're sorry, but the requested page could not be found." %}

12 |
13 | {% endblock content %} 14 | -------------------------------------------------------------------------------- /templates/500.html: -------------------------------------------------------------------------------- 1 | {% load i18n staticfiles %} 2 | 3 | 4 | 5 | {% trans "500 - Server error" %} 6 | 7 | 8 | 9 | 10 |
11 |

{% trans "500 - Server error" %}

12 |

{% trans "There's been an error. It's been reported to the site administrators via e-mail and should be fixed shortly. Thanks for your patience." %}

13 |
14 | 15 | 16 | -------------------------------------------------------------------------------- /templates/base.html: -------------------------------------------------------------------------------- 1 | {% load i18n staticfiles cms_tags sekizai_tags %} 2 | 3 | 4 | 5 | 6 | 7 | 8 | {# TODO proper extension #} 9 | {% block title %} 10 | {% page_attribute page_title %} - {{ request.site.name }} 11 | {% endblock title %} 12 | 13 | {% block meta_tags %} 14 | 15 | 20 | {% endblock meta_tags %} 21 | 22 | 23 | {# {% include "includes/critical_css.html" %} #} 24 | 25 | {% comment %} 26 | {# use this to start loading fonts before finishing parsing css #} 27 | 28 | {% endcomment %} 29 | 30 | 31 | {% render_block "css" %} 32 | {% block extrahead %}{% endblock %} 33 | {{ ALDRYN_SNAKE.render_head }} 34 | 35 | 36 | {% include "includes/analytics.html" %} 37 | {% cms_toolbar %} 38 | 39 | {% block extend_root %}{% endblock %} 40 | 41 | 42 | {% if request.toolbar and request.toolbar.edit_mode_active %} 43 | 44 | {% endif %} 45 | {% render_block "js" %} 46 | {% block extrafoot %}{% endblock %} 47 | {{ ALDRYN_SNAKE.render_tail }} 48 | {% include "includes/browser.html" %} 49 | 50 | 51 | -------------------------------------------------------------------------------- /templates/content.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% load i18n staticfiles cms_tags menu_tags %} 3 | 4 | {% block body_class %}tpl-base{% endblock %} 5 | 6 | {# no indent for better readability on extend_root #} 7 | {% block extend_root %} 8 | {% block header %} 9 | {# DOCS: http://getbootstrap.com/components/#navbar #} 10 | 47 | {% endblock header %} 48 | 49 | {# DOCS: http://getbootstrap.com/components/#breadcrumbs #} 50 | {% block breadcrumb %} 51 | {% if not request.current_page.is_home %} 52 | 62 | {% endif %} 63 | {% endblock breadcrumb %} 64 | 65 | {# start: content #} 66 |
67 | {% block extend_base %} 68 | {% block messages %} 69 | {% include "includes/messages.html" %} 70 | {% endblock messages %} 71 | {% block content %} 72 | {% with 960 as width %} 73 |
74 | {% placeholder "content" %} 75 |
76 | {% endwith %} 77 | {% endblock %} 78 | {% endblock extend_base %} 79 |
80 | {# end: content #} 81 | 82 | {% block footer %} 83 |
84 |

{% trans "Sitemap" %}

85 | 86 |
87 | {% render_model_block request.current_page "changelist" %} 88 | 92 | {% endrender_model_block %} 93 |
94 |
95 | {% endblock footer %} 96 | {% endblock extend_root %} 97 | -------------------------------------------------------------------------------- /templates/includes/analytics.html: -------------------------------------------------------------------------------- 1 | {# INFO: from html5 boilerplate https://github.com/h5bp/html5-boilerplate/blob/master/index.html #} 2 | {% if GOOGLE_ANALYTICS_ID %} 3 | 11 | {% endif %} 12 | -------------------------------------------------------------------------------- /templates/includes/browser.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | 3 | 14 | -------------------------------------------------------------------------------- /templates/includes/icon.html: -------------------------------------------------------------------------------- 1 | {% load static %} 2 | 3 | {% if sprite %}{% else %}{% endif %} 4 | 5 | {% if title %} 6 | {{ title }} 7 | {% endif %} 8 | 9 | -------------------------------------------------------------------------------- /templates/includes/messages.html: -------------------------------------------------------------------------------- 1 | {% if messages %} 2 |
3 | {% for message in messages %} 4 |
5 |

{{ message }}

6 |
7 | {% endfor %} 8 |
9 | {% endif %} 10 | -------------------------------------------------------------------------------- /tools/build/install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | SCRIPT=$(readlink -f "$0") 6 | BASEDIR=$(dirname "$SCRIPT") 7 | OS_RELEASE=$(cat /etc/os-release | grep "^ID=" | cut -d= -f2) 8 | 9 | chmod +x ${BASEDIR}/*.sh 10 | 11 | ${BASEDIR}/node-${OS_RELEASE}.sh 12 | -------------------------------------------------------------------------------- /tools/build/node-alpine.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | # Node installation for Alpine systems 5 | apk update 6 | 7 | # Get exact package version where rN isn't known 8 | NODE_APK_REV=$(apk search nodejs | grep nodejs-$NODE_VERSION | rev | cut -d'-' -f1 | rev ) 9 | NODE_APK=nodejs@edge=$NODE_VERSION-$NODE_APK_REV 10 | 11 | # Intentionally using NODE version for NPM 12 | NPM_APK_REV=$(apk search nodejs-npm | grep nodejs-npm-$NODE_VERSION | rev | cut -d'-' -f1 | rev ) 13 | NPM_APK=nodejs-npm@edge=$NODE_VERSION-$NPM_APK_REV 14 | 15 | apk add python2 libuv@edge $NODE_APK $NPM_APK 16 | 17 | npm install npm@"$NPM_VERSION" 18 | npm install -g gulp bower 19 | 20 | -------------------------------------------------------------------------------- /tools/build/node-debian.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | source $NVM_DIR/nvm.sh 5 | 6 | RUN apt-get update -y && \ 7 | apt-get install -y build-essential --no-install-recommends 8 | 9 | # ensure python2 is available by name for gyp 10 | if [ ! -f /usr/bin/python2 ]; then 11 | apt-get install -y python2.7 --no-install-recommends 12 | ln -sn /usr/bin/python2.7 /usr/bin/python2 13 | fi 14 | 15 | nvm install $NODE_VERSION 16 | nvm alias default $NODE_VERSION 17 | nvm use default 18 | 19 | npm install -g npm@"$NPM_VERSION" 20 | npm install -g gulp bower 21 | -------------------------------------------------------------------------------- /tools/tasks/icons/json.js: -------------------------------------------------------------------------------- 1 | const file = require('gulp-file'); 2 | const fs = require('fs'); 3 | 4 | module.exports = function(gulp, opts) { 5 | return function() { 6 | const list = fs.readdirSync(opts.PROJECT_PATH.svg + '/' + opts.svg).map(file => 7 | `"icon-${file.replace(/\.svg$/, '')}"` 8 | ).join(',\n'); 9 | 10 | const content = ` 11 | { 12 | "svg": true, 13 | "spritePath": "sprites/${opts.svg}.svg", 14 | "iconClass": "icon", 15 | "iconClassFix": "icon-", 16 | "icons": [ 17 | ${list} 18 | ] 19 | } 20 | `; 21 | 22 | return ( 23 | file('iconset.json', content, { src: true }) 24 | .pipe(gulp.dest(opts.PROJECT_ROOT + '/static')) 25 | ); 26 | }; 27 | }; 28 | -------------------------------------------------------------------------------- /tools/tasks/icons/svgsprite.js: -------------------------------------------------------------------------------- 1 | const gutil = require('gulp-util'); 2 | const svgSprites = require('gulp-svg-sprites'); 3 | 4 | module.exports = function(gulp, opts) { 5 | return function() { 6 | // https://github.com/shakyshane/gulp-svg-sprites 7 | const config = { 8 | mode: 'symbols', 9 | preview: true, 10 | svgPath: `../sprites/${opts.svg}.svg`, 11 | selector: "icon-%f", 12 | svg: { 13 | symbols: `${opts.PROJECT_PATH.sprites}/${opts.svg}.svg`, 14 | }, 15 | }; 16 | 17 | return ( 18 | gulp 19 | .src(opts.PROJECT_PATTERNS.svg[opts.svg]) 20 | .pipe(svgSprites(config)) 21 | .on('error', function(error) { 22 | gutil.log(gutil.colors.red('Error (' + error.plugin + '): ' + error.messageFormatted)); 23 | }) 24 | // needs to be PROJECT_ROOT as the svgSprite config will do the rest 25 | .pipe(gulp.dest(opts.PROJECT_ROOT)) 26 | ); 27 | }; 28 | }; 29 | -------------------------------------------------------------------------------- /tools/tasks/lint/javascript.js: -------------------------------------------------------------------------------- 1 | const eslint = require('gulp-eslint'); 2 | 3 | 4 | module.exports = function (gulp, opts) { 5 | return function () { 6 | return gulp.src(opts.PROJECT_PATTERNS.js) 7 | .pipe(eslint()) 8 | .pipe(eslint.format()) 9 | .pipe(eslint.failAfterError()); 10 | }; 11 | }; 12 | -------------------------------------------------------------------------------- /tools/tasks/lint/sass.js: -------------------------------------------------------------------------------- 1 | const styleLint = require('gulp-stylelint'); 2 | 3 | 4 | module.exports = function (gulp, opts) { 5 | return function () { 6 | return gulp.src(opts.PROJECT_PATTERNS.sass) 7 | .pipe(styleLint({ 8 | reporters: [{ 9 | formatter: (opts.argv.debug) ? 'verbose' : 'string', 10 | console: true, 11 | }], 12 | })); 13 | }; 14 | }; 15 | -------------------------------------------------------------------------------- /tools/tasks/optimise/images.js: -------------------------------------------------------------------------------- 1 | const gutil = require('gulp-util'); 2 | const imagemin = require('gulp-imagemin'); 3 | 4 | 5 | module.exports = function (gulp, opts) { 6 | return function () { 7 | const options = { 8 | interlaced: true, 9 | optimizationLevel: 5, 10 | progressive: true, 11 | }; 12 | 13 | return gulp.src(opts.PROJECT_PATTERNS.images) 14 | .pipe(imagemin(options)) 15 | .on('error', function (error) { 16 | gutil.log(gutil.colors.red( 17 | 'Error (' + error.plugin + '): ' + error.messageFormatted) 18 | ); 19 | }) 20 | .pipe(gulp.dest(opts.PROJECT_PATH.images)); 21 | }; 22 | }; 23 | -------------------------------------------------------------------------------- /tools/tasks/optimise/svg.js: -------------------------------------------------------------------------------- 1 | const gutil = require('gulp-util'); 2 | const imagemin = require('gulp-imagemin'); 3 | 4 | 5 | module.exports = function (gulp, opts) { 6 | return function () { 7 | return gulp.src(opts.PROJECT_PATTERNS.svg) 8 | .pipe(imagemin([ 9 | imagemin.svgo({ 10 | plugins: [{ 11 | removeDimensions: true, 12 | }], 13 | })], 14 | // options 15 | { 16 | verbose: true, 17 | } 18 | )) 19 | .on('error', function (error) { 20 | gutil.log(gutil.colors.red( 21 | 'Error (' + error.plugin + '): ' + error.messageFormatted) 22 | ); 23 | }) 24 | .pipe(gulp.dest(opts.PROJECT_PATH.svg)); 25 | }; 26 | }; 27 | -------------------------------------------------------------------------------- /tools/tasks/sass/compile.js: -------------------------------------------------------------------------------- 1 | const autoprefixer = require('autoprefixer'); 2 | const gulpif = require('gulp-if'); 3 | const gutil = require('gulp-util'); 4 | const postcss = require('gulp-postcss'); 5 | const sass = require('gulp-sass'); 6 | const cleanCSS = require('gulp-clean-css'); 7 | const concat = require('gulp-concat-util'); 8 | const sourcemaps = require('gulp-sourcemaps'); 9 | // https://gist.github.com/chriseppstein/d7be56e21b216275bd86 10 | // Eyeglass is used to auto-discover bootstrap from npm. 11 | // Version 0.7 is required as bootstrap-sass pinns it in their package.json. 12 | const Eyeglass = require('eyeglass').Eyeglass; 13 | const eyeglass = new Eyeglass({ 14 | importer: function (uri, prev, done) { 15 | done(sass.compiler.types.NULL); 16 | }, 17 | // important to have no rounding errors 18 | precision: 10, 19 | }); 20 | 21 | 22 | module.exports = function (gulp, opts) { 23 | return function () { 24 | return gulp.src(opts.PROJECT_PATTERNS.sass) 25 | .pipe(gulpif(opts.argv.debug, sourcemaps.init())) 26 | .pipe(sass(eyeglass.sassOptions())) 27 | .on('error', function (error) { 28 | gutil.log(gutil.colors.red( 29 | 'Error (' + error.plugin + '): ' + error.messageFormatted) 30 | ); 31 | 32 | // used on Divio Cloud to inform divio app about the errors in 33 | // SASS compilation 34 | if (process.env.EXIT_ON_ERRORS) { 35 | process.exit(1); // eslint-disable-line 36 | } else { 37 | // in dev mode - just continue 38 | this.emit('end'); 39 | } 40 | }) 41 | .pipe( 42 | postcss([ 43 | autoprefixer({ 44 | // browsers are coming from browserslist file 45 | cascade: false, 46 | }), 47 | ]) 48 | ) 49 | .pipe(gulpif(!opts.argv.debug, cleanCSS({ 50 | rebase: false, 51 | }))) 52 | // this information is added on top of the generated .css file 53 | .pipe(concat.header( 54 | '/*\n This file is generated.\n' + 55 | ' Do not edit directly.\n' + 56 | ' Edit original files in\n' + 57 | ' /private/sass instead\n */ \n\n' 58 | )) 59 | .pipe(gulpif(opts.argv.debug, sourcemaps.write())) 60 | .pipe(gulp.dest(opts.PROJECT_PATH.css)); 61 | }; 62 | }; 63 | -------------------------------------------------------------------------------- /tools/tasks/sass/critical.js: -------------------------------------------------------------------------------- 1 | const cleanCSS = require('gulp-clean-css'); 2 | const concat = require('gulp-concat-util'); 3 | const criticalSplit = require('postcss-critical-split'); 4 | const gulpif = require('gulp-if'); 5 | const postcss = require('gulp-postcss'); 6 | const rename = require('gulp-rename') 7 | const sourcemaps = require('gulp-sourcemaps'); 8 | 9 | 10 | module.exports = function (gulp, opts) { 11 | return function () { 12 | return gulp.src(opts.PROJECT_PATTERNS.css) 13 | .pipe(gulpif(opts.argv.debug, sourcemaps.init({ 'loadMaps': true }))) 14 | .pipe( 15 | postcss([ 16 | criticalSplit({ 17 | output: 'critical', 18 | }), 19 | ]) 20 | ) 21 | .pipe(gulpif(!opts.argv.debug, cleanCSS({ 22 | rebase: false, 23 | }))) 24 | .pipe(rename({ 25 | suffix: '-critical', 26 | })) 27 | .pipe(concat.header( 28 | '/*\n This file is generated.\n' + 29 | ' Do not edit directly.\n' + 30 | ' Edit original files in\n' + 31 | ' /private/sass instead\n */ \n\n' 32 | )) 33 | .pipe(gulpif(opts.argv.debug, sourcemaps.write())) 34 | .pipe(gulp.dest(opts.PROJECT_PATH.css)); 35 | }; 36 | }; 37 | -------------------------------------------------------------------------------- /tools/tasks/sass/inline.js: -------------------------------------------------------------------------------- 1 | const checkFileSize = require('gulp-check-filesize'); 2 | const cleanCSS = require('gulp-clean-css'); 3 | const concat = require('gulp-concat-util'); 4 | const rename = require('gulp-rename') 5 | 6 | 7 | module.exports = function (gulp, opts) { 8 | return function () { 9 | return gulp.src(opts.PROJECT_PATH.css + '/*-critical.css') 10 | .pipe(checkFileSize({ 11 | fileSizeLimit: '14336', 12 | })) 13 | // inline the file into the correct location 14 | // written into templates/includes/critical_css.html 15 | .pipe(cleanCSS()) 16 | .pipe(concat.header('')) 18 | .pipe(rename({ 19 | basename: 'critical_css', 20 | extname: '.html', 21 | })) 22 | .pipe(gulp.dest(opts.PROJECT_PATH.html + '/includes')); 23 | }; 24 | }; 25 | -------------------------------------------------------------------------------- /tools/tasks/sass/rest.js: -------------------------------------------------------------------------------- 1 | const cleanCSS = require('gulp-clean-css'); 2 | const concat = require('gulp-concat-util'); 3 | const criticalSplit = require('postcss-critical-split'); 4 | const gulpif = require('gulp-if'); 5 | const postcss = require('gulp-postcss'); 6 | const sourcemaps = require('gulp-sourcemaps'); 7 | 8 | 9 | module.exports = function (gulp, opts) { 10 | return function () { 11 | // generate sass, optionally with sourcemaps and without cleaned css 12 | return gulp.src(opts.PROJECT_PATTERNS.css) 13 | .pipe(gulpif(opts.argv.debug, sourcemaps.init({ 'loadMaps': true }))) 14 | .pipe( 15 | postcss([ 16 | criticalSplit({ 17 | output: 'rest', 18 | }), 19 | ]) 20 | ) 21 | .pipe(gulpif(!opts.argv.debug, cleanCSS({ 22 | rebase: false, 23 | }))) 24 | // this information is added on top of the generated .css file 25 | .pipe(concat.header( 26 | '/*\n This file is generated.\n' + 27 | ' Do not edit directly.\n' + 28 | ' Edit original files in\n' + 29 | ' /private/sass instead\n */ \n\n' 30 | )) 31 | .pipe(gulpif(opts.argv.debug, sourcemaps.write())) 32 | .pipe(gulp.dest(opts.PROJECT_PATH.css)); 33 | }; 34 | }; 35 | -------------------------------------------------------------------------------- /tools/tasks/webpack/compile.js: -------------------------------------------------------------------------------- 1 | const gutil = require('gulp-util'); 2 | const webpack = require('webpack'); 3 | 4 | module.exports = function(gulp, opts) { 5 | return function(callback) { 6 | var config = require(opts.PROJECT_PATH.webpack + '/webpack.config'); 7 | 8 | config.watch = opts.watch; 9 | 10 | webpack(config, function(err, stats) { 11 | if (err) { 12 | throw new gutil.PluginError('webpack', err); 13 | } 14 | gutil.log( 15 | '[webpack]', 16 | stats.toString({ 17 | colors: true, 18 | maxModules: Infinity, 19 | optimizationBailout: true, 20 | }) 21 | ); 22 | if (!opts.watch) { 23 | callback(); 24 | } 25 | }); 26 | }; 27 | }; 28 | --------------------------------------------------------------------------------