aboutsummaryrefslogtreecommitdiff
path: root/docs/components.html
diff options
context:
space:
mode:
authorJacob Thornton <[email protected]>2012-01-29 13:16:02 -0800
committerJacob Thornton <[email protected]>2012-01-29 13:16:02 -0800
commit910e78d26ad476d11331e8bb9b0233e0b2ba21e3 (patch)
tree89c22731c23c1808bf92db1ceb670ca2cd3c7677 /docs/components.html
parent49d565a6da38359a776f83f31a1f1ccd658c88a7 (diff)
parent9fa8bde44d9bb6f26b16c7633a01bbe5ce7b20a4 (diff)
downloadbootstrap-910e78d26ad476d11331e8bb9b0233e0b2ba21e3.tar.xz
bootstrap-910e78d26ad476d11331e8bb9b0233e0b2ba21e3.zip
Merge branch '2.0-wip' of https://github.com/twitter/bootstrap into 2.0-wip
Diffstat (limited to 'docs/components.html')
-rw-r--r--docs/components.html189
1 files changed, 111 insertions, 78 deletions
diff --git a/docs/components.html b/docs/components.html
index a2fac7360..63a4b3dd0 100644
--- a/docs/components.html
+++ b/docs/components.html
@@ -467,7 +467,7 @@
<div class="well" style="padding: 8px 0;">
<ul class="nav list">
<li class="nav-header">List header</li>
- <li class="active"><a href="#"><i class="icon home"></i> Home</a></li>
+ <li class="active"><a href="#"><i class="icon white home"></i> Home</a></li>
<li><a href="#"><i class="icon book"></i> Library</a></li>
<li><a href="#"><i class="icon pencil"></i> Applications</a></li>
<li class="nav-header">Another list header</li>
@@ -659,43 +659,50 @@
</div>
<h2>Static navbar example</h2>
<p>An example of a static (not fixed to the top) navbar with project name, navigation, and search form.</p>
- <div class="navbar navbar-static">
+ <div class="navbar">
<div class="navbar-inner">
<div class="container" style="width: auto;">
+ <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
+ <span class="i-bar"></span>
+ <span class="i-bar"></span>
+ <span class="i-bar"></span>
+ </a>
<a class="brand" href="#">Project name</a>
- <ul class="nav">
- <li class="active"><a href="#">Home</a></li>
- <li><a href="#">Link</a></li>
- <li><a href="#">Link</a></li>
- <li><a href="#">Link</a></li>
- <li class="dropdown">
- <a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
- <ul class="dropdown-menu">
- <li><a href="#">Action</a></li>
- <li><a href="#">Another action</a></li>
- <li><a href="#">Something else here</a></li>
- <li class="divider"></li>
- <li><a href="#">Separated link</a></li>
- </ul>
- </li>
- </ul>
- <form class="navbar-search pull-left" action="">
- <input type="text" class="search-query span2" placeholder="Search">
- </form>
- <ul class="nav pull-right">
- <li><a href="#">Link</a></li>
- <li class="vertical-divider"></li>
- <li class="dropdown">
- <a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
- <ul class="dropdown-menu">
- <li><a href="#">Action</a></li>
- <li><a href="#">Another action</a></li>
- <li><a href="#">Something else here</a></li>
- <li class="divider"></li>
- <li><a href="#">Separated link</a></li>
- </ul>
- </li>
- </ul>
+ <div class="nav-collapse">
+ <ul class="nav">
+ <li class="active"><a href="#">Home</a></li>
+ <li><a href="#">Link</a></li>
+ <li><a href="#">Link</a></li>
+ <li><a href="#">Link</a></li>
+ <li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
+ <ul class="dropdown-menu">
+ <li><a href="#">Action</a></li>
+ <li><a href="#">Another action</a></li>
+ <li><a href="#">Something else here</a></li>
+ <li class="divider"></li>
+ <li><a href="#">Separated link</a></li>
+ </ul>
+ </li>
+ </ul>
+ <form class="navbar-search pull-left" action="">
+ <input type="text" class="search-query span2" placeholder="Search">
+ </form>
+ <ul class="nav pull-right">
+ <li><a href="#">Link</a></li>
+ <li class="vertical-divider"></li>
+ <li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
+ <ul class="dropdown-menu">
+ <li><a href="#">Action</a></li>
+ <li><a href="#">Another action</a></li>
+ <li><a href="#">Something else here</a></li>
+ <li class="divider"></li>
+ <li><a href="#">Separated link</a></li>
+ </ul>
+ </li>
+ </ul>
+ </div><!-- /.nav-collapse -->
</div>
</div><!-- /navbar-inner -->
</div><!-- /navbar -->
@@ -705,7 +712,7 @@
<h3>Navbar scaffolding</h3>
<p>The navbar requires only a few divs to structure it well for static or fixed display.</p>
<pre class="prettyprint linenums">
-&lt;div class="navbar navbar-static"&gt;
+&lt;div class="navbar"&gt;
&lt;div class="navbar-inner"&gt;
&lt;div class="container"&gt;
...
@@ -713,7 +720,7 @@
&lt;/div&gt;
&lt;/div&gt;
</pre>
- <p>To make the navbar fixed, swap the <code>.navbar-static</code> class for <code>.navbar-fixed-top</code>. In your CSS, you will also need to account for the overlap it causes by adding <code>padding-top: 40px;</code> to your <code>&lt;body&gt;</code>.</p>
+ <p>To make the navbar fixed to the top of the viewport, add <code>.navbar-fixed-top</code> to the outermost div, <code>.navbar</code>. In your CSS, you will also need to account for the overlap it causes by adding <code>padding-top: 40px;</code> to your <code>&lt;body&gt;</code>.</p>
<pre class="prettyprint linenums">
&lt;div class="navbar navbar-fixed-top"&gt;
...
@@ -733,7 +740,37 @@
&lt;input type="text" class="search-query pull-left" placeholder="Search"&gt;
&lt;/form&gt;
</pre>
- </div>
+ <h3>Optional responsive variation</h3>
+ <p>Depending on the amount of content in your topbar, you might want to implement the responsive options. To do so, wrap your nav content in a containing div, <code>.nav-collapse</code>, and add the navbar toggle button, <code>.btn-navbar</code>.</p>
+<pre class="prettyprint linenums">
+&lt;div class="navbar"&gt;
+ &lt;div class="navbar-inner"&gt;
+ &lt;div class="container"&gt;
+
+ &lt;!-- .btn-navbar is used as the toggle for collapsed navbar content --&gt;
+ &lt;a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"&gt;
+ &lt;span class="i-bar"&gt;&lt;/span&gt;
+ &lt;span class="i-bar"&gt;&lt;/span&gt;
+ &lt;span class="i-bar"&gt;&lt;/span&gt;
+ &lt;/a&gt;
+
+ &lt;!-- Be sure to leave the brand out there if you want it shown --&gt;
+ &lt;a class="brand" href="#"&gt;Project name&lt;/a&gt;
+
+ &lt;!-- Everything you want hidden at 940px or less, place within here --&gt;
+ &lt;div class="nav-collapse"&gt;
+ &lt;!-- .nav, .navbar-search, .navbar-form, etc --&gt;
+ &lt;/div&gt;
+
+ &lt;/div&gt;
+ &lt;/div&gt;
+&lt;/div&gt;
+</pre>
+ <div class="alert alert-info">
+ <strong>Heads up!</strong> The responsive navbar requires the <a href="./javascript.html#collapse">collapse plugin</a>.
+ </div>
+
+ </div><!-- /.span -->
<div class="span4">
<h3>Nav links</h3>
<p>Nav items are simple to add via unordered lists.</p>
@@ -763,9 +800,9 @@
&lt;/li&gt;
&lt;/ul&gt;
</pre>
- <p><a class="btn" href="./javascript.html/#dropdown">Get the javascript &rarr;</a></p>
- </div>
- </div>
+ <p><a class="btn" href="./javascript.html/#dropdown">Get the javascript &rarr;</a></p>
+ </div><!-- /.span -->
+ </div><!-- /.row -->
</section>
@@ -970,34 +1007,34 @@
</tr>
<tr>
<td>
- <span class="label success">New</span>
+ <span class="label label-success">New</span>
</td>
<td>
- <code>&lt;span class="label success"&gt;New&lt;/span&gt;</code>
+ <code>&lt;span class="label label-success"&gt;New&lt;/span&gt;</code>
</td>
</tr>
<tr>
<td>
- <span class="label warning">Warning</span>
+ <span class="label label-warning">Warning</span>
</td>
<td>
- <code>&lt;span class="label warning"&gt;Warning&lt;/span&gt;</code>
+ <code>&lt;span class="label label-warning"&gt;Warning&lt;/span&gt;</code>
</td>
</tr>
<tr>
<td>
- <span class="label important">Important</span>
+ <span class="label label-important">Important</span>
</td>
<td>
- <code>&lt;span class="label important"&gt;Important&lt;/span&gt;</code>
+ <code>&lt;span class="label label-important"&gt;Important&lt;/span&gt;</code>
</td>
</tr>
<tr>
<td>
- <span class="label info">Info</span>
+ <span class="label label-info">Info</span>
</td>
<td>
- <code>&lt;span class="label info"&gt;Info&lt;/span&gt;</code>
+ <code>&lt;span class="label label-info"&gt;Info&lt;/span&gt;</code>
</td>
</tr>
</tbody>
@@ -1020,22 +1057,22 @@
<ul class="thumbnails">
<li class="span3">
<a href="#" class="thumbnail">
- <img src="http://placehold.it/210x150" alt="">
+ <img src="http://placehold.it/260x180" alt="">
</a>
</li>
<li class="span3">
<a href="#" class="thumbnail">
- <img src="http://placehold.it/210x150" alt="">
+ <img src="http://placehold.it/260x180" alt="">
</a>
</li>
<li class="span3">
<a href="#" class="thumbnail">
- <img src="http://placehold.it/210x150" alt="">
+ <img src="http://placehold.it/260x180" alt="">
</a>
</li>
<li class="span3">
<a href="#" class="thumbnail">
- <img src="http://placehold.it/210x150" alt="">
+ <img src="http://placehold.it/260x180" alt="">
</a>
</li>
</ul>
@@ -1046,7 +1083,7 @@
<ul class="thumbnails">
<li class="span3">
<div class="thumbnail">
- <img src="http://placehold.it/210x150" alt="">
+ <img src="http://placehold.it/260x180" alt="">
<div class="caption">
<h5>Thumbnail label</h5>
<p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
@@ -1056,7 +1093,7 @@
</li>
<li class="span3">
<div class="thumbnail">
- <img src="http://placehold.it/210x150" alt="">
+ <img src="http://placehold.it/260x180" alt="">
<div class="caption">
<h5>Thumbnail label</h5>
<p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
@@ -1091,7 +1128,7 @@
&lt;ul class="thumbnails"&gt;
&lt;li class="span3"&gt;
&lt;a href="#" class="thumbnail"&gt;
- &lt;img src="http://placehold.it/210x150" alt=""&gt;
+ &lt;img src="http://placehold.it/260x180" alt=""&gt;
&lt;/a&gt;
&lt;/li&gt;
...
@@ -1102,7 +1139,7 @@
&lt;ul class="thumbnails"&gt;
&lt;li class="span3"&gt;
&lt;div class="thumbnail"&gt;
- &lt;img src="http://placehold.it/210x150" alt=""&gt;
+ &lt;img src="http://placehold.it/260x180" alt=""&gt;
&lt;h5&gt;Thumbnail label&lt;/h5&gt;
&lt;p&gt;Thumbnail caption right here...&lt;/p&gt;
&lt;/div&gt;
@@ -1117,32 +1154,32 @@
<ul class="thumbnails">
<li class="span4">
<a href="#" class="thumbnail">
- <img src="http://placehold.it/290x226" alt="">
+ <img src="http://placehold.it/360x268" alt="">
</a>
</li>
<li class="span2">
<a href="#" class="thumbnail">
- <img src="http://placehold.it/130x100" alt="">
+ <img src="http://placehold.it/160x120" alt="">
</a>
</li>
<li class="span2">
<a href="#" class="thumbnail">
- <img src="http://placehold.it/130x100" alt="">
+ <img src="http://placehold.it/160x120" alt="">
</a>
</li>
<li class="span2">
<a href="#" class="thumbnail">
- <img src="http://placehold.it/130x100" alt="">
+ <img src="http://placehold.it/160x120" alt="">
</a>
</li>
<li class="span2">
<a href="#" class="thumbnail">
- <img src="http://placehold.it/130x100" alt="">
+ <img src="http://placehold.it/160x120" alt="">
</a>
</li>
<li class="span2">
<a href="#" class="thumbnail">
- <img src="http://placehold.it/130x100" alt="">
+ <img src="http://placehold.it/160x120" alt="">
</a>
</li>
</ul>
@@ -1270,12 +1307,12 @@
<div class="span4">
<h3>Striped</h3>
<p>Uses a gradient to create a striped effect.</p>
- <div class="progress info striped">
+ <div class="progress progress-info progress-striped">
<div class="bar" style="width: 20%;"></div>
</div>
<pre class="prettyprint linenums">
-&lt;div class="progress info
- striped"&gt;
+&lt;div class="progress progress-info
+ progress-striped"&gt;
&lt;div class="bar"
style="width: 20%;"&gt;&lt;/div&gt;
&lt;/div&gt;
@@ -1284,12 +1321,12 @@
<div class="span4">
<h3>Animated</h3>
<p>Takes the striped example and animates it.</p>
- <div class="progress danger active striped">
+ <div class="progress progress-danger progress-striped active">
<div class="bar" style="width: 45%"></div>
</div>
<pre class="prettyprint linenums">
-&lt;div class="progress danger
- striped active"&gt;
+&lt;div class="progress progress-danger
+ progress-striped active"&gt;
&lt;div class="bar"
style="width: 40%;"&gt;&lt;/div&gt;
&lt;/div&gt;
@@ -1301,18 +1338,18 @@
<div class="row">
<div class="span4">
<h3>Additional colors</h3>
- <p>Progress bars utilize some of the same classes as buttons and alert messages for quick styling.</p>
+ <p>Progress bars utilize some of the same class names as buttons and alerts for similar styling.</p>
<ul>
- <li><code>.info</code></li>
- <li><code>.success</code></li>
- <li><code>.danger</code></li>
+ <li><code>.progress-info</code></li>
+ <li><code>.progress-success</code></li>
+ <li><code>.progress-danger</code></li>
</ul>
<p>Alternatively, you can customize the LESS files and roll your own colors and sizes.</p>
</div>
<div class="span4">
<h3>Behavior</h3>
<p>Progress bars use CSS3 transitions, so if you dynamically adjust the width via javascript, it will smoothly resize.</p>
- <p>If you use the <code>.active</code> class, your <code>.striped</code> progress bars will animate the stripes left to right.</p>
+ <p>If you use the <code>.active</code> class, your <code>.progress-striped</code> progress bars will animate the stripes left to right.</p>
</div>
<div class="span4">
<h3>Browser support</h3>
@@ -1361,10 +1398,6 @@
</section>
-
-
-
-
<!-- Footer
================================================== -->
<footer class="footer">