Skip to content

Commit 2a43e7e

Browse files
committed
Break up docs into includes
1 parent bdb70fa commit 2a43e7e

Some content is hidden

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

67 files changed

+9239
-9534
lines changed

dist/js/bootstrap.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1054,7 +1054,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
10541054
animation: true,
10551055
placement: 'top',
10561056
selector: false,
1057-
template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',
1057+
template: '<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',
10581058
trigger: 'hover focus',
10591059
title: '',
10601060
delay: 0,
@@ -1600,7 +1600,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
16001600

16011601
ScrollSpy.prototype.process = function () {
16021602
var scrollTop = this.$scrollElement.scrollTop() + this.options.offset
1603-
var scrollHeight = this.$scrollElement[0].scrollHeight || this.$body[0].scrollHeight
1603+
var scrollHeight = this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight)
16041604
var maxScroll = scrollHeight - this.$scrollElement.height()
16051605
var offsets = this.offsets
16061606
var targets = this.targets

dist/js/bootstrap.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/_includes/components/alerts.html

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
<div class="bs-docs-section">
2+
<h1 id="alerts" class="page-header">Alerts</h1>
3+
4+
<p class="lead">Provide contextual feedback messages for typical user actions with the handful of available and flexible alert messages. For inline dismissal, use the <a href="../javascript/#alerts">alerts jQuery plugin</a>.</p>
5+
6+
<h2 id="alerts-examples">Examples</h2>
7+
<p>Wrap any text and an optional dismiss button in <code>.alert</code> and one of the four contextual classes (e.g., <code>.alert-success</code>) for basic alert messages.</p>
8+
9+
<div class="bs-callout bs-callout-info">
10+
<h4>No default class</h4>
11+
<p>Alerts don't have default classes, only base and modifier classes. A default gray alert doesn't make too much sense, so you're required to specify a type via contextual class. Choose from success, info, warning, or danger.</p>
12+
</div>
13+
14+
<div class="bs-example">
15+
<div class="alert alert-success" role="alert">
16+
<strong>Well done!</strong> You successfully read this important alert message.
17+
</div>
18+
<div class="alert alert-info" role="alert">
19+
<strong>Heads up!</strong> This alert needs your attention, but it's not super important.
20+
</div>
21+
<div class="alert alert-warning" role="alert">
22+
<strong>Warning!</strong> Better check yourself, you're not looking too good.
23+
</div>
24+
<div class="alert alert-danger" role="alert">
25+
<strong>Oh snap!</strong> Change a few things up and try submitting again.
26+
</div>
27+
</div>
28+
{% highlight html %}
29+
<div class="alert alert-success" role="alert">...</div>
30+
<div class="alert alert-info" role="alert">...</div>
31+
<div class="alert alert-warning" role="alert">...</div>
32+
<div class="alert alert-danger" role="alert">...</div>
33+
{% endhighlight %}
34+
35+
<h2 id="alerts-dismissable">Dismissable alerts</h2>
36+
<p>Build on any alert by adding an optional <code>.alert-dismissable</code> and close button.</p>
37+
<div class="bs-example">
38+
<div class="alert alert-warning alert-dismissable" role="alert">
39+
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
40+
<strong>Warning!</strong> Better check yourself, you're not looking too good.
41+
</div>
42+
</div>
43+
{% highlight html %}
44+
<div class="alert alert-warning alert-dismissable" role="alert">
45+
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
46+
<strong>Warning!</strong> Better check yourself, you're not looking too good.
47+
</div>
48+
{% endhighlight %}
49+
50+
<div class="bs-callout bs-callout-warning">
51+
<h4>Ensure proper behavior across all devices</h4>
52+
<p>Be sure to use the <code>&lt;button&gt;</code> element with the <code>data-dismiss="alert"</code> data attribute.</p>
53+
</div>
54+
55+
<h2 id="alerts-links">Links in alerts</h2>
56+
<p>Use the <code>.alert-link</code> utility class to quickly provide matching colored links within any alert.</p>
57+
<div class="bs-example">
58+
<div class="alert alert-success" role="alert">
59+
<strong>Well done!</strong> You successfully read <a href="#" class="alert-link">this important alert message</a>.
60+
</div>
61+
<div class="alert alert-info" role="alert">
62+
<strong>Heads up!</strong> This <a href="#" class="alert-link">alert needs your attention</a>, but it's not super important.
63+
</div>
64+
<div class="alert alert-warning" role="alert">
65+
<strong>Warning!</strong> Better check yourself, you're <a href="#" class="alert-link">not looking too good</a>.
66+
</div>
67+
<div class="alert alert-danger" role="alert">
68+
<strong>Oh snap!</strong> <a href="#" class="alert-link">Change a few things up</a> and try submitting again.
69+
</div>
70+
</div>
71+
{% highlight html %}
72+
<div class="alert alert-success" role="alert">
73+
<a href="#" class="alert-link">...</a>
74+
</div>
75+
<div class="alert alert-info" role="alert">
76+
<a href="#" class="alert-link">...</a>
77+
</div>
78+
<div class="alert alert-warning" role="alert">
79+
<a href="#" class="alert-link">...</a>
80+
</div>
81+
<div class="alert alert-danger" role="alert">
82+
<a href="#" class="alert-link">...</a>
83+
</div>
84+
{% endhighlight %}
85+
</div>

docs/_includes/components/badges.html

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
<div class="bs-docs-section">
2+
<h1 id="badges" class="page-header">Badges</h1>
3+
4+
<p class="lead">Easily highlight new or unread items by adding a <code>&lt;span class="badge"&gt;</code> to links, Bootstrap navs, and more.</p>
5+
6+
<div class="bs-example">
7+
<a href="#">Inbox <span class="badge">42</span></a>
8+
</div>
9+
{% highlight html %}
10+
<a href="#">Inbox <span class="badge">42</span></a>
11+
{% endhighlight %}
12+
13+
<h4>Self collapsing</h4>
14+
<p>When there are no new or unread items, badges will simply collapse (via CSS's <code>:empty</code> selector) provided no content exists within.</p>
15+
16+
<div class="bs-callout bs-callout-danger">
17+
<h4>Cross-browser compatibility</h4>
18+
<p>Badges won't self collapse in Internet Explorer 8 because it lacks support for the <code>:empty</code> selector.</p>
19+
</div>
20+
21+
<h4>Adapts to active nav states</h4>
22+
<p>Built-in styles are included for placing badges in active states in pill navigations.</p>
23+
<div class="bs-example">
24+
<ul class="nav nav-pills">
25+
<li class="active"><a href="#">Home <span class="badge">42</span></a></li>
26+
<li><a href="#">Profile</a></li>
27+
<li><a href="#">Messages <span class="badge">3</span></a></li>
28+
</ul>
29+
<br>
30+
<ul class="nav nav-pills nav-stacked" style="max-width: 260px;">
31+
<li class="active">
32+
<a href="#">
33+
<span class="badge pull-right">42</span>
34+
Home
35+
</a>
36+
</li>
37+
<li><a href="#">Profile</a></li>
38+
<li>
39+
<a href="#">
40+
<span class="badge pull-right">3</span>
41+
Messages
42+
</a>
43+
</li>
44+
</ul>
45+
<br>
46+
<button class="btn btn-primary" type="button">
47+
Messages <span class="badge">4</span>
48+
</button>
49+
</div>
50+
{% highlight html %}
51+
<ul class="nav nav-pills nav-stacked">
52+
<li class="active">
53+
<a href="#">
54+
<span class="badge pull-right">42</span>
55+
Home
56+
</a>
57+
</li>
58+
...
59+
</ul>
60+
{% endhighlight %}
61+
</div>
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<div class="bs-docs-section">
2+
<h1 id="breadcrumbs" class="page-header">Breadcrumbs</h1>
3+
4+
<p class="lead">Indicate the current page's location within a navigational hierarchy.</p>
5+
<p>Separators are automatically added in CSS through <code>:before</code> and <code>content</code>.</p>
6+
<div class="bs-example">
7+
<ol class="breadcrumb">
8+
<li class="active">Home</li>
9+
</ol>
10+
<ol class="breadcrumb">
11+
<li><a href="#">Home</a></li>
12+
<li class="active">Library</li>
13+
</ol>
14+
<ol class="breadcrumb" style="margin-bottom: 5px;">
15+
<li><a href="#">Home</a></li>
16+
<li><a href="#">Library</a></li>
17+
<li class="active">Data</li>
18+
</ol>
19+
</div>
20+
{% highlight html %}
21+
<ol class="breadcrumb">
22+
<li><a href="#">Home</a></li>
23+
<li><a href="#">Library</a></li>
24+
<li class="active">Data</li>
25+
</ol>
26+
{% endhighlight %}
27+
</div>

0 commit comments

Comments
 (0)