Commit 70265cc6 authored by Robert Knight's avatar Robert Knight Committed by Nick Stenning

Put all the files for the custom bootstrap build in a single place

Our script and style files are split between h/static/scripts
and h/static/styles in the source tree.

When updating Bootstrap however, these files are part of a single
archive and it is useful to have the config.json file, the CSS
and the JS all in one place.

This also updates the Bootstrap build with styles for
alerts which are still used by the flashbar.
parent c2201ed2
......@@ -6,7 +6,7 @@ var installerController = require('./installer-controller');
// load our customized version of Bootstrap which
// provides a few basic UI components (eg. modal dialogs)
require('./vendor/bootstrap');
require('../styles/vendor/bootstrap/bootstrap');
function setupGroupsController(path) {
if (path === '/groups/new') {
......
{
"__comment__": "Configuration file for a minimial version of Bootstrap",
"vars": {},
"css": [
"modals.less"
],
"js": [
"modal.js"
],
"customizerUrl": "http://getbootstrap.com/customize/?id=60ee00f3201977e61456"
}
// minimal bootstrap CSS
@import './vendor/bootstrap';
@import './vendor/bootstrap/bootstrap';
// shared styling used by both the app and the website
@import './base';
......
A minimal build of Bootstrap with just the components
that we actually use.
To update this bootstrap build:
1. Go to http://getbootstrap.com/customize/
2. Upload the config.json file
3. Make any desired changes
4. Compile and download the updated bootstrap
build.
5. Replace 'bootstrap.scss' with 'bootstrap.css' from the archive
and 'bootstrap.js' with the version from the archive.
......@@ -5,8 +5,8 @@
*/
/*!
* Generated using the Bootstrap Customizer (http://getbootstrap.com/customize/?id=60ee00f3201977e61456)
* Config saved to config.json and https://gist.github.com/60ee00f3201977e61456
* Generated using the Bootstrap Customizer (http://getbootstrap.com/customize/?id=f791f6eed709d3253cfb)
* Config saved to config.json and https://gist.github.com/f791f6eed709d3253cfb
*/
if (typeof jQuery === 'undefined') {
throw new Error('Bootstrap\'s JavaScript requires jQuery')
......@@ -19,6 +19,101 @@ if (typeof jQuery === 'undefined') {
}
}(jQuery);
/* ========================================================================
* Bootstrap: alert.js v3.3.6
* http://getbootstrap.com/javascript/#alerts
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
+function ($) {
'use strict';
// ALERT CLASS DEFINITION
// ======================
var dismiss = '[data-dismiss="alert"]'
var Alert = function (el) {
$(el).on('click', dismiss, this.close)
}
Alert.VERSION = '3.3.6'
Alert.TRANSITION_DURATION = 150
Alert.prototype.close = function (e) {
var $this = $(this)
var selector = $this.attr('data-target')
if (!selector) {
selector = $this.attr('href')
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
}
var $parent = $(selector)
if (e) e.preventDefault()
if (!$parent.length) {
$parent = $this.closest('.alert')
}
$parent.trigger(e = $.Event('close.bs.alert'))
if (e.isDefaultPrevented()) return
$parent.removeClass('in')
function removeElement() {
// detach from parent, fire event then clean up data
$parent.detach().trigger('closed.bs.alert').remove()
}
$.support.transition && $parent.hasClass('fade') ?
$parent
.one('bsTransitionEnd', removeElement)
.emulateTransitionEnd(Alert.TRANSITION_DURATION) :
removeElement()
}
// ALERT PLUGIN DEFINITION
// =======================
function Plugin(option) {
return this.each(function () {
var $this = $(this)
var data = $this.data('bs.alert')
if (!data) $this.data('bs.alert', (data = new Alert(this)))
if (typeof option == 'string') data[option].call($this)
})
}
var old = $.fn.alert
$.fn.alert = Plugin
$.fn.alert.Constructor = Alert
// ALERT NO CONFLICT
// =================
$.fn.alert.noConflict = function () {
$.fn.alert = old
return this
}
// ALERT DATA-API
// ==============
$(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close)
}(jQuery);
/* ========================================================================
* Bootstrap: modal.js v3.3.6
* http://getbootstrap.com/javascript/#modals
......
......@@ -5,8 +5,8 @@
*/
/*!
* Generated using the Bootstrap Customizer (http://getbootstrap.com/customize/?id=60ee00f3201977e61456)
* Config saved to config.json and https://gist.github.com/60ee00f3201977e61456
* Generated using the Bootstrap Customizer (http://getbootstrap.com/customize/?id=ccdd906c19fa36ff9897)
* Config saved to config.json and https://gist.github.com/ccdd906c19fa36ff9897
*/
/*!
* Bootstrap v3.3.6 (http://getbootstrap.com)
......@@ -299,6 +299,106 @@ hr {
[role="button"] {
cursor: pointer;
}
.alert {
padding: 15px;
margin-bottom: 20px;
border: 1px solid transparent;
border-radius: 4px;
}
.alert h4 {
margin-top: 0;
color: inherit;
}
.alert .alert-link {
font-weight: bold;
}
.alert > p,
.alert > ul {
margin-bottom: 0;
}
.alert > p + p {
margin-top: 5px;
}
.alert-dismissable,
.alert-dismissible {
padding-right: 35px;
}
.alert-dismissable .close,
.alert-dismissible .close {
position: relative;
top: -2px;
right: -21px;
color: inherit;
}
.alert-success {
background-color: #dff0d8;
border-color: #d6e9c6;
color: #3c763d;
}
.alert-success hr {
border-top-color: #c9e2b3;
}
.alert-success .alert-link {
color: #2b542c;
}
.alert-info {
background-color: #d9edf7;
border-color: #bce8f1;
color: #31708f;
}
.alert-info hr {
border-top-color: #a6e1ec;
}
.alert-info .alert-link {
color: #245269;
}
.alert-warning {
background-color: #fcf8e3;
border-color: #faebcc;
color: #8a6d3b;
}
.alert-warning hr {
border-top-color: #f7e1b5;
}
.alert-warning .alert-link {
color: #66512c;
}
.alert-danger {
background-color: #f2dede;
border-color: #ebccd1;
color: #a94442;
}
.alert-danger hr {
border-top-color: #e4b9c0;
}
.alert-danger .alert-link {
color: #843534;
}
.close {
float: right;
font-size: 21px;
font-weight: bold;
line-height: 1;
color: #000000;
text-shadow: 0 1px 0 #ffffff;
opacity: 0.2;
filter: alpha(opacity=20);
}
.close:hover,
.close:focus {
color: #000000;
text-decoration: none;
cursor: pointer;
opacity: 0.5;
filter: alpha(opacity=50);
}
button.close {
padding: 0;
cursor: pointer;
background: transparent;
border: 0;
-webkit-appearance: none;
}
.modal-open {
overflow: hidden;
}
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment