Skip to content

Commit 8d315f0

Browse files
committed
v2.0 update
1 parent 21c40da commit 8d315f0

File tree

119 files changed

+11573
-3737
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+11573
-3737
lines changed

bootstrap/css/bootstrap-docs.css

Lines changed: 1067 additions & 0 deletions
Large diffs are not rendered by default.

bootstrap/css/bootstrap-responsive.css

Lines changed: 1109 additions & 0 deletions
Large diffs are not rendered by default.

css/bootstrap.css renamed to bootstrap/css/bootstrap.css

Lines changed: 247 additions & 119 deletions
Large diffs are not rendered by default.

bootstrap/css/prettify.css

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
.com { color: #93a1a1; }
2+
.lit { color: #195f91; }
3+
.pun, .opn, .clo { color: #93a1a1; }
4+
.fun { color: #dc322f; }
5+
.str, .atv { color: #D14; }
6+
.kwd, .prettyprint .tag { color: #1e347b; }
7+
.typ, .atn, .dec, .var { color: teal; }
8+
.pln { color: #48484c; }
9+
10+
.prettyprint {
11+
padding: 8px;
12+
background-color: #f7f7f9;
13+
border: 1px solid #e1e1e8;
14+
}
15+
.prettyprint.linenums {
16+
-webkit-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0;
17+
-moz-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0;
18+
box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0;
19+
}
20+
21+
/* Specify class=linenums on a pre to get line numbering */
22+
ol.linenums {
23+
margin: 0 0 0 33px; /* IE indents via margin-left */
24+
}
25+
ol.linenums li {
26+
padding-left: 12px;
27+
color: #bebec5;
28+
line-height: 20px;
29+
text-shadow: 0 1px 0 #fff;
30+
}
8.57 KB
Loading
12.5 KB
Loading

bootstrap/js/application.js

Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
// NOTICE!! DO NOT USE ANY OF THIS JAVASCRIPT
2+
// IT'S ALL JUST JUNK FOR OUR DOCS!
3+
// ++++++++++++++++++++++++++++++++++++++++++
4+
5+
!function ($) {
6+
7+
$(function(){
8+
9+
var $window = $(window)
10+
11+
// Disable certain links in docs
12+
$('section [href^=#]').click(function (e) {
13+
e.preventDefault()
14+
})
15+
16+
// side bar
17+
setTimeout(function () {
18+
$('.bs-docs-sidenav').affix({
19+
offset: {
20+
top: function () { return $window.width() <= 980 ? 290 : 210 }
21+
, bottom: 270
22+
}
23+
})
24+
}, 100)
25+
26+
// make code pretty
27+
window.prettyPrint && prettyPrint()
28+
29+
// add-ons
30+
$('.add-on :checkbox').on('click', function () {
31+
var $this = $(this)
32+
, method = $this.attr('checked') ? 'addClass' : 'removeClass'
33+
$(this).parents('.add-on')[method]('active')
34+
})
35+
36+
// add tipsies to grid for scaffolding
37+
if ($('#gridSystem').length) {
38+
$('#gridSystem').tooltip({
39+
selector: '.show-grid > [class*="span"]'
40+
, title: function () { return $(this).width() + 'px' }
41+
})
42+
}
43+
44+
// tooltip demo
45+
$('.tooltip-demo').tooltip({
46+
selector: "a[data-toggle=tooltip]"
47+
})
48+
49+
$('.tooltip-test').tooltip()
50+
$('.popover-test').popover()
51+
52+
// popover demo
53+
$("a[data-toggle=popover]")
54+
.popover()
55+
.click(function(e) {
56+
e.preventDefault()
57+
})
58+
59+
// button state demo
60+
$('#fat-btn')
61+
.click(function () {
62+
var btn = $(this)
63+
btn.button('loading')
64+
setTimeout(function () {
65+
btn.button('reset')
66+
}, 3000)
67+
})
68+
69+
// carousel demo
70+
$('#myCarousel').carousel()
71+
72+
// javascript build logic
73+
var inputsComponent = $("#components.download input")
74+
, inputsPlugin = $("#plugins.download input")
75+
, inputsVariables = $("#variables.download input")
76+
77+
// toggle all plugin checkboxes
78+
$('#components.download .toggle-all').on('click', function (e) {
79+
e.preventDefault()
80+
inputsComponent.attr('checked', !inputsComponent.is(':checked'))
81+
})
82+
83+
$('#plugins.download .toggle-all').on('click', function (e) {
84+
e.preventDefault()
85+
inputsPlugin.attr('checked', !inputsPlugin.is(':checked'))
86+
})
87+
88+
$('#variables.download .toggle-all').on('click', function (e) {
89+
e.preventDefault()
90+
inputsVariables.val('')
91+
})
92+
93+
// request built javascript
94+
$('.download-btn .btn').on('click', function () {
95+
96+
var css = $("#components.download input:checked")
97+
.map(function () { return this.value })
98+
.toArray()
99+
, js = $("#plugins.download input:checked")
100+
.map(function () { return this.value })
101+
.toArray()
102+
, vars = {}
103+
, img = ['glyphicons-halflings.png', 'glyphicons-halflings-white.png']
104+
105+
$("#variables.download input")
106+
.each(function () {
107+
$(this).val() && (vars[ $(this).prev().text() ] = $(this).val())
108+
})
109+
110+
$.ajax({
111+
type: 'POST'
112+
, url: /\?dev/.test(window.location) ? 'http://localhost:3000' : 'http://bootstrap.herokuapp.com'
113+
, dataType: 'jsonpi'
114+
, params: {
115+
js: js
116+
, css: css
117+
, vars: vars
118+
, img: img
119+
}
120+
})
121+
})
122+
})
123+
124+
// Modified from the original jsonpi https://github.com/benvinegar/jquery-jsonpi
125+
$.ajaxTransport('jsonpi', function(opts, originalOptions, jqXHR) {
126+
var url = opts.url;
127+
128+
return {
129+
send: function(_, completeCallback) {
130+
var name = 'jQuery_iframe_' + jQuery.now()
131+
, iframe, form
132+
133+
iframe = $('<iframe>')
134+
.attr('name', name)
135+
.appendTo('head')
136+
137+
form = $('<form>')
138+
.attr('method', opts.type) // GET or POST
139+
.attr('action', url)
140+
.attr('target', name)
141+
142+
$.each(opts.params, function(k, v) {
143+
144+
$('<input>')
145+
.attr('type', 'hidden')
146+
.attr('name', k)
147+
.attr('value', typeof v == 'string' ? v : JSON.stringify(v))
148+
.appendTo(form)
149+
})
150+
151+
form.appendTo('body').submit()
152+
}
153+
}
154+
})
155+
156+
}(window.jQuery)

bootstrap/js/google-code-prettify/prettify.js

Lines changed: 28 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)