Rebase branch off of 8.x-3.x

Signed-off-by: markcarver's avatarMark Carver <mark.carver@me.com>
parent ad64d617
# OS
.DS_Store
# Applications & Tools
.idea
bower_components
config.codekit
node_modules
npm-debug.log
# Project Specific
.libraries
lib
starterkits/*/bootstrap
<!-- @file Project Page -->
# Bootstrap
> Sleek, intuitive, and powerful mobile first front-end framework for faster and
> easier web development. Bootstrap has become one of the most popular front-end
> frameworks and open source projects in the world.
This base theme bridges the gap between Drupal and the [Bootstrap Framework].
### Features
- [jsDelivr CDN](http://www.jsdelivr.com) for "out-of-the-box" styling and
faster page load times.
- [Bootswatch](http://bootswatch.com) theme support, if using the CDN.
- Glyphicons support via [Icon API](https://www.drupal.org/project/icon).
- Extensive integration and template/preprocessor overrides for most of the
[Bootstrap Framework] CSS, Components and JavaScript
- Theme settings to further enhance the Drupal Bootstrap integration:
- [Breadcrumbs](https://getbootstrap.com/docs/3.4/components/#breadcrumbs)
- [Navbar](https://getbootstrap.com/docs/3.4/components/#navbar)
- [Popovers](https://getbootstrap.com/docs/3.4/javascript/#popovers)
- [Tooltips](https://getbootstrap.com/docs/3.4/javascript/#tooltips)
- [Wells](https://getbootstrap.com/docs/3.4/components/#wells) (per region)
### Documentation
Visit the project's [official documentation site](https://drupal-bootstrap.org)
or the markdown files inside the `./docs` directory.
### Supported modules
**Drupal 8**
- [Bootstrap Layouts](https://www.drupal.org/project/bootstrap_layouts)
**Drupal 7**
- [Bootstrap Core](https://www.drupal.org/project/bootstrap_core)
- [jQuery Update](https://www.drupal.org/project/jquery_update)
- [Icon API](https://www.drupal.org/project/icon)
- [Picture](https://www.drupal.org/project/picture)
- [Views](https://www.drupal.org/project/views) _(partial support)_
- [Webform](https://www.drupal.org/project/webform) _(partial support)_
### 5 Year Evolution (gource)
https://youtu.be/Cvq6MPJp2dI
[Bootstrap Framework]: https://getbootstrap.com/docs/3.4/
This branch currently only exists to help postpone issues for a
later date in the issue queue. Please use 7.x-3.x-dev instead.
<?php
/**
* @file
* Fix the class loader to allow cross-request class based theme callbacks.
*/
/**
* Invokes \Drupal\Core\Extension\ThemeHandler::listInfo.
*
* This is in an attempt to ensure theme autoloading works properly.
*
* @see \Drupal\bootstrap\Bootstrap::autoloadFixInclude
*/
try {
\Drupal::service('theme_handler')->listInfo();
}
catch (\Exception $e) {
// Intentionally left blank.
}
<?php
/**
* @file
* List of available procedural hook and alter APIs for use in your sub-theme.
*/
/**
* @addtogroup plugins_alter
*
* @{
*/
/**
* Allows sub-themes to alter the array used for colorizing text.
*
* @param array $texts
* An associative array containing the text and classes to be matched, passed
* by reference.
*
* @see \Drupal\bootstrap\Bootstrap::cssClassFromString()
*/
function hook_bootstrap_colorize_text_alter(array &$texts) {
// This matches the exact string: "My Unique Button Text".
// Note: the t() function in D8 returns a TranslatableMarkup object.
// It must be rendered to a string before it can be added as an array key.
$texts['matches'][t('My Unique Button Text')->render()] = 'primary';
// This would also match the string above, however the class returned would
// also be the one above; "matches" takes precedence over "contains".
$texts['contains'][t('Unique')->render()] = 'notice';
// Remove matching for strings that contain "apply":
unset($texts['contains'][t('Apply')->render()]);
// Change the class that matches "Rebuild" (originally "warning"):
$texts['contains'][t('Rebuild')->render()] = 'success';
}
/**
* Allows sub-themes to alter the array used for associating an icon with text.
*
* @param array $texts
* An associative array containing the text and icons to be matched, passed
* by reference.
*
* @see \Drupal\bootstrap\Bootstrap::glyphiconFromString()
*/
function hook_bootstrap_iconize_text_alter(array &$texts) {
// This matches the exact string: "My Unique Button Text".
// Note: the t() function in D8 returns a TranslatableMarkup object.
// It must be rendered to a string before it can be added as an array key.
$texts['matches'][t('My Unique Button Text')->render()] = 'heart';
// This would also match the string above, however the class returned would
// also be the one above; "matches" takes precedence over "contains".
$texts['contains'][t('Unique')->render()] = 'bullhorn';
// Remove matching for strings that contain "filter":
unset($texts['contains'][t('Filter')->render()]);
// Change the icon that matches "Upload" (originally "upload"):
$texts['contains'][t('Upload')->render()] = 'ok';
}
/**
* @} End of "addtogroup".
*/
bootstrap.screen-xs-max:
label: screen-xs-max
mediaQuery: 'all and (max-width: 767px)'
weight: 1
multipliers:
- 1x
- 2x
bootstrap.screen-sm-min:
label: screen-sm-min
mediaQuery: 'all and (min-width: 768px)'
weight: 2
multipliers:
- 1x
- 2x
bootstrap.screen-sm-max:
label: screen-sm-max
mediaQuery: 'all and (max-width: 991px)'
weight: 3
multipliers:
- 1x
- 2x
bootstrap.screen-md-min:
label: screen-md-min
mediaQuery: 'all and (min-width: 992px)'
weight: 4
multipliers:
- 1x
- 2x
bootstrap.screen-md-max:
label: screen-md-max
mediaQuery: 'all and (max-width: 1199px)'
weight: 5
multipliers:
- 1x
- 2x
bootstrap.screen-lg-min:
label: screen-lg-min
mediaQuery: 'all and (min-width: 1200px)'
weight: 6
multipliers:
- 1x
- 2x
core: 8.x
type: theme
base theme: false
name: 'Bootstrap'
description: 'Built to use Bootstrap, a sleek, intuitive, and powerful front-end framework for faster and easier web development.'
package: 'Bootstrap'
regions:
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'
libraries:
- 'bootstrap/theme'
libraries-extend:
core/drupal.ajax:
- bootstrap/drupal.ajax
core/drupal.autocomplete:
- bootstrap/drupal.autocomplete
core/drupal.dialog.ajax:
- bootstrap/drupal.dialog.ajax
core/drupal.form:
- bootstrap/drupal.form
core/drupal.message:
- bootstrap/drupal.message
core/drupal.progress:
- bootstrap/drupal.progress
core/drupal.states:
- bootstrap/drupal.states
core/drupal.tabledrag:
- bootstrap/drupal.tabledrag
core/drupal.tableheader:
- bootstrap/drupal.tableheader
image_widget_crop/cropper.integration:
- bootstrap/image_widget_crop
views/views.ajax:
- bootstrap/views.ajax
libraries-override:
core/drupal.batch: bootstrap/drupal.batch
core/drupal.dropbutton: bootstrap/dropdown
core/drupal.vertical-tabs: bootstrap/drupal.vertical-tabs
filter/drupal.filter: bootstrap/drupal.filter
system/admin: false
text/drupal.text: bootstrap/drupal.text
# Remove individual stylesheets.
system/base:
css:
component:
css/components/ajax-progress.module.css: false
css/components/autocomplete-loading.module.css: false
css/components/tabledrag.module.css: false
file/drupal.file:
css:
theme:
css/file.admin.css: false
filter/drupal.filter.admin:
css:
theme:
css/filter.admin.css: false
node/drupal.node.preview:
css:
theme:
css/node.preview.css: false
attributes:
js:
js/attributes.js: {}
dependencies:
- core/jquery
- core/underscore
# This is automatically extended with JavaScript and CSS for CDN based themes.
# If sub-theme uses a starterkit like LESS or SASS, then it should extend this
# library to add in the compiled CSS and JavaScript sources.
framework:
css: {}
js: {}
dependencies:
- core/jquery
drupal.bootstrap:
js:
js/drupal.bootstrap.js: {}
dependencies:
- core/jquery
- core/drupal
- core/drupalSettings
- bootstrap/framework
# Create a library placeholder for livereload.
# This is altered dynamically based on the set URL.
# @see \Drupal\bootstrap\Plugin\Alter\LibraryInfo::alter
livereload:
js:
livereload.js: {}
theme:
js:
js/theme.js: {}
dependencies:
- bootstrap/drupal.bootstrap
- bootstrap/attributes
theme-settings:
js:
js/theme-settings.js: {}
dependencies:
- core/jquery
- core/jquery.once
- core/drupal
- core/drupalSettings
dropdown:
js:
js/dropdown.js: {}
dependencies:
- bootstrap/theme
modal:
js:
js/modal.js: {}
dependencies:
- bootstrap/theme
modal.jquery.ui.bridge:
js:
js/modal.jquery.ui.bridge.js: {}
dependencies:
- bootstrap/modal
- core/jquery.ui
- core/jquery.ui.widget
- core/jquery.ui.draggable
- core/jquery.ui.mouse
- core/jquery.ui.position
- core/jquery.ui.resizable
popover:
js:
js/popover.js: {}
dependencies:
- bootstrap/theme
tooltip:
js:
js/tooltip.js: {}
dependencies:
- bootstrap/theme
# libraries-extend
drupal.ajax:
js:
js/misc/ajax.js: {}
drupal.autocomplete:
js:
js/misc/autocomplete.js: {}
drupal.dialog.ajax:
js:
js/misc/dialog.ajax.js: {}
drupal.form:
js:
js/misc/form.js: {}
dependencies:
- bootstrap/theme
drupal.message:
js:
js/misc/message.js: {}
drupal.progress:
js:
js/misc/progress.js: {}
drupal.states:
js:
js/misc/states.js: {}
drupal.tabledrag:
js:
js/misc/tabledrag.js: {}
drupal.tableheader:
js:
js/misc/tableheader.js: {}
image_widget_crop:
js:
js/modules/image_widget_crop/ImageWidgetCrop.js: {}
views.ajax:
js:
js/modules/views/ajax_view.js: {}
# libraries-override
drupal.batch:
js:
js/misc/batch.js: { cache: false }
dependencies:
- bootstrap/theme
- core/drupal.ajax
- core/drupal.progress
- core/jquery.once
drupal.filter:
version: VERSION
js:
js/modules/filter/filter.js: {}
dependencies:
- core/jquery
- core/drupal
- core/jquery.once
drupal.text:
js:
js/text/text.js: {}
dependencies:
- core/jquery
- core/jquery.once
- core/drupal
drupal.vertical-tabs:
js:
js/misc/vertical-tabs.js: {}
dependencies:
- bootstrap/theme
- core/jquery.once
- core/drupal.form
- core/matchmedia
<?php
/**
* @file
* The primary PHP file for the Drupal Bootstrap base theme.
*
* This file should only contain light helper functions and point to stubs in
* other files containing more complex functions.
*
* The stubs should point to files within the `./includes` directory named after
* the function itself minus the theme prefix. If the stub contains a group of
* functions, then please organize them so they are related in some way and name
* the file appropriately to at least hint at what it contains.
*
* All [pre]process functions, theme functions and template files lives inside
* the `./templates` directory. This is a highly automated and complex system
* designed to only load the necessary files when a given theme hook is invoked.
*
* Visit this project's official documentation site https://drupal-bootstrap.org
* or the markdown files inside the `./docs` directory.
*
* @see bootstrap_theme()
* @see \Drupal\bootstrap\Registry
*/
use Drupal\bootstrap\Bootstrap;
/**
* Initialize the active theme.
*/
Bootstrap::initialize();
/**
* {@inheritdoc}
*
* @see hook_bootstrap_colorize_text_alter()
*/
function bootstrap_bootstrap_colorize_text_alter(&$data, &$context1 = NULL, &$context2 = NULL) {
Bootstrap::alter(__FUNCTION__, $data, $context1, $context2);
}
/**
* {@inheritdoc}
*
* @see hook_bootstrap_iconize_text_alter()
*/
function bootstrap_bootstrap_iconize_text_alter(&$data, &$context1 = NULL, &$context2 = NULL) {
Bootstrap::alter(__FUNCTION__, $data, $context1, $context2);
}
/**
* {@inheritdoc}
*
* @see hook_bootstrap_layouts_class_options_alter()
*/
function bootstrap_bootstrap_layouts_class_options_alter(&$data, &$context1 = NULL, &$context2 = NULL) {
Bootstrap::alter(__FUNCTION__, $data, $context1, $context2);
}
/**
* {@inheritdoc}
*
* @see \Drupal\bootstrap\Plugin\Alter\ElementInfo::alter()
*/
function bootstrap_element_info_alter(&$data, &$context1 = NULL, &$context2 = NULL) {
Bootstrap::alter(__FUNCTION__, $data, $context1, $context2);
}
/**
* {@inheritdoc}
*
* @see \Drupal\bootstrap\Theme::alter()
*/
function bootstrap_form_alter(&$data, &$context1 = NULL, &$context2 = NULL) {
Bootstrap::alter(__FUNCTION__, $data, $context1, $context2);
}
/**
* {@inheritdoc}
*
* @see \Drupal\bootstrap\Plugin\Form\SystemThemeSettings::alterForm()
*/
function bootstrap_form_system_theme_settings_alter(&$data, &$context1 = NULL, &$context2 = NULL) {
Bootstrap::alter(__FUNCTION__, $data, $context1, $context2);
}
/**
* {@inheritdoc}
*/
function bootstrap_js_settings_alter(&$data, &$context1 = NULL, &$context2 = NULL) {
Bootstrap::alter(__FUNCTION__, $data, $context1, $context2);
}
/**
* {@inheritdoc}
*
* @see \Drupal\bootstrap\Plugin\Alter\LibraryInfo::alter()
*/
function bootstrap_library_info_alter(&$data, &$context1 = NULL, &$context2 = NULL) {
Bootstrap::alter(__FUNCTION__, $data, $context1, $context2);
}
/**
* {@inheritdoc}
*
* @see \Drupal\bootstrap\Plugin\Alter\PageAttachments::alter()
*/
function bootstrap_page_attachments_alter(&$data, &$context1 = NULL, &$context2 = NULL) {
Bootstrap::alter(__FUNCTION__, $data, $context1, $context2);
}
/**
* {@inheritdoc}
*
* @see \Drupal\bootstrap\Bootstrap::preprocess()
*/
function bootstrap_preprocess(&$variables, $hook, $info) {
Bootstrap::preprocess($variables, $hook, $info);
}
/**
* {@inheritdoc}
*
* @see \Drupal\bootstrap\Bootstrap::getInfo()
*/
function bootstrap_theme() {
return Bootstrap::getThemeHooks();
}
/**
* {@inheritdoc}
*
* @see \Drupal\bootstrap\Plugin\Alter\ThemeRegistry::alter()
*
* @todo Remove once a proper replacement for the theme.registry service can be
* created in a bootstrap_core sub-module.
*/
function bootstrap_theme_registry_alter(&$data, &$context1 = NULL, &$context2 = NULL) {
Bootstrap::alter(__FUNCTION__, $data, $context1, $context2);
}
/**
* {@inheritdoc}
*
* @see \Drupal\bootstrap\Plugin\Alter\ThemeSuggestions::alter()
*/
function bootstrap_theme_suggestions_alter(&$data, &$context1 = NULL, &$context2 = NULL) {
Bootstrap::alter(__FUNCTION__, $data, $context1, $context2);
}
{
"name": "drupal/bootstrap",
"description": "Built to use Bootstrap, a sleek, intuitive, and powerful front-end framework for faster and easier web development.",
"type": "drupal-theme",
"license": "GPL-2.0",
"homepage": "https://www.drupal.org/project/bootstrap",
"authors": [
{
"name": "Mark Carver (markcarver)",
"homepage": "https://www.drupal.org/u/markcarver",
"role": "Maintainer"
},
{
"name": "John McCormick (neardark)",