Commit 59e25b62 authored by Achilles's avatar Achilles

added bootstrap bc_theme for d8

parent 17bf0bdb
<!-- @file Instructions for subtheming using the Sass Starterkit. -->
<!-- @defgroup sub_theming_sass -->
<!-- @ingroup sub_theming -->
# Sass Starterkit
Below are instructions on how to create a Bootstrap sub-theme using a Sass
- [Prerequisites](#prerequisites)
- [Additional Setup](#setup)
- [Overrides](#overrides)
## Prerequisites
- Read the @link getting_started Getting Started @endlink and @link sub_theming Sub-theming @endlink documentation topics.
- You must understand the basic concept of using the [Sass] CSS pre-processor.
- You must use a **[local Sass compiler](**.
- You must use the [Bootstrap Framework Source Files] ending in the `.scss`
extension, not files ending in `.css`.
## Additional Setup {#setup}
Download and extract the **latest** 3.x.x version of
[Bootstrap Framework Source Files] into the root of your new sub-theme. After
it has been extracted, the directory should be renamed (if needed) so it reads
If for whatever reason you have an additional `bootstrap` directory wrapping the
first `bootstrap` directory (e.g. `./THEMENAME/bootstrap/bootstrap`), remove the
wrapping `bootstrap` directory. You will only ever need to touch these files if
or when you upgrade your version of the [Bootstrap Framework].
{.alert.alert-warning} **WARNING:** Do not modify the files inside of
`./THEMENAME/bootstrap` directly. Doing so may cause issues when upgrading the
[Bootstrap Framework] in the future.
## Overrides {#overrides}
The `./THEMENAME/sass/_default-variables.scss` file is generally where you will
spend the majority of your time providing any default variables that should be
used by the [Bootstrap Framework] instead of its own.
The `./THEMENAME/sass/overrides.scss` file contains various Drupal overrides to
properly integrate with the [Bootstrap Framework]. It may contain a few
enhancements, feel free to edit this file as you see fit.
The `./THEMENAME/scss/style.scss` file is the glue that combines:
`_default-variables.scss`, [Bootstrap Framework Source Files] and the
`overrides.scss` file together. Generally, you will not need to modify this
file unless you need to add or remove files to be imported. This is the file
that you should compile to `./THEMENAME/css/style.css` (note the same file
name, using a different extension of course).
#### See also:
- @link theme_settings Theme Settings @endlink
- @link templates Templates @endlink
- @link plugins Plugin System @endlink
[Bootstrap Framework]:
[Bootstrap Framework Source Files]:
core: 8.x
type: theme
base theme: bootstrap
name: 'BC THEME'
description: 'Uses the bootstrap sass files'
package: 'Bootstrap'
navigation: 'Navigation'
navigation_collapsible: 'Navigation (Collapsible)'
header: 'Top Bar'
highlighted: 'Highlighted'
help: 'Help'
content: 'Content'
sidebar_first: 'Primary'
sidebar_second: 'Secondary'
footer: 'Footer'
page_top: 'Page top'
page_bottom: 'Page bottom'
- 'bc_theme/global-styling'
- 'bc_theme/bootstrap-scripts'
label: Front special
category: bc
template: layouts/front_special/front-special
css: layouts/front_special/layout.css
label: Header Left
label: Header Right
label: Highlighted
label: Body Left
label: Body Right
label: Body Column 1
label: Body Column 2
label: Body Column 3
\ No newline at end of file
css/style.css: {}
bootstrap/assets/javascripts/bootstrap/affix.js: {}
bootstrap/assets/javascripts/bootstrap/alert.js: {}
bootstrap/assets/javascripts/bootstrap/button.js: {}
bootstrap/assets/javascripts/bootstrap/carousel.js: {}
bootstrap/assets/javascripts/bootstrap/collapse.js: {}
bootstrap/assets/javascripts/bootstrap/dropdown.js: {}
bootstrap/assets/javascripts/bootstrap/modal.js: {}
bootstrap/assets/javascripts/bootstrap/tooltip.js: {}
bootstrap/assets/javascripts/bootstrap/popover.js: {}
bootstrap/assets/javascripts/bootstrap/scrollspy.js: {}
bootstrap/assets/javascripts/bootstrap/tab.js: {}
bootstrap/assets/javascripts/bootstrap/transition.js: {}
* @file
* Bootstrap sub-theme.
* Place your custom PHP code in this file.
//= require ./bootstrap/transition
//= require ./bootstrap/alert
//= require ./bootstrap/button
//= require ./bootstrap/carousel
//= require ./bootstrap/collapse
//= require ./bootstrap/dropdown
//= require ./bootstrap/modal
//= require ./bootstrap/tab
//= require ./bootstrap/affix
//= require ./bootstrap/scrollspy
//= require ./bootstrap/tooltip
//= require ./bootstrap/popover
/* ========================================================================
* Bootstrap: affix.js v3.3.7
* ========================================================================
* Copyright 2011-2016 Twitter, Inc.
* Licensed under MIT (
* ======================================================================== */
+function ($) {
'use strict';
// ======================
var Affix = function (element, options) {
this.options = $.extend({}, Affix.DEFAULTS, options)
this.$target = $(
.on('', $.proxy(this.checkPosition, this))
.on('', $.proxy(this.checkPositionWithEventLoop, this))
this.$element = $(element)
this.affixed = null
this.unpin = null
this.pinnedOffset = null
Affix.VERSION = '3.3.7'
Affix.RESET = 'affix affix-top affix-bottom'
Affix.DEFAULTS = {
offset: 0,
target: window
Affix.prototype.getState = function (scrollHeight, height, offsetTop, offsetBottom) {
var scrollTop = this.$target.scrollTop()
var position = this.$element.offset()
var targetHeight = this.$target.height()
if (offsetTop != null && this.affixed == 'top') return scrollTop < offsetTop ? 'top' : false
if (this.affixed == 'bottom') {
if (offsetTop != null) return (scrollTop + this.unpin <= ? false : 'bottom'
return (scrollTop + targetHeight <= scrollHeight - offsetBottom) ? false : 'bottom'
var initializing = this.affixed == null
var colliderTop = initializing ? scrollTop :
var colliderHeight = initializing ? targetHeight : height
if (offsetTop != null && scrollTop <= offsetTop) return 'top'
if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom'
return false
Affix.prototype.getPinnedOffset = function () {
if (this.pinnedOffset) return this.pinnedOffset
var scrollTop = this.$target.scrollTop()
var position = this.$element.offset()
return (this.pinnedOffset = - scrollTop)
Affix.prototype.checkPositionWithEventLoop = function () {
setTimeout($.proxy(this.checkPosition, this), 1)
Affix.prototype.checkPosition = function () {
if (!this.$':visible')) return
var height = this.$element.height()
var offset = this.options.offset
var offsetTop =
var offsetBottom = offset.bottom
var scrollHeight = Math.max($(document).height(), $(document.body).height())