0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-11-29 11:24:18 +01:00

Merge remote-tracking branch 'bootstrap/3.0.0-wip' into 3.0.0-wip

Conflicts:
	js/bootstrap-collapse.js
This commit is contained in:
Ivan Khalopik 2013-05-27 11:06:31 +03:00
commit 3285f4c306
116 changed files with 12462 additions and 8776 deletions

1
.gitignore vendored
View File

@ -1,5 +1,6 @@
# Ignore compiled docs
_gh_pages
_site
# Numerous always-ignore extensions
*.diff

View File

@ -196,7 +196,7 @@ Running makefile now require JSHint and Recess.
- Add jshint support
- Add travis-ci support w/ headless phantom integration
- Replace UA sniffing in bootstrap-transitions.js
- Replace UA sniffing in transitions.js
- Add MSTransitionEnd event to transition plugin
- Fix pause method in carousel (shouldn't restart when hovering over controls)
- Fix crazy opera bug #1776

View File

@ -23,12 +23,6 @@ We only accept issues that are bug reports or feature requests. Bugs must be iso
## Notes on the repo
As of v2.0.0, Bootstrap's documentation is powered by Mustache templates and built via `make` before each commit and release. This was done to enable internationalization (translation) in a future release by uploading our strings to the [Twitter Translation Center](http://translate.twttr.com/). Any edits to the docs should be first done in the Mustache files and then recompiled into the HTML.
## Pull requests
- Try to submit pull requests against the latest `*-wip` branch for easier merging
@ -40,16 +34,16 @@ As of v2.0.0, Bootstrap's documentation is powered by Mustache templates and bui
## Coding standards: HTML
## Coding standards
### HTML
- Two spaces for indentation, never tabs
- Double quotes only, never single quotes
- Always use proper indentation
- Use tags and elements appropriate for an HTML5 doctype (e.g., self-closing tags)
## Coding standards: CSS
### CSS
- Adhere to the [Recess CSS property order](http://markdotto.com/2011/11/29/css-property-order/)
- Multiple-line approach (one property and value per line)
@ -58,9 +52,7 @@ As of v2.0.0, Bootstrap's documentation is powered by Mustache templates and bui
- For multiple, comma-separated selectors, place each selector on it's own line
- Attribute selectors, like `input[type="text"]` should always wrap the attribute's value in double quotes, for consistency and safety (see this [blog post on unquoted attribute values](http://mathiasbynens.be/notes/unquoted-attribute-values) that can lead to XSS attacks).
## Coding standards: JS
### JS
- No semicolons
- Comma first

View File

@ -23,11 +23,10 @@ build:
@echo " ${CHECK}"
@printf "Prepping documentation assets..."
@cp fonts/* docs/assets/fonts/
@cp js/*.js docs/assets/js/
@cp js/tests/vendor/jquery.js docs/assets/js/
@echo " ${CHECK}"
@printf "Compiling and minifying JavaScript..."
@cat js/bootstrap-transition.js js/bootstrap-alert.js js/bootstrap-button.js js/bootstrap-carousel.js js/bootstrap-collapse.js js/bootstrap-dropdown.js js/bootstrap-modal.js js/bootstrap-tooltip.js js/bootstrap-popover.js js/bootstrap-scrollspy.js js/bootstrap-tab.js js/bootstrap-typeahead.js js/bootstrap-affix.js > docs/assets/js/bootstrap.js
@cat js/transition.js js/alert.js js/button.js js/carousel.js js/collapse.js js/dropdown.js js/modal.js js/tooltip.js js/popover.js js/scrollspy.js js/tab.js js/affix.js > docs/assets/js/bootstrap.js
@uglifyjs -nc docs/assets/js/bootstrap.js > docs/assets/js/bootstrap.min.tmp.js
@echo "/**\n* Bootstrap.js v3.0.0 by @fat & @mdo\n* Copyright 2012 Twitter, Inc.\n* http://www.apache.org/licenses/LICENSE-2.0.txt\n*/" > docs/assets/js/copyright.js
@cat docs/assets/js/copyright.js docs/assets/js/bootstrap.min.tmp.js > docs/assets/js/bootstrap.min.js
@ -72,14 +71,14 @@ bootstrap-js: bootstrap/js/*.js
bootstrap/js/*.js: js/*.js
mkdir -p bootstrap/js
cat js/bootstrap-transition.js js/bootstrap-alert.js js/bootstrap-button.js js/bootstrap-carousel.js js/bootstrap-collapse.js js/bootstrap-dropdown.js js/bootstrap-modal.js js/bootstrap-tooltip.js js/bootstrap-popover.js js/bootstrap-scrollspy.js js/bootstrap-tab.js js/bootstrap-typeahead.js js/bootstrap-affix.js > bootstrap/js/bootstrap.js
cat js/transition.js js/alert.js js/button.js js/carousel.js js/collapse.js js/dropdown.js js/modal.js js/tooltip.js js/popover.js js/scrollspy.js js/tab.js js/affix.js > bootstrap/js/bootstrap.js
uglifyjs -nc bootstrap/js/bootstrap.js > bootstrap/js/bootstrap.min.tmp.js
echo "/*!\n* Bootstrap.js by @fat & @mdo\n* Copyright 2012 Twitter, Inc.\n* http://www.apache.org/licenses/LICENSE-2.0.txt\n*/" > bootstrap/js/copyright.js
cat bootstrap/js/copyright.js bootstrap/js/bootstrap.min.tmp.js > bootstrap/js/bootstrap.min.js
rm bootstrap/js/copyright.js bootstrap/js/bootstrap.min.tmp.js
#
# CSS COMPLILE
# CSS COMPILE
#
bootstrap-css: bootstrap/css/*.css
@ -100,18 +99,6 @@ bootstrap/fonts/*: fonts/*
cp fonts/* bootstrap/fonts/
#
# MAKE FOR GH-PAGES 4 FAT & MDO ONLY (O_O )
#
gh-pages: bootstrap docs
rm -f docs/assets/bootstrap.zip
zip -r docs/assets/bootstrap.zip bootstrap
rm -r bootstrap
rm -f ../bootstrap-gh-pages/assets/bootstrap.zip
node docs/build production
cp -r docs/* ../bootstrap-gh-pages
#
# WATCH LESS FILES
#
@ -120,5 +107,11 @@ watch:
echo "Watching less files..."; \
watchr -e "watch('less/.*\.less') { system 'make' }"
#
# BUILD AND START SERVER
#
run: build
jekyll build && jekyll server
.PHONY: docs watch gh-pages bootstrap-img bootstrap-css bootstrap-js

View File

@ -12,18 +12,9 @@ Three quick start options are available:
* [Download the latest release](https://github.com/twitter/bootstrap/zipball/master).
* Clone the repo: `git clone git://github.com/twitter/bootstrap.git`.
* Install with Twitter's [Bower](http://github.com/bower/bower): `bower install bootstrap`.
* Install with [Bower](http://bower.io): `bower install bootstrap`.
Read the [Getting Started page](http://getbootstrap.com/getting-started/) for information on the framework contents, basic template guidelines, and more.
## Bootstrap elsewhere
Beyond getting started with the Bootstrap core, there are ways to use Bootstrap in other tools and services:
* [Roots WordPress theme](https://github.com/retlehs/roots) - A WordPress starter theme based on HTML5 Boilerplate & Bootstrap from Twitter.
Have suggestions? Let us know with a [new issue](https://github.com/twitter/bootstrap/issues).
Read the [Getting Started page](http://getbootstrap.com/getting-started/) for information on the framework contents, templates and examples, and more.
@ -35,21 +26,35 @@ Have a bug or a feature request? [Please open a new issue](https://github.com/tw
## Documentation
Bootstrap's docs are built using [Jekyll](http://jekyllrb.com) and hosted on GitHub Pages at [http://getbootstrap.com](http://getbootstrap.com). To view our docs locally, you'll need to [install Jekyll](https://github.com/mojombo/jekyll/wiki/install) to run a local server.
Bootstrap's documentation, included in this repo in the `/docs` directory, is built with [Jekyll](http://jekyllrb.com) and publicly hosted on GitHub Pages at [http://getbootstrap.com](http://getbootstrap.com). The docs maybe also be run locally.
Documentation for [previous versions](https://github.com/twitter/bootstrap/tags) is also available via tags.
### Running documentation locally
1. If necessary, [install Jekyll](http://jekyllrb.com/docs/installation).
2. From the `/bootstrap` directory, run `jekyll serve` in the command line.
3. Open [http://getbootstrap.dev:9001](http://getbootstrap.dev:9001) in your browser, and voilà.
Learn more about using Jekyll by reading their [documentation](http://jekyllrb.com/docs/home/).
### Documentation for previous releases
Documentation for v2.3.2 has been made available for the time being at [http://getbootstrap.com/2.3.2/docs](http://getbootstrap.com/2.3.2/docs) while folks transition to Bootstrap 3.
For previous releases, documentation is available for [download via Git tags](https://github.com/twitter/bootstrap/tags).
## Compiling CSS and JavaScript
Bootstrap includes a [makefile](Makefile) with convenient methods for working with the framework. Before getting started, be sure to install [the necessary local dependencies](package.json):
Bootstrap includes a [makefile](Makefile) with convenient methods for working with the framework. Before getting started, install [the necessary local dependencies](package.json):
```
$ npm install
```
When completed, you'll be able to run the various make commands provided:
When completed, you'll be able to run the various make commands provided.
### Available makefile commands
#### Build - `make`
`make` runs the Recess compiler to rebuild the `/less` files and compile the docs. **Requires recess and uglify-js.**
@ -63,15 +68,19 @@ Runs jshint and qunit tests headlessly in [phantomjs](http://code.google.com/p/p
#### Watch - `make watch`
This is a convenience method for watching just Less files and automatically building them whenever you save. **Requires the watchr gem.**
Should you encounter problems with installing dependencies or running the makefile commands, uninstall any previous versions (global and local) you may have installed, and then rerun `npm install`.
### Troubleshooting dependencies
Should you encounter problems with installing dependencies or running makefile commands, uninstall all previous dependency versions (global and local). Then, rerun `npm install`.
## Contributing
Please submit all pull requests against *-wip branches. If your pull request contains JavaScript patches or features, you must include relevant unit tests. All HTML and CSS should conform to the [Code Guide](http://github.com/mdo/code-guide), maintained by [Mark Otto](http://github.com/mdo).
Please read through our guidelines for contributing to Bootstrap. Included are directions for opening issues, coding standards, and notes on development.
Editor preferences are also available in the [editor config](.editorconfig) for easy application in common text editors. Read more and download plugins at [http://editorconfig.com](http://editorconfig.com).
More over, if your pull request contains JavaScript patches or features, you must include relevant unit tests. All HTML and CSS should conform to the [Code Guide](http://github.com/mdo/code-guide), maintained by [Mark Otto](http://github.com/mdo).
Editor preferences are available in the [editor config](.editorconfig) for easy use in common text editors. Read more and download plugins at [http://editorconfig.com](http://editorconfig.com).

View File

@ -8,5 +8,5 @@ permalink: pretty
# Server
source: ./docs
destination: ./_gh_pages
url: http://bootstrap.dev:9001
server_port: 9001
port: 9001
url: http://getbootstrap.dev:9001

View File

@ -1,25 +1,7 @@
<!-- Footer
================================================== -->
<footer class="bs-docs-footer">
<div class="bs-docs-container">
<div class="bs-docs-social">
<ul class="bs-docs-social-buttons">
<li>
<iframe class="github-btn" src="http://ghbtns.com/github-btn.html?user=twitter&repo=bootstrap&type=watch&count=true" allowtransparency="true" frameborder="0" scrolling="0" width="100px" height="20px"></iframe>
</li>
<li>
<iframe class="github-btn" src="http://ghbtns.com/github-btn.html?user=twitter&repo=bootstrap&type=fork&count=true" allowtransparency="true" frameborder="0" scrolling="0" width="102px" height="20px"></iframe>
</li>
<li class="follow-btn">
<a href="https://twitter.com/twbootstrap" class="twitter-follow-button" data-link-color="#0069D6" data-show-count="true">Follow @twbootstrap</a>
</li>
<li class="tweet-btn">
<a href="https://twitter.com/share" class="twitter-share-button" data-url="http://twitter.github.com/bootstrap/" data-count="horizontal" data-via="twbootstrap" data-related="mdo:Creator of Twitter Bootstrap">Tweet</a>
</li>
</ul>
</div>
<footer class="bs-footer">
{% include social-buttons.html %}
<p>Designed and built with all the love in the world by <a href="http://twitter.com/mdo" target="_blank">@mdo</a> and <a href="http://twitter.com/fat" target="_blank">@fat</a>.</p>
<p>Code licensed under <a href="http://www.apache.org/licenses/LICENSE-2.0" target="_blank">Apache License v2.0</a>, documentation under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.</p>
@ -31,5 +13,4 @@
<li class="muted">&middot;</li>
<li><a href="https://github.com/twitter/bootstrap/blob/master/CHANGELOG.md">Changelog</a></li>
</ul>
</div>
</footer>

View File

@ -1,226 +0,0 @@
<div class="bs-docs-sidebar">
<ul class="nav bs-docs-sidenav">
<h3 class="bs-docs-sidenav-heading"><a href="/">Bootstrap</a></h3>
<li><a href="#welcome">Welcome!</a></li>
<li><a href="#getting-started">Getting started</a></li>
<li><a href="#whats-included">What's included</a></li>
<li><a href="#examples">Templates and examples</a></li>
<li><a href="#customizing">Customizing Bootstrap</a></li>
<!-- CSS -->
<li><a class="nav-header" href="#css">CSS</a></li>
<li><a href="#css-overview">Overview</a></li>
<li>
<a href="#grid">Grid system</a>
<ul class="nav">
<li><a href="#grid-example">Example usage</a></li>
<li><a href="#grid-offsetting">Offset columns</a></li>
<li><a href="#grid-nesting">Nested columns</a></li>
<li><a href="#grid-column-ordering">Column ordering</a></li>
<li><a href="#grid-small">Small device grid</a></li>
<li><a href="#grid-less">LESS mixins and variables</a></li>
</ul>
</li>
<li>
<a href="#type">Typography</a>
<ul class="nav">
<li><a href="#type-headings">Headings</a></li>
<li><a href="#type-body-copy">Body copy</a></li>
<li><a href="#type-emphasis">Emphasis</a></li>
<li><a href="#type-abbreviations">Abbreviations</a></li>
<li><a href="#type-addresses">Addresses</a></li>
<li><a href="#type-blockquotes">Blockquotes</a></li>
<li><a href="#type-lists">Lists</a></li>
<li><a href="#type-"></a></li>
</ul>
</li>
<li><a href="#code">Code</a></li>
<li>
<a href="#tables">Tables</a>
<ul class="nav">
<li><a href="#tables-example">Basic example</a></li>
<li><a href="#tables-striped">Zebra striping</a></li>
<li><a href="#tables-bordered">Bordered tables</a></li>
<li><a href="#tables-hover-rows">Hover rows</a></li>
<li><a href="#tables-condensed">Condensed tables</a></li>
<li><a href="#tables-row-classes">Contextual row classes</a></li>
</ul>
</li>
<li>
<a href="#forms">Forms</a>
<ul class="nav">
<li><a href="#forms-example">Basic example</a></li>
<li><a href="#forms-inline">Inline variation</a></li>
<li><a href="#forms-horizontal">Horizontal variation</a></li>
<li><a href="#forms-controls">Supported controls</a></li>
<li><a href="#forms-control-states">Control states</a></li>
<li><a href="#forms-input-groups">Input groups</a></li>
<li><a href="#forms-control-sizes">Control sizing</a></li>
<li><a href="#forms-actions">Form actions</a></li>
<li><a href="#forms-help-text">Help text</a></li>
</ul>
</li>
<li>
<a href="#buttons">Buttons</a>
<ul class="nav">
<li><a href="#buttons-options">Button options</a></li>
<li><a href="#buttons-sizes">Sizes</a></li>
<li><a href="#buttons-disabled">Disabled</a></li>
<li><a href="#buttons-tags">Button tags</a></li>
</ul>
</li>
<li><a href="#images">Images</a></li>
<li><a href="#helper-classes">Helper classes</a></li>
<li><a href="#responsive-utilities">Responsive utilities</a></li>
<!-- Components -->
<li><a class="nav-header" href="#components">Components</a></li>
<li><a href="#icons">Glyphicons</a></li>
<li>
<a href="#dropdowns">Dropdowns</a>
<ul class="nav">
<li><a href="#dropdowns-example">Example</a></li>
<li><a href="#dropdowns-alignment">Alignment options</a></li>
<li><a href="#dropdowns-disabled">Disabled menu items</a></li>
<li><a href="#dropdowns-submenus">Submenus</a></li>
</ul>
</li>
<li>
<a href="#btn-groups">Button groups</a>
<ul class="nav">
<li><a href="#btn-groups-single">Basic button group</a></li>
<li><a href="#btn-groups-toolbar">Button toolbar</a></li>
<li><a href="#btn-groups-vertical">Vertical variation</a></li>
<li><a href="#btn-groups-justified">Justified link buttons</a></li>
</ul>
</li>
<li>
<a href="#btn-dropdowns">Button dropdowns</a>
<ul class="nav">
<li><a href="#btn-dropdowns-single">Single button dropdown</a></li>
<li><a href="#btn-dropdowns-split">Split button dropdown</a></li>
<li><a href="#btn-dropdowns-sizes">Button sizes</a></li>
<li><a href="#btn-dropdowns-dropup">Dropup variation</a></li>
</ul>
</li>
<li>
<a href="#nav">Navs</a>
<ul class="nav">
<li><a href="#nav-tabs">Tabs nav</a></li>
<li><a href="#nav-pills">Pills nav</a></li>
<li><a href="#nav-justified">Justified nav</a></li>
<li><a href="#nav-disabled-links">Disabled links</a></li>
<li><a href="#nav-alignment">Alignment options</a></li>
<li><a href="#nav-dropdowns">Using dropdowns</a></li>
</ul>
</li>
<li>
<a href="#navbar">Navbar</a>
<ul class="nav">
<li><a href="#navbar-basic">Basic navbar</a></li>
<li><a href="#navbar-nav">Nav links</a></li>
<li><a href="#navbar-forms">Forms in navbars</a></li>
<li><a href="#navbar-buttons">Buttons in navbars</a></li>
<li><a href="#navbar-text">Text in navbars</a></li>
<li><a href="#navbar-links">Links in navbars</a></li>
<li><a href="#navbar-component-alignment">Component alignment</a></li>
<li><a href="#navbar-fixed-top">Fixed top navbar</a></li>
<li><a href="#navbar-fixed-bottom">Fixed bottom navbar</a></li>
<li><a href="#navbar-static-top">Static top navbar</a></li>
<li><a href="#navbar-responsive">Responsive navbar</a></li>
</ul>
</li>
<li><a href="#breadcrumbs">Breadcrumbs</a></li>
<li>
<a href="#pagination">Pagination</a>
<ul class="nav">
<li><a href="#pagination-default">Default pagination</a></li>
<li><a href="#pagination-pager">Pager</a></li>
</ul>
</li>
<li><a href="#labels">Labels</a></li>
<li><a href="#badges">Badges</a></li>
<li>
<a href="#type-components">Typography</a>
<ul class="nav">
<li><a href="#type-components-jumbotron">Jumbotron</a></li>
<li><a href="#type-components-page-header">Page header</a></li>
</ul>
</li>
<li><a href="#thumbnails">Thumbnails</a></li>
<li>
<a href="#alerts">Alerts</a>
<ul class="nav">
<li><a href="#alerts-default">Default alert</a></li>
<li><a href="#alerts-block">Block alerts</a></li>
<li><a href="#alerts-alternatives">Contextual alternatives</a></li>
</ul>
</li>
<li>
<a href="#progress">Progress bars</a>
<ul class="nav">
<li><a href="#progress-basic">Basic progress bar</a></li>
<li><a href="#progress-alternatives">Contextual alternatives</a></li>
<li><a href="#progress-striped">Striped</a></li>
<li><a href="#progress-animated">Animated</a></li>
<li><a href="#progress-stacked">Stacked</a></li>
</ul>
</li>
<li><a href="#media">Media object</a></li>
<li>
<a href="#list-group">List group</a>
<ul class="nav">
<li><a href="#list-group-basic">Basic list group</a></li>
<li><a href="#list-group-chevrons">Chevrons</a></li>
<li><a href="#list-group-badges">Badges</a></li>
<li><a href="#list-group-badges-chevrons">Badges and chevrons</a></li>
<li><a href="#list-group-linked">Linked items</a></li>
<li><a href="#list-group-custom-content">Custom content</a></li>
<!-- <li><a href="#list-group-pic">Leading picture</a></li> -->
</ul>
</li>
<li>
<a href="#panels">Panels</a>
<ul class="nav">
<li><a href="#panels-basic">Basic panel</a></li>
<li><a href="#panels-heading">Panel with heading</a></li>
<li><a href="#panels-alternatives">Contextual alternatives</a></li>
<li><a href="#panels-list-group">With list groups</a>
</ul>
</li>
<li><a href="#wells">Wells</a></li>
<!-- JavaScript -->
<li><a class="nav-header" href="#js">JavaScript</a></li>
<li>
<a href="#js-overview">Overview</a>
<ul class="nav">
<li><a href="#js-individual-compiled">Individual or compiled</a></li>
<li><a href="#js-data-attributes">Data attributes</a></li>
<li><a href="#js-programmatic-api">Programmatic API</a></li>
<li><a href="#js-noconflict">No Conflict</a></li>
<li><a href="#js-events">Evens</a></li>
</ul>
</li>
<li><a href="#transitions">Transitions</a></li>
<li>
<a href="#modals">Modal</a>
<ul class="nav">
<li><a href="#modals-examples">Examples</a></li>
<li><a href="#modals-usage">Usage</a></li>
</ul>
</li>
<li><a href="#dropdowns">Dropdown</a></li>
<li><a href="#scrollspy">Scrollspy</a></li>
<li><a href="#tabs">Tab</a></li>
<li><a href="#tooltips">Tooltip</a></li>
<li><a href="#popovers">Popover</a></li>
<li><a href="#js-alerts">Alert</a></li>
<li><a href="#js-buttons">Button</a></li>
<li><a href="#collapse">Collapse</a></li>
<li><a href="#carousel">Carousel</a></li>
<li><a href="#typeahead">Typeahead</a></li>
<li><a href="#affix">Affix</a></li>
</ul>
</div>

View File

@ -2,19 +2,7 @@
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="/assets/js/jquery.js"></script>
<script src="/assets/js/bootstrap-transition.js"></script>
<script src="/assets/js/bootstrap-alert.js"></script>
<script src="/assets/js/bootstrap-modal.js"></script>
<script src="/assets/js/bootstrap-dropdown.js"></script>
<script src="/assets/js/bootstrap-scrollspy.js"></script>
<script src="/assets/js/bootstrap-tab.js"></script>
<script src="/assets/js/bootstrap-tooltip.js"></script>
<script src="/assets/js/bootstrap-popover.js"></script>
<script src="/assets/js/bootstrap-button.js"></script>
<script src="/assets/js/bootstrap-collapse.js"></script>
<script src="/assets/js/bootstrap-carousel.js"></script>
<script src="/assets/js/bootstrap-typeahead.js"></script>
<script src="/assets/js/bootstrap-affix.js"></script>
<script src="/assets/js/bootstrap.js"></script>
<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
<script src="/assets/js/holder/holder.js"></script>

View File

@ -0,0 +1,122 @@
<li>
<a href="#icons">Glyphicons</a>
<ul class="nav">
<li><a href="#icons-list">Icon list</a></li>
<li><a href="#icons-how-to">How to use</a></li>
<li><a href="#icons-examples">Examples</a></li>
</ul>
</li>
<li>
<a href="#dropdowns">Dropdowns</a>
<ul class="nav">
<li><a href="#dropdowns-example">Example</a></li>
<li><a href="#dropdowns-alignment">Alignment options</a></li>
<li><a href="#dropdowns-disabled">Disabled menu items</a></li>
<li><a href="#dropdowns-submenus">Submenus</a></li>
</ul>
</li>
<li>
<a href="#btn-groups">Button groups</a>
<ul class="nav">
<li><a href="#btn-groups-single">Basic button group</a></li>
<li><a href="#btn-groups-toolbar">Button toolbar</a></li>
<li><a href="#btn-groups-vertical">Vertical variation</a></li>
<li><a href="#btn-groups-justified">Justified link buttons</a></li>
</ul>
</li>
<li>
<a href="#btn-dropdowns">Button dropdowns</a>
<ul class="nav">
<li><a href="#btn-dropdowns-single">Single button dropdown</a></li>
<li><a href="#btn-dropdowns-split">Split button dropdown</a></li>
<li><a href="#btn-dropdowns-sizes">Button sizes</a></li>
<li><a href="#btn-dropdowns-dropup">Dropup variation</a></li>
</ul>
</li>
<li>
<a href="#nav">Navs</a>
<ul class="nav">
<li><a href="#nav-tabs">Tabs nav</a></li>
<li><a href="#nav-pills">Pills nav</a></li>
<li><a href="#nav-justified">Justified nav</a></li>
<li><a href="#nav-disabled-links">Disabled links</a></li>
<li><a href="#nav-alignment">Alignment options</a></li>
<li><a href="#nav-dropdowns">Using dropdowns</a></li>
</ul>
</li>
<li>
<a href="#navbar">Navbar</a>
<ul class="nav">
<li><a href="#navbar-basic">Basic navbar</a></li>
<li><a href="#navbar-nav">Nav links</a></li>
<li><a href="#navbar-forms">Forms in navbars</a></li>
<li><a href="#navbar-buttons">Buttons in navbars</a></li>
<li><a href="#navbar-text">Text in navbars</a></li>
<li><a href="#navbar-links">Links in navbars</a></li>
<li><a href="#navbar-component-alignment">Component alignment</a></li>
<li><a href="#navbar-fixed-top">Fixed top navbar</a></li>
<li><a href="#navbar-fixed-bottom">Fixed bottom navbar</a></li>
<li><a href="#navbar-static-top">Static top navbar</a></li>
<li><a href="#navbar-responsive">Responsive navbar</a></li>
</ul>
</li>
<li><a href="#breadcrumbs">Breadcrumbs</a></li>
<li>
<a href="#pagination">Pagination</a>
<ul class="nav">
<li><a href="#pagination-default">Default pagination</a></li>
<li><a href="#pagination-pager">Pager</a></li>
</ul>
</li>
<li><a href="#labels">Labels</a></li>
<li><a href="#badges">Badges</a></li>
<li>
<a href="#type-components">Typography</a>
<ul class="nav">
<li><a href="#type-components-jumbotron">Jumbotron</a></li>
<li><a href="#type-components-page-header">Page header</a></li>
</ul>
</li>
<li><a href="#thumbnails">Thumbnails</a></li>
<li>
<a href="#alerts">Alerts</a>
<ul class="nav">
<li><a href="#alerts-default">Default alert</a></li>
<li><a href="#alerts-block">Block alerts</a></li>
<li><a href="#alerts-alternatives">Contextual alternatives</a></li>
<li><a href="#alerts-links">Links in alerts</a></li>
</ul>
</li>
<li>
<a href="#progress">Progress bars</a>
<ul class="nav">
<li><a href="#progress-basic">Basic progress bar</a></li>
<li><a href="#progress-alternatives">Contextual alternatives</a></li>
<li><a href="#progress-striped">Striped</a></li>
<li><a href="#progress-animated">Animated</a></li>
<li><a href="#progress-stacked">Stacked</a></li>
</ul>
</li>
<li><a href="#media">Media object</a></li>
<li>
<a href="#list-group">List group</a>
<ul class="nav">
<li><a href="#list-group-basic">Basic list group</a></li>
<li><a href="#list-group-chevrons">Chevrons</a></li>
<li><a href="#list-group-badges">Badges</a></li>
<li><a href="#list-group-badges-chevrons">Badges and chevrons</a></li>
<li><a href="#list-group-linked">Linked items</a></li>
<li><a href="#list-group-custom-content">Custom content</a></li>
<!-- <li><a href="#list-group-pic">Leading picture</a></li> -->
</ul>
</li>
<li>
<a href="#panels">Panels</a>
<ul class="nav">
<li><a href="#panels-basic">Basic panel</a></li>
<li><a href="#panels-heading">Panel with heading</a></li>
<li><a href="#panels-alternatives">Contextual alternatives</a></li>
<li><a href="#panels-list-group">With list groups</a>
</ul>
</li>
<li><a href="#wells">Wells</a></li>

View File

@ -0,0 +1,71 @@
<li>
<a href="#overview">Overview</a>
<ul class="nav">
<li><a href="#overview-doctype">HTML5 doctype</a></li>
<li><a href="#overview-mobile">Mobile first</a></li>
<li><a href="#overview-responsive-images">Responsive images</a></li>
<li><a href="#overview-type-links">Type and links</a></li>
<li><a href="#overview-normalize">Normalize</a></li>
<li><a href="#overview-container">Container</a></li>
</ul>
</li>
<li>
<a href="#grid">Grid system</a>
<ul class="nav">
<li><a href="#grid-example">Example usage</a></li>
<li><a href="#grid-offsetting">Offset columns</a></li>
<li><a href="#grid-nesting">Nested columns</a></li>
<li><a href="#grid-column-ordering">Column ordering</a></li>
<li><a href="#grid-small">Small device grid</a></li>
<li><a href="#grid-less">LESS mixins and variables</a></li>
</ul>
</li>
<li>
<a href="#type">Typography</a>
<ul class="nav">
<li><a href="#type-headings">Headings</a></li>
<li><a href="#type-body-copy">Body copy</a></li>
<li><a href="#type-emphasis">Emphasis</a></li>
<li><a href="#type-abbreviations">Abbreviations</a></li>
<li><a href="#type-addresses">Addresses</a></li>
<li><a href="#type-blockquotes">Blockquotes</a></li>
<li><a href="#type-lists">Lists</a></li>
</ul>
</li>
<li><a href="#code">Code</a></li>
<li>
<a href="#tables">Tables</a>
<ul class="nav">
<li><a href="#tables-example">Basic example</a></li>
<li><a href="#tables-striped">Zebra striping</a></li>
<li><a href="#tables-bordered">Bordered tables</a></li>
<li><a href="#tables-hover-rows">Hover rows</a></li>
<li><a href="#tables-condensed">Condensed tables</a></li>
<li><a href="#tables-row-classes">Contextual row classes</a></li>
</ul>
</li>
<li>
<a href="#forms">Forms</a>
<ul class="nav">
<li><a href="#forms-example">Basic example</a></li>
<li><a href="#forms-inline">Inline variation</a></li>
<li><a href="#forms-horizontal">Horizontal variation</a></li>
<li><a href="#forms-controls">Supported controls</a></li>
<li><a href="#forms-control-states">Control states</a></li>
<li><a href="#forms-input-groups">Input groups</a></li>
<li><a href="#forms-control-sizes">Control sizing</a></li>
<li><a href="#forms-help-text">Help text</a></li>
</ul>
</li>
<li>
<a href="#buttons">Buttons</a>
<ul class="nav">
<li><a href="#buttons-options">Button options</a></li>
<li><a href="#buttons-sizes">Sizes</a></li>
<li><a href="#buttons-disabled">Disabled</a></li>
<li><a href="#buttons-tags">Button tags</a></li>
</ul>
</li>
<li><a href="#images">Images</a></li>
<li><a href="#helper-classes">Helper classes</a></li>
<li><a href="#responsive-utilities">Responsive utilities</a></li>

View File

@ -0,0 +1,32 @@
<li>
<a href="#less">LESS components</a>
</li>
<li>
<a href="#plugins">jQuery plugins</a>
</li>
<li>
<a href="#variables">LESS variables</a>
<ul class="nav">
<li><a href="#variables-basics">Basics</a></li>
<li><a href="#variables-buttons">Buttons</a></li>
<li><a href="#variables-form-states">Form states</a></li>
<li><a href="#variables-alerts">Alerts</a></li>
<li><a href="#variables-navbar">Navbar</a></li>
<li><a href="#variables-tables">Tables</a></li>
<li><a href="#variables-forms">Forms</a></li>
<li><a href="#variables-dropdowns">Dropdowns</a></li>
<li><a href="#variables-panels-wells">Panels and wells</a></li>
<li><a href="#variables-jumbotron">Jumbotron</a></li>
<li><a href="#variables-modals">Modals</a></li>
<li><a href="#variables-list-group">List group</a></li>
<li><a href="#variables-thumbnails">Thumbnails</a></li>
<li><a href="#variables-progress">Progress bars</a></li>
<li><a href="#variables-pagination">Pagination</a></li>
<li><a href="#variables-labels">Labels</a></li>
<li><a href="#variables-tooltips-popovers">Tooltips and popovers</a></li>
<li><a href="#variables-other">Other</a></li>
</ul>
</li>
<li>
<a href="#download">Download</a>
</li>

View File

@ -0,0 +1,20 @@
<li>
<a href="#download">Download Bootstrap</a>
<ul class="nav">
<li><a href="#download-options">Download options</a></li>
<li><a href="#download-cdn">Bootstrap CDN</a></li>
</ul>
</li>
<li>
<a href="#whats-included">What's included</a>
</li>
<li>
<a href="#examples">Templates and examples</a>
<ul class="nav">
<li><a href="#examples-template">HTML template</a></li>
<li><a href="#examples-list">List of examples</a></li>
</ul>
</li>
<li>
<a href="#customizing">Customizing Bootstrap</a>
</li>

View File

@ -0,0 +1,28 @@
<li>
<a href="#js-overview">Overview</a>
<ul class="nav">
<li><a href="#js-individual-compiled">Individual or compiled</a></li>
<li><a href="#js-data-attributes">Data attributes</a></li>
<li><a href="#js-programmatic-api">Programmatic API</a></li>
<li><a href="#js-noconflict">No Conflict</a></li>
<li><a href="#js-events">Events</a></li>
</ul>
</li>
<li><a href="#transitions">Transitions</a></li>
<li>
<a href="#modals">Modal</a>
<ul class="nav">
<li><a href="#modals-examples">Examples</a></li>
<li><a href="#modals-usage">Usage</a></li>
</ul>
</li>
<li><a href="#dropdowns">Dropdown</a></li>
<li><a href="#scrollspy">Scrollspy</a></li>
<li><a href="#tabs">Tab</a></li>
<li><a href="#tooltips">Tooltip</a></li>
<li><a href="#popovers">Popover</a></li>
<li><a href="#js-alerts">Alert</a></li>
<li><a href="#js-buttons">Button</a></li>
<li><a href="#collapse">Collapse</a></li>
<li><a href="#carousel">Carousel</a></li>
<li><a href="#affix">Affix</a></li>

View File

@ -0,0 +1,29 @@
<div class="navbar navbar-inverse navbar-fixed-top bs-docs-nav">
<div class="container">
<a href="/" class="navbar-brand">Bootstrap</a>
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target=".bs-navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<div class="nav-collapse collapse bs-navbar-collapse">
<ul class="nav navbar-nav">
<li{% if page.slug == "getting-started" %} class="active"{% endif %}>
<a href="/getting-started">Getting started</a>
</li>
<li{% if page.slug == "css" %} class="active"{% endif %}>
<a href="/css">CSS</a>
</li>
<li{% if page.slug == "components" %} class="active"{% endif %}>
<a href="/components">Components</a>
</li>
<li{% if page.slug == "js" %} class="active"{% endif %}>
<a href="/javascript">JavaScript</a>
</li>
<li{% if page.slug == "customize" %} class="active"{% endif %}>
<a href="/customize">Customize</a>
</li>
</ul>
</div>
</div>
</div>

View File

@ -1,34 +0,0 @@
<!-- Navbar
================================================== -->
<div class="navbar navbar-inverse navbar-fixed-left bs-docs-navbar">
<div class="container">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/">B</a>
<div class="nav-collapse collapse">
<ul class="nav">
<!-- <li {% if page.title == "Bootstrap" %}class="active"{% endif %}>
<a href="/"><span class="glyphicon glyphicon-home"></span></a>
</li>
--> <li {% if page.title == "Getting started" %}class="active"{% endif %}>
<a href="/getting-started" data-toggle="tooltip" data-placement="right" title="Getting started"><span class="glyphicon glyphicon-list"></span></a>
</li>
<li {% if page.title == "CSS" %}class="active"{% endif %}>
<a href="/css" data-toggle="tooltip" data-placement="right" title="CSS"><span class="glyphicon glyphicon-tint"></span></a>
</li>
<li {% if page.title == "Components" %}class="active"{% endif %}>
<a href="/components" data-toggle="tooltip" data-placement="right" title="Components"><span class="glyphicon glyphicon-fire"></span></a>
</li>
<li {% if page.title == "JavaScript plugins" %}class="active"{% endif %}>
<a href="/javascript" data-toggle="tooltip" data-placement="right" title="JavaScript plugins"><span class="glyphicon glyphicon-dashboard"></span></a>
</li>
<li {% if page.title == "Customize and download" %}class="active"{% endif %}>
<a href="/customize" data-toggle="tooltip" data-placement="right" title="Customize"><span class="glyphicon glyphicon-cog"></span></a>
</li>
</ul>
</div>
</div>
</div>

View File

@ -0,0 +1,16 @@
<div class="bs-social">
<ul class="bs-social-buttons">
<li>
<iframe class="github-btn" src="http://ghbtns.com/github-btn.html?user=twitter&repo=bootstrap&type=watch&count=true" allowtransparency="true" frameborder="0" scrolling="0" width="100px" height="20px"></iframe>
</li>
<li>
<iframe class="github-btn" src="http://ghbtns.com/github-btn.html?user=twitter&repo=bootstrap&type=fork&count=true" allowtransparency="true" frameborder="0" scrolling="0" width="102px" height="20px"></iframe>
</li>
<li class="follow-btn">
<a href="https://twitter.com/twbootstrap" class="twitter-follow-button" data-link-color="#0069D6" data-show-count="true">Follow @twbootstrap</a>
</li>
<li class="tweet-btn">
<a href="https://twitter.com/share" class="twitter-share-button" data-url="http://twitter.github.com/bootstrap/" data-count="horizontal" data-via="twbootstrap" data-related="mdo:Creator of Twitter Bootstrap">Tweet</a>
</li>
</ul>
</div>

View File

@ -5,13 +5,49 @@
{% include header.html %}
<!-- Place anything custom after this. -->
</head>
<body class="bs-docs-docs" data-spy="scroll" data-target=".bs-docs-sidebar">
<body data-spy="scroll" data-target=".bs-sidebar">
<!-- Docs nav -->
{% include docs-nav.html %}
<!-- Docs master nav -->
{% include nav-main.html %}
<!-- Page content of course! -->
<!-- Docs page layout -->
<div class="bs-header">
<div class="container">
<h1>{{ page.title }}</h1>
<p>{{ page.lead }}</p>
</div>
</div>
<div class="container bs-docs-container">
<div class="row">
<div class="col col-lg-3">
<div class="bs-sidebar">
<ul class="nav bs-sidenav">
{% if page.slug == "getting-started" %}
{% include nav-getting-started.html %}
{% elsif page.slug == "css" %}
{% include nav-css.html %}
{% elsif page.slug == "components" %}
{% include nav-components.html %}
{% elsif page.slug == "js" %}
{% include nav-javascript.html %}
{% elsif page.slug == "customize" %}
{% include nav-customize.html %}
{% endif %}
</ul>
</div>
</div>
<div class="col col-lg-9">
{{ content }}
</div>
</div>
<!-- Quick back to top -->
<a href="#" class="bs-top">
Back to top
</a>
</div>
<!-- Main docs footer (social buttons, copyright, etc). -->
{% include colophon.html %}

View File

@ -7,6 +7,9 @@
</head>
<body class="bs-docs-home">
<!-- Docs master nav -->
{% include nav-main.html %}
<!-- Page content of course! -->
{{ content }}

View File

@ -251,7 +251,7 @@ table {
max-width: 100% !important;
}
@page {
margin: 0.5cm;
margin: 2cm .5cm;
}
p,
h2,
@ -263,7 +263,7 @@ table {
h3 {
page-break-after: avoid;
}
.navbar-toggle {
.navbar {
display: none;
}
}
@ -280,17 +280,10 @@ html {
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
@media screen and (max-device-width: 480px) {
html {
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}
}
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 14px;
line-height: 20px;
line-height: 1.428571429;
color: #333333;
background-color: #ffffff;
}
@ -422,9 +415,8 @@ h6,
.h4,
.h5,
.h6 {
font-family: inherit;
font-weight: 500;
line-height: 20px;
line-height: 1.1;
}
h1 small,
@ -449,11 +441,6 @@ h2,
h3 {
margin-top: 20px;
margin-bottom: 10px;
line-height: 40px;
}
h3 {
line-height: 30px;
}
h4,
@ -465,22 +452,22 @@ h6 {
h1,
.h1 {
font-size: 38.5px;
font-size: 38px;
}
h2,
.h2 {
font-size: 31.5px;
font-size: 32px;
}
h3,
.h3 {
font-size: 24.5px;
font-size: 24px;
}
h4,
.h4 {
font-size: 17.5px;
font-size: 18px;
}
h5,
@ -490,24 +477,21 @@ h5,
h6,
.h6 {
font-size: 11.9px;
font-size: 12px;
}
h1 small,
.h1 small {
font-size: 24.5px;
font-size: 24px;
}
h2 small,
.h2 small {
font-size: 17.5px;
font-size: 18px;
}
h3 small,
.h3 small {
font-size: 14px;
}
.h3 small,
h4 small,
.h4 small {
font-size: 14px;
@ -533,7 +517,7 @@ ol ul {
}
li {
line-height: 20px;
line-height: 1.428571429;
}
.list-unstyled {
@ -558,7 +542,7 @@ dl {
dt,
dd {
line-height: 20px;
line-height: 1.428571429;
}
dt {
@ -640,7 +624,7 @@ blockquote p:last-child {
blockquote small {
display: block;
line-height: 20px;
line-height: 1.428571429;
color: #999999;
}
@ -680,7 +664,7 @@ address {
display: block;
margin-bottom: 20px;
font-style: normal;
line-height: 20px;
line-height: 1.428571429;
}
code,
@ -705,7 +689,7 @@ pre {
padding: 9.5px;
margin: 0 0 10px;
font-size: 13px;
line-height: 20px;
line-height: 1.428571429;
word-break: break-all;
word-wrap: break-word;
white-space: pre;
@ -992,10 +976,6 @@ pre code {
.container {
max-width: 728px;
}
.row {
margin-right: -15px;
margin-left: -15px;
}
}
@media screen and (min-width: 992px) {
@ -1033,7 +1013,7 @@ th {
.table thead > tr > td,
.table tbody > tr > td {
padding: 8px;
line-height: 20px;
line-height: 1.428571429;
vertical-align: top;
border-top: 1px solid #dddddd;
}
@ -1221,7 +1201,7 @@ legend {
padding: 0;
margin-bottom: 20px;
font-size: 21px;
line-height: 40px;
line-height: inherit;
color: #333333;
border: 0;
border-bottom: 1px solid #e5e5e5;
@ -1249,11 +1229,11 @@ input[type="url"],
input[type="search"],
input[type="tel"],
input[type="color"] {
display: inline-block;
min-height: 34px;
padding: 6px 9px;
display: block;
min-height: 36px;
padding: 8px 12px;
font-size: 14px;
line-height: 20px;
line-height: 1.428571429;
color: #555555;
vertical-align: middle;
background-color: #ffffff;
@ -1261,10 +1241,32 @@ input[type="color"] {
border-radius: 4px;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
-webkit-transition: border-color linear 0.2s, box-shadow linear 0.2s;
-moz-transition: border-color linear 0.2s, box-shadow linear 0.2s;
-o-transition: border-color linear 0.2s, box-shadow linear 0.2s;
transition: border-color linear 0.2s, box-shadow linear 0.2s;
-webkit-transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
-moz-transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
-o-transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
}
select:focus,
textarea:focus,
input[type="text"]:focus,
input[type="password"]:focus,
input[type="datetime"]:focus,
input[type="datetime-local"]:focus,
input[type="date"]:focus,
input[type="month"]:focus,
input[type="time"]:focus,
input[type="week"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus,
input[type="color"]:focus {
border-color: rgba(82, 168, 236, 0.8);
outline: 0;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
}
input,
@ -1293,30 +1295,6 @@ textarea {
height: auto;
}
textarea:focus,
input[type="text"]:focus,
input[type="password"]:focus,
input[type="datetime"]:focus,
input[type="datetime-local"]:focus,
input[type="date"]:focus,
input[type="month"]:focus,
input[type="time"]:focus,
input[type="week"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus,
input[type="color"]:focus {
border-color: rgba(82, 168, 236, 0.8);
outline: 0;
outline: thin dotted \9;
/* IE6-9 */
-webkit-box-shadow: 0 0 8px rgba(82, 168, 236, 0.6);
box-shadow: 0 0 8px rgba(82, 168, 236, 0.6);
}
input[type="radio"],
input[type="checkbox"] {
margin: 4px 0 0;
@ -1328,10 +1306,10 @@ input[type="checkbox"] {
select,
input[type="file"] {
height: 34px;
height: 36px;
/* In IE7, the height of the select element cannot be changed by height, only font-size. TODO: Check if this is still needed when dropping IE7 support */
line-height: 34px;
line-height: 36px;
}
select[multiple],
@ -1339,7 +1317,12 @@ select[size] {
height: auto;
}
select:focus,
select optgroup {
font-family: inherit;
font-size: inherit;
font-style: inherit;
}
input[type="file"]:focus,
input[type="radio"]:focus,
input[type="checkbox"]:focus {
@ -1373,7 +1356,9 @@ textarea::-webkit-input-placeholder {
display: block;
min-height: 20px;
padding-left: 20px;
margin-top: 10px;
margin-bottom: 10px;
vertical-align: middle;
}
.radio label,
@ -1437,8 +1422,8 @@ input[type="url"].input-large,
input[type="search"].input-large,
input[type="tel"].input-large,
input[type="color"].input-large {
padding: 11px 14px;
font-size: 17.5px;
padding: 14px 16px;
font-size: 18px;
border-radius: 6px;
}
@ -1458,31 +1443,12 @@ input[type="url"].input-small,
input[type="search"].input-small,
input[type="tel"].input-small,
input[type="color"].input-small {
min-height: 26px;
padding: 2px 10px;
font-size: 11.9px;
min-height: 30px;
padding: 5px 10px;
font-size: 12px;
border-radius: 3px;
}
input[class*="span"],
select[class*="span"],
textarea[class*="span"] {
float: none;
margin-right: 0;
margin-left: 0;
}
.input-append input[class*="span"],
.input-prepend input[class*="span"] {
display: inline-block;
}
input[class*="span"],
select[class*="span"],
textarea[class*="span"] {
height: 34px;
}
input[disabled],
select[disabled],
textarea[disabled],
@ -1571,81 +1537,38 @@ select:focus:invalid:focus {
box-shadow: 0 0 6px #f8b9b7;
}
.form-actions {
padding: 19px 20px 20px;
margin-top: 20px;
margin-bottom: 20px;
background-color: #f5f5f5;
border-top: 1px solid #e5e5e5;
}
.form-actions:before,
.form-actions:after {
display: table;
content: " ";
}
.form-actions:after {
clear: both;
}
.form-actions:before,
.form-actions:after {
display: table;
content: " ";
}
.form-actions:after {
clear: both;
}
.help-block,
.help-inline {
color: #737373;
}
.help-block {
display: block;
margin-top: 5px;
margin-bottom: 10px;
}
.help-inline {
display: inline-block;
padding-left: 5px;
vertical-align: middle;
color: #737373;
}
.input-group {
display: table;
}
.input-group[class*="span"] {
.input-group.col {
float: none;
padding: 0;
padding-right: 0;
padding-left: 0;
}
.input-group input,
.input-group select {
width: 100%;
margin-bottom: 0;
}
.input-group-addon,
.input-group-btn,
.input-group input {
display: table-cell;
margin: 0;
border-radius: 0;
}
.input-group-addon.input-small,
.input-group-btn.input-small,
.input-group input.input-small {
border-radius: 0;
}
.input-group-addon.input-large,
.input-group-btn.input-large,
.input-group input.input-large {
.input-group-addon:not(:first-child):not(:last-child),
.input-group-btn:not(:first-child):not(:last-child),
.input-group input:not(:first-child):not(:last-child) {
border-radius: 0;
}
@ -1656,45 +1579,39 @@ select:focus:invalid:focus {
}
.input-group-addon {
padding: 6px 8px;
padding: 8px 12px;
font-size: 14px;
font-weight: normal;
line-height: 20px;
line-height: 1.428571429;
text-align: center;
text-shadow: 0 1px 0 #fff;
background-color: #eeeeee;
border: 1px solid #ccc;
border-radius: 4px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.input-group-addon.input-small {
padding: 2px 10px;
font-size: 11.9px;
padding: 5px 10px;
font-size: 12px;
border-radius: 3px;
}
.input-group-addon.input-large {
padding: 11px 14px;
font-size: 17.5px;
padding: 14px 16px;
font-size: 18px;
border-radius: 6px;
}
.input-group input:first-child,
.input-group-addon:first-child {
border-bottom-left-radius: 4px;
border-top-left-radius: 4px;
}
.input-group input:first-child.input-small,
.input-group-addon:first-child.input-small {
border-bottom-left-radius: 3px;
border-top-left-radius: 3px;
}
.input-group input:first-child.input-large,
.input-group-addon:first-child.input-large {
border-bottom-left-radius: 6px;
border-top-left-radius: 6px;
.input-group-addon:first-child,
.input-group-btn:first-child > .btn,
.input-group-btn:first-child > .dropdown-toggle,
.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle) {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
.input-group-addon:first-child {
@ -1702,21 +1619,12 @@ select:focus:invalid:focus {
}
.input-group input:last-child,
.input-group-addon:last-child {
border-top-right-radius: 4px;
border-bottom-right-radius: 4px;
}
.input-group input:last-child.input-small,
.input-group-addon:last-child.input-small {
border-top-right-radius: 3px;
border-bottom-right-radius: 3px;
}
.input-group input:last-child.input-large,
.input-group-addon:last-child.input-large {
border-top-right-radius: 6px;
border-bottom-right-radius: 6px;
.input-group-addon:last-child,
.input-group-btn:last-child > .btn,
.input-group-btn:last-child > .dropdown-toggle,
.input-group-btn:first-child > .btn:not(:first-child) {
border-bottom-left-radius: 0;
border-top-left-radius: 0;
}
.input-group-addon:last-child {
@ -1731,7 +1639,6 @@ select:focus:invalid:focus {
.input-group-btn > .btn {
position: relative;
float: left;
border-radius: 0;
}
.input-group-btn > .btn + .btn {
@ -1743,94 +1650,46 @@ select:focus:invalid:focus {
z-index: 2;
}
.input-group-btn:first-child > .btn:first-child,
.input-group-btn:first-child > .dropdown-toggle:first-child {
border-bottom-left-radius: 4px;
border-top-left-radius: 4px;
.form-inline input,
.form-inline select,
.form-inline textarea,
.form-inline .radio,
.form-inline .checkbox {
display: inline-block;
}
.input-group-btn:first-child > .btn:first-child.btn-large,
.input-group-btn:first-child > .dropdown-toggle:first-child.btn-large {
border-bottom-left-radius: 6px;
border-top-left-radius: 6px;
}
.input-group-btn:first-child > .btn:first-child.btn-small,
.input-group-btn:first-child > .dropdown-toggle:first-child.btn-small {
border-bottom-left-radius: 3px;
border-top-left-radius: 3px;
}
.input-group-btn:last-child > .btn:last-child,
.input-group-btn:last-child > .dropdown-toggle {
border-top-right-radius: 4px;
border-bottom-right-radius: 4px;
}
.input-group-btn:last-child > .btn:last-child.btn-large,
.input-group-btn:last-child > .dropdown-toggle.btn-large {
border-top-right-radius: 6px;
border-bottom-right-radius: 6px;
}
.input-group-btn:last-child > .btn:last-child.btn-small,
.input-group-btn:last-child > .dropdown-toggle.btn-small {
border-top-right-radius: 3px;
border-bottom-right-radius: 3px;
}
@media screen and (min-width: 768px) {
.form-horizontal .control-group {
position: relative;
margin-bottom: 20px;
}
.form-horizontal .control-group:before,
.form-horizontal .control-group:after {
display: table;
content: " ";
}
.form-horizontal .control-group:after {
clear: both;
}
.form-horizontal .control-group:before,
.form-horizontal .control-group:after {
display: table;
content: " ";
}
.form-horizontal .control-group:after {
clear: both;
}
.form-horizontal .control-group input,
.form-horizontal .control-group select,
.form-horizontal .control-group textarea {
.form-inline .radio,
.form-inline .checkbox {
margin-top: 0;
margin-bottom: 0;
}
.form-horizontal .control-group > .control-label {
float: left;
width: 160px;
.form-horizontal .row + .row {
margin-top: 15px;
}
.form-horizontal .control-label {
padding-top: 6px;
}
@media (min-width: 768px) {
.form-horizontal .control-label {
text-align: right;
}
.form-horizontal .control-group > .controls {
margin-left: 180px;
}
.form-horizontal .form-actions {
padding-left: 180px;
}
}
.btn {
display: inline-block;
padding: 6px 12px;
padding: 8px 12px;
margin-bottom: 0;
font-size: 14px;
font-weight: 500;
line-height: 20px;
line-height: 1.428571429;
text-align: center;
white-space: nowrap;
vertical-align: middle;
cursor: pointer;
border: 1px solid #a7a9aa;
border: 1px solid transparent;
border-radius: 4px;
}
@ -1865,72 +1724,38 @@ fieldset[disabled] .btn {
box-shadow: none;
}
.btn-large {
padding: 11px 14px;
font-size: 17.5px;
border-radius: 6px;
}
.btn-small {
padding: 2px 10px;
font-size: 11.9px;
border-radius: 3px;
}
.btn-mini {
padding: 0 6px;
font-size: 10.5px;
border-radius: 3px;
}
.btn-block {
display: block;
width: 100%;
padding-right: 0;
padding-left: 0;
}
.btn-block + .btn-block {
margin-top: 5px;
}
input[type="submit"].btn-block,
input[type="reset"].btn-block,
input[type="button"].btn-block {
width: 100%;
}
.btn {
.btn-default {
color: #ffffff;
background-color: #a7a9aa;
border-color: #a7a9aa;
}
.btn:hover,
.btn:focus,
.btn:active,
.btn.active {
.btn-default:hover,
.btn-default:focus,
.btn-default:active,
.btn-default.active {
background-color: #9a9c9d;
border-color: #8d9091;
}
.btn.disabled:hover,
.btn[disabled]:hover,
fieldset[disabled] .btn:hover,
.btn.disabled:focus,
.btn[disabled]:focus,
fieldset[disabled] .btn:focus,
.btn.disabled:active,
.btn[disabled]:active,
fieldset[disabled] .btn:active,
.btn.disabled.active,
.btn[disabled].active,
fieldset[disabled] .btn.active {
.btn-default.disabled:hover,
.btn-default[disabled]:hover,
fieldset[disabled] .btn-default:hover,
.btn-default.disabled:focus,
.btn-default[disabled]:focus,
fieldset[disabled] .btn-default:focus,
.btn-default.disabled:active,
.btn-default[disabled]:active,
fieldset[disabled] .btn-default:active,
.btn-default.disabled.active,
.btn-default[disabled].active,
fieldset[disabled] .btn-default.active {
background-color: #a7a9aa;
border-color: #a7a9aa;
}
.btn-primary {
color: #ffffff;
background-color: #428bca;
border-color: #428bca;
}
@ -1960,6 +1785,7 @@ fieldset[disabled] .btn-primary.active {
}
.btn-warning {
color: #ffffff;
background-color: #f0ad4e;
border-color: #f0ad4e;
}
@ -1989,6 +1815,7 @@ fieldset[disabled] .btn-warning.active {
}
.btn-danger {
color: #ffffff;
background-color: #d9534f;
border-color: #d9534f;
}
@ -2018,6 +1845,7 @@ fieldset[disabled] .btn-danger.active {
}
.btn-success {
color: #ffffff;
background-color: #5cb85c;
border-color: #5cb85c;
}
@ -2047,6 +1875,7 @@ fieldset[disabled] .btn-success.active {
}
.btn-info {
color: #ffffff;
background-color: #5bc0de;
border-color: #5bc0de;
}
@ -2114,6 +1943,36 @@ fieldset[disabled] .btn-link:focus {
text-decoration: none;
}
.btn-large {
padding: 14px 16px;
font-size: 18px;
border-radius: 6px;
}
.btn-small {
padding: 5px 10px;
font-size: 12px;
line-height: 1.5;
border-radius: 3px;
}
.btn-block {
display: block;
width: 100%;
padding-right: 0;
padding-left: 0;
}
.btn-block + .btn-block {
margin-top: 5px;
}
input[type="submit"].btn-block,
input[type="reset"].btn-block,
input[type="button"].btn-block {
width: 100%;
}
.fade {
opacity: 0;
-webkit-transition: opacity 0.15s linear;
@ -2126,16 +1985,6 @@ fieldset[disabled] .btn-link:focus {
opacity: 1;
}
/*.collapse {
position: relative;
height: 0;
overflow: hidden;
.transition(height .35s ease);
&.in {
height: auto;
}
}*/
.collapse {
position: relative;
height: 0;
@ -2158,6 +2007,7 @@ fieldset[disabled] .btn-link:focus {
.glyphicon:before {
font-family: 'Glyphicons Halflings';
-webkit-font-smoothing: antialiased;
font-style: normal;
font-weight: normal;
line-height: 1;
@ -2803,32 +2653,18 @@ fieldset[disabled] .btn-link:focus {
content: "\e160";
}
.dropup,
.dropdown {
position: relative;
}
.dropdown-toggle:active,
.open .dropdown-toggle {
outline: 0;
}
.caret {
display: inline-block;
width: 0;
height: 0;
vertical-align: top;
margin-left: 2px;
vertical-align: middle;
border-top: 4px solid #000;
border-right: 4px solid transparent;
border-left: 4px solid transparent;
content: "";
}
.dropdown .caret {
margin-top: 8px;
margin-left: 2px;
}
.dropdown-menu {
position: absolute;
top: 100%;
@ -2869,7 +2705,7 @@ fieldset[disabled] .btn-link:focus {
padding: 3px 20px;
clear: both;
font-weight: normal;
line-height: 20px;
line-height: 1.428571429;
color: #333333;
white-space: nowrap;
}
@ -2923,6 +2759,19 @@ fieldset[disabled] .btn-link:focus {
display: block;
}
.open > a {
outline: 0;
}
.dropdown-backdrop {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 990;
}
.pull-right > .dropdown-menu {
right: 0;
left: auto;
@ -3101,6 +2950,15 @@ a.list-group-item.active .list-group-item-text {
border-top-left-radius: 3px;
}
.panel-footer {
padding: 10px 15px;
margin: 15px -15px -15px;
background-color: #f5f5f5;
border-top: 1px solid #dddddd;
border-bottom-right-radius: 3px;
border-bottom-left-radius: 3px;
}
.panel-primary {
border-color: #428bca;
}
@ -3250,6 +3108,7 @@ button.close {
}
.nav > li {
position: relative;
display: block;
}
@ -3281,11 +3140,26 @@ button.close {
margin-top: 9px;
}
.nav.open > a,
.nav.open > a:hover,
.nav.open > a:focus {
color: #fff;
background-color: #428bca;
border-color: #428bca;
}
.nav.open > a .caret,
.nav.open > a:hover .caret,
.nav.open > a:focus .caret {
border-top-color: #fff;
border-bottom-color: #fff;
}
.nav > .pull-right {
float: right;
}
.nav .divider {
.nav .nav-divider {
height: 2px;
margin: 9px 0;
overflow: hidden;
@ -3304,7 +3178,7 @@ button.close {
.nav-tabs > li > a {
margin-right: 2px;
line-height: 20px;
line-height: 1.428571429;
border: 1px solid transparent;
border-radius: 4px 4px 0 0;
}
@ -3392,9 +3266,9 @@ button.close {
.nav-header {
display: block;
padding: 3px 15px;
font-size: 10.5px;
font-size: 11px;
font-weight: bold;
line-height: 20px;
line-height: 1.428571429;
color: #999999;
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
text-transform: uppercase;
@ -3430,75 +3304,22 @@ button.close {
display: block;
}
/*
// Prevent IE8 from misplacing imgs
// See https://github.com/h5bp/html5-boilerplate/issues/984#issuecomment-3985989
.nav > li > a > img {
max-width: none;
.nav .caret {
border-top-color: #428bca;
border-bottom-color: #428bca;
}
// Dropdowns
// -------------------------
.nav a:hover .caret {
border-top-color: #2a6496;
border-bottom-color: #2a6496;
}
.nav-tabs .dropdown-menu {
// Remove the top rounded corners here since there is a hard edge above the menu
.border-top-radius(0);
margin-top: -1px;
border-top-right-radius: 0;
border-top-left-radius: 0;
}
// Default dropdown links
// -------------------------
// Make carets use linkColor to start
.nav .dropdown-toggle .caret {
border-top-color: @link-color;
border-bottom-color: @link-color;
margin-top: 8px;
}
.nav .dropdown-toggle:hover .caret {
border-top-color: @link-hover-color;
border-bottom-color: @link-hover-color;
}
// Active dropdown links
// -------------------------
.nav .active .dropdown-toggle .caret {
border-top-color: #fff;
border-bottom-color: #fff;
}
.nav-tabs .active .dropdown-toggle .caret {
border-top-color: @gray;
border-bottom-color: @gray;
}
// Active:hover dropdown links
// -------------------------
.nav > .dropdown.active > a:hover {
cursor: pointer;
}
// Open dropdowns
// -------------------------
.nav-tabs .open .dropdown-toggle,
.nav-pills .open .dropdown-toggle,
.nav > li.dropdown.open.active > a:hover {
color: #fff;
background-color: @gray-light;
border-color: @gray-light;
}
.nav li.dropdown.open .caret,
.nav li.dropdown.open.active .caret,
.nav li.dropdown.open a:hover .caret {
border-top-color: #fff;
border-bottom-color: #fff;
.opacity(1);
}
// Dropdowns in stacked tabs
.tabs-stacked .open > a:hover {
border-color: @gray-light;
}
*/
.navbar {
position: relative;
padding-right: 15px;
@ -3529,7 +3350,8 @@ button.close {
}
.navbar-nav {
margin-top: 5px;
margin-top: 10px;
margin-bottom: 15px;
}
.navbar-nav > li > a {
@ -3537,6 +3359,7 @@ button.close {
padding-bottom: 15px;
line-height: 20px;
color: #777777;
border-radius: 4px;
}
.navbar-nav > li > a:hover,
@ -3587,7 +3410,7 @@ button.close {
padding: 15px;
margin-right: auto;
margin-left: auto;
font-size: 17.5px;
font-size: 18px;
font-weight: 500;
line-height: 20px;
color: #777777;
@ -3629,8 +3452,22 @@ button.close {
}
.navbar-form {
margin-top: 8px;
margin-bottom: 8px;
margin-top: 7px;
margin-bottom: 7px;
}
.navbar-form input,
.navbar-form select,
.navbar-form textarea,
.navbar-form .radio,
.navbar-form .checkbox {
display: inline-block;
}
.navbar-form .radio,
.navbar-form .checkbox {
margin-top: 0;
margin-bottom: 0;
}
.navbar-nav > li > .dropdown-menu {
@ -3644,27 +3481,27 @@ button.close {
border-bottom-left-radius: 0;
}
.navbar-nav li.dropdown > a:hover .caret,
.navbar-nav li.dropdown > a:focus .caret {
.navbar-nav > .dropdown > a:hover .caret,
.navbar-nav > .dropdown > a:focus .caret {
border-top-color: #333333;
border-bottom-color: #333333;
}
.navbar-nav li.dropdown.open > .dropdown-toggle,
.navbar-nav li.dropdown.active > .dropdown-toggle,
.navbar-nav li.dropdown.open.active > .dropdown-toggle {
.navbar-nav > .open > a,
.navbar-nav > .open > a:hover,
.navbar-nav > .open > a:focus {
color: #555555;
background-color: #d5d5d5;
}
.navbar-nav li.dropdown > .dropdown-toggle .caret {
.navbar-nav > .dropdown > a .caret {
border-top-color: #777777;
border-bottom-color: #777777;
}
.navbar-nav li.dropdown.open > .dropdown-toggle .caret,
.navbar-nav li.dropdown.active > .dropdown-toggle .caret,
.navbar-nav li.dropdown.open.active > .dropdown-toggle .caret {
.navbar-nav > .open > a .caret,
.navbar-nav > .open > a:hover .caret,
.navbar-nav > .open > a:focus .caret {
border-top-color: #555555;
border-bottom-color: #555555;
}
@ -3730,26 +3567,26 @@ button.close {
background-color: #fff;
}
.navbar-inverse .navbar-nav li.dropdown.open > .dropdown-toggle,
.navbar-inverse .navbar-nav li.dropdown.active > .dropdown-toggle,
.navbar-inverse .navbar-nav li.dropdown.open.active > .dropdown-toggle {
.navbar-inverse .navbar-nav > .open > a,
.navbar-inverse .navbar-nav > .open > a:hover,
.navbar-inverse .navbar-nav > .open > a:focus {
color: #ffffff;
background-color: #080808;
}
.navbar-inverse .navbar-nav li.dropdown > a:hover .caret {
.navbar-inverse .navbar-nav > .dropdown > a:hover .caret {
border-top-color: #ffffff;
border-bottom-color: #ffffff;
}
.navbar-inverse .navbar-nav li.dropdown > .dropdown-toggle .caret {
.navbar-inverse .navbar-nav > .dropdown > a .caret {
border-top-color: #999999;
border-bottom-color: #999999;
}
.navbar-inverse .navbar-nav li.dropdown.open > .dropdown-toggle .caret,
.navbar-inverse .navbar-nav li.dropdown.active > .dropdown-toggle .caret,
.navbar-inverse .navbar-nav li.dropdown.open.active > .dropdown-toggle .caret {
.navbar-inverse .navbar-nav > .open > a .caret,
.navbar-inverse .navbar-nav > .open > a:hover .caret,
.navbar-inverse .navbar-nav > .open > a:focus .caret {
border-top-color: #ffffff;
border-bottom-color: #ffffff;
}
@ -3763,10 +3600,14 @@ button.close {
.navbar .nav {
float: left;
margin-top: 0;
margin-bottom: 0;
}
.navbar .nav > li {
float: left;
}
.navbar .nav > li > a {
border-radius: 0;
}
.navbar .nav.pull-right {
float: right;
}
@ -3783,7 +3624,12 @@ button.close {
}
.navbar-btn {
margin-top: 8px;
margin-top: 7px;
}
.navbar-text {
margin-top: 15px;
margin-bottom: 15px;
}
.navbar-link {
@ -3810,24 +3656,28 @@ button.close {
border-bottom-color: #ffffff;
}
.btn-group {
.btn-group,
.btn-group-vertical {
position: relative;
display: inline-block;
vertical-align: middle;
}
.btn-group > .btn {
.btn-group > .btn,
.btn-group-vertical > .btn {
position: relative;
float: left;
}
.btn-group > .btn + btn {
margin-left: -1px;
.btn-group > .btn:hover,
.btn-group-vertical > .btn:hover,
.btn-group > .btn:active,
.btn-group-vertical > .btn:active {
z-index: 2;
}
.btn-group > .btn:hover,
.btn-group > .btn:active {
z-index: 2;
.btn-group .btn + .btn {
margin-left: -1px;
}
.btn-toolbar:before,
@ -3861,52 +3711,42 @@ button.close {
margin-left: 5px;
}
.btn-group > .btn {
position: relative;
.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {
border-radius: 0;
}
.btn-group > .btn:first-child {
margin-left: 0;
border-bottom-left-radius: 4px;
border-top-left-radius: 4px;
}
.btn-group > .btn:last-child,
.btn-group > .dropdown-toggle {
border-top-right-radius: 4px;
border-bottom-right-radius: 4px;
.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
.btn-group > .btn.large:first-child {
margin-left: 0;
border-bottom-left-radius: 6px;
border-top-left-radius: 6px;
}
.btn-group > .btn.large:last-child,
.btn-group > .large.dropdown-toggle {
border-top-right-radius: 6px;
border-bottom-right-radius: 6px;
.btn-group > .btn:last-child:not(:first-child),
.btn-group > .dropdown-toggle:not(:first-child) {
border-bottom-left-radius: 0;
border-top-left-radius: 0;
}
.btn-group > .btn-group {
float: left;
}
.btn-group > .btn-group > .btn {
.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {
border-radius: 0;
}
.btn-group > .btn-group:last-child > .btn {
border-top-right-radius: 4px;
border-bottom-right-radius: 4px;
.btn-group > .btn-group:first-child > .btn:last-child,
.btn-group > .btn-group:first-child > .dropdown-toggle {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
.btn-group > .btn-group:first-child > .btn {
margin-left: 0;
border-bottom-left-radius: 4px;
border-top-left-radius: 4px;
.btn-group > .btn-group:last-child > .btn:first-child {
border-bottom-left-radius: 0;
border-top-left-radius: 0;
}
.btn-group .dropdown-toggle:active,
@ -3935,7 +3775,6 @@ button.close {
}
.btn .caret {
margin-top: 8px;
margin-left: 0;
}
@ -3954,26 +3793,22 @@ button.close {
max-width: 100%;
}
.btn-group-vertical .btn:first-child {
.btn-group-vertical > .btn + .btn {
margin-top: -1px;
}
.btn-group-vertical .btn:not(:first-child):not(:last-child) {
border-radius: 0;
border-top-right-radius: 4px;
border-top-left-radius: 4px;
}
.btn-group-vertical .btn:first-child {
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
}
.btn-group-vertical .btn:last-child {
border-radius: 0;
border-bottom-right-radius: 4px;
border-bottom-left-radius: 4px;
}
.btn-group-vertical .btn-large:first-child {
border-top-right-radius: 6px;
border-top-left-radius: 6px;
}
.btn-group-vertical .btn-large:last-child {
border-bottom-right-radius: 6px;
border-bottom-left-radius: 6px;
border-top-right-radius: 0;
border-top-left-radius: 0;
}
.btn-group-justified {
@ -4034,7 +3869,7 @@ button.close {
.pagination > li > span {
float: left;
padding: 4px 12px;
line-height: 20px;
line-height: 1.428571429;
text-decoration: none;
background-color: #ffffff;
border: 1px solid #dddddd;
@ -4078,8 +3913,8 @@ button.close {
.pagination-large > li > a,
.pagination-large > li > span {
padding: 11px 14px;
font-size: 17.5px;
padding: 14px 16px;
font-size: 18px;
}
.pagination-large > li:first-child > a,
@ -4094,34 +3929,24 @@ button.close {
border-bottom-right-radius: 6px;
}
.pagination-mini > li:first-child > a,
.pagination-small > li > a,
.pagination-small > li > span {
padding: 5px 10px;
font-size: 12px;
}
.pagination-small > li:first-child > a,
.pagination-mini > li:first-child > span,
.pagination-small > li:first-child > span {
border-bottom-left-radius: 3px;
border-top-left-radius: 3px;
}
.pagination-mini > li:last-child > a,
.pagination-small > li:last-child > a,
.pagination-mini > li:last-child > span,
.pagination-small > li:last-child > span {
border-top-right-radius: 3px;
border-bottom-right-radius: 3px;
}
.pagination-small > li > a,
.pagination-small > li > span {
padding: 2px 10px;
font-size: 11.9px;
}
.pagination-mini > li > a,
.pagination-mini > li > span {
padding: 0 6px;
font-size: 10.5px;
}
.pager {
margin: 20px 0;
text-align: center;
@ -4260,7 +4085,7 @@ button.close {
}
.modal-header {
min-height: 35px;
min-height: 16.428571429px;
padding: 15px;
border-bottom: 1px solid #e5e5e5;
}
@ -4271,7 +4096,7 @@ button.close {
.modal-title {
margin: 0;
line-height: 20px;
line-height: 1.428571429;
}
.modal-body {
@ -4338,7 +4163,7 @@ button.close {
position: absolute;
z-index: 1030;
display: block;
font-size: 10.5px;
font-size: 11px;
line-height: 1.4;
opacity: 0;
filter: alpha(opacity=0);
@ -4560,7 +4385,7 @@ button.close {
}
.alert {
padding: 8px 35px 8px 14px;
padding: 10px 35px 10px 15px;
margin-bottom: 20px;
color: #c09853;
background-color: #fcf8e3;
@ -4577,8 +4402,7 @@ button.close {
border-top-color: #f8e5be;
}
.alert > a,
.alert > p > a {
.alert .alert-link {
font-weight: 500;
color: #a47e3c;
}
@ -4600,8 +4424,7 @@ button.close {
border-top-color: #c9e2b3;
}
.alert-success > a,
.alert-success > p > a {
.alert-success .alert-link {
color: #356635;
}
@ -4615,8 +4438,7 @@ button.close {
border-top-color: #e6c1c7;
}
.alert-danger > a,
.alert-danger > p > a {
.alert-danger .alert-link {
color: #953b39;
}
@ -4630,14 +4452,13 @@ button.close {
border-top-color: #a6e1ec;
}
.alert-info > a,
.alert-info > p > a {
.alert-info .alert-link {
color: #2d6987;
}
.alert-block {
padding-top: 14px;
padding-bottom: 14px;
padding-top: 15px;
padding-bottom: 15px;
}
.alert-block > p,
@ -4652,7 +4473,7 @@ button.close {
.thumbnail,
.img-thumbnail {
padding: 4px;
line-height: 20px;
line-height: 1.428571429;
background-color: #ffffff;
border: 1px solid #dddddd;
border-radius: 4px;
@ -4785,7 +4606,7 @@ a.thumbnail:focus {
display: inline-block;
min-width: 10px;
padding: 3px 7px;
font-size: 11.9px;
font-size: 12px;
font-weight: bold;
line-height: 1;
color: #fff;
@ -4885,7 +4706,7 @@ a.list-group-item.active > .badge,
float: left;
width: 0;
height: 100%;
font-size: 11.9px;
font-size: 12px;
color: #fff;
text-align: center;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
@ -4896,9 +4717,6 @@ a.list-group-item.active > .badge,
-moz-transition: width 0.6s ease;
-o-transition: width 0.6s ease;
transition: width 0.6s ease;
-webkit-backface-visibility: hidden;
-moz-backface-visibility: hidden;
backface-visibility: hidden;
}
.progress-striped .progress-bar {
@ -5122,7 +4940,7 @@ a.list-group-item.active > .badge,
position: absolute;
bottom: 20px;
left: 50%;
z-index: 5;
z-index: 15;
width: 100px;
margin: 0 0 0 -50px;
text-align: center;
@ -5182,7 +5000,7 @@ a.list-group-item.active > .badge,
margin-bottom: 30px;
font-size: 21px;
font-weight: 200;
line-height: 30px;
line-height: 2.1428571435;
color: inherit;
background-color: #eeeeee;
}
@ -5263,68 +5081,68 @@ a.list-group-item.active > .badge,
visibility: hidden;
}
.visible-phone {
display: inherit !important;
.visible-sm {
display: block !important;
}
.visible-tablet {
.visible-md {
display: none !important;
}
.visible-desktop {
.visible-lg {
display: none !important;
}
.hidden-phone {
.hidden-sm {
display: none !important;
}
.hidden-tablet {
display: inherit !important;
.hidden-md {
display: block !important;
}
.hidden-desktop {
display: inherit !important;
.hidden-lg {
display: block !important;
}
@media (min-width: 768px) and (max-width: 991px) {
.visible-phone {
.visible-sm {
display: none !important;
}
.visible-tablet {
display: inherit !important;
.visible-md {
display: block !important;
}
.visible-desktop {
.visible-lg {
display: none !important;
}
.hidden-phone {
display: inherit !important;
.hidden-sm {
display: block !important;
}
.hidden-tablet {
.hidden-md {
display: none !important;
}
.hidden-desktop {
display: inherit !important;
.hidden-lg {
display: block !important;
}
}
@media (min-width: 992px) {
.visible-phone {
.visible-sm {
display: none !important;
}
.visible-tablet {
.visible-md {
display: none !important;
}
.visible-desktop {
display: inherit !important;
.visible-lg {
display: block !important;
}
.hidden-phone {
display: inherit !important;
.hidden-sm {
display: block !important;
}
.hidden-tablet {
display: inherit !important;
.hidden-md {
display: block !important;
}
.hidden-desktop {
.hidden-lg {
display: none !important;
}
}
@ -5335,7 +5153,7 @@ a.list-group-item.active > .badge,
@media print {
.visible-print {
display: inherit !important;
display: block !important;
}
.hidden-print {
display: none !important;

View File

@ -10,94 +10,60 @@
body {
position: relative; /* For scrollyspy */
/* We add the padding to the body for >768px only */
}
hr {
margin-top: 30px;
margin-bottom: 30px;
}
.bs-docs-dl-options h4 {
margin-top: 15px;
margin-bottom: 5px;
}
.bs-docs-container,
.bs-home-container {
padding-left: 15px;
padding-right: 15px;
}
.bs-docs-container {
max-width: 860px;
}
.bs-docs-container .row {
margin-left: -15px;
margin-right: -15px;
}
/* Side notes for calling out things */
.bs-docs-sidenote {
margin: 20px 0;
padding: 15px 30px 15px 15px;
background-color: #fcf2f2;
border-left: 5px solid #df7c7b;
}
.bs-docs-sidenote h4 {
margin-top: 0;
}
.bs-docs-sidenote p:last-child {
margin-bottom: 0;
}
.bs-docs-sidenote code,
.bs-docs-sidenote .highlight {
background-color: #fff;
padding-top: 50px; /* Account for fixed navbar */
}
/* Sections
/* Top nav and header
-------------------------------------------------- */
/* Padding for in-page bookmarks */
section,
.bs-docs-section {
padding-top: 30px;
.bs-docs-nav {
background-color: #b94a48;
}
/* Few stylistic typography tweaks */
section > .page-header,
section > .lead {
color: #5a5a5a;
.bs-docs-nav .navbar-brand {
color: #fff;
}
section > ul li {
margin-bottom: 5px;
.bs-docs-nav .navbar-nav > li > a {
color: #e6cac8;
}
.bs-docs-nav .navbar-nav > li > a:hover {
color: #fff;
}
.bs-docs-nav .navbar-nav > .active > a,
.bs-docs-nav .navbar-nav > .active > a:hover {
color: #fff;
background-color: #993c3a;
}
.bs-docs-nav .navbar-toggle {
border-color: #b94a48;
}
.bs-docs-nav .navbar-toggle:hover {
background-color: #993c3a;
border-color: #993c3a;
}
/* Jumbotrons
/* Homepage masthead
-------------------------------------------------- */
.bs-docs-section-header {
padding-top: 60px;
color: #b94a48;
border-bottom: 5px solid #b94a48;
}
/* Base class */
.bs-docs-jumbotron {
.bs-masthead {
position: relative;
margin-bottom: 20px;
padding: 30px 15px;
text-align: center;
}
.bs-docs-jumbotron h1 {
.bs-masthead h1 {
font-size: 50px;
line-height: 1;
}
.bs-masthead .bs-social {
margin-top: 80px;
}
/* Download button */
.bs-docs-jumbotron .btn {
.bs-masthead .btn {
margin-top: 5px;
margin-bottom: 5px;
padding: 18px 24px;
@ -106,28 +72,174 @@ section > ul li {
background-color: #fff;
border-color: #e5e5e5;
}
.bs-docs-jumbotron .btn:hover,
.bs-docs-jumbotron .btn:active {
.bs-masthead .btn:hover,
.bs-masthead .btn:active {
color: #fff; /* redeclare to override the `.jumbotron a` */
background-color: #b94a48;
border-color: #b94a48;
}
/* Textual links in masthead */
.masthead-links {
/* Textual links */
.bs-masthead-links {
margin: 20px 0;
list-style: none;
}
.masthead-links li {
.bs-masthead-links li {
display: inline;
color: #999;
}
.masthead-links li + li {
.bs-masthead-links li + li {
margin-left: 20px;
}
/* Customize and Download button
-------------------------------------------------- */
.bs-customizer {
}
.bs-customizer .toggle {
float: right;
}
.bs-customizer label {
margin-top: 10px;
font-weight: 500;
color: #555;
}
.bs-customizer h4 {
margin-top: 15px;
}
.bs-customizer input[type="text"] {
background-color: #fafafa;
}
.bs-customize-download {
text-align:center;
}
.bs-customize-download .btn {
margin-top: 5px;
margin-bottom: 5px;
padding: 18px 24px;
font-size: 21px;
color: #b94a48;
background-color: #fff;
border-color: #b94a48;
}
.bs-customize-download .btn:hover,
.bs-customize-download .btn:active {
color: #fff;
background-color: #b94a48;
}
/* Docs pages and sections
-------------------------------------------------- */
/* Page headers */
.bs-header {
padding: 30px 30px 40px;
font-size: 16px;
color: #5a5a5a;
text-align: center;
border-bottom: 1px solid #ddd;
}
.bs-header h1 {
color: #b94a48;
}
.bs-header p {
font-weight: 300;
line-height: 1.5;
}
/* Padding for in-page bookmarks */
.bs-docs-section {
padding-top: 30px;
}
/* Docs sidebar
-------------------------------------------------- */
/* By default it's not affixed in mobile views, so undo that */
.bs-sidebar.affix {
position: static;
}
/* First level of nav */
.bs-sidenav {
margin-top: 30px;
margin-bottom: 30px;
padding-top: 15px;
padding-bottom: 15px;
text-shadow: 0 1px 0 #fff;
background-color: #f5f5f5;
border-radius: 5px;
}
/* All levels of nav */
.bs-sidebar .nav > li > a {
display: block;
color: #666;
padding: 4px 20px;
}
.bs-sidebar .nav > li > a:hover,
.bs-sidebar .nav > li > a:focus {
text-decoration: none;
border-right: 1px solid #d5d5d5;
}
.bs-sidebar .nav > .active > a,
.bs-sidebar .nav > .active:hover > a,
.bs-sidebar .nav > .active:focus > a {
font-weight: 500;
color: #b94a48;
background-color: transparent;
border-right: 1px solid #b94a48;
}
/* Nav: second level (shown on .active) */
.bs-sidebar .nav .nav {
display: none;
margin-bottom: 5px;
}
.bs-sidebar .nav > .active > ul {
display: block;
}
.bs-sidebar .nav .nav > li > a {
padding-top: 2px;
padding-bottom: 2px;
padding-left: 30px;
font-size: 90%;
}
/* Side notes for calling out things
-------------------------------------------------- */
.bs-callout {
margin: 20px 0;
padding: 15px 30px 15px 15px;
background-color: #fcf2f2;
border-left: 5px solid #df7c7b;
}
.bs-callout h4 {
margin-top: 0;
}
.bs-callout p:last-child {
margin-bottom: 0;
}
.bs-callout code,
.bs-callout .highlight {
background-color: #fff;
}
/* Special grid styles
-------------------------------------------------- */
@ -146,96 +258,11 @@ section > ul li {
/* Sidenav
-------------------------------------------------- */
.bs-docs-sidebar {
display: none;
position: fixed;
top: 0;
left: 0;
bottom: 0;
width: 240px;
overflow-y: scroll;
text-shadow: 0 1px 0 #fff;
background-color: #f5f5f5;
box-shadow: inset -1px 0 0 #e5e5e5;
}
/* Nav: first level */
.bs-docs-sidebar > .nav {
margin: 0 0 25px 0;
}
.bs-docs-sidebar .nav > li > a {
display: block;
color: #666;
padding: 4px 25px;
}
.bs-docs-sidebar .nav > li > a:hover,
.bs-docs-sidebar .nav > li > a:focus {
text-decoration: none;
border-right: 1px solid #d5d5d5;
}
.bs-docs-sidebar .nav > .active > a,
.bs-docs-sidebar .nav > .active:hover > a,
.bs-docs-sidebar .nav > .active:focus > a {
font-weight: 500;
color: #b94a48;
background-color: transparent;
border-right: 1px solid #b94a48;
}
/* Nav: second level (shown on .active) */
.bs-docs-sidebar .nav .nav {
display: none;
margin-bottom: 5px;
}
.bs-docs-sidebar .nav > .active > ul {
display: block;
}
.bs-docs-sidebar .nav .nav > li > a {
padding-top: 2px;
padding-bottom: 2px;
padding-left: 40px;
font-size: 90%;
}
.bs-docs-sidenav-heading {
margin: 0 0 25px;
}
.bs-docs-sidenav-heading a {
display: block;
padding: 15px 25px;
color: #b94a48;
border-bottom: 1px solid #e5e5e5;
box-shadow: 0 1px 0 #fff;
}
.bs-docs-sidenav-heading a:hover {
color: #a3403e;
text-decoration: none;
}
/* Section headings for groups of links */
.bs-docs-sidenav > li > .nav-header {
margin-top: 20px;
margin-bottom: 5px;
font-size: 14px;
font-weight: 500;
color: #333;
}
.bs-docs-sidenav > .active > .nav-header,
.bs-docs-sidenav > .active > .nav-header:hover {
color: #333;
border-color: #333;
}
/* Bootstrap code examples
-------------------------------------------------- */
/* Base class */
.bs-docs-example {
.bs-example {
position: relative;
padding: 39px 14px 14px;
margin-bottom: -1px;
@ -244,7 +271,7 @@ section > ul li {
border-top-right-radius: 4px;
}
/* Echo out a label for the example */
.bs-docs-example:after {
.bs-example:after {
content: "Example";
position: absolute;
top: -1px;
@ -260,56 +287,70 @@ section > ul li {
}
/* Tweak display of the examples */
.bs-docs-example + .prettyprint,
.bs-docs-example + .highlight {
.bs-example + .prettyprint,
.bs-example + .highlight {
margin-top: 0;
border-top-left-radius: 0;
border-top-right-radius: 0;
}
/* Tweak content of examples for optimum awesome */
.bs-docs-example > p:last-child,
.bs-docs-example > ul:last-child,
.bs-docs-example > ol:last-child,
.bs-docs-example > blockquote:last-child,
.bs-docs-example > input:last-child,
.bs-docs-example > select:last-child,
.bs-docs-example > textarea:last-child,
.bs-docs-example > .table:last-child,
.bs-docs-example > .jumbotron:last-child,
.bs-docs-example > .alert:last-child,
.bs-docs-example > .panel:last-child,
.bs-docs-example > .list-group:last-child,
.bs-docs-example > .well:last-child {
.bs-example > p:last-child,
.bs-example > ul:last-child,
.bs-example > ol:last-child,
.bs-example > blockquote:last-child,
.bs-example > input:last-child,
.bs-example > select:last-child,
.bs-example > textarea:last-child,
.bs-example > .table:last-child,
.bs-example > .navbar:last-child
.bs-example > .jumbotron:last-child,
.bs-example > .alert:last-child,
.bs-example > .panel:last-child,
.bs-example > .list-group:last-child,
.bs-example > .well:last-child {
margin-bottom: 0;
}
.bs-example > .close {
float: none;
}
/* Typography */
.bs-docs-example-type .table td {
.bs-example-type .table td {
color: #999;
vertical-align: middle;
border-color: ;
}
.bs-docs-example-type .table td,
.bs-docs-example-type .table th {
.bs-example-type .table td,
.bs-example-type .table th {
padding: 15px 0;
border-color: #eee;
}
.bs-docs-example-type .table tr:first-child td,
.bs-docs-example-type .table tr:first-child th {
.bs-example-type .table tr:first-child td,
.bs-example-type .table tr:first-child th {
border-top: 0;
}
.bs-docs-example-type h1,
.bs-docs-example-type h2,
.bs-docs-example-type h3,
.bs-docs-example-type h4,
.bs-docs-example-type h5,
.bs-docs-example-type h6 {
.bs-example-type h1,
.bs-example-type h2,
.bs-example-type h3,
.bs-example-type h4,
.bs-example-type h5,
.bs-example-type h6 {
margin: 0;
}
/* Forms */
.bs-example.form-inline select,
.bs-example.form-inline input[type="text"],
.bs-example.form-inline input[type="password"] {
width: 180px;
}
.bs-example-control-sizing input[type="text"] + input[type="text"] {
margin-top: 10px;
}
/* List groups */
.bs-docs-example > .list-group {
.bs-example > .list-group {
max-width: 400px;
}
@ -355,10 +396,10 @@ section > ul li {
}
/* Example modals */
.bs-docs-example-modal {
.bs-example-modal {
background-color: #f5f5f5;
}
.bs-docs-example-modal .modal {
.bs-example-modal .modal {
position: relative;
top: auto;
right: auto;
@ -367,49 +408,49 @@ section > ul li {
z-index: 1;
display: block;
}
.bs-docs-example-modal .modal-dialog {
.bs-example-modal .modal-dialog {
left: auto;
margin-left: auto;
margin-right: auto;
}
/* Example dropdowns */
.bs-docs-example > .dropdown > .dropdown-menu,
.bs-docs-example-submenu > .pull-left > .dropup > .dropdown-menu,
.bs-docs-example-submenu > .pull-left > .dropdown > .dropdown-menu {
.bs-example > .dropdown > .dropdown-menu,
.bs-example-submenu > .pull-left > .dropup > .dropdown-menu,
.bs-example-submenu > .pull-left > .dropdown > .dropdown-menu {
position: static;
display: block;
margin-bottom: 5px;
}
.bs-docs-example-submenu {
.bs-example-submenu {
min-height: 230px;
}
.bs-docs-example-submenu > .pull-left + .pull-left {
.bs-example-submenu > .pull-left + .pull-left {
margin-left: 20px;
}
/* Example tabbable tabs */
.bs-docs-example-tabs .nav-tabs {
.bs-example-tabs .nav-tabs {
margin-bottom: 15px;
}
/* Tooltips */
.bs-docs-tooltip-examples {
.bs-example-tooltips {
text-align: center;
margin: 0 0 10px;
list-style: none;
}
.bs-docs-tooltip-examples li {
.bs-example-tooltips li {
display: inline;
padding: 0 10px;
}
/* Popovers */
.bs-docs-example-popover {
.bs-example-popover {
padding-bottom: 24px;
background-color: #f9f9f9;
}
.bs-docs-example-popover .popover {
.bs-example-popover .popover {
position: relative;
display: block;
float: left;
@ -418,13 +459,14 @@ section > ul li {
}
/* Example templates
-------------------------------------------------- */
.bs-docs-examples h4 {
.bs-examples h4 {
margin-bottom: 5px;
}
.bs-docs-examples p {
.bs-examples p {
margin-bottom: 20px;
}
@ -510,31 +552,25 @@ section > ul li {
position: relative;
float: left;
width: 25%;
height: 43px;
font-size: 14px;
font-weight: bold;
line-height: 43px;
color: #999;
text-align: center;
border: 1px solid #ddd;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
}
.responsive-utilities-test li + li {
margin-left: 10px;
}
.responsive-utilities-test span {
position: absolute;
top: -1px;
left: -1px;
right: -1px;
bottom: -1px;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
padding: 15px 10px;
font-size: 14px;
font-weight: bold;
line-height: 1.1;
text-align: center;
border-radius: 4px;
}
.responsive-utilities-test span {
.responsive-utilities-test.visible-on [class*="hidden"],
.responsive-utilities-test.hidden-on [class*="visible"] {
color: #999;
border: 1px solid #ddd;
}
.responsive-utilities-test.visible-on [class*="visible"],
.responsive-utilities-test.hidden-on [class*="hidden"] {
color: #468847;
background-color: #dff0d8;
border: 1px solid #d6e9c6;
@ -545,13 +581,14 @@ section > ul li {
/* Footer
-------------------------------------------------- */
.bs-docs-footer {
padding-top: 30px;
.bs-footer {
padding-top: 40px;
padding-bottom: 30px;
margin-top: 100px;
text-align: center;
border-top: 1px solid #e5e5e5;
}
.bs-docs-footer p {
.bs-footer p {
margin-bottom: 0;
color: #777;
}
@ -567,27 +604,25 @@ section > ul li {
}
/* Social proof buttons from GitHub & Twitter */
.bs-docs-social {
margin-top: 80px;
.bs-social {
margin-bottom: 20px;
}
/* Quick links on Home */
.bs-docs-social-buttons {
.bs-social-buttons {
display: inline-block;
margin: 0;
list-style: none;
}
.bs-docs-social-buttons li {
.bs-social-buttons li {
display: inline-block;
line-height: 1;
}
.bs-docs-social-buttons li + li {
.bs-social-buttons li + li {
margin-left: 15px;
}
.bs-docs-social-buttons .twitter-follow-button {
.bs-social-buttons .twitter-follow-button {
width: 225px !important;
}
.bs-docs-social-buttons .twitter-share-button {
.bs-social-buttons .twitter-share-button {
width: 98px !important;
}
@ -622,6 +657,7 @@ input.focused {
}
.highlight pre {
padding: 0;
margin-top: 0;
margin-bottom: 0;
background-color: transparent;
border: 0;
@ -640,14 +676,15 @@ input.focused {
color: #bebec5;
}
/* Better spacing on download options in getting started */
.bs-docs-dl-options h4 {
margin-top: 15px;
margin-bottom: 5px;
}
/* Docs gallery
-------------------------------------------------- */
.bs-docs-gallery .thumbnail {
max-width: 400px;
margin: 0 auto 20px;
/* Hide the top link initially */
.bs-top {
display: none;
}
@ -656,7 +693,7 @@ input.focused {
/* Hide code snippets on mobile devices */
@media screen and (max-width: 480px) {
.bs-docs-example {
.bs-example {
border-radius: 4px;
}
.highlight {
@ -667,8 +704,16 @@ input.focused {
/* Tablets and up */
@media screen and (min-width: 768px) {
/* Reaffix the fixed sidebar */
.bs-sidebar.affix {
position: fixed; /* Undo the static from mobile-first approach */
top: 50px;
width: 160px;
}
/* Back to top link */
.bs-docs-top {
.bs-top {
display: block; /* Unhide */
float: left;
padding: 7px 15px;
font-weight: 500;
@ -676,57 +721,44 @@ input.focused {
background-color: #eee;
border-radius: 4px;
}
.bs-docs-top:hover {
.bs-top:hover {
color: #fff;
text-decoration: none;
background-color: #999;
}
.bs-docs-top.affix {
.bs-top.affix {
position: fixed;
right: 15px;
bottom: 15px;
}
.bs-docs-section-header h1 {
font-size: 80px;
font-size: 8rem;
.bs-header {
font-size: 21px;
text-align: left;
}
.bs-header h1 {
font-size: 60px;
line-height: 1;
}
/* Account for fixed navbar (which is static to start) */
.bs-docs-docs {
padding-left: 260px;
}
/* Undo custom padding */
.bs-docs-container {
padding-left: 0;
padding-right: 0;
}
/* Show the docs nav */
.bs-docs-sidebar {
.bs-sidebar {
display: block;
}
/* Tweak display of docs jumbotrons */
.masthead {
.bs-masthead {
padding-top: 100px;
padding-bottom: 100px;
}
.masthead h1 {
.bs-masthead h1 {
font-size: 100px;
}
.masthead p {
.bs-masthead p {
margin-left: 15%;
margin-right: 15%;
font-size: 30px;
}
.subhead {
padding-top: 60px;
padding-bottom: 60px;
text-align: left;
}
.bs-navbar-top-example .navbar-fixed-top,
.bs-navbar-bottom-example .navbar-fixed-bottom {
@ -738,8 +770,9 @@ input.focused {
/* Tablets/desktops and up */
@media screen and (min-width: 992px) {
.bs-docs-docs {
padding-left: 280px;
/* Widen the fixed sidebar */
.bs-sidebar.affix {
width: 213px;
}
/* Icons */
@ -751,8 +784,10 @@ input.focused {
/* Large desktops and up */
@media screen and (min-width: 1200px) {
.bs-docs-docs {
padding-left: 300px;
/* Widen the fixed sidebar again */
.bs-sidebar.affix {
width: 270px;
}
}

View File

@ -1,106 +0,0 @@
## 2.0 BOOTSTRAP JS PHILOSOPHY
These are the high-level design rules which guide the development of Bootstrap's plugin apis.
---
### DATA-ATTRIBUTE API
We believe you should be able to use all plugins provided by Bootstrap purely through the markup API without writing a single line of javascript.
We acknowledge that this isn't always the most performant and sometimes it may be desirable to turn this functionality off altogether. Therefore, as of 2.0 we provide the ability to disable the data attribute API by unbinding all events on the body namespaced with `'data-api'`. This looks like this:
$('body').off('.data-api')
To target a specific plugin, just include the plugins name as a namespace along with the data-api namespace like this:
$('body').off('.alert.data-api')
---
### PROGRAMMATIC API
We also believe you should be able to use all plugins provided by Bootstrap purely through the JS API.
All public APIs should be single, chainable methods, and return the collection acted upon.
$(".btn.danger").button("toggle").addClass("fat")
All methods should accept an optional options object, a string which targets a particular method, or null which initiates the default behavior:
$("#myModal").modal() // initialized with defaults
$("#myModal").modal({ keyboard: false }) // initialized with now keyboard
$("#myModal").modal('show') // initializes and invokes show immediately afterqwe2
---
### OPTIONS
Options should be sparse and add universal value. We should pick the right defaults.
All plugins should have a default object which can be modified to effect all instance's default options. The defaults object should be available via `$.fn.plugin.defaults`.
$.fn.modal.defaults = { … }
An options definition should take the following form:
*noun*: *adjective* - describes or modifies a quality of an instance
examples:
backdrop: true
keyboard: false
placement: 'top'
---
### EVENTS
All events should have an infinitive and past participle form. The infinitive is fired just before an action takes place, the past participle on completion of the action.
show | shown
hide | hidden
---
### CONSTRUCTORS
Each plugin should expose it's raw constructor on a `Constructor` property -- accessed in the following way:
$.fn.popover.Constructor
---
### DATA ACCESSOR
Each plugin stores a copy of the invoked class on an object. This class instance can be accessed directly through jQuery's data API like this:
$('[rel=popover]').data('popover') instanceof $.fn.popover.Constructor
---
### DATA ATTRIBUTES
Data attributes should take the following form:
- data-{{verb}}={{plugin}} - defines main interaction
- data-target || href^=# - defined on "control" element (if element controls an element other than self)
- data-{{noun}} - defines class instance options
examples:
// control other targets
data-toggle="modal" data-target="#foo"
data-toggle="collapse" data-target="#foo" data-parent="#bar"
// defined on element they control
data-spy="scroll"
data-dismiss="modal"
data-dismiss="alert"
data-toggle="dropdown"
data-toggle="button"
data-toggle="buttons-checkbox"
data-toggle="buttons-radio"

View File

@ -14,28 +14,18 @@
})
// back to top
// setTimeout(function () {
// $('.bs-docs-sidenav').affix({
// offset: {
// top: function () { return $window.width() <= 980 ? 290 : 210 }
// , bottom: 270
// }
// })
// }, 100)
setTimeout(function () {
$('.bs-docs-top').affix()
$('.bs-sidebar').affix({
offset: {
top: function () { return $window.width() <= 980 ? 290 : 210 }
, bottom: 270
}
})
}, 100)
// make code pretty
window.prettyPrint && prettyPrint()
// add-ons
$('.add-on :checkbox').on('click', function () {
var $this = $(this)
, method = $this.attr('checked') ? 'addClass' : 'removeClass'
$(this).parents('.add-on')[method]('active')
})
setTimeout(function () {
$('.bs-top').affix()
}, 100)
// add tipsies to grid for scaffolding
if ($('#grid-system').length) {
@ -79,22 +69,22 @@
$('.bs-docs-carousel-example').carousel()
// javascript build logic
var inputsComponent = $("#components.download input")
, inputsPlugin = $("#plugins.download input")
, inputsVariables = $("#variables.download input")
var inputsComponent = $("#less input")
, inputsPlugin = $("#plugins input")
, inputsVariables = $("#variables input")
// toggle all plugin checkboxes
$('#components.download .toggle-all').on('click', function (e) {
$('#components .toggle').on('click', function (e) {
e.preventDefault()
inputsComponent.attr('checked', !inputsComponent.is(':checked'))
inputsComponent.prop('checked', !inputsComponent.is(':checked'))
})
$('#plugins.download .toggle-all').on('click', function (e) {
$('#plugins .toggle').on('click', function (e) {
e.preventDefault()
inputsPlugin.attr('checked', !inputsPlugin.is(':checked'))
inputsPlugin.prop('checked', !inputsPlugin.is(':checked'))
})
$('#variables.download .toggle-all').on('click', function (e) {
$('#variables .toggle').on('click', function (e) {
e.preventDefault()
inputsVariables.val('')
})
@ -102,16 +92,16 @@
// request built javascript
$('.download-btn .btn').on('click', function () {
var css = $("#components.download input:checked")
var css = $("#components input:checked")
.map(function () { return this.value })
.toArray()
, js = $("#plugins.download input:checked")
, js = $("#plugins input:checked")
.map(function () { return this.value })
.toArray()
, vars = {}
, img = ['glyphicons-halflings.png', 'glyphicons-halflings-white.png']
$("#variables.download input")
$("#variables input")
.each(function () {
$(this).val() && (vars[ $(this).prev().text() ] = $(this).val())
})

View File

@ -1,117 +0,0 @@
/* ==========================================================
* bootstrap-affix.js v3.0.0
* http://twitter.github.com/bootstrap/javascript.html#affix
* ==========================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ========================================================== */
!function ($) {
"use strict"; // jshint ;_;
/* AFFIX CLASS DEFINITION
* ====================== */
var Affix = function (element, options) {
this.options = $.extend({}, $.fn.affix.defaults, options)
this.$window = $(window)
.on('scroll.affix.data-api', $.proxy(this.checkPosition, this))
.on('click.affix.data-api', $.proxy(function () { setTimeout($.proxy(this.checkPosition, this), 1) }, this))
this.$element = $(element)
this.checkPosition()
}
Affix.prototype.checkPosition = function () {
if (!this.$element.is(':visible')) return
var scrollHeight = $(document).height()
, scrollTop = this.$window.scrollTop()
, position = this.$element.offset()
, offset = this.options.offset
, offsetBottom = offset.bottom
, offsetTop = offset.top
, reset = 'affix affix-top affix-bottom'
, affix
if (typeof offset != 'object') offsetBottom = offsetTop = offset
if (typeof offsetTop == 'function') offsetTop = offset.top()
if (typeof offsetBottom == 'function') offsetBottom = offset.bottom()
affix = this.unpin != null && (scrollTop + this.unpin <= position.top) ?
false : offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ?
'bottom' : offsetTop != null && scrollTop <= offsetTop ?
'top' : false
if (this.affixed === affix) return
this.affixed = affix
this.unpin = affix == 'bottom' ? position.top - scrollTop : null
this.$element.removeClass(reset).addClass('affix' + (affix ? '-' + affix : ''))
}
/* AFFIX PLUGIN DEFINITION
* ======================= */
var old = $.fn.affix
$.fn.affix = function (option) {
return this.each(function () {
var $this = $(this)
, data = $this.data('affix')
, options = typeof option == 'object' && option
if (!data) $this.data('affix', (data = new Affix(this, options)))
if (typeof option == 'string') data[option]()
})
}
$.fn.affix.Constructor = Affix
$.fn.affix.defaults = {
offset: 0
}
/* AFFIX NO CONFLICT
* ================= */
$.fn.affix.noConflict = function () {
$.fn.affix = old
return this
}
/* AFFIX DATA-API
* ============== */
$(window).on('load', function () {
$('[data-spy="affix"]').each(function () {
var $spy = $(this)
, data = $spy.data()
data.offset = data.offset || {}
data.offsetBottom && (data.offset.bottom = data.offsetBottom)
data.offsetTop && (data.offset.top = data.offsetTop)
$spy.affix(data)
})
})
}(window.jQuery);

View File

@ -1,207 +0,0 @@
/* ==========================================================
* bootstrap-carousel.js v3.0.0
* http://twitter.github.com/bootstrap/javascript.html#carousel
* ==========================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ========================================================== */
!function ($) {
"use strict"; // jshint ;_;
/* CAROUSEL CLASS DEFINITION
* ========================= */
var Carousel = function (element, options) {
this.$element = $(element)
this.$indicators = this.$element.find('.carousel-indicators')
this.options = options
this.options.pause == 'hover' && this.$element
.on('mouseenter', $.proxy(this.pause, this))
.on('mouseleave', $.proxy(this.cycle, this))
}
Carousel.prototype = {
cycle: function (e) {
if (!e) this.paused = false
if (this.interval) clearInterval(this.interval);
this.options.interval
&& !this.paused
&& (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
return this
}
, getActiveIndex: function () {
this.$active = this.$element.find('.item.active')
this.$items = this.$active.parent().children()
return this.$items.index(this.$active)
}
, to: function (pos) {
var activeIndex = this.getActiveIndex()
, that = this
if (pos > (this.$items.length - 1) || pos < 0) return
if (this.sliding) {
return this.$element.one('slid', function () {
that.to(pos)
})
}
if (activeIndex == pos) {
return this.pause().cycle()
}
return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos]))
}
, pause: function (e) {
if (!e) this.paused = true
if (this.$element.find('.next, .prev').length && $.support.transition.end) {
this.$element.trigger($.support.transition.end)
this.cycle(true)
}
clearInterval(this.interval)
this.interval = null
return this
}
, next: function () {
if (this.sliding) return
return this.slide('next')
}
, prev: function () {
if (this.sliding) return
return this.slide('prev')
}
, slide: function (type, next) {
var $active = this.$element.find('.item.active')
, $next = next || $active[type]()
, isCycling = this.interval
, direction = type == 'next' ? 'left' : 'right'
, fallback = type == 'next' ? 'first' : 'last'
, that = this
, e
this.sliding = true
isCycling && this.pause()
$next = $next.length ? $next : this.$element.find('.item')[fallback]()
e = $.Event('slide', {
relatedTarget: $next[0]
, direction: direction
})
if ($next.hasClass('active')) return
if (this.$indicators.length) {
this.$indicators.find('.active').removeClass('active')
this.$element.one('slid', function () {
var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()])
$nextIndicator && $nextIndicator.addClass('active')
})
}
if ($.support.transition && this.$element.hasClass('slide')) {
this.$element.trigger(e)
if (e.isDefaultPrevented()) return
$next.addClass(type)
$next[0].offsetWidth // force reflow
$active.addClass(direction)
$next.addClass(direction)
this.$element.one($.support.transition.end, function () {
$next.removeClass([type, direction].join(' ')).addClass('active')
$active.removeClass(['active', direction].join(' '))
that.sliding = false
setTimeout(function () { that.$element.trigger('slid') }, 0)
})
} else {
this.$element.trigger(e)
if (e.isDefaultPrevented()) return
$active.removeClass('active')
$next.addClass('active')
this.sliding = false
this.$element.trigger('slid')
}
isCycling && this.cycle()
return this
}
}
/* CAROUSEL PLUGIN DEFINITION
* ========================== */
var old = $.fn.carousel
$.fn.carousel = function (option) {
return this.each(function () {
var $this = $(this)
, data = $this.data('carousel')
, options = $.extend({}, $.fn.carousel.defaults, typeof option == 'object' && option)
, action = typeof option == 'string' ? option : options.slide
if (!data) $this.data('carousel', (data = new Carousel(this, options)))
if (typeof option == 'number') data.to(option)
else if (action) data[action]()
else if (options.interval) data.pause().cycle()
})
}
$.fn.carousel.defaults = {
interval: 5000
, pause: 'hover'
}
$.fn.carousel.Constructor = Carousel
/* CAROUSEL NO CONFLICT
* ==================== */
$.fn.carousel.noConflict = function () {
$.fn.carousel = old
return this
}
/* CAROUSEL DATA-API
* ================= */
$(document).on('click.carousel.data-api', '[data-slide], [data-slide-to]', function (e) {
var $this = $(this), href
, $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
, options = $.extend({}, $target.data(), $this.data())
, slideIndex
$target.carousel(options)
if (slideIndex = $this.attr('data-slide-to')) {
$target.data('carousel').pause().to(slideIndex).cycle()
}
e.preventDefault()
})
}(window.jQuery);

View File

@ -1,167 +0,0 @@
/* =============================================================
* bootstrap-collapse.js v3.0.0
* http://twitter.github.com/bootstrap/javascript.html#collapse
* =============================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ============================================================ */
!function ($) {
"use strict"; // jshint ;_;
/* COLLAPSE PUBLIC CLASS DEFINITION
* ================================ */
var Collapse = function (element, options) {
this.$element = $(element)
this.options = $.extend({}, $.fn.collapse.defaults, options)
if (this.options.parent) {
this.$parent = $(this.options.parent)
}
this.options.toggle && this.toggle()
}
Collapse.prototype = {
constructor: Collapse
, dimension: function () {
var hasWidth = this.$element.hasClass('width')
return hasWidth ? 'width' : 'height'
}
, show: function () {
var dimension
, scroll
, actives
, hasData
if (this.transitioning || this.$element.hasClass('in')) return
dimension = this.dimension()
scroll = $.camelCase(['scroll', dimension].join('-'))
actives = this.$parent && this.$parent.find('> .accordion-group > .in')
if (actives && actives.length) {
hasData = actives.data('collapse')
if (hasData && hasData.transitioning) return
actives.collapse('hide')
hasData || actives.data('collapse', null)
}
this.$element[dimension](0)
this.transition('addClass', $.Event('show'), 'shown')
$.support.transition && this.$element[dimension](this.$element[0][scroll])
}
, hide: function () {
var dimension
if (this.transitioning || !this.$element.hasClass('in')) return
dimension = this.dimension()
this.reset(this.$element[dimension]())
this.transition('removeClass', $.Event('hide'), 'hidden')
this.$element[dimension](0)
}
, reset: function (size) {
var dimension = this.dimension()
this.$element
.removeClass('collapse')
[dimension](size || 'auto')
[0].offsetWidth
this.$element[size !== null ? 'addClass' : 'removeClass']('collapse')
return this
}
, transition: function (method, startEvent, completeEvent) {
var that = this
, complete = function () {
if (startEvent.type == 'show') that.reset()
that.transitioning = 0
that.$element.trigger(completeEvent)
}
this.$element.trigger(startEvent)
if (startEvent.isDefaultPrevented()) return
this.transitioning = 1
this.$element[method]('in')
$.support.transition && this.$element.hasClass('collapse') ?
this.$element.one($.support.transition.end, complete) :
complete()
}
, toggle: function () {
this[this.$element.hasClass('in') ? 'hide' : 'show']()
}
}
/* COLLAPSE PLUGIN DEFINITION
* ========================== */
var old = $.fn.collapse
$.fn.collapse = function (option) {
return this.each(function () {
var $this = $(this)
, data = $this.data('collapse')
, options = $.extend({}, $.fn.collapse.defaults, $this.data(), typeof option == 'object' && option)
if (!data) $this.data('collapse', (data = new Collapse(this, options)))
if (typeof option == 'string') data[option]()
})
}
$.fn.collapse.defaults = {
toggle: true
}
$.fn.collapse.Constructor = Collapse
/* COLLAPSE NO CONFLICT
* ==================== */
$.fn.collapse.noConflict = function () {
$.fn.collapse = old
return this
}
/* COLLAPSE DATA-API
* ================= */
$(document).on('click.collapse.data-api', '[data-toggle=collapse]', function (e) {
var $this = $(this), href
, target = $this.attr('data-target')
|| e.preventDefault()
|| (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
, option = $(target).data('collapse') ? 'toggle' : $this.data()
$this[$(target).hasClass('in') ? 'addClass' : 'removeClass']('collapsed')
$(target).collapse(option)
})
}(window.jQuery);

View File

@ -1,165 +0,0 @@
/* ============================================================
* bootstrap-dropdown.js v3.0.0
* http://twitter.github.com/bootstrap/javascript.html#dropdowns
* ============================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ============================================================ */
!function ($) {
"use strict"; // jshint ;_;
/* DROPDOWN CLASS DEFINITION
* ========================= */
var toggle = '[data-toggle=dropdown]'
, Dropdown = function (element) {
var $el = $(element).on('click.dropdown.data-api', this.toggle)
$('html').on('click.dropdown.data-api', function () {
$el.parent().removeClass('open')
})
}
Dropdown.prototype = {
constructor: Dropdown
, toggle: function (e) {
var $this = $(this)
, $parent
, isActive
if ($this.is('.disabled, :disabled')) return
$parent = getParent($this)
isActive = $parent.hasClass('open')
clearMenus()
if (!isActive) {
$parent.toggleClass('open')
}
$this.focus()
return false
}
, keydown: function (e) {
var $this
, $items
, $active
, $parent
, isActive
, index
if (!/(38|40|27)/.test(e.keyCode)) return
$this = $(this)
e.preventDefault()
e.stopPropagation()
if ($this.is('.disabled, :disabled')) return
$parent = getParent($this)
isActive = $parent.hasClass('open')
if (!isActive || (isActive && e.keyCode == 27)) {
if (e.which == 27) $parent.find(toggle).focus()
return $this.click()
}
$items = $('[role=menu] li:not(.divider):visible a', $parent)
if (!$items.length) return
index = $items.index($items.filter(':focus'))
if (e.keyCode == 38 && index > 0) index-- // up
if (e.keyCode == 40 && index < $items.length - 1) index++ // down
if (!~index) index = 0
$items
.eq(index)
.focus()
}
}
function clearMenus() {
$(toggle).each(function () {
getParent($(this)).removeClass('open')
})
}
function getParent($this) {
var selector = $this.attr('data-target')
, $parent
if (!selector) {
selector = $this.attr('href')
selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
}
$parent = selector && $(selector)
if (!$parent || !$parent.length) $parent = $this.parent()
return $parent
}
/* DROPDOWN PLUGIN DEFINITION
* ========================== */
var old = $.fn.dropdown
$.fn.dropdown = function (option) {
return this.each(function () {
var $this = $(this)
, data = $this.data('dropdown')
if (!data) $this.data('dropdown', (data = new Dropdown(this)))
if (typeof option == 'string') data[option].call($this)
})
}
$.fn.dropdown.Constructor = Dropdown
/* DROPDOWN NO CONFLICT
* ==================== */
$.fn.dropdown.noConflict = function () {
$.fn.dropdown = old
return this
}
/* APPLY TO STANDARD DROPDOWN ELEMENTS
* =================================== */
$(document)
.on('click.dropdown.data-api', clearMenus)
.on('click.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
.on('click.dropdown-menu', function (e) { e.stopPropagation() })
.on('click.dropdown.data-api' , toggle, Dropdown.prototype.toggle)
.on('keydown.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)
}(window.jQuery);

View File

@ -1,251 +0,0 @@
/* =========================================================
* bootstrap-modal.js v3.0.0
* http://twitter.github.com/bootstrap/javascript.html#modals
* =========================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ========================================================= */
!function ($) {
"use strict"; // jshint ;_;
/* MODAL CLASS DEFINITION
* ====================== */
var Modal = function (element, options) {
this.options = options
this.$element = $(element)
.delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this))
this.options.remote && this.$element.find('.modal-body').load(this.options.remote)
}
Modal.prototype = {
constructor: Modal
, toggle: function () {
return this[!this.isShown ? 'show' : 'hide']()
}
, show: function () {
var that = this
, e = $.Event('show')
this.$element.trigger(e)
if (this.isShown || e.isDefaultPrevented()) return
this.isShown = true
this.escape()
this.backdrop(function () {
var transition = $.support.transition && that.$element.hasClass('fade')
if (!that.$element.parent().length) {
that.$element.appendTo(document.body) //don't move modals dom position
}
that.$element.show()
if (transition) {
that.$element[0].offsetWidth // force reflow
}
that.$element
.addClass('in')
.attr('aria-hidden', false)
that.enforceFocus()
transition ?
that.$element.one($.support.transition.end, function () { that.$element.focus().trigger('shown') }) :
that.$element.focus().trigger('shown')
})
}
, hide: function (e) {
e && e.preventDefault()
var that = this
e = $.Event('hide')
this.$element.trigger(e)
if (!this.isShown || e.isDefaultPrevented()) return
this.isShown = false
this.escape()
$(document).off('focusin.modal')
this.$element
.removeClass('in')
.attr('aria-hidden', true)
$.support.transition && this.$element.hasClass('fade') ?
this.hideWithTransition() :
this.hideModal()
}
, enforceFocus: function () {
var that = this
$(document).on('focusin.modal', function (e) {
if (that.$element[0] !== e.target && !that.$element.has(e.target).length) {
that.$element.focus()
}
})
}
, escape: function () {
var that = this
if (this.isShown && this.options.keyboard) {
this.$element.on('keyup.dismiss.modal', function ( e ) {
e.which == 27 && that.hide()
})
} else if (!this.isShown) {
this.$element.off('keyup.dismiss.modal')
}
}
, hideWithTransition: function () {
var that = this
, timeout = setTimeout(function () {
that.$element.off($.support.transition.end)
that.hideModal()
}, 500)
this.$element.one($.support.transition.end, function () {
clearTimeout(timeout)
that.hideModal()
})
}
, hideModal: function () {
var that = this
this.$element.hide()
this.backdrop(function () {
that.removeBackdrop()
that.$element.trigger('hidden')
})
}
, removeBackdrop: function () {
this.$backdrop && this.$backdrop.remove()
this.$backdrop = null
}
, backdrop: function (callback) {
var that = this
, animate = this.$element.hasClass('fade') ? 'fade' : ''
if (this.isShown && this.options.backdrop) {
var doAnimate = $.support.transition && animate
this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
.appendTo(document.body)
this.$backdrop.click(
this.options.backdrop == 'static' ?
$.proxy(this.$element[0].focus, this.$element[0])
: $.proxy(this.hide, this)
)
if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
this.$backdrop.addClass('in')
if (!callback) return
doAnimate ?
this.$backdrop.one($.support.transition.end, callback) :
callback()
} else if (!this.isShown && this.$backdrop) {
this.$backdrop.removeClass('in')
$.support.transition && this.$element.hasClass('fade')?
this.$backdrop.one($.support.transition.end, callback) :
callback()
} else if (callback) {
callback()
}
}
}
/* MODAL PLUGIN DEFINITION
* ======================= */
var old = $.fn.modal
$.fn.modal = function (option) {
return this.each(function () {
var $this = $(this)
, data = $this.data('modal')
, options = $.extend({}, $.fn.modal.defaults, $this.data(), typeof option == 'object' && option)
if (!data) $this.data('modal', (data = new Modal(this, options)))
if (typeof option == 'string') data[option]()
else if (options.show) data.show()
})
}
$.fn.modal.defaults = {
backdrop: true
, keyboard: true
, show: true
}
$.fn.modal.Constructor = Modal
/* MODAL NO CONFLICT
* ================= */
$.fn.modal.noConflict = function () {
$.fn.modal = old
return this
}
/* MODAL DATA-API
* ============== */
$(document).on('click.modal.data-api', '[data-toggle="modal"]', function (e) {
var $this = $(this)
, href = $this.attr('href')
, $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7
, option = $target.data('modal') ? 'toggle' : $.extend({ remote:!/#/.test(href) && href }, $target.data(), $this.data())
e.preventDefault()
$target
.modal(option)
.one('hide', function () {
$this.focus()
})
})
var $body = $(document.body)
.on('shown', '.modal', function () { $body.addClass('modal-open') })
.on('hidden', '.modal', function () { $body.removeClass('modal-open') })
}(window.jQuery);

View File

@ -1,114 +0,0 @@
/* ===========================================================
* bootstrap-popover.js v3.0.0
* http://twitter.github.com/bootstrap/javascript.html#popovers
* ===========================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* =========================================================== */
!function ($) {
"use strict"; // jshint ;_;
/* POPOVER PUBLIC CLASS DEFINITION
* =============================== */
var Popover = function (element, options) {
this.init('popover', element, options)
}
/* NOTE: POPOVER EXTENDS BOOTSTRAP-TOOLTIP.js
========================================== */
Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype, {
constructor: Popover
, setContent: function () {
var $tip = this.tip()
, title = this.getTitle()
, content = this.getContent()
$tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
$tip.find('.popover-content')[this.options.html ? 'html' : 'text'](content)
$tip.removeClass('fade top bottom left right in')
}
, hasContent: function () {
return this.getTitle() || this.getContent()
}
, getContent: function () {
var content
, $e = this.$element
, o = this.options
content = (typeof o.content == 'function' ? o.content.call($e[0]) : o.content)
|| $e.attr('data-content')
return content
}
, tip: function () {
if (!this.$tip) {
this.$tip = $(this.options.template)
}
return this.$tip
}
, destroy: function () {
this.hide().$element.off('.' + this.type).removeData(this.type)
}
})
/* POPOVER PLUGIN DEFINITION
* ======================= */
var old = $.fn.popover
$.fn.popover = function (option) {
return this.each(function () {
var $this = $(this)
, data = $this.data('popover')
, options = typeof option == 'object' && option
if (!data) $this.data('popover', (data = new Popover(this, options)))
if (typeof option == 'string') data[option]()
})
}
$.fn.popover.Constructor = Popover
$.fn.popover.defaults = $.extend({} , $.fn.tooltip.defaults, {
placement: 'right'
, trigger: 'click'
, content: ''
, template: '<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
})
/* POPOVER NO CONFLICT
* =================== */
$.fn.popover.noConflict = function () {
$.fn.popover = old
return this
}
}(window.jQuery);

View File

@ -1,162 +0,0 @@
/* =============================================================
* bootstrap-scrollspy.js v3.0.0
* http://twitter.github.com/bootstrap/javascript.html#scrollspy
* =============================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ============================================================== */
!function ($) {
"use strict"; // jshint ;_;
/* SCROLLSPY CLASS DEFINITION
* ========================== */
function ScrollSpy(element, options) {
var process = $.proxy(this.process, this)
, $element = $(element).is('body') ? $(window) : $(element)
, href
this.options = $.extend({}, $.fn.scrollspy.defaults, options)
this.$scrollElement = $element.on('scroll.scroll-spy.data-api', process)
this.selector = (this.options.target
|| ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
|| '') + ' .nav li > a'
this.$body = $('body')
this.refresh()
this.process()
}
ScrollSpy.prototype = {
constructor: ScrollSpy
, refresh: function () {
var self = this
, $targets
this.offsets = $([])
this.targets = $([])
$targets = this.$body
.find(this.selector)
.map(function () {
var $el = $(this)
, href = $el.data('target') || $el.attr('href')
, $href = /^#\w/.test(href) && $(href)
return ( $href
&& $href.length
&& [[ $href.position().top + (!$.isWindow(self.$scrollElement.get(0)) && self.$scrollElement.scrollTop()), href ]] ) || null
})
.sort(function (a, b) { return a[0] - b[0] })
.each(function () {
self.offsets.push(this[0])
self.targets.push(this[1])
})
}
, process: function () {
var scrollTop = this.$scrollElement.scrollTop() + this.options.offset
, scrollHeight = this.$scrollElement[0].scrollHeight || this.$body[0].scrollHeight
, maxScroll = scrollHeight - this.$scrollElement.height()
, offsets = this.offsets
, targets = this.targets
, activeTarget = this.activeTarget
, i
if (scrollTop >= maxScroll) {
return activeTarget != (i = targets.last()[0])
&& this.activate ( i )
}
for (i = offsets.length; i--;) {
activeTarget != targets[i]
&& scrollTop >= offsets[i]
&& (!offsets[i + 1] || scrollTop <= offsets[i + 1])
&& this.activate( targets[i] )
}
}
, activate: function (target) {
var active
, selector
this.activeTarget = target
$(this.selector)
.parents('.active')
.removeClass('active')
selector = this.selector
+ '[data-target="' + target + '"],'
+ this.selector + '[href="' + target + '"]'
active = $(selector)
.parents('li')
.addClass('active')
if (active.parent('.dropdown-menu').length) {
active = active.closest('li.dropdown').addClass('active')
}
active.trigger('activate')
}
}
/* SCROLLSPY PLUGIN DEFINITION
* =========================== */
var old = $.fn.scrollspy
$.fn.scrollspy = function (option) {
return this.each(function () {
var $this = $(this)
, data = $this.data('scrollspy')
, options = typeof option == 'object' && option
if (!data) $this.data('scrollspy', (data = new ScrollSpy(this, options)))
if (typeof option == 'string') data[option]()
})
}
$.fn.scrollspy.Constructor = ScrollSpy
$.fn.scrollspy.defaults = {
offset: 10
}
/* SCROLLSPY NO CONFLICT
* ===================== */
$.fn.scrollspy.noConflict = function () {
$.fn.scrollspy = old
return this
}
/* SCROLLSPY DATA-API
* ================== */
$(window).on('load', function () {
$('[data-spy="scroll"]').each(function () {
var $spy = $(this)
$spy.scrollspy($spy.data())
})
})
}(window.jQuery);

View File

@ -1,144 +0,0 @@
/* ========================================================
* bootstrap-tab.js v3.0.0
* http://twitter.github.com/bootstrap/javascript.html#tabs
* ========================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ======================================================== */
!function ($) {
"use strict"; // jshint ;_;
/* TAB CLASS DEFINITION
* ==================== */
var Tab = function (element) {
this.element = $(element)
}
Tab.prototype = {
constructor: Tab
, show: function () {
var $this = this.element
, $ul = $this.closest('ul:not(.dropdown-menu)')
, selector = $this.attr('data-target')
, previous
, $target
, e
if (!selector) {
selector = $this.attr('href')
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
}
if ( $this.parent('li').hasClass('active') ) return
previous = $ul.find('.active:last a')[0]
e = $.Event('show', {
relatedTarget: previous
})
$this.trigger(e)
if (e.isDefaultPrevented()) return
$target = $(selector)
this.activate($this.parent('li'), $ul)
this.activate($target, $target.parent(), function () {
$this.trigger({
type: 'shown'
, relatedTarget: previous
})
})
}
, activate: function ( element, container, callback) {
var $active = container.find('> .active')
, transition = callback
&& $.support.transition
&& $active.hasClass('fade')
function next() {
$active
.removeClass('active')
.find('> .dropdown-menu > .active')
.removeClass('active')
element.addClass('active')
if (transition) {
element[0].offsetWidth // reflow for transition
element.addClass('in')
} else {
element.removeClass('fade')
}
if ( element.parent('.dropdown-menu') ) {
element.closest('li.dropdown').addClass('active')
}
callback && callback()
}
transition ?
$active.one($.support.transition.end, next) :
next()
$active.removeClass('in')
}
}
/* TAB PLUGIN DEFINITION
* ===================== */
var old = $.fn.tab
$.fn.tab = function ( option ) {
return this.each(function () {
var $this = $(this)
, data = $this.data('tab')
if (!data) $this.data('tab', (data = new Tab(this)))
if (typeof option == 'string') data[option]()
})
}
$.fn.tab.Constructor = Tab
/* TAB NO CONFLICT
* =============== */
$.fn.tab.noConflict = function () {
$.fn.tab = old
return this
}
/* TAB DATA-API
* ============ */
$(document).on('click.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
e.preventDefault()
$(this).tab('show')
})
}(window.jQuery);

View File

@ -1,361 +0,0 @@
/* ===========================================================
* bootstrap-tooltip.js v3.0.0
* http://twitter.github.com/bootstrap/javascript.html#tooltips
* Inspired by the original jQuery.tipsy by Jason Frame
* ===========================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ========================================================== */
!function ($) {
"use strict"; // jshint ;_;
/* TOOLTIP PUBLIC CLASS DEFINITION
* =============================== */
var Tooltip = function (element, options) {
this.init('tooltip', element, options)
}
Tooltip.prototype = {
constructor: Tooltip
, init: function (type, element, options) {
var eventIn
, eventOut
, triggers
, trigger
, i
this.type = type
this.$element = $(element)
this.options = this.getOptions(options)
this.enabled = true
triggers = this.options.trigger.split(' ')
for (i = triggers.length; i--;) {
trigger = triggers[i]
if (trigger == 'click') {
this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
} else if (trigger != 'manual') {
eventIn = trigger == 'hover' ? 'mouseenter' : 'focus'
eventOut = trigger == 'hover' ? 'mouseleave' : 'blur'
this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
}
}
this.options.selector ?
(this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
this.fixTitle()
}
, getOptions: function (options) {
options = $.extend({}, $.fn[this.type].defaults, this.$element.data(), options)
if (options.delay && typeof options.delay == 'number') {
options.delay = {
show: options.delay
, hide: options.delay
}
}
return options
}
, enter: function (e) {
var defaults = $.fn[this.type].defaults
, options = {}
, self
this._options && $.each(this._options, function (key, value) {
if (defaults[key] != value) options[key] = value
}, this)
self = $(e.currentTarget)[this.type](options).data(this.type)
if (!self.options.delay || !self.options.delay.show) return self.show()
clearTimeout(this.timeout)
self.hoverState = 'in'
this.timeout = setTimeout(function() {
if (self.hoverState == 'in') self.show()
}, self.options.delay.show)
}
, leave: function (e) {
var self = $(e.currentTarget)[this.type](this._options).data(this.type)
if (this.timeout) clearTimeout(this.timeout)
if (!self.options.delay || !self.options.delay.hide) return self.hide()
self.hoverState = 'out'
this.timeout = setTimeout(function() {
if (self.hoverState == 'out') self.hide()
}, self.options.delay.hide)
}
, show: function () {
var $tip
, pos
, actualWidth
, actualHeight
, placement
, tp
, e = $.Event('show')
if (this.hasContent() && this.enabled) {
this.$element.trigger(e)
if (e.isDefaultPrevented()) return
$tip = this.tip()
this.setContent()
if (this.options.animation) {
$tip.addClass('fade')
}
placement = typeof this.options.placement == 'function' ?
this.options.placement.call(this, $tip[0], this.$element[0]) :
this.options.placement
$tip
.detach()
.css({ top: 0, left: 0, display: 'block' })
this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
pos = this.getPosition()
actualWidth = $tip[0].offsetWidth
actualHeight = $tip[0].offsetHeight
switch (placement) {
case 'bottom':
tp = {top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2}
break
case 'top':
tp = {top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2}
break
case 'left':
tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth}
break
case 'right':
tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width}
break
}
this.applyPlacement(tp, placement)
this.$element.trigger('shown')
}
}
, applyPlacement: function(offset, placement){
var $tip = this.tip()
, width = $tip[0].offsetWidth
, height = $tip[0].offsetHeight
, actualWidth
, actualHeight
, delta
, replace
$tip
.offset(offset)
.addClass(placement)
.addClass('in')
actualWidth = $tip[0].offsetWidth
actualHeight = $tip[0].offsetHeight
if (placement == 'top' && actualHeight != height) {
offset.top = offset.top + height - actualHeight
replace = true
}
if (placement == 'bottom' || placement == 'top') {
delta = 0
if (offset.left < 0){
delta = offset.left * -2
offset.left = 0
$tip.offset(offset)
actualWidth = $tip[0].offsetWidth
actualHeight = $tip[0].offsetHeight
}
this.replaceArrow(delta - width + actualWidth, actualWidth, 'left')
} else {
this.replaceArrow(actualHeight - height, actualHeight, 'top')
}
if (replace) $tip.offset(offset)
}
, replaceArrow: function(delta, dimension, position){
this
.arrow()
.css(position, delta ? (50 * (1 - delta / dimension) + "%") : '')
}
, setContent: function () {
var $tip = this.tip()
, title = this.getTitle()
$tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)
$tip.removeClass('fade in top bottom left right')
}
, hide: function () {
var that = this
, $tip = this.tip()
, e = $.Event('hide')
this.$element.trigger(e)
if (e.isDefaultPrevented()) return
$tip.removeClass('in')
function removeWithAnimation() {
var timeout = setTimeout(function () {
$tip.off($.support.transition.end).detach()
}, 500)
$tip.one($.support.transition.end, function () {
clearTimeout(timeout)
$tip.detach()
})
}
$.support.transition && this.$tip.hasClass('fade') ?
removeWithAnimation() :
$tip.detach()
this.$element.trigger('hidden')
return this
}
, fixTitle: function () {
var $e = this.$element
if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') {
$e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
}
}
, hasContent: function () {
return this.getTitle()
}
, getPosition: function () {
var el = this.$element[0]
return $.extend({}, (typeof el.getBoundingClientRect == 'function') ? el.getBoundingClientRect() : {
width: el.offsetWidth
, height: el.offsetHeight
}, this.$element.offset())
}
, getTitle: function () {
var title
, $e = this.$element
, o = this.options
title = $e.attr('data-original-title')
|| (typeof o.title == 'function' ? o.title.call($e[0]) : o.title)
return title
}
, tip: function () {
return this.$tip = this.$tip || $(this.options.template)
}
, arrow: function(){
return this.$arrow = this.$arrow || this.tip().find(".tooltip-arrow")
}
, validate: function () {
if (!this.$element[0].parentNode) {
this.hide()
this.$element = null
this.options = null
}
}
, enable: function () {
this.enabled = true
}
, disable: function () {
this.enabled = false
}
, toggleEnabled: function () {
this.enabled = !this.enabled
}
, toggle: function (e) {
var self = e ? $(e.currentTarget)[this.type](this._options).data(this.type) : this
self.tip().hasClass('in') ? self.hide() : self.show()
}
, destroy: function () {
this.hide().$element.off('.' + this.type).removeData(this.type)
}
}
/* TOOLTIP PLUGIN DEFINITION
* ========================= */
var old = $.fn.tooltip
$.fn.tooltip = function ( option ) {
return this.each(function () {
var $this = $(this)
, data = $this.data('tooltip')
, options = typeof option == 'object' && option
if (!data) $this.data('tooltip', (data = new Tooltip(this, options)))
if (typeof option == 'string') data[option]()
})
}
$.fn.tooltip.Constructor = Tooltip
$.fn.tooltip.defaults = {
animation: true
, placement: 'top'
, selector: false
, template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'
, trigger: 'hover focus'
, title: ''
, delay: 0
, html: false
, container: false
}
/* TOOLTIP NO CONFLICT
* =================== */
$.fn.tooltip.noConflict = function () {
$.fn.tooltip = old
return this
}
}(window.jQuery);

View File

@ -1,60 +0,0 @@
/* ===================================================
* bootstrap-transition.js v3.0.0
* http://twitter.github.com/bootstrap/javascript.html#transitions
* ===================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ========================================================== */
!function ($) {
"use strict"; // jshint ;_;
/* CSS TRANSITION SUPPORT (http://www.modernizr.com/)
* ======================================================= */
$(function () {
$.support.transition = (function () {
var transitionEnd = (function () {
var el = document.createElement('bootstrap')
, transEndEventNames = {
'WebkitTransition' : 'webkitTransitionEnd'
, 'MozTransition' : 'transitionend'
, 'OTransition' : 'oTransitionEnd otransitionend'
, 'transition' : 'transitionend'
}
, name
for (name in transEndEventNames){
if (el.style[name] !== undefined) {
return transEndEventNames[name]
}
}
}())
return transitionEnd && {
end: transitionEnd
}
})()
})
}(window.jQuery);

View File

@ -1,335 +0,0 @@
/* =============================================================
* bootstrap-typeahead.js v3.0.0
* http://twitter.github.com/bootstrap/javascript.html#typeahead
* =============================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ============================================================ */
!function($){
"use strict"; // jshint ;_;
/* TYPEAHEAD PUBLIC CLASS DEFINITION
* ================================= */
var Typeahead = function (element, options) {
this.$element = $(element)
this.options = $.extend({}, $.fn.typeahead.defaults, options)
this.matcher = this.options.matcher || this.matcher
this.sorter = this.options.sorter || this.sorter
this.highlighter = this.options.highlighter || this.highlighter
this.updater = this.options.updater || this.updater
this.source = this.options.source
this.$menu = $(this.options.menu)
this.shown = false
this.listen()
}
Typeahead.prototype = {
constructor: Typeahead
, select: function () {
var val = this.$menu.find('.active').attr('data-value')
this.$element
.val(this.updater(val))
.change()
return this.hide()
}
, updater: function (item) {
return item
}
, show: function () {
var pos = $.extend({}, this.$element.position(), {
height: this.$element[0].offsetHeight
})
this.$menu
.insertAfter(this.$element)
.css({
top: pos.top + pos.height
, left: pos.left
})
.show()
this.shown = true
return this
}
, hide: function () {
this.$menu.hide()
this.shown = false
return this
}
, lookup: function (event) {
var items
this.query = this.$element.val()
if (!this.query || this.query.length < this.options.minLength) {
return this.shown ? this.hide() : this
}
items = $.isFunction(this.source) ? this.source(this.query, $.proxy(this.process, this)) : this.source
return items ? this.process(items) : this
}
, process: function (items) {
var that = this
items = $.grep(items, function (item) {
return that.matcher(item)
})
items = this.sorter(items)
if (!items.length) {
return this.shown ? this.hide() : this
}
return this.render(items.slice(0, this.options.items)).show()
}
, matcher: function (item) {
return ~item.toLowerCase().indexOf(this.query.toLowerCase())
}
, sorter: function (items) {
var beginswith = []
, caseSensitive = []
, caseInsensitive = []
, item
while (item = items.shift()) {
if (!item.toLowerCase().indexOf(this.query.toLowerCase())) beginswith.push(item)
else if (~item.indexOf(this.query)) caseSensitive.push(item)
else caseInsensitive.push(item)
}
return beginswith.concat(caseSensitive, caseInsensitive)
}
, highlighter: function (item) {
var query = this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$&')
return item.replace(new RegExp('(' + query + ')', 'ig'), function ($1, match) {
return '<strong>' + match + '</strong>'
})
}
, render: function (items) {
var that = this
items = $(items).map(function (i, item) {
i = $(that.options.item).attr('data-value', item)
i.find('a').html(that.highlighter(item))
return i[0]
})
items.first().addClass('active')
this.$menu.html(items)
return this
}
, next: function (event) {
var active = this.$menu.find('.active').removeClass('active')
, next = active.next()
if (!next.length) {
next = $(this.$menu.find('li')[0])
}
next.addClass('active')
}
, prev: function (event) {
var active = this.$menu.find('.active').removeClass('active')
, prev = active.prev()
if (!prev.length) {
prev = this.$menu.find('li').last()
}
prev.addClass('active')
}
, listen: function () {
this.$element
.on('focus', $.proxy(this.focus, this))
.on('blur', $.proxy(this.blur, this))
.on('keypress', $.proxy(this.keypress, this))
.on('keyup', $.proxy(this.keyup, this))
if (this.eventSupported('keydown')) {
this.$element.on('keydown', $.proxy(this.keydown, this))
}
this.$menu
.on('click', $.proxy(this.click, this))
.on('mouseenter', 'li', $.proxy(this.mouseenter, this))
.on('mouseleave', 'li', $.proxy(this.mouseleave, this))
}
, eventSupported: function(eventName) {
var isSupported = eventName in this.$element
if (!isSupported) {
this.$element.setAttribute(eventName, 'return;')
isSupported = typeof this.$element[eventName] === 'function'
}
return isSupported
}
, move: function (e) {
if (!this.shown) return
switch(e.keyCode) {
case 9: // tab
case 13: // enter
case 27: // escape
e.preventDefault()
break
case 38: // up arrow
e.preventDefault()
this.prev()
break
case 40: // down arrow
e.preventDefault()
this.next()
break
}
e.stopPropagation()
}
, keydown: function (e) {
this.suppressKeyPressRepeat = ~$.inArray(e.keyCode, [40,38,9,13,27])
this.move(e)
}
, keypress: function (e) {
if (this.suppressKeyPressRepeat) return
this.move(e)
}
, keyup: function (e) {
switch(e.keyCode) {
case 40: // down arrow
case 38: // up arrow
case 16: // shift
case 17: // ctrl
case 18: // alt
break
case 9: // tab
case 13: // enter
if (!this.shown) return
this.select()
break
case 27: // escape
if (!this.shown) return
this.hide()
break
default:
this.lookup()
}
e.stopPropagation()
e.preventDefault()
}
, focus: function (e) {
this.focused = true
}
, blur: function (e) {
this.focused = false
if (!this.mousedover && this.shown) this.hide()
}
, click: function (e) {
e.stopPropagation()
e.preventDefault()
this.select()
this.$element.focus()
}
, mouseenter: function (e) {
this.mousedover = true
this.$menu.find('.active').removeClass('active')
$(e.currentTarget).addClass('active')
}
, mouseleave: function (e) {
this.mousedover = false
if (!this.focused && this.shown) this.hide()
}
}
/* TYPEAHEAD PLUGIN DEFINITION
* =========================== */
var old = $.fn.typeahead
$.fn.typeahead = function (option) {
return this.each(function () {
var $this = $(this)
, data = $this.data('typeahead')
, options = typeof option == 'object' && option
if (!data) $this.data('typeahead', (data = new Typeahead(this, options)))
if (typeof option == 'string') data[option]()
})
}
$.fn.typeahead.defaults = {
source: []
, items: 8
, menu: '<ul class="typeahead dropdown-menu"></ul>'
, item: '<li><a href="#"></a></li>'
, minLength: 1
}
$.fn.typeahead.Constructor = Typeahead
/* TYPEAHEAD NO CONFLICT
* =================== */
$.fn.typeahead.noConflict = function () {
$.fn.typeahead = old
return this
}
/* TYPEAHEAD DATA-API
* ================== */
$(document).on('focus.typeahead.data-api', '[data-provide="typeahead"]', function (e) {
var $this = $(this)
if ($this.data('typeahead')) return
$this.typeahead($this.data())
})
}(window.jQuery);

View File

@ -1,8 +1,8 @@
/* ===================================================
* bootstrap-transition.js v3.0.0
/* ========================================================================
* Bootstrap: transition.js v3.0.0
* http://twitter.github.com/bootstrap/javascript.html#transitions
* ===================================================
* Copyright 2012 Twitter, Inc.
* ========================================================================
* Copyright 2013 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -15,54 +15,41 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ========================================================== */
* ======================================================================== */
!function ($) {
+function ($) { "use strict";
"use strict"; // jshint ;_;
/* CSS TRANSITION SUPPORT (http://www.modernizr.com/)
* ======================================================= */
$(function () {
$.support.transition = (function () {
var transitionEnd = (function () {
// CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
// ============================================================
function transitionEnd() {
var el = document.createElement('bootstrap')
, transEndEventNames = {
var transEndEventNames = {
'WebkitTransition' : 'webkitTransitionEnd'
, 'MozTransition' : 'transitionend'
, 'OTransition' : 'oTransitionEnd otransitionend'
, 'transition' : 'transitionend'
}
, name
for (name in transEndEventNames){
for (var name in transEndEventNames) {
if (el.style[name] !== undefined) {
return transEndEventNames[name]
return { end: transEndEventNames[name] }
}
}
}
}())
return transitionEnd && {
end: transitionEnd
}
})()
$(function () {
$.support.transition = transitionEnd()
})
}(window.jQuery);
/* ==========================================================
* bootstrap-alert.js v3.0.0
/* ========================================================================
* Bootstrap: alert.js v3.0.0
* http://twitter.github.com/bootstrap/javascript.html#alerts
* ==========================================================
* Copyright 2012 Twitter, Inc.
* ========================================================================
* Copyright 2013 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -75,48 +62,44 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ========================================================== */
* ======================================================================== */
!function ($) {
+function ($) { "use strict";
"use strict"; // jshint ;_;
/* ALERT CLASS DEFINITION
* ====================== */
// ALERT CLASS DEFINITION
// ======================
var dismiss = '[data-dismiss="alert"]'
, Alert = function (el) {
var Alert = function (el) {
$(el).on('click', dismiss, this.close)
}
Alert.prototype.close = function (e) {
var $this = $(this)
, selector = $this.attr('data-target')
, $parent
var selector = $this.attr('data-target')
if (!selector) {
selector = $this.attr('href')
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
}
$parent = $(selector)
var $parent = $(selector)
e && e.preventDefault()
if (e) e.preventDefault()
$parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent())
if (!$parent.length) {
$parent = $this.hasClass('alert') ? $this : $this.parent()
}
$parent.trigger(e = $.Event('close'))
$parent.trigger(e = $.Event('close.bs.alert'))
if (e.isDefaultPrevented()) return
$parent.removeClass('in')
function removeElement() {
$parent
.trigger('closed')
.remove()
$parent.trigger('closed.bs.alert').remove()
}
$.support.transition && $parent.hasClass('fade') ?
@ -125,16 +108,17 @@
}
/* ALERT PLUGIN DEFINITION
* ======================= */
// ALERT PLUGIN DEFINITION
// =======================
var old = $.fn.alert
$.fn.alert = function (option) {
return this.each(function () {
var $this = $(this)
, data = $this.data('alert')
if (!data) $this.data('alert', (data = new Alert(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)
})
}
@ -142,8 +126,8 @@
$.fn.alert.Constructor = Alert
/* ALERT NO CONFLICT
* ================= */
// ALERT NO CONFLICT
// =================
$.fn.alert.noConflict = function () {
$.fn.alert = old
@ -151,17 +135,17 @@
}
/* ALERT DATA-API
* ============== */
// ALERT DATA-API
// ==============
$(document).on('click.alert.data-api', dismiss, Alert.prototype.close)
$(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close)
}(window.jQuery);
/* ============================================================
* bootstrap-button.js v3.0.0
/* ========================================================================
* Bootstrap: button.js v3.0.0
* http://twitter.github.com/bootstrap/javascript.html#buttons
* ============================================================
* Copyright 2012 Twitter, Inc.
* ========================================================================
* Copyright 2013 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -174,30 +158,32 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ============================================================ */
* ======================================================================== */
!function ($) {
+function ($) { "use strict";
"use strict"; // jshint ;_;
/* BUTTON PUBLIC CLASS DEFINITION
* ============================== */
// BUTTON PUBLIC CLASS DEFINITION
// ==============================
var Button = function (element, options) {
this.$element = $(element)
this.options = $.extend({}, $.fn.button.defaults, options)
this.options = $.extend({}, Button.DEFAULTS, options)
}
Button.DEFAULTS = {
loadingText: 'loading...'
}
Button.prototype.setState = function (state) {
var d = 'disabled'
, $el = this.$element
, data = $el.data()
, val = $el.is('input') ? 'val' : 'html'
var $el = this.$element
var val = $el.is('input') ? 'val' : 'html'
var data = $el.data()
state = state + 'Text'
data.resetText || $el.data('resetText', $el[val]())
if (!data.resetText) $el.data('resetText', $el[val]())
$el[val](data[state] || this.options[state])
@ -205,46 +191,44 @@
setTimeout(function () {
state == 'loadingText' ?
$el.addClass(d).attr(d, d) :
$el.removeClass(d).removeAttr(d)
$el.removeClass(d).removeAttr(d);
}, 0)
}
Button.prototype.toggle = function () {
var $parent = this.$element.closest('[data-toggle="buttons-radio"]')
$parent && $parent
.find('.active')
.removeClass('active')
if ($parent) {
$parent.find('.active').removeClass('active')
}
this.$element.toggleClass('active')
}
/* BUTTON PLUGIN DEFINITION
* ======================== */
// BUTTON PLUGIN DEFINITION
// ========================
var old = $.fn.button
$.fn.button = function (option) {
return this.each(function () {
var $this = $(this)
, data = $this.data('button')
, options = typeof option == 'object' && option
if (!data) $this.data('button', (data = new Button(this, options)))
var data = $this.data('button')
var options = typeof option == 'object' && option
if (!data) $this.data('bs.button', (data = new Button(this, options)))
if (option == 'toggle') data.toggle()
else if (option) data.setState(option)
})
}
$.fn.button.defaults = {
loadingText: 'loading...'
}
$.fn.button.Constructor = Button
/* BUTTON NO CONFLICT
* ================== */
// BUTTON NO CONFLICT
// ==================
$.fn.button.noConflict = function () {
$.fn.button = old
@ -252,20 +236,20 @@
}
/* BUTTON DATA-API
* =============== */
// BUTTON DATA-API
// ===============
$(document).on('click.button.data-api', '[data-toggle^=button]', function (e) {
$(document).on('click.bs.button.data-api', '[data-toggle^=button]', function (e) {
var $btn = $(e.target)
if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
$btn.button('toggle')
})
}(window.jQuery);
/* ==========================================================
* bootstrap-carousel.js v3.0.0
/* ========================================================================
* Bootstrap: carousel.js v3.0.0
* http://twitter.github.com/bootstrap/javascript.html#carousel
* ==========================================================
* ========================================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -279,91 +263,95 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ========================================================== */
* ======================================================================== */
!function ($) {
+function ($) { "use strict";
"use strict"; // jshint ;_;
/* CAROUSEL CLASS DEFINITION
* ========================= */
// CAROUSEL CLASS DEFINITION
// =========================
var Carousel = function (element, options) {
this.$element = $(element)
this.$indicators = this.$element.find('.carousel-indicators')
this.options = options
this.paused =
this.sliding =
this.interval =
this.$active =
this.$items = null
this.options.pause == 'hover' && this.$element
.on('mouseenter', $.proxy(this.pause, this))
.on('mouseleave', $.proxy(this.cycle, this))
}
Carousel.prototype = {
Carousel.DEFAULTS = {
interval: 5000
, pause: 'hover'
}
Carousel.prototype.cycle = function (e) {
e || (this.paused = false)
this.interval && clearInterval(this.interval)
cycle: function (e) {
if (!e) this.paused = false
if (this.interval) clearInterval(this.interval);
this.options.interval
&& !this.paused
&& (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
return this
}
, getActiveIndex: function () {
Carousel.prototype.getActiveIndex = function () {
this.$active = this.$element.find('.item.active')
this.$items = this.$active.parent().children()
return this.$items.index(this.$active)
}
, to: function (pos) {
Carousel.prototype.to = function (pos) {
var that = this
var activeIndex = this.getActiveIndex()
, that = this
if (pos > (this.$items.length - 1) || pos < 0) return
if (this.sliding) {
return this.$element.one('slid', function () {
that.to(pos)
})
}
if (activeIndex == pos) {
return this.pause().cycle()
}
if (this.sliding) return this.$element.one('slid', function () { that.to(pos) })
if (activeIndex == pos) return this.pause().cycle()
return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos]))
}
, pause: function (e) {
if (!e) this.paused = true
Carousel.prototype.pause = function (e) {
e || (this.paused = true)
if (this.$element.find('.next, .prev').length && $.support.transition.end) {
this.$element.trigger($.support.transition.end)
this.cycle(true)
}
clearInterval(this.interval)
this.interval = null
this.interval = clearInterval(this.interval)
return this
}
, next: function () {
Carousel.prototype.next = function () {
if (this.sliding) return
return this.slide('next')
}
, prev: function () {
Carousel.prototype.prev = function () {
if (this.sliding) return
return this.slide('prev')
}
, slide: function (type, next) {
Carousel.prototype.slide = function (type, next) {
var $active = this.$element.find('.item.active')
, $next = next || $active[type]()
, isCycling = this.interval
, direction = type == 'next' ? 'left' : 'right'
, fallback = type == 'next' ? 'first' : 'last'
, that = this
, e
var $next = next || $active[type]()
var isCycling = this.interval
var direction = type == 'next' ? 'left' : 'right'
var fallback = type == 'next' ? 'first' : 'last'
var that = this
this.sliding = true
@ -371,10 +359,7 @@
$next = $next.length ? $next : this.$element.find('.item')[fallback]()
e = $.Event('slide', {
relatedTarget: $next[0]
, direction: direction
})
var e = $.Event('slide.bs.carousel', { relatedTarget: $next[0], direction: direction })
if ($next.hasClass('active')) return
@ -413,66 +398,61 @@
return this
}
}
/* CAROUSEL PLUGIN DEFINITION
* ========================== */
// CAROUSEL PLUGIN DEFINITION
// ==========================
var old = $.fn.carousel
$.fn.carousel = function (option) {
return this.each(function () {
var $this = $(this)
, data = $this.data('carousel')
, options = $.extend({}, $.fn.carousel.defaults, typeof option == 'object' && option)
, action = typeof option == 'string' ? option : options.slide
if (!data) $this.data('carousel', (data = new Carousel(this, options)))
var data = $this.data('bs.carousel')
var options = $.extend({}, Carousel.DEFAULTS, typeof option == 'object' && option)
var action = typeof option == 'string' ? option : options.slide
if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))
if (typeof option == 'number') data.to(option)
else if (action) data[action]()
else if (options.interval) data.pause().cycle()
})
}
$.fn.carousel.defaults = {
interval: 5000
, pause: 'hover'
}
$.fn.carousel.Constructor = Carousel
/* CAROUSEL NO CONFLICT
* ==================== */
// CAROUSEL NO CONFLICT
// ====================
$.fn.carousel.noConflict = function () {
$.fn.carousel = old
return this
}
/* CAROUSEL DATA-API
* ================= */
$(document).on('click.carousel.data-api', '[data-slide], [data-slide-to]', function (e) {
// CAROUSEL DATA-API
// =================
$(document).on('click.bs.carousel.data-api', '[data-slide], [data-slide-to]', function (e) {
var $this = $(this), href
, $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
, options = $.extend({}, $target.data(), $this.data())
, slideIndex
var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
var options = $.extend({}, $target.data(), $this.data())
var slideIndex
$target.carousel(options)
if (slideIndex = $this.attr('data-slide-to')) {
$target.data('carousel').pause().to(slideIndex).cycle()
$target.data('bs-carousel').pause().to(slideIndex).cycle()
}
e.preventDefault()
})
}(window.jQuery);
/* =============================================================
* bootstrap-collapse.js v3.0.0
/* ========================================================================
* Bootstrap: collapse.js v3.0.0
* http://twitter.github.com/bootstrap/javascript.html#collapse
* =============================================================
* ========================================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -486,71 +466,61 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ============================================================ */
* ======================================================================== */
!function ($) {
+function ($) { "use strict";
"use strict"; // jshint ;_;
/* COLLAPSE PUBLIC CLASS DEFINITION
* ================================ */
// COLLAPSE PUBLIC CLASS DEFINITION
// ================================
var Collapse = function (element, options) {
this.$element = $(element)
this.options = $.extend({}, $.fn.collapse.defaults, options)
this.options = $.extend({}, Collapse.DEFAULTS, options)
this.transitioning = null
if (this.options.parent) {
this.$parent = $(this.options.parent)
if (this.options.parent) this.$parent = $(this.options.parent)
if (this.options.toggle) this.toggle()
}
this.options.toggle && this.toggle()
Collapse.DEFAULTS = {
toggle: true
}
Collapse.prototype = {
constructor: Collapse
, dimension: function () {
Collapse.prototype.dimension = function () {
var hasWidth = this.$element.hasClass('width')
return hasWidth ? 'width' : 'height'
}
, show: function () {
var dimension
, scroll
, actives
, hasData
Collapse.prototype.show = function () {
if (this.transitioning || this.$element.hasClass('in')) return
dimension = this.dimension()
scroll = $.camelCase(['scroll', dimension].join('-'))
actives = this.$parent && this.$parent.find('> .accordion-group > .in')
var dimension = this.dimension()
var scroll = $.camelCase(['scroll', dimension].join('-'))
var actives = this.$parent && this.$parent.find('> .accordion-group > .in')
if (actives && actives.length) {
hasData = actives.data('collapse')
var hasData = actives.data('collapse')
if (hasData && hasData.transitioning) return
actives.collapse('hide')
hasData || actives.data('collapse', null)
}
this.$element[dimension](0)
this.transition('addClass', $.Event('show'), 'shown')
$.support.transition && this.$element[dimension](this.$element[0][scroll])
this.transition('addClass', $.Event('show.bs.collapse'), 'shown.bs.collapse')
if ($.support.transition) this.$element[dimension](this.$element[0][scroll])
}
, hide: function () {
var dimension
Collapse.prototype.hide = function () {
if (this.transitioning || !this.$element.hasClass('in')) return
dimension = this.dimension()
var dimension = this.dimension()
this.reset(this.$element[dimension]())
this.transition('removeClass', $.Event('hide'), 'hidden')
this.transition('removeClass', $.Event('hide.bs.collapse'), 'hidden')
this.$element[dimension](0)
}
, reset: function (size) {
Collapse.prototype.reset = function (size) {
var dimension = this.dimension()
this.$element
@ -563,9 +533,9 @@
return this
}
, transition: function (method, startEvent, completeEvent) {
Collapse.prototype.transition = function (method, startEvent, completeEvent) {
var that = this
, complete = function () {
var complete = function () {
if (startEvent.type == 'show') that.reset()
that.transitioning = 0
that.$element.trigger(completeEvent)
@ -584,37 +554,32 @@
complete()
}
, toggle: function () {
Collapse.prototype.toggle = function () {
this[this.$element.hasClass('in') ? 'hide' : 'show']()
}
}
/* COLLAPSE PLUGIN DEFINITION
* ========================== */
// COLLAPSE PLUGIN DEFINITION
// ==========================
var old = $.fn.collapse
$.fn.collapse = function (option) {
return this.each(function () {
var $this = $(this)
, data = $this.data('collapse')
, options = $.extend({}, $.fn.collapse.defaults, $this.data(), typeof option == 'object' && option)
var data = $this.data('collapse')
var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)
if (!data) $this.data('collapse', (data = new Collapse(this, options)))
if (typeof option == 'string') data[option]()
})
}
$.fn.collapse.defaults = {
toggle: true
}
$.fn.collapse.Constructor = Collapse
/* COLLAPSE NO CONFLICT
* ==================== */
// COLLAPSE NO CONFLICT
// ====================
$.fn.collapse.noConflict = function () {
$.fn.collapse = old
@ -622,24 +587,25 @@
}
/* COLLAPSE DATA-API
* ================= */
// COLLAPSE DATA-API
// =================
$(document).on('click.collapse.data-api', '[data-toggle=collapse]', function (e) {
$(document).on('click.bs.collapse.data-api', '[data-toggle=collapse]', function (e) {
var $this = $(this), href
, target = $this.attr('data-target')
var target = $this.attr('data-target')
|| e.preventDefault()
|| (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
, option = $(target).data('collapse') ? 'toggle' : $this.data()
var option = $(target).data('collapse') ? 'toggle' : $this.data()
$this[$(target).hasClass('in') ? 'addClass' : 'removeClass']('collapsed')
$(target).collapse(option)
})
}(window.jQuery);
/* ============================================================
* bootstrap-dropdown.js v3.0.0
/* ========================================================================
* Bootstrap: dropdown.js v3.0.0
* http://twitter.github.com/bootstrap/javascript.html#dropdowns
* ============================================================
* ========================================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -653,44 +619,43 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ============================================================ */
* ======================================================================== */
!function ($) {
+function ($) { "use strict";
"use strict"; // jshint ;_;
/* DROPDOWN CLASS DEFINITION
* ========================= */
// DROPDOWN CLASS DEFINITION
// =========================
var backdrop = '.dropdown-backdrop'
var toggle = '[data-toggle=dropdown]'
, Dropdown = function (element) {
var $el = $(element).on('click.dropdown.data-api', this.toggle)
$('html').on('click.dropdown.data-api', function () {
$el.parent().removeClass('open')
})
var Dropdown = function (element) {
var $el = $(element).on('click.bs.dropdown', this.toggle)
}
Dropdown.prototype = {
constructor: Dropdown
, toggle: function (e) {
Dropdown.prototype.toggle = function (e) {
var $this = $(this)
, $parent
, isActive
if ($this.is('.disabled, :disabled')) return
$parent = getParent($this)
isActive = $parent.hasClass('open')
var $parent = getParent($this)
var isActive = $parent.hasClass('open')
clearMenus()
if (!isActive) {
$parent.toggleClass('open')
if ('ontouchstart' in document.documentElement) {
// if mobile we we use a backdrop because click events don't delegate
$('<div class="dropdown-backdrop"/>').insertBefore($(this)).on('click', clearMenus)
}
$parent.trigger(e = $.Event('show.bs.dropdown'))
if (e.isDefaultPrevented()) return
$parent
.toggleClass('open')
.trigger('shown.bs.dropdown')
}
$this.focus()
@ -698,81 +663,72 @@
return false
}
, keydown: function (e) {
var $this
, $items
, $active
, $parent
, isActive
, index
Dropdown.prototype.keydown = function (e) {
if (!/(38|40|27)/.test(e.keyCode)) return
$this = $(this)
var $this = $(this)
e.preventDefault()
e.stopPropagation()
if ($this.is('.disabled, :disabled')) return
$parent = getParent($this)
isActive = $parent.hasClass('open')
var $parent = getParent($this)
var isActive = $parent.hasClass('open')
if (!isActive || (isActive && e.keyCode == 27)) {
if (e.which == 27) $parent.find(toggle).focus()
return $this.click()
}
$items = $('[role=menu] li:not(.divider):visible a', $parent)
var $items = $('[role=menu] li:not(.divider):visible a', $parent)
if (!$items.length) return
index = $items.index($items.filter(':focus'))
var index = $items.index($items.filter(':focus'))
if (e.keyCode == 38 && index > 0) index-- // up
if (e.keyCode == 40 && index < $items.length - 1) index++ // down
if (!~index) index=0
$items
.eq(index)
.focus()
}
$items.eq(index).focus()
}
function clearMenus() {
$(toggle).each(function () {
getParent($(this)).removeClass('open')
$(backdrop).remove()
$(toggle).each(function (e) {
var $parent = getParent($(this))
if (!$parent.hasClass('open')) return
$parent.trigger(e = $.Event('hide.bs.dropdown'))
if (e.isDefaultPrevented()) return
$parent.removeClass('open').trigger('hidden.bs.dropdown')
})
}
function getParent($this) {
var selector = $this.attr('data-target')
, $parent
if (!selector) {
selector = $this.attr('href')
selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
}
$parent = selector && $(selector)
var $parent = selector && $(selector)
if (!$parent || !$parent.length) $parent = $this.parent()
return $parent
return $parent && $parent.length ? $parent : $this.parent()
}
/* DROPDOWN PLUGIN DEFINITION
* ========================== */
// DROPDOWN PLUGIN DEFINITION
// ==========================
var old = $.fn.dropdown
$.fn.dropdown = function (option) {
return this.each(function () {
var $this = $(this)
, data = $this.data('dropdown')
var data = $this.data('dropdown')
if (!data) $this.data('dropdown', (data = new Dropdown(this)))
if (typeof option == 'string') data[option].call($this)
})
@ -781,8 +737,8 @@
$.fn.dropdown.Constructor = Dropdown
/* DROPDOWN NO CONFLICT
* ==================== */
// DROPDOWN NO CONFLICT
// ====================
$.fn.dropdown.noConflict = function () {
$.fn.dropdown = old
@ -790,21 +746,21 @@
}
/* APPLY TO STANDARD DROPDOWN ELEMENTS
* =================================== */
// APPLY TO STANDARD DROPDOWN ELEMENTS
// ===================================
$(document)
.on('click.dropdown.data-api', clearMenus)
.on('click.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
.on('click.dropdown-menu', function (e) { e.stopPropagation() })
.on('click.dropdown.data-api' , toggle, Dropdown.prototype.toggle)
.on('keydown.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)
.on('click.bs.dropdown.data-api', clearMenus)
.on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
.on('click.bs.dropdown.data-api' , toggle, Dropdown.prototype.toggle)
.on('keydown.bs.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)
}(window.jQuery);
/* =========================================================
* bootstrap-modal.js v3.0.0
/* ========================================================================
* Bootstrap: modal.js v3.0.0
* http://twitter.github.com/bootstrap/javascript.html#modals
* =========================================================
* ========================================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -818,35 +774,36 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ========================================================= */
* ======================================================================== */
!function ($) {
+function ($) { "use strict";
"use strict"; // jshint ;_;
/* MODAL CLASS DEFINITION
* ====================== */
// MODAL CLASS DEFINITION
// ======================
var Modal = function (element, options) {
this.options = options
this.$element = $(element)
.delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this))
this.options.remote && this.$element.find('.modal-body').load(this.options.remote)
this.$element = $(element).delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this))
this.$backdrop =
this.isShown = null
if (this.options.remote) this.$element.find('.modal-body').load(this.options.remote)
}
Modal.prototype = {
Modal.DEFAULTS = {
backdrop: true
, keyboard: true
, show: true
}
constructor: Modal
, toggle: function () {
Modal.prototype.toggle = function () {
return this[!this.isShown ? 'show' : 'hide']()
}
, show: function () {
Modal.prototype.show = function () {
var that = this
, e = $.Event('show')
var e = $.Event('show.bs.modal')
this.$element.trigger(e)
@ -876,18 +833,15 @@
that.enforceFocus()
transition ?
that.$element.one($.support.transition.end, function () { that.$element.focus().trigger('shown') }) :
that.$element.focus().trigger('shown')
that.$element.one($.support.transition.end, function () { that.$element.focus().trigger('shown.bs.modal') }) :
that.$element.focus().trigger('shown.bs.modal')
})
}
, hide: function (e) {
e && e.preventDefault()
Modal.prototype.hide = function (e) {
if (e) e.preventDefault()
var that = this
e = $.Event('hide')
e = $.Event('hide.bs.modal')
this.$element.trigger(e)
@ -897,7 +851,7 @@
this.escape()
$(document).off('focusin.modal')
$(document).off('focusin.bs.modal')
this.$element
.removeClass('in')
@ -908,29 +862,29 @@
this.hideModal()
}
, enforceFocus: function () {
var that = this
$(document).on('focusin.modal', function (e) {
if (that.$element[0] !== e.target && !that.$element.has(e.target).length) {
that.$element.focus()
Modal.prototype.enforceFocus = function () {
$(document)
.off('focusin.bs.modal') // guard against infinite focus loop
.on('focusin.bs.modal', function (e) {
if (this.$element[0] !== e.target && !this.$element.has(e.target).length) {
this.$element.focus()
}
})
}, this)
}
, escape: function () {
var that = this
Modal.prototype.escape = function () {
if (this.isShown && this.options.keyboard) {
this.$element.on('keyup.dismiss.modal', function ( e ) {
e.which == 27 && that.hide()
})
this.$element.on('keyup.dismiss.bs.modal', function ( e ) {
e.which == 27 && this.hide()
}, this)
} else if (!this.isShown) {
this.$element.off('keyup.dismiss.modal')
this.$element.off('keyup.dismiss.bs.modal')
}
}
, hideWithTransition: function () {
Modal.prototype.hideWithTransition = function () {
var that = this
, timeout = setTimeout(function () {
var timeout = setTimeout(function () {
that.$element.off($.support.transition.end)
that.hideModal()
}, 500)
@ -941,23 +895,23 @@
})
}
, hideModal: function () {
Modal.prototype.hideModal = function () {
var that = this
this.$element.hide()
this.backdrop(function () {
that.removeBackdrop()
that.$element.trigger('hidden')
that.$element.trigger('hidden.bs.modal')
})
}
, removeBackdrop: function () {
Modal.prototype.removeBackdrop = function () {
this.$backdrop && this.$backdrop.remove()
this.$backdrop = null
}
, backdrop: function (callback) {
Modal.prototype.backdrop = function (callback) {
var that = this
, animate = this.$element.hasClass('fade') ? 'fade' : ''
var animate = this.$element.hasClass('fade') ? 'fade' : ''
if (this.isShown && this.options.backdrop) {
var doAnimate = $.support.transition && animate
@ -992,36 +946,30 @@
callback()
}
}
}
/* MODAL PLUGIN DEFINITION
* ======================= */
// MODAL PLUGIN DEFINITION
// =======================
var old = $.fn.modal
$.fn.modal = function (option) {
return this.each(function () {
var $this = $(this)
, data = $this.data('modal')
, options = $.extend({}, $.fn.modal.defaults, $this.data(), typeof option == 'object' && option)
if (!data) $this.data('modal', (data = new Modal(this, options)))
var data = $this.data('bs.modal')
var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)
if (!data) $this.data('bs.modal', (data = new Modal(this, options)))
if (typeof option == 'string') data[option]()
else if (options.show) data.show()
})
}
$.fn.modal.defaults = {
backdrop: true
, keyboard: true
, show: true
}
$.fn.modal.Constructor = Modal
/* MODAL NO CONFLICT
* ================= */
// MODAL NO CONFLICT
// =================
$.fn.modal.noConflict = function () {
$.fn.modal = old
@ -1029,14 +977,14 @@
}
/* MODAL DATA-API
* ============== */
// MODAL DATA-API
// ==============
$(document).on('click.modal.data-api', '[data-toggle="modal"]', function (e) {
$(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) {
var $this = $(this)
, href = $this.attr('href')
, $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7
, option = $target.data('modal') ? 'toggle' : $.extend({ remote:!/#/.test(href) && href }, $target.data(), $this.data())
var href = $this.attr('href')
var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7
var option = $target.data('modal') ? 'toggle' : $.extend({ remote:!/#/.test(href) && href }, $target.data(), $this.data())
e.preventDefault()
@ -1048,15 +996,15 @@
})
var $body = $(document.body)
.on('shown', '.modal', function () { $body.addClass('modal-open') })
.on('hidden', '.modal', function () { $body.removeClass('modal-open') })
.on('bs.modal.shown', '.modal', function () { $body.addClass('modal-open') })
.on('bs.modal.hidden', '.modal', function () { $body.removeClass('modal-open') })
}(window.jQuery);
/* ===========================================================
* bootstrap-tooltip.js v3.0.0
* http://twitter.github.com/bootstrap/javascript.html#tooltips
/* ========================================================================
* Bootstrap: tooltip.js v3.0.0
* http://twitter.github.com/bootstrap/javascript.html#affix
* Inspired by the original jQuery.tipsy by Jason Frame
* ===========================================================
* ========================================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -1070,46 +1018,54 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ========================================================== */
* ======================================================================== */
!function ($) {
+function ($) { "use strict";
"use strict"; // jshint ;_;
/* TOOLTIP PUBLIC CLASS DEFINITION
* =============================== */
// TOOLTIP PUBLIC CLASS DEFINITION
// ===============================
var Tooltip = function (element, options) {
this.type =
this.options =
this.enabled =
this.timeout =
this.hoverState =
this.$element = null
this.init('tooltip', element, options)
}
Tooltip.prototype = {
constructor: Tooltip
, init: function (type, element, options) {
var eventIn
, eventOut
, triggers
, trigger
, i
Tooltip.DEFAULTS = {
animation: true
, placement: 'top'
, selector: false
, template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'
, trigger: 'hover focus'
, title: ''
, delay: 0
, html: false
, container: false
}
Tooltip.prototype.init = function (type, element, options) {
this.enabled = true
this.type = type
this.$element = $(element)
this.options = this.getOptions(options)
this.enabled = true
triggers = this.options.trigger.split(' ')
var triggers = this.options.trigger.split(' ')
for (var i = triggers.length; i--;) {
var trigger = triggers[i]
for (i = triggers.length; i--;) {
trigger = triggers[i]
if (trigger == 'click') {
this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
} else if (trigger != 'manual') {
eventIn = trigger == 'hover' ? 'mouseenter' : 'focus'
eventOut = trigger == 'hover' ? 'mouseleave' : 'blur'
var eventIn = trigger == 'hover' ? 'mouseenter' : 'focus'
var eventOut = trigger == 'hover' ? 'mouseleave' : 'blur'
this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
}
@ -1120,8 +1076,12 @@
this.fixTitle()
}
, getOptions: function (options) {
options = $.extend({}, $.fn[this.type].defaults, this.$element.data(), options)
Tooltip.prototype.getDefaults = function () {
return Tooltip.DEFAULTS
}
Tooltip.prototype.getOptions = function (options) {
options = $.extend({}, this.getDefaults(), this.$element.data(), options)
if (options.delay && typeof options.delay == 'number') {
options.delay = {
@ -1133,28 +1093,28 @@
return options
}
, enter: function (e) {
var defaults = $.fn[this.type].defaults
, options = {}
, self
Tooltip.prototype.enter = function (e) {
var defaults = this.getDefaults()
var options = {}
this._options && $.each(this._options, function (key, value) {
if (defaults[key] != value) options[key] = value
}, this)
})
self = $(e.currentTarget)[this.type](options).data(this.type)
var self = $(e.currentTarget)[this.type](options).data('bs.' + this.type)
if (!self.options.delay || !self.options.delay.show) return self.show()
clearTimeout(this.timeout)
self.hoverState = 'in'
this.timeout = setTimeout(function() {
if (self.hoverState == 'in') self.show()
}, self.options.delay.show)
}
, leave: function (e) {
var self = $(e.currentTarget)[this.type](this._options).data(this.type)
Tooltip.prototype.leave = function (e) {
var self = $(e.currentTarget)[this.type](this._options).data('bs.' + this.type)
if (this.timeout) clearTimeout(this.timeout)
if (!self.options.delay || !self.options.delay.hide) return self.hide()
@ -1165,26 +1125,21 @@
}, self.options.delay.hide)
}
, show: function () {
var $tip
, pos
, actualWidth
, actualHeight
, placement
, tp
, e = $.Event('show')
Tooltip.prototype.show = function () {
var e = $.Event('show.bs.'+ this.type)
if (this.hasContent() && this.enabled) {
this.$element.trigger(e)
if (e.isDefaultPrevented()) return
$tip = this.tip()
var $tip = this.tip()
this.setContent()
if (this.options.animation) {
$tip.addClass('fade')
}
if (this.options.animation) $tip.addClass('fade')
placement = typeof this.options.placement == 'function' ?
var placement = typeof this.options.placement == 'function' ?
this.options.placement.call(this, $tip[0], this.$element[0]) :
this.options.placement
@ -1194,10 +1149,10 @@
this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
pos = this.getPosition()
actualWidth = $tip[0].offsetWidth
actualHeight = $tip[0].offsetHeight
var tp
var pos = this.getPosition()
var actualWidth = $tip[0].offsetWidth
var actualHeight = $tip[0].offsetHeight
switch (placement) {
case 'bottom':
@ -1215,39 +1170,38 @@
}
this.applyPlacement(tp, placement)
this.$element.trigger('shown')
this.$element.trigger('shown.bs.' + this.type)
}
}
, applyPlacement: function(offset, placement){
Tooltip.prototype.applyPlacement = function(offset, placement) {
var replace
var $tip = this.tip()
, width = $tip[0].offsetWidth
, height = $tip[0].offsetHeight
, actualWidth
, actualHeight
, delta
, replace
var width = $tip[0].offsetWidth
var height = $tip[0].offsetHeight
$tip
.offset(offset)
.addClass(placement)
.addClass('in')
actualWidth = $tip[0].offsetWidth
actualHeight = $tip[0].offsetHeight
var actualWidth = $tip[0].offsetWidth
var actualHeight = $tip[0].offsetHeight
if (placement == 'top' && actualHeight != height) {
offset.top = offset.top + height - actualHeight
replace = true
offset.top = offset.top + height - actualHeight
}
if (placement == 'bottom' || placement == 'top') {
delta = 0
var delta = 0
if (offset.left < 0){
delta = offset.left * -2
offset.left = 0
$tip.offset(offset)
actualWidth = $tip[0].offsetWidth
actualHeight = $tip[0].offsetHeight
}
@ -1260,26 +1214,25 @@
if (replace) $tip.offset(offset)
}
, replaceArrow: function(delta, dimension, position){
this
.arrow()
.css(position, delta ? (50 * (1 - delta / dimension) + "%") : '')
Tooltip.prototype.replaceArrow = function(delta, dimension, position) {
this.arrow().css(position, delta ? (50 * (1 - delta / dimension) + "%") : '')
}
, setContent: function () {
Tooltip.prototype.setContent = function () {
var $tip = this.tip()
, title = this.getTitle()
var title = this.getTitle()
$tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)
$tip.removeClass('fade in top bottom left right')
}
, hide: function () {
Tooltip.prototype.hide = function () {
var that = this
, $tip = this.tip()
, e = $.Event('hide')
var $tip = this.tip()
var e = $.Event('hide.bs.' + this.type)
this.$element.trigger(e)
if (e.isDefaultPrevented()) return
$tip.removeClass('in')
@ -1299,23 +1252,23 @@
removeWithAnimation() :
$tip.detach()
this.$element.trigger('hidden')
this.$element.trigger('hidden.bs.' + this.type)
return this
}
, fixTitle: function () {
Tooltip.prototype.fixTitle = function () {
var $e = this.$element
if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') {
$e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
}
}
, hasContent: function () {
Tooltip.prototype.hasContent = function () {
return this.getTitle()
}
, getPosition: function () {
Tooltip.prototype.getPosition = function () {
var el = this.$element[0]
return $.extend({}, (typeof el.getBoundingClientRect == 'function') ? el.getBoundingClientRect() : {
width: el.offsetWidth
@ -1323,10 +1276,10 @@
}, this.$element.offset())
}
, getTitle: function () {
Tooltip.prototype.getTitle = function () {
var title
, $e = this.$element
, o = this.options
var $e = this.$element
var o = this.options
title = $e.attr('data-original-title')
|| (typeof o.title == 'function' ? o.title.call($e[0]) : o.title)
@ -1334,15 +1287,15 @@
return title
}
, tip: function () {
Tooltip.prototype.tip = function () {
return this.$tip = this.$tip || $(this.options.template)
}
, arrow: function(){
Tooltip.prototype.arrow =function(){
return this.$arrow = this.$arrow || this.tip().find(".tooltip-arrow")
}
, validate: function () {
Tooltip.prototype.validate = function () {
if (!this.$element[0].parentNode) {
this.hide()
this.$element = null
@ -1350,62 +1303,49 @@
}
}
, enable: function () {
Tooltip.prototype.enable = function () {
this.enabled = true
}
, disable: function () {
Tooltip.prototype.disable = function () {
this.enabled = false
}
, toggleEnabled: function () {
Tooltip.prototype.toggleEnabled = function () {
this.enabled = !this.enabled
}
, toggle: function (e) {
var self = e ? $(e.currentTarget)[this.type](this._options).data(this.type) : this
Tooltip.prototype.toggle = function (e) {
var self = e ? $(e.currentTarget)[this.type](this._options).data('bs.' + this.type) : this
self.tip().hasClass('in') ? self.hide() : self.show()
}
, destroy: function () {
this.hide().$element.off('.' + this.type).removeData(this.type)
}
Tooltip.prototype.destroy = function () {
this.hide().$element.off('.' + this.type).removeData('bs.' + this.type)
}
/* TOOLTIP PLUGIN DEFINITION
* ========================= */
// TOOLTIP PLUGIN DEFINITION
// =========================
var old = $.fn.tooltip
$.fn.tooltip = function (option) {
return this.each(function () {
var $this = $(this)
, data = $this.data('tooltip')
, options = typeof option == 'object' && option
if (!data) $this.data('tooltip', (data = new Tooltip(this, options)))
var data = $this.data('bs.tooltip')
var options = typeof option == 'object' && option
if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))
if (typeof option == 'string') data[option]()
})
}
$.fn.tooltip.Constructor = Tooltip
$.fn.tooltip.defaults = {
animation: true
, placement: 'top'
, selector: false
, template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'
, trigger: 'hover focus'
, title: ''
, delay: 0
, html: false
, container: false
}
/* TOOLTIP NO CONFLICT
* =================== */
// TOOLTIP NO CONFLICT
// ===================
$.fn.tooltip.noConflict = function () {
$.fn.tooltip = old
@ -1413,10 +1353,10 @@
}
}(window.jQuery);
/* ===========================================================
* bootstrap-popover.js v3.0.0
/* ========================================================================
* Bootstrap: popover.js v3.0.0
* http://twitter.github.com/bootstrap/javascript.html#popovers
* ===========================================================
* ========================================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -1430,87 +1370,19 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* =========================================================== */
* ======================================================================== */
!function ($) {
+function ($) { "use strict";
"use strict"; // jshint ;_;
/* POPOVER PUBLIC CLASS DEFINITION
* =============================== */
// POPOVER PUBLIC CLASS DEFINITION
// ===============================
var Popover = function (element, options) {
this.init('popover', element, options)
}
/* NOTE: POPOVER EXTENDS BOOTSTRAP-TOOLTIP.js
========================================== */
Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype, {
constructor: Popover
, setContent: function () {
var $tip = this.tip()
, title = this.getTitle()
, content = this.getContent()
$tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
$tip.find('.popover-content')[this.options.html ? 'html' : 'text'](content)
$tip.removeClass('fade top bottom left right in')
}
, hasContent: function () {
return this.getTitle() || this.getContent()
}
, getContent: function () {
var content
, $e = this.$element
, o = this.options
content = (typeof o.content == 'function' ? o.content.call($e[0]) : o.content)
|| $e.attr('data-content')
return content
}
, tip: function () {
if (!this.$tip) {
this.$tip = $(this.options.template)
}
return this.$tip
}
, destroy: function () {
this.hide().$element.off('.' + this.type).removeData(this.type)
}
})
/* POPOVER PLUGIN DEFINITION
* ======================= */
var old = $.fn.popover
$.fn.popover = function (option) {
return this.each(function () {
var $this = $(this)
, data = $this.data('popover')
, options = typeof option == 'object' && option
if (!data) $this.data('popover', (data = new Popover(this, options)))
if (typeof option == 'string') data[option]()
})
}
$.fn.popover.Constructor = Popover
$.fn.popover.defaults = $.extend({} , $.fn.tooltip.defaults, {
Popover.DEFAULTS = $.extend({} , $.fn.tooltip.Constructor.DEFAULTS, {
placement: 'right'
, trigger: 'click'
, content: ''
@ -1518,8 +1390,71 @@
})
/* POPOVER NO CONFLICT
* =================== */
// NOTE: POPOVER EXTENDS tooltip.js
// ================================
Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype)
Popover.prototype.constructor = Popover
Popover.prototype.getDefaults = function () {
return Popover.DEFAULTS
}
Popover.prototype.setContent = function () {
var $tip = this.tip()
var title = this.getTitle()
var content = this.getContent()
$tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
$tip.find('.popover-content')[this.options.html ? 'html' : 'text'](content)
$tip.removeClass('fade top bottom left right in')
}
Popover.prototype.hasContent = function () {
return this.getTitle() || this.getContent()
}
Popover.prototype.getContent = function () {
var content = typeof this.options.content == 'function' ?
this.options.content.call(this.$element[0]) :
this.options.content
return content || this.$element.attr('data-content')
}
Popover.prototype.tip = function () {
if (!this.$tip) this.$tip = $(this.options.template)
return this.$tip
}
Popover.prototype.destroy = function () {
this.hide().$element.off('.' + this.type).removeData(this.type)
}
// POPOVER PLUGIN DEFINITION
// =========================
var old = $.fn.popover
$.fn.popover = function (option) {
return this.each(function () {
var $this = $(this)
var data = $this.data('bs.popover')
var options = typeof option == 'object' && option
if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
if (typeof option == 'string') data[option]()
})
}
$.fn.popover.Constructor = Popover
// POPOVER NO CONFLICT
// ===================
$.fn.popover.noConflict = function () {
$.fn.popover = old
@ -1527,10 +1462,10 @@
}
}(window.jQuery);
/* =============================================================
* bootstrap-scrollspy.js v3.0.0
/* ========================================================================
* Bootstrap: scrollspy.js v3.0.0
* http://twitter.github.com/bootstrap/javascript.html#scrollspy
* =============================================================
* ========================================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -1544,48 +1479,49 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ============================================================== */
* ======================================================================== */
!function ($) {
+function ($) { "use strict";
"use strict"; // jshint ;_;
/* SCROLLSPY CLASS DEFINITION
* ========================== */
// SCROLLSPY CLASS DEFINITION
// ==========================
function ScrollSpy(element, options) {
var href
var process = $.proxy(this.process, this)
, $element = $(element).is('body') ? $(window) : $(element)
, href
this.options = $.extend({}, $.fn.scrollspy.defaults, options)
this.$scrollElement = $element.on('scroll.scroll-spy.data-api', process)
var $element = $(element).is('body') ? $(window) : $(element)
this.$body = $('body')
this.$scrollElement = $element.on('scroll.bs.scroll-spy.data-api', process)
this.options = $.extend({}, ScrollSpy.DEFAULTS, options)
this.selector = (this.options.target
|| ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
|| '') + ' .nav li > a'
this.$body = $('body')
this.offsets = $([])
this.targets = $([])
this.activeTarget = null
this.refresh()
this.process()
}
ScrollSpy.prototype = {
constructor: ScrollSpy
, refresh: function () {
var self = this
, $targets
ScrollSpy.DEFAULTS = {
offset: 10
}
ScrollSpy.prototype.refresh = function () {
this.offsets = $([])
this.targets = $([])
$targets = this.$body
var self = this
var $targets = this.$body
.find(this.selector)
.map(function () {
var $el = $(this)
, href = $el.data('target') || $el.attr('href')
, $href = /^#\w/.test(href) && $(href)
var href = $el.data('target') || $el.attr('href')
var $href = /^#\w/.test(href) && $(href)
return ($href
&& $href.length
&& [[ $href.position().top + (!$.isWindow(self.$scrollElement.get(0)) && self.$scrollElement.scrollTop()), href ]]) || null
@ -1597,18 +1533,17 @@
})
}
, process: function () {
ScrollSpy.prototype.process = function () {
var scrollTop = this.$scrollElement.scrollTop() + this.options.offset
, scrollHeight = this.$scrollElement[0].scrollHeight || this.$body[0].scrollHeight
, maxScroll = scrollHeight - this.$scrollElement.height()
, offsets = this.offsets
, targets = this.targets
, activeTarget = this.activeTarget
, i
var scrollHeight = this.$scrollElement[0].scrollHeight || this.$body[0].scrollHeight
var maxScroll = scrollHeight - this.$scrollElement.height()
var offsets = this.offsets
var targets = this.targets
var activeTarget = this.activeTarget
var i
if (scrollTop >= maxScroll) {
return activeTarget != (i = targets.last()[0])
&& this.activate ( i )
return activeTarget != (i = targets.last()[0]) && this.activate(i)
}
for (i = offsets.length; i--;) {
@ -1619,58 +1554,52 @@
}
}
, activate: function (target) {
var active
, selector
ScrollSpy.prototype.activate = function (target) {
this.activeTarget = target
$(this.selector)
.parents('.active')
.removeClass('active')
selector = this.selector
var selector = this.selector
+ '[data-target="' + target + '"],'
+ this.selector + '[href="' + target + '"]'
active = $(selector)
var active = $(selector)
.parents('li')
.addClass('active')
if (active.parent('.dropdown-menu').length) {
active = active.closest('li.dropdown').addClass('active')
active = active
.closest('li.dropdown')
.addClass('active')
}
active.trigger('activate')
}
}
/* SCROLLSPY PLUGIN DEFINITION
* =========================== */
// SCROLLSPY PLUGIN DEFINITION
// ===========================
var old = $.fn.scrollspy
$.fn.scrollspy = function (option) {
return this.each(function () {
var $this = $(this)
, data = $this.data('scrollspy')
, options = typeof option == 'object' && option
if (!data) $this.data('scrollspy', (data = new ScrollSpy(this, options)))
var data = $this.data('bs.scrollspy')
var options = typeof option == 'object' && option
if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options)))
if (typeof option == 'string') data[option]()
})
}
$.fn.scrollspy.Constructor = ScrollSpy
$.fn.scrollspy.defaults = {
offset: 10
}
/* SCROLLSPY NO CONFLICT
* ===================== */
// SCROLLSPY NO CONFLICT
// =====================
$.fn.scrollspy.noConflict = function () {
$.fn.scrollspy = old
@ -1678,8 +1607,8 @@
}
/* SCROLLSPY DATA-API
* ================== */
// SCROLLSPY DATA-API
// ==================
$(window).on('load', function () {
$('[data-spy="scroll"]').each(function () {
@ -1689,10 +1618,10 @@
})
}(window.jQuery);
/* ========================================================
* bootstrap-tab.js v3.0.0
/* ========================================================================
* Bootstrap: tab.js v3.0.0
* http://twitter.github.com/bootstrap/javascript.html#tabs
* ========================================================
* ========================================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -1706,32 +1635,22 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ======================================================== */
* ======================================================================== */
!function ($) {
+function ($) { "use strict";
"use strict"; // jshint ;_;
/* TAB CLASS DEFINITION
* ==================== */
// TAB CLASS DEFINITION
// ====================
var Tab = function (element) {
this.element = $(element)
}
Tab.prototype = {
constructor: Tab
, show: function () {
Tab.prototype.show = function () {
var $this = this.element
, $ul = $this.closest('ul:not(.dropdown-menu)')
, selector = $this.attr('data-target')
, previous
, $target
, e
var $ul = $this.closest('ul:not(.dropdown-menu)')
var selector = $this.attr('data-target')
if (!selector) {
selector = $this.attr('href')
@ -1740,9 +1659,8 @@
if ($this.parent('li').hasClass('active')) return
previous = $ul.find('.active:last a')[0]
e = $.Event('show', {
var previous = $ul.find('.active:last a')[0]
var e = $.Event('show.bs.tab', {
relatedTarget: previous
})
@ -1750,20 +1668,20 @@
if (e.isDefaultPrevented()) return
$target = $(selector)
var $target = $(selector)
this.activate($this.parent('li'), $ul)
this.activate($target, $target.parent(), function () {
$this.trigger({
type: 'shown'
type: 'shown.bs.tab'
, relatedTarget: previous
})
})
}
, activate: function ( element, container, callback) {
Tab.prototype.activate = function (element, container, callback) {
var $active = container.find('> .active')
, transition = callback
var transition = callback
&& $.support.transition
&& $active.hasClass('fade')
@ -1795,19 +1713,19 @@
$active.removeClass('in')
}
}
/* TAB PLUGIN DEFINITION
* ===================== */
// TAB PLUGIN DEFINITION
// =====================
var old = $.fn.tab
$.fn.tab = function ( option ) {
return this.each(function () {
var $this = $(this)
, data = $this.data('tab')
if (!data) $this.data('tab', (data = new Tab(this)))
var data = $this.data('bs.tab')
if (!data) $this.data('bs.tab', (data = new Tab(this)))
if (typeof option == 'string') data[option]()
})
}
@ -1815,8 +1733,8 @@
$.fn.tab.Constructor = Tab
/* TAB NO CONFLICT
* =============== */
// TAB NO CONFLICT
// ===============
$.fn.tab.noConflict = function () {
$.fn.tab = old
@ -1824,354 +1742,19 @@
}
/* TAB DATA-API
* ============ */
// TAB DATA-API
// ============
$(document).on('click.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
$(document).on('click.bs.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
e.preventDefault()
$(this).tab('show')
})
}(window.jQuery);
/* =============================================================
* bootstrap-typeahead.js v3.0.0
* http://twitter.github.com/bootstrap/javascript.html#typeahead
* =============================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ============================================================ */
!function($){
"use strict"; // jshint ;_;
/* TYPEAHEAD PUBLIC CLASS DEFINITION
* ================================= */
var Typeahead = function (element, options) {
this.$element = $(element)
this.options = $.extend({}, $.fn.typeahead.defaults, options)
this.matcher = this.options.matcher || this.matcher
this.sorter = this.options.sorter || this.sorter
this.highlighter = this.options.highlighter || this.highlighter
this.updater = this.options.updater || this.updater
this.source = this.options.source
this.$menu = $(this.options.menu)
this.shown = false
this.listen()
}
Typeahead.prototype = {
constructor: Typeahead
, select: function () {
var val = this.$menu.find('.active').attr('data-value')
this.$element
.val(this.updater(val))
.change()
return this.hide()
}
, updater: function (item) {
return item
}
, show: function () {
var pos = $.extend({}, this.$element.position(), {
height: this.$element[0].offsetHeight
})
this.$menu
.insertAfter(this.$element)
.css({
top: pos.top + pos.height
, left: pos.left
})
.show()
this.shown = true
return this
}
, hide: function () {
this.$menu.hide()
this.shown = false
return this
}
, lookup: function (event) {
var items
this.query = this.$element.val()
if (!this.query || this.query.length < this.options.minLength) {
return this.shown ? this.hide() : this
}
items = $.isFunction(this.source) ? this.source(this.query, $.proxy(this.process, this)) : this.source
return items ? this.process(items) : this
}
, process: function (items) {
var that = this
items = $.grep(items, function (item) {
return that.matcher(item)
})
items = this.sorter(items)
if (!items.length) {
return this.shown ? this.hide() : this
}
return this.render(items.slice(0, this.options.items)).show()
}
, matcher: function (item) {
return ~item.toLowerCase().indexOf(this.query.toLowerCase())
}
, sorter: function (items) {
var beginswith = []
, caseSensitive = []
, caseInsensitive = []
, item
while (item = items.shift()) {
if (!item.toLowerCase().indexOf(this.query.toLowerCase())) beginswith.push(item)
else if (~item.indexOf(this.query)) caseSensitive.push(item)
else caseInsensitive.push(item)
}
return beginswith.concat(caseSensitive, caseInsensitive)
}
, highlighter: function (item) {
var query = this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$&')
return item.replace(new RegExp('(' + query + ')', 'ig'), function ($1, match) {
return '<strong>' + match + '</strong>'
})
}
, render: function (items) {
var that = this
items = $(items).map(function (i, item) {
i = $(that.options.item).attr('data-value', item)
i.find('a').html(that.highlighter(item))
return i[0]
})
items.first().addClass('active')
this.$menu.html(items)
return this
}
, next: function (event) {
var active = this.$menu.find('.active').removeClass('active')
, next = active.next()
if (!next.length) {
next = $(this.$menu.find('li')[0])
}
next.addClass('active')
}
, prev: function (event) {
var active = this.$menu.find('.active').removeClass('active')
, prev = active.prev()
if (!prev.length) {
prev = this.$menu.find('li').last()
}
prev.addClass('active')
}
, listen: function () {
this.$element
.on('focus', $.proxy(this.focus, this))
.on('blur', $.proxy(this.blur, this))
.on('keypress', $.proxy(this.keypress, this))
.on('keyup', $.proxy(this.keyup, this))
if (this.eventSupported('keydown')) {
this.$element.on('keydown', $.proxy(this.keydown, this))
}
this.$menu
.on('click', $.proxy(this.click, this))
.on('mouseenter', 'li', $.proxy(this.mouseenter, this))
.on('mouseleave', 'li', $.proxy(this.mouseleave, this))
}
, eventSupported: function(eventName) {
var isSupported = eventName in this.$element
if (!isSupported) {
this.$element.setAttribute(eventName, 'return;')
isSupported = typeof this.$element[eventName] === 'function'
}
return isSupported
}
, move: function (e) {
if (!this.shown) return
switch(e.keyCode) {
case 9: // tab
case 13: // enter
case 27: // escape
e.preventDefault()
break
case 38: // up arrow
e.preventDefault()
this.prev()
break
case 40: // down arrow
e.preventDefault()
this.next()
break
}
e.stopPropagation()
}
, keydown: function (e) {
this.suppressKeyPressRepeat = ~$.inArray(e.keyCode, [40,38,9,13,27])
this.move(e)
}
, keypress: function (e) {
if (this.suppressKeyPressRepeat) return
this.move(e)
}
, keyup: function (e) {
switch(e.keyCode) {
case 40: // down arrow
case 38: // up arrow
case 16: // shift
case 17: // ctrl
case 18: // alt
break
case 9: // tab
case 13: // enter
if (!this.shown) return
this.select()
break
case 27: // escape
if (!this.shown) return
this.hide()
break
default:
this.lookup()
}
e.stopPropagation()
e.preventDefault()
}
, focus: function (e) {
this.focused = true
}
, blur: function (e) {
this.focused = false
if (!this.mousedover && this.shown) this.hide()
}
, click: function (e) {
e.stopPropagation()
e.preventDefault()
this.select()
this.$element.focus()
}
, mouseenter: function (e) {
this.mousedover = true
this.$menu.find('.active').removeClass('active')
$(e.currentTarget).addClass('active')
}
, mouseleave: function (e) {
this.mousedover = false
if (!this.focused && this.shown) this.hide()
}
}
/* TYPEAHEAD PLUGIN DEFINITION
* =========================== */
var old = $.fn.typeahead
$.fn.typeahead = function (option) {
return this.each(function () {
var $this = $(this)
, data = $this.data('typeahead')
, options = typeof option == 'object' && option
if (!data) $this.data('typeahead', (data = new Typeahead(this, options)))
if (typeof option == 'string') data[option]()
})
}
$.fn.typeahead.defaults = {
source: []
, items: 8
, menu: '<ul class="typeahead dropdown-menu"></ul>'
, item: '<li><a href="#"></a></li>'
, minLength: 1
}
$.fn.typeahead.Constructor = Typeahead
/* TYPEAHEAD NO CONFLICT
* =================== */
$.fn.typeahead.noConflict = function () {
$.fn.typeahead = old
return this
}
/* TYPEAHEAD DATA-API
* ================== */
$(document).on('focus.typeahead.data-api', '[data-provide="typeahead"]', function (e) {
var $this = $(this)
if ($this.data('typeahead')) return
$this.typeahead($this.data())
})
}(window.jQuery);
/* ==========================================================
* bootstrap-affix.js v3.0.0
/* ========================================================================
* Bootstrap: affix.js v3.0.0
* http://twitter.github.com/bootstrap/javascript.html#affix
* ==========================================================
* ========================================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -2185,46 +1768,53 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ========================================================== */
* ======================================================================== */
!function ($) {
+function ($) { "use strict";
"use strict"; // jshint ;_;
/* AFFIX CLASS DEFINITION
* ====================== */
// AFFIX CLASS DEFINITION
// ======================
var Affix = function (element, options) {
this.options = $.extend({}, $.fn.affix.defaults, options)
this.options = $.extend({}, Affix.DEFAULTS, options)
this.$window = $(window)
.on('scroll.affix.data-api', $.proxy(this.checkPosition, this))
.on('click.affix.data-api', $.proxy(function () { setTimeout($.proxy(this.checkPosition, this), 1) }, this))
.on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))
.on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this))
this.$element = $(element)
this.affixed =
this.unpin = null
this.checkPosition()
}
Affix.DEFAULTS = {
offset: 0
}
Affix.prototype.checkPositionWithEventLoop = function () {
setTimeout($.proxy(this.checkPosition, this), 1)
}
Affix.prototype.checkPosition = function () {
if (!this.$element.is(':visible')) return
var scrollHeight = $(document).height()
, scrollTop = this.$window.scrollTop()
, position = this.$element.offset()
, offset = this.options.offset
, offsetBottom = offset.bottom
, offsetTop = offset.top
, reset = 'affix affix-top affix-bottom'
, affix
var scrollTop = this.$window.scrollTop()
var position = this.$element.offset()
var offset = this.options.offset
var offsetTop = offset.top
var offsetBottom = offset.bottom
var reset = 'affix affix-top affix-bottom'
if (typeof offset != 'object') offsetBottom = offsetTop = offset
if (typeof offsetTop == 'function') offsetTop = offset.top()
if (typeof offsetBottom == 'function') offsetBottom = offset.bottom()
affix = this.unpin != null && (scrollTop + this.unpin <= position.top) ?
false : offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ?
'bottom' : offsetTop != null && scrollTop <= offsetTop ?
'top' : false
var affix = this.unpin != null && (scrollTop + this.unpin <= position.top) ? false :
offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ? 'bottom' :
offsetTop != null && (scrollTop <= offsetTop) ? 'top' : false
if (this.affixed === affix) return
@ -2235,30 +1825,27 @@
}
/* AFFIX PLUGIN DEFINITION
* ======================= */
// AFFIX PLUGIN DEFINITION
// =======================
var old = $.fn.affix
$.fn.affix = function (option) {
return this.each(function () {
var $this = $(this)
, data = $this.data('affix')
, options = typeof option == 'object' && option
if (!data) $this.data('affix', (data = new Affix(this, options)))
var data = $this.data('bs.affix')
var options = typeof option == 'object' && option
if (!data) $this.data('bs.affix', (data = new Affix(this, options)))
if (typeof option == 'string') data[option]()
})
}
$.fn.affix.Constructor = Affix
$.fn.affix.defaults = {
offset: 0
}
/* AFFIX NO CONFLICT
* ================= */
// AFFIX NO CONFLICT
// =================
$.fn.affix.noConflict = function () {
$.fn.affix = old
@ -2266,22 +1853,21 @@
}
/* AFFIX DATA-API
* ============== */
// AFFIX DATA-API
// ==============
$(window).on('load', function () {
$('[data-spy="affix"]').each(function () {
var $spy = $(this)
, data = $spy.data()
var data = $spy.data()
data.offset = data.offset || {}
data.offsetBottom && (data.offset.bottom = data.offsetBottom)
data.offsetTop && (data.offset.top = data.offsetTop)
if (data.offsetBottom) data.offset.bottom = data.offsetBottom
if (data.offsetTop) data.offset.top = data.offsetTop
$spy.affix(data)
})
})
}(window.jQuery);

File diff suppressed because one or more lines are too long

2536
docs/components.html Normal file
View File

@ -0,0 +1,2536 @@
---
layout: default
title: Components
slug: components
lead: "Dozens of reusable components built to provide iconography, dropdowns, navigation, alerts, popovers, and much more."
---
<!-- Icons
================================================== -->
<div class="bs-docs-section" id="icons">
<div class="page-header">
<h1>Icons font <small>by <a href="http://glyphicons.com" target="_blank">Glyphicons</a></small></h1>
</div>
<h2 id="icons-list">Included glyphs</h2>
<p>Bootstrap comes with all 160 of <a href="http://glyphicons.com" target="_blank">Glyphicons</a> Halflings set, all available in font formats for easy coloring, sizing, and placement.</p>
<ul class="the-icons clearfix">
<li><i class="glyphicon glyphicon-glass"></i> glyphicon-glass</li>
<li><i class="glyphicon glyphicon-music"></i> glyphicon-music</li>
<li><i class="glyphicon glyphicon-search"></i> glyphicon-search</li>
<li><i class="glyphicon glyphicon-envelope"></i> glyphicon-envelope</li>
<li><i class="glyphicon glyphicon-heart"></i> glyphicon-heart</li>
<li><i class="glyphicon glyphicon-star"></i> glyphicon-star</li>
<li><i class="glyphicon glyphicon-star-empty"></i> glyphicon-star-empty</li>
<li><i class="glyphicon glyphicon-user"></i> glyphicon-user</li>
<li><i class="glyphicon glyphicon-film"></i> glyphicon-film</li>
<li><i class="glyphicon glyphicon-th-large"></i> glyphicon-th-large</li>
<li><i class="glyphicon glyphicon-th"></i> glyphicon-th</li>
<li><i class="glyphicon glyphicon-th-list"></i> glyphicon-th-list</li>
<li><i class="glyphicon glyphicon-ok"></i> glyphicon-ok</li>
<li><i class="glyphicon glyphicon-remove"></i> glyphicon-remove</li>
<li><i class="glyphicon glyphicon-zoom-in"></i> glyphicon-zoom-in</li>
<li><i class="glyphicon glyphicon-zoom-out"></i> glyphicon-zoom-out</li>
<li><i class="glyphicon glyphicon-off"></i> glyphicon-off</li>
<li><i class="glyphicon glyphicon-signal"></i> glyphicon-signal</li>
<li><i class="glyphicon glyphicon-cog"></i> glyphicon-cog</li>
<li><i class="glyphicon glyphicon-trash"></i> glyphicon-trash</li>
<li><i class="glyphicon glyphicon-home"></i> glyphicon-home</li>
<li><i class="glyphicon glyphicon-file"></i> glyphicon-file</li>
<li><i class="glyphicon glyphicon-time"></i> glyphicon-time</li>
<li><i class="glyphicon glyphicon-road"></i> glyphicon-road</li>
<li><i class="glyphicon glyphicon-download-alt"></i> glyphicon-download-alt</li>
<li><i class="glyphicon glyphicon-download"></i> glyphicon-download</li>
<li><i class="glyphicon glyphicon-upload"></i> glyphicon-upload</li>
<li><i class="glyphicon glyphicon-inbox"></i> glyphicon-inbox</li>
<li><i class="glyphicon glyphicon-play-circle"></i> glyphicon-play-circle</li>
<li><i class="glyphicon glyphicon-repeat"></i> glyphicon-repeat</li>
<li><i class="glyphicon glyphicon-refresh"></i> glyphicon-refresh</li>
<li><i class="glyphicon glyphicon-list-alt"></i> glyphicon-list-alt</li>
<li><i class="glyphicon glyphicon-lock"></i> glyphicon-lock</li>
<li><i class="glyphicon glyphicon-flag"></i> glyphicon-flag</li>
<li><i class="glyphicon glyphicon-headphones"></i> glyphicon-headphones</li>
<li><i class="glyphicon glyphicon-volume-off"></i> glyphicon-volume-off</li>
<li><i class="glyphicon glyphicon-volume-down"></i> glyphicon-volume-down</li>
<li><i class="glyphicon glyphicon-volume-up"></i> glyphicon-volume-up</li>
<li><i class="glyphicon glyphicon-qrcode"></i> glyphicon-qrcode</li>
<li><i class="glyphicon glyphicon-barcode"></i> glyphicon-barcode</li>
<li><i class="glyphicon glyphicon-tag"></i> glyphicon-tag</li>
<li><i class="glyphicon glyphicon-tags"></i> glyphicon-tags</li>
<li><i class="glyphicon glyphicon-book"></i> glyphicon-book</li>
<li><i class="glyphicon glyphicon-bookmark"></i> glyphicon-bookmark</li>
<li><i class="glyphicon glyphicon-print"></i> glyphicon-print</li>
<li><i class="glyphicon glyphicon-camera"></i> glyphicon-camera</li>
<li><i class="glyphicon glyphicon-font"></i> glyphicon-font</li>
<li><i class="glyphicon glyphicon-bold"></i> glyphicon-bold</li>
<li><i class="glyphicon glyphicon-italic"></i> glyphicon-italic</li>
<li><i class="glyphicon glyphicon-text-height"></i> glyphicon-text-height</li>
<li><i class="glyphicon glyphicon-text-width"></i> glyphicon-text-width</li>
<li><i class="glyphicon glyphicon-align-left"></i> glyphicon-align-left</li>
<li><i class="glyphicon glyphicon-align-center"></i> glyphicon-align-center</li>
<li><i class="glyphicon glyphicon-align-right"></i> glyphicon-align-right</li>
<li><i class="glyphicon glyphicon-align-justify"></i> glyphicon-align-justify</li>
<li><i class="glyphicon glyphicon-list"></i> glyphicon-list</li>
<li><i class="glyphicon glyphicon-indent-left"></i> glyphicon-indent-left</li>
<li><i class="glyphicon glyphicon-indent-right"></i> glyphicon-indent-right</li>
<li><i class="glyphicon glyphicon-facetime-video"></i> glyphicon-facetime-video</li>
<li><i class="glyphicon glyphicon-picture"></i> glyphicon-picture</li>
<li><i class="glyphicon glyphicon-pencil"></i> glyphicon-pencil</li>
<li><i class="glyphicon glyphicon-map-marker"></i> glyphicon-map-marker</li>
<li><i class="glyphicon glyphicon-adjust"></i> glyphicon-adjust</li>
<li><i class="glyphicon glyphicon-tint"></i> glyphicon-tint</li>
<li><i class="glyphicon glyphicon-edit"></i> glyphicon-edit</li>
<li><i class="glyphicon glyphicon-share"></i> glyphicon-share</li>
<li><i class="glyphicon glyphicon-check"></i> glyphicon-check</li>
<li><i class="glyphicon glyphicon-move"></i> glyphicon-move</li>
<li><i class="glyphicon glyphicon-step-backward"></i> glyphicon-step-backward</li>
<li><i class="glyphicon glyphicon-fast-backward"></i> glyphicon-fast-backward</li>
<li><i class="glyphicon glyphicon-backward"></i> glyphicon-backward</li>
<li><i class="glyphicon glyphicon-play"></i> glyphicon-play</li>
<li><i class="glyphicon glyphicon-pause"></i> glyphicon-pause</li>
<li><i class="glyphicon glyphicon-stop"></i> glyphicon-stop</li>
<li><i class="glyphicon glyphicon-forward"></i> glyphicon-forward</li>
<li><i class="glyphicon glyphicon-fast-forward"></i> glyphicon-fast-forward</li>
<li><i class="glyphicon glyphicon-step-forward"></i> glyphicon-step-forward</li>
<li><i class="glyphicon glyphicon-eject"></i> glyphicon-eject</li>
<li><i class="glyphicon glyphicon-chevron-left"></i> glyphicon-chevron-left</li>
<li><i class="glyphicon glyphicon-chevron-right"></i> glyphicon-chevron-right</li>
<li><i class="glyphicon glyphicon-plus-sign"></i> glyphicon-plus-sign</li>
<li><i class="glyphicon glyphicon-minus-sign"></i> glyphicon-minus-sign</li>
<li><i class="glyphicon glyphicon-remove-sign"></i> glyphicon-remove-sign</li>
<li><i class="glyphicon glyphicon-ok-sign"></i> glyphicon-ok-sign</li>
<li><i class="glyphicon glyphicon-question-sign"></i> glyphicon-question-sign</li>
<li><i class="glyphicon glyphicon-info-sign"></i> glyphicon-info-sign</li>
<li><i class="glyphicon glyphicon-screenshot"></i> glyphicon-screenshot</li>
<li><i class="glyphicon glyphicon-remove-circle"></i> glyphicon-remove-circle</li>
<li><i class="glyphicon glyphicon-ok-circle"></i> glyphicon-ok-circle</li>
<li><i class="glyphicon glyphicon-ban-circle"></i> glyphicon-ban-circle</li>
<li><i class="glyphicon glyphicon-arrow-left"></i> glyphicon-arrow-left</li>
<li><i class="glyphicon glyphicon-arrow-right"></i> glyphicon-arrow-right</li>
<li><i class="glyphicon glyphicon-arrow-up"></i> glyphicon-arrow-up</li>
<li><i class="glyphicon glyphicon-arrow-down"></i> glyphicon-arrow-down</li>
<li><i class="glyphicon glyphicon-share-alt"></i> glyphicon-share-alt</li>
<li><i class="glyphicon glyphicon-resize-full"></i> glyphicon-resize-full</li>
<li><i class="glyphicon glyphicon-resize-small"></i> glyphicon-resize-small</li>
<li><i class="glyphicon glyphicon-plus"></i> glyphicon-plus</li>
<li><i class="glyphicon glyphicon-minus"></i> glyphicon-minus</li>
<li><i class="glyphicon glyphicon-asterisk"></i> glyphicon-asterisk</li>
<li><i class="glyphicon glyphicon-exclamation-sign"></i> glyphicon-exclamation-sign</li>
<li><i class="glyphicon glyphicon-gift"></i> glyphicon-gift</li>
<li><i class="glyphicon glyphicon-leaf"></i> glyphicon-leaf</li>
<li><i class="glyphicon glyphicon-fire"></i> glyphicon-fire</li>
<li><i class="glyphicon glyphicon-eye-open"></i> glyphicon-eye-open</li>
<li><i class="glyphicon glyphicon-eye-close"></i> glyphicon-eye-close</li>
<li><i class="glyphicon glyphicon-warning-sign"></i> glyphicon-warning-sign</li>
<li><i class="glyphicon glyphicon-plane"></i> glyphicon-plane</li>
<li><i class="glyphicon glyphicon-calendar"></i> glyphicon-calendar</li>
<li><i class="glyphicon glyphicon-random"></i> glyphicon-random</li>
<li><i class="glyphicon glyphicon-comment"></i> glyphicon-comment</li>
<li><i class="glyphicon glyphicon-magnet"></i> glyphicon-magnet</li>
<li><i class="glyphicon glyphicon-chevron-up"></i> glyphicon-chevron-up</li>
<li><i class="glyphicon glyphicon-chevron-down"></i> glyphicon-chevron-down</li>
<li><i class="glyphicon glyphicon-retweet"></i> glyphicon-retweet</li>
<li><i class="glyphicon glyphicon-shopping-cart"></i> glyphicon-shopping-cart</li>
<li><i class="glyphicon glyphicon-folder-close"></i> glyphicon-folder-close</li>
<li><i class="glyphicon glyphicon-folder-open"></i> glyphicon-folder-open</li>
<li><i class="glyphicon glyphicon-resize-vertical"></i> glyphicon-resize-vertical</li>
<li><i class="glyphicon glyphicon-resize-horizontal"></i> glyphicon-resize-horizontal</li>
<li><i class="glyphicon glyphicon-hdd"></i> glyphicon-hdd</li>
<li><i class="glyphicon glyphicon-bullhorn"></i> glyphicon-bullhorn</li>
<li><i class="glyphicon glyphicon-bell"></i> glyphicon-bell</li>
<li><i class="glyphicon glyphicon-certificate"></i> glyphicon-certificate</li>
<li><i class="glyphicon glyphicon-thumbs-up"></i> glyphicon-thumbs-up</li>
<li><i class="glyphicon glyphicon-thumbs-down"></i> glyphicon-thumbs-down</li>
<li><i class="glyphicon glyphicon-hand-right"></i> glyphicon-hand-right</li>
<li><i class="glyphicon glyphicon-hand-left"></i> glyphicon-hand-left</li>
<li><i class="glyphicon glyphicon-hand-up"></i> glyphicon-hand-up</li>
<li><i class="glyphicon glyphicon-hand-down"></i> glyphicon-hand-down</li>
<li><i class="glyphicon glyphicon-circle-arrow-right"></i> glyphicon-circle-arrow-right</li>
<li><i class="glyphicon glyphicon-circle-arrow-left"></i> glyphicon-circle-arrow-left</li>
<li><i class="glyphicon glyphicon-circle-arrow-up"></i> glyphicon-circle-arrow-up</li>
<li><i class="glyphicon glyphicon-circle-arrow-down"></i> glyphicon-circle-arrow-down</li>
<li><i class="glyphicon glyphicon-globe"></i> glyphicon-globe</li>
<li><i class="glyphicon glyphicon-wrench"></i> glyphicon-wrench</li>
<li><i class="glyphicon glyphicon-tasks"></i> glyphicon-tasks</li>
<li><i class="glyphicon glyphicon-filter"></i> glyphicon-filter</li>
<li><i class="glyphicon glyphicon-briefcase"></i> glyphicon-briefcase</li>
<li><i class="glyphicon glyphicon-fullscreen"></i> glyphicon-fullscreen</li>
<li><i class="glyphicon glyphicon-dashboard"></i> glyphicon-dashboard</li>
<li><i class="glyphicon glyphicon-paperclip"></i> glyphicon-paperclip</li>
<li><i class="glyphicon glyphicon-heart-empty"></i> glyphicon-heart-empty</li>
<li><i class="glyphicon glyphicon-link"></i> glyphicon-link</li>
<li><i class="glyphicon glyphicon-phone"></i> glyphicon-phone</li>
<li><i class="glyphicon glyphicon-pushpin"></i> glyphicon-pushpin</li>
<li><i class="glyphicon glyphicon-euro"></i> glyphicon-euro</li>
<li><i class="glyphicon glyphicon-usd"></i> glyphicon-usd</li>
<li><i class="glyphicon glyphicon-gbp"></i> glyphicon-gbp</li>
<li><i class="glyphicon glyphicon-sort"></i> glyphicon-sort</li>
<li><i class="glyphicon glyphicon-sort-by-alphabet"></i> glyphicon-sort-by-alphabet</li>
<li><i class="glyphicon glyphicon-sort-by-alphabet-alt"></i> glyphicon-sort-by-alphabet-alt</li>
<li><i class="glyphicon glyphicon-sort-by-order"></i> glyphicon-sort-by-order</li>
<li><i class="glyphicon glyphicon-sort-by-order-alt"></i> glyphicon-sort-by-order-alt</li>
<li><i class="glyphicon glyphicon-sort-by-attributes"></i> glyphicon-sort-by-attributes</li>
<li><i class="glyphicon glyphicon-sort-by-attributes-alt"></i> glyphicon-sort-by-attributes-alt</li>
<li><i class="glyphicon glyphicon-unchecked"></i> glyphicon-unchecked</li>
<li><i class="glyphicon glyphicon-expand"></i> glyphicon-expand</li>
<li><i class="glyphicon glyphicon-collapse"></i> glyphicon-collapse</li>
<li><i class="glyphicon glyphicon-collapse-top"></i> glyphicon-collapse-top</li>
</ul>
<h3>Glyphicons attribution</h3>
<p><a href="http://glyphicons.com/">Glyphicons</a> Halflings are normally not available for free, but an arrangement between Bootstrap and the Glyphicons creator have made this possible at no cost to you as developers. As a thank you, we ask you to include an optional link back to <a href="http://glyphicons.com/">Glyphicons</a> whenever practical.</p>
<h2 id="icons-how-to">How to use</h2>
<p>Add the appropriate class to any inline element. All icon classes are prefixed with <code>glyphicon-</code> for easy styling. To use, place the following code just about anywhere:</p>
{% highlight html %}
<span class="glyphicon glyphicon-search"></span>
{% endhighlight %}
<p>Want to change the icon color? Just change the <code>color</code> of the parent element.</p>
<p>When using beside strings of text, as in buttons or nav links, be sure to leave a space after the icon for proper spacing.</p>
<h2 id="icons-examples">Icon examples</h2>
<p>Use them in buttons, button groups for a toolbar, navigation, or prepended form inputs.</p>
<h4>Buttons</h4>
<h5>Button group in a button toolbar</h5>
<div class="bs-example">
<div class="btn-toolbar">
<div class="btn-group">
<a class="btn btn-default" href="#"><span class="glyphicon glyphicon-align-left"></span></a>
<a class="btn btn-default" href="#"><span class="glyphicon glyphicon-align-center"></span></a>
<a class="btn btn-default" href="#"><span class="glyphicon glyphicon-align-right"></span></a>
<a class="btn btn-default" href="#"><span class="glyphicon glyphicon-align-justify"></span></a>
</div>
</div>
</div><!-- /bs-example -->
{% highlight html %}
<div class="btn-toolbar">
<div class="btn-group">
<a class="btn btn-default" href="#"><span class="glyphicon glyphicon-align-left"></span></a>
<a class="btn btn-default" href="#"><span class="glyphicon glyphicon-align-center"></span></a>
<a class="btn btn-default" href="#"><span class="glyphicon glyphicon-align-right"></span></a>
<a class="btn btn-default" href="#"><span class="glyphicon glyphicon-align-justify"></span></a>
</div>
</div>
{% endhighlight %}
<div class="bs-callout">
<h4>Accessibility</h4>
<p>Keep in mind that using icons without any additional content means the icons are not represented to screen reader users.</p>
</div>
<h5>Dropdown in a button group</h5>
<div class="bs-example">
<div class="btn-group">
<a class="btn btn-primary" href="#"><span class="glyphicon glyphicon-user"></span> User</a>
<a class="btn btn-primary dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="#"><span class="glyphicon glyphicon-pencil"></span> Edit</a></li>
<li><a href="#"><span class="glyphicon glyphicon-trash"></span> Delete</a></li>
<li><a href="#"><span class="glyphicon glyphicon-ban-circle"></span> Ban</a></li>
<li class="divider"></li>
<li><a href="#">Make admin</a></li>
</ul>
</div>
</div><!-- /bs-example -->
{% highlight html %}
<div class="btn-group">
<a class="btn btn-default btn-primary" href="#"><span class="glyphicon glyphicon-user"></span> User</a>
<a class="btn btn-default btn-primary dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="#"><span class="glyphicon glyphicon-pencil"></span> Edit</a></li>
<li><a href="#"><span class="glyphicon glyphicon-trash"></span> Delete</a></li>
<li><a href="#"><span class="glyphicon glyphicon-ban-circle"></span> Ban</a></li>
<li class="divider"></li>
<li><a href="#"><span class="glyphicon glyphicon-"></span> Make admin</a></li>
</ul>
</div>
{% endhighlight %}
<h5>Large button</h5>
<div class="bs-example">
<a class="btn btn-default btn-large" href="#"><span class="glyphicon glyphicon-star"></span> Star</a>
</div><!-- /bs-example -->
{% highlight html %}
<a class="btn btn-default btn-large" href="#"><span class="glyphicon glyphicon-star"></span> Star</a>
{% endhighlight %}
<h5>Small button</h5>
<div class="bs-example">
<a class="btn btn-default btn-small" href="#"><span class="glyphicon glyphicon-star"></span></a>
</div><!-- /bs-example -->
{% highlight html %}
<a class="btn btn-default btn-small" href="#"><span class="glyphicon glyphicon-star"></span></a>
{% endhighlight %}
<h4>Navigation</h4>
<div class="bs-example">
<ul class="nav nav-pills nav-stacked">
<li class="active"><a href="#"><span class="glyphicon glyphicon-home"></span> Home</a></li>
<li><a href="#"><span class="glyphicon glyphicon-book"></span> Library</a></li>
<li><a href="#"><span class="glyphicon glyphicon-pencil"></span> Applications</a></li>
<li><a href="#"><span class="glyphicon glyphicon-"></span> Misc</a></li>
</ul>
</div><!-- /bs-example -->
{% highlight html %}
<ul class="nav nav-pills nav-stacked">
<li class="active"><a href="#"><span class="glyphicon glyphicon-home"></span> Home</a></li>
<li><a href="#"><span class="glyphicon glyphicon-book"></span> Library</a></li>
<li><a href="#"><span class="glyphicon glyphicon-pencil"></span> Applications</a></li>
<li><a href="#"><span class="glyphicon glyphicon-"></span> Misc</a></li>
</ul>
{% endhighlight %}
<h4>Form fields</h4>
<form class="bs-example form-horizontal">
<div class="control-group">
<label class="control-label" for="inputIcon">Email address</label>
<div class="controls">
<div class="input-group">
<span class="input-group-addon"><span class="glyphicon glyphicon-envelope"></span></span>
<input class="col col-lg-2" id="inputIcon" type="text">
</div>
</div>
</div>
</form>
{% highlight html %}
<div class="control-group">
<label class="control-label" for="inputIcon">Email address</label>
<div class="controls">
<div class="input-group">
<span class="input-group-addon"><span class="glyphicon glyphicon-envelope"></span></span>
<input class="col col-lg-2" id="inputIcon" type="text">
</div>
</div>
</div>
{% endhighlight %}
</div>
<!-- Dropdowns
================================================== -->
<div class="bs-docs-section" id="dropdowns">
<div class="page-header">
<h1>Dropdown menus</h1>
</div>
<p class="lead">Toggleable, contextual menu for displaying lists of links. Made interactive with the <a href="./javascript.html#dropdowns">dropdown JavaScript plugin</a>.</p>
<h3 id="dropdowns-example">Example</h3>
<p>Wrap the dropdown's trigger and the dropdown menu within <code>.dropdown</code>, or another element that declares <code>position: relative;</code>. Then add the menu's HTML.</p>
<div class="bs-example">
<div class="dropdown clearfix">
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu">
<li><a tabindex="-1" href="#">Action</a></li>
<li><a tabindex="-1" href="#">Another action</a></li>
<li><a tabindex="-1" href="#">Something else here</a></li>
<li class="divider"></li>
<li><a tabindex="-1" href="#">Separated link</a></li>
</ul>
</div>
</div><!-- /example -->
{% highlight html %}
<div class="dropdown">
<!-- Link or button to toggle dropdown -->
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu">
<li><a tabindex="-1" href="#">Action</a></li>
<li><a tabindex="-1" href="#">Another action</a></li>
<li><a tabindex="-1" href="#">Something else here</a></li>
<li class="divider"></li>
<li><a tabindex="-1" href="#">Separated link</a></li>
</ul>
</div>
{% endhighlight %}
<h3 id="dropdowns-alignment">Aligning the menus</h3>
<p>Add <code>.pull-right</code> to a <code>.dropdown-menu</code> to right align the dropdown menu.</p>
{% highlight html %}
<ul class="dropdown-menu pull-right" role="menu" aria-labelledby="dLabel">
...
</ul>
{% endhighlight %}
<h3 id="dropdowns-disabled">Disabled menu options</h3>
<p>Add <code>.disabled</code> to a <code>&lt;li&gt;</code> in the dropdown to disable the link.</p>
<div class="bs-example">
<div class="dropdown clearfix">
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu">
<li><a tabindex="-1" href="#">Regular link</a></li>
<li class="disabled"><a tabindex="-1" href="#">Disabled link</a></li>
<li><a tabindex="-1" href="#">Another link</a></li>
</ul>
</div>
</div><!-- /example -->
{% highlight html %}
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu">
<li><a tabindex="-1" href="#">Regular link</a></li>
<li class="disabled"><a tabindex="-1" href="#">Disabled link</a></li>
<li><a tabindex="-1" href="#">Another link</a></li>
</ul>
{% endhighlight %}
<h3 id="dropdowns-submenus">Sub menus on dropdowns</h3>
<p>Add an extra level of dropdown menus, appearing on hover like those of OS X, with some simple markup additions. Add <code>.dropdown-submenu</code> to any <code>li</code> in an existing dropdown menu for automatic styling.</p>
<div class="bs-example bs-example-submenu">
<div class="pull-left">
<p class="text-muted">Default</p>
<div class="dropdown clearfix">
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu">
<li><a tabindex="-1" href="#">Action</a></li>
<li><a tabindex="-1" href="#">Another action</a></li>
<li><a tabindex="-1" href="#">Something else here</a></li>
<li class="divider"></li>
<li class="dropdown-submenu">
<a tabindex="-1" href="#">More options</a>
<ul class="dropdown-menu">
<li><a tabindex="-1" href="#">Second level link</a></li>
<li><a tabindex="-1" href="#">Second level link</a></li>
<li><a tabindex="-1" href="#">Second level link</a></li>
<li><a tabindex="-1" href="#">Second level link</a></li>
<li><a tabindex="-1" href="#">Second level link</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div class="pull-left">
<p class="text-muted">Dropup</p>
<div class="dropup">
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu">
<li><a tabindex="-1" href="#">Action</a></li>
<li><a tabindex="-1" href="#">Another action</a></li>
<li><a tabindex="-1" href="#">Something else here</a></li>
<li class="divider"></li>
<li class="dropdown-submenu">
<a tabindex="-1" href="#">More options</a>
<ul class="dropdown-menu">
<li><a tabindex="-1" href="#">Second level link</a></li>
<li><a tabindex="-1" href="#">Second level link</a></li>
<li><a tabindex="-1" href="#">Second level link</a></li>
<li><a tabindex="-1" href="#">Second level link</a></li>
<li><a tabindex="-1" href="#">Second level link</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div class="pull-left">
<p class="text-muted">Left submenu</p>
<div class="dropdown">
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu">
<li><a tabindex="-1" href="#">Action</a></li>
<li><a tabindex="-1" href="#">Another action</a></li>
<li><a tabindex="-1" href="#">Something else here</a></li>
<li class="divider"></li>
<li class="dropdown-submenu pull-left">
<a tabindex="-1" href="#">More options</a>
<ul class="dropdown-menu">
<li><a tabindex="-1" href="#">Second level link</a></li>
<li><a tabindex="-1" href="#">Second level link</a></li>
<li><a tabindex="-1" href="#">Second level link</a></li>
<li><a tabindex="-1" href="#">Second level link</a></li>
<li><a tabindex="-1" href="#">Second level link</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div>
{% highlight html %}
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu">
...
<li class="dropdown-submenu pull-left">
<a tabindex="-1" href="#">More options</a>
<ul class="dropdown-menu">
<li><a tabindex="-1" href="#">Second level link</a></li>
<li><a tabindex="-1" href="#">Second level link</a></li>
<li><a tabindex="-1" href="#">Second level link</a></li>
<li><a tabindex="-1" href="#">Second level link</a></li>
<li><a tabindex="-1" href="#">Second level link</a></li>
</ul>
</li>
...
</ul>
{% endhighlight %}
</div>
<!-- Button Groups
================================================== -->
<div class="bs-docs-section" id="btn-groups">
<div class="page-header">
<h1>Button groups</h1>
</div>
<p class="lead">Group a series of buttons together on a single line with the button group. Add on optional JavaScript radio and checkbox style behavior with <a href="./javascript.html#buttons">our buttons plugin</a>.</p>
<h3 id="btn-groups-single">Basic button group</h3>
<p>Wrap a series of buttons with <code>.btn</code> in <code>.btn-group</code>.</p>
<div class="bs-example">
<div class="btn-group" style="margin: 9px 0 5px;">
<button type="button" class="btn btn-default">Left</button>
<button type="button" class="btn btn-default">Middle</button>
<button type="button" class="btn btn-default">Right</button>
</div>
</div>
{% highlight html %}
<div class="btn-group">
<button type="button" class="btn btn-default">Left</button>
<button type="button" class="btn btn-default">Middle</button>
<button type="button" class="btn btn-default">Right</button>
</div>
{% endhighlight %}
<h3 id="btn-groups-toolbar">Multiple button groups</h3>
<p>Combine sets of <code>&lt;div class="btn-group"&gt;</code> into a <code>&lt;div class="btn-toolbar"&gt;</code> for more complex components.</p>
<div class="bs-example">
<div class="btn-toolbar" style="margin: 0;">
<div class="btn-group">
<button type="button" class="btn btn-default">1</button>
<button type="button" class="btn btn-default">2</button>
<button type="button" class="btn btn-default">3</button>
<button type="button" class="btn btn-default">4</button>
</div>
<div class="btn-group">
<button type="button" class="btn btn-default">5</button>
<button type="button" class="btn btn-default">6</button>
<button type="button" class="btn btn-default">7</button>
</div>
<div class="btn-group">
<button type="button" class="btn btn-default">8</button>
</div>
</div>
</div>
{% highlight html %}
<div class="btn-toolbar">
<div class="btn-group">...</div>
<div class="btn-group">...</div>
<div class="btn-group">...</div>
</div>
{% endhighlight %}
<h3 id="btn-groups-nested">Nested button groups</h3>
<p>Place buttons groups within button groups when you want dropdown menus mixed with a series of buttons.</p>
<div class="bs-example">
<div class="btn-group">
<button type="button" class="btn btn-default">1</button>
<button type="button" class="btn btn-default">2</button>
<button type="button" class="btn btn-default">3</button>
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
Dropdown
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li><a href="#">Dropdown link</a></li>
<li><a href="#">Dropdown link</a></li>
<li><a href="#">Dropdown link</a></li>
</ul>
</div>
</div>
</div>
<h3 id="btn-groups-vertical">Vertical button groups</h3>
<p>Make a set of buttons appear vertically stacked rather than horizontally.</p>
<div class="bs-example">
<div class="btn-group-vertical">
<button type="button" class="btn btn-default"><i class="glyphicon glyphicon-align-left"></i></button>
<button type="button" class="btn btn-default"><i class="glyphicon glyphicon-align-center"></i></button>
<button type="button" class="btn btn-default"><i class="glyphicon glyphicon-align-right"></i></button>
<button type="button" class="btn btn-default"><i class="glyphicon glyphicon-align-justify"></i></button>
</div>
</div>
{% highlight html %}
<div class="btn-group-vertical">
...
</div>
{% endhighlight %}
<h3 id="btn-groups-justified">Justified button groups</h3>
<p>Make a group of buttons stretch at the same size to span the entire width of its parent. <strong>This only works with <code>&lt;a&gt;</code> elements</strong> as the <code>&lt;button&gt;</code> doesn't pick up these styles.</p>
<div class="bs-example">
<div class="btn-group btn-group-justified">
<a href="#" class="btn btn-default">Left</a>
<a href="#" class="btn btn-default">Right</a>
<a href="#" class="btn btn-default">Middle</a>
</div>
</div>
{% highlight html %}
<div class="btn-group btn-group-justified">
...
</div>
{% endhighlight %}
</div>
<!-- Split button dropdowns
================================================== -->
<div class="bs-docs-section" id="btn-dropdowns">
<div class="page-header">
<h1>Button dropdown menus</h1>
</div>
<p class="lead">Use any button to trigger a dropdown menu by placing it within a <code>.btn-group</code> and providing the proper menu markup.</p>
<div class="bs-callout">
<h4>Plugin dependency</h4>
<p>Button dropdowns require the <a href="#dropdown-plugin">dropdown plugin</a> to be included in your version of Bootstrap.</p>
</div>
<h3 id="btn-dropdowns-single">Single button dropdowns</h3>
<p>Turn a button into dropdown toggle with some basic markup changes.</p>
<div class="bs-example">
<div class="btn-toolbar" style="margin-bottom: 10px;">
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">Action <span class="caret"></span></button>
<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>
</div><!-- /btn-group -->
<div class="btn-group">
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">Action <span class="caret"></span></button>
<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>
</div><!-- /btn-group -->
<div class="btn-group">
<button type="button" class="btn btn-danger dropdown-toggle" data-toggle="dropdown">Danger <span class="caret"></span></button>
<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>
</div><!-- /btn-group -->
<div class="btn-group">
<button type="button" class="btn btn-warning dropdown-toggle" data-toggle="dropdown">Warning <span class="caret"></span></button>
<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>
</div><!-- /btn-group -->
<div class="btn-group">
<button type="button" class="btn btn-success dropdown-toggle" data-toggle="dropdown">Success <span class="caret"></span></button>
<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>
</div><!-- /btn-group -->
</div>
</div>
{% highlight html %}
<!-- Single button -->
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
Action <span class="caret"></span>
</button>
<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>
</div>
{% endhighlight %}
<h3 id="btn-dropdowns-split">Split button dropdowns</h3>
<p>Similarly, create split button dropdowns with the same markup changes, only with a separate button.</p>
<div class="bs-example">
<div class="btn-toolbar" style="margin: 0;">
<div class="btn-group">
<button type="button" class="btn btn-default">Action</button>
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button>
<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>
</div><!-- /btn-group -->
<div class="btn-group">
<button type="button" class="btn btn-primary">Action</button>
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button>
<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>
</div><!-- /btn-group -->
<div class="btn-group">
<button type="button" class="btn btn-danger">Danger</button>
<button type="button" class="btn btn-danger dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button>
<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>
</div><!-- /btn-group -->
<div class="btn-group">
<button type="button" class="btn btn-warning">Warning</button>
<button type="button" class="btn btn-warning dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button>
<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>
</div><!-- /btn-group -->
<div class="btn-group">
<button type="button" class="btn btn-success">Success</button>
<button type="button" class="btn btn-success dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button>
<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>
</div><!-- /btn-group -->
</div><!-- /btn-toolbar -->
</div>
{% highlight html %}
<!-- Split button -->
<div class="btn-group">
<button type="button" class="btn btn-default">Action</button>
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<span class="caret"></span>
</button>
<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>
</div>
{% endhighlight %}
<h3 id="btn-dropdowns-sizes">Works with all button sizes</h3>
<p>Button dropdowns work with buttons of all sizes.</p>
<div class="bs-example">
<div class="btn-toolbar" style="margin: 0;">
<div class="btn-group">
<button class="btn btn-default btn-large dropdown-toggle" type="button" data-toggle="dropdown">
Large button <span class="caret"></span>
</button>
<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>
</div><!-- /btn-group -->
<div class="btn-group">
<button class="btn btn-default btn-small dropdown-toggle" type="button" data-toggle="dropdown">
Small button <span class="caret"></span>
</button>
<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>
</div><!-- /btn-group -->
</div><!-- /btn-toolbar -->
</div><!-- /example -->
{% highlight html %}
<!-- Large button group -->
<div class="btn-group">
<button class="btn btn-default btn-large dropdown-toggle" type="button" data-toggle="dropdown">
Large button <span class="caret"></span>
</button>
<ul class="dropdown-menu">
...
</ul>
</div>
<!-- Small button group -->
<div class="btn-group">
<button class="btn btn-default btn-small dropdown-toggle" type="button" data-toggle="dropdown">
Small button <span class="caret"></span>
</button>
<ul class="dropdown-menu">
...
</ul>
</div>
</div>
{% endhighlight %}
<h3 id="btn-dropdowns-dropup">Dropup buttons</h3>
<p>Trigger dropdown menus above elements by adding <code>.dropup</code> to the parent.</p>
<div class="bs-example">
<div class="btn-toolbar">
<div class="btn-group dropup">
<button type="button" class="btn btn-default">Dropup</button>
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button>
<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>
</div><!-- /btn-group -->
<div class="btn-group dropup">
<button type="button" class="btn btn-primary">Right dropup</button>
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button>
<ul class="dropdown-menu pull-right">
<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>
</div><!-- /btn-group -->
</div>
</div><!-- /example -->
{% highlight html %}
<div class="btn-group dropup">
<button type="button" class="btn btn-default">Dropup</button>
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
<!-- Dropdown menu links -->
</ul>
</div>
{% endhighlight %}
</div>
<!-- Navs
================================================== -->
<div class="bs-docs-section" id="nav">
<div class="page-header">
<h1>Navs</small></h1>
</div>
<p class="lead">Navs available in Bootstrap have shared markup, starting with the base <code>.nav</code> class, as well as shared states. Swap modifier classes to switch between each style.</p>
<h2 id="nav-tabs">Tabs</h2>
<p>Note the <code>.nav-tabs</code> class requires the <code>.nav</code> base class.</p>
<div class="bs-example">
<ul class="nav nav-tabs">
<li class="active"><a href="#">Home</a></li>
<li><a href="#">Profile</a></li>
<li><a href="#">Messages</a></li>
</ul>
</div>
{% highlight html %}
<ul class="nav nav-tabs">
<li class="active"><a href="#">Home</a></li>
<li><a href="#">Profile</a></li>
<li><a href="#">Messages</a></li>
</ul>
{% endhighlight %}
<h2 id="nav-pills">Pills</h2>
<p>Take that same HTML, but use <code>.nav-pills</code> instead:</p>
<div class="bs-example">
<ul class="nav nav-pills">
<li class="active"><a href="#">Home</a></li>
<li><a href="#">Profile</a></li>
<li><a href="#">Messages</a></li>
</ul>
</div>
{% highlight html %}
<ul class="nav nav-pills">
<li class="active"><a href="#">Home</a></li>
<li><a href="#">Profile</a></li>
<li><a href="#">Messages</a></li>
</ul>
{% endhighlight %}
<p>Pills are also vertically stackable. Just add <code>.nav-stacked</code>.</p>
<div class="bs-example">
<ul class="nav nav-pills nav-stacked" style="max-width: 300px;">
<li class="active"><a href="#">Home</a></li>
<li><a href="#">Profile</a></li>
<li><a href="#">Messages</a></li>
</ul>
</div>
{% highlight html %}
<ul class="nav nav-pills nav-stacked">
...
</ul>
{% endhighlight %}
<h2>Options</h2>
<h3 id="nav-justified">Justified links</h3>
<p>Easily make tabs or pills equal widths of their parent with <code>.nav-justified</code>.</p>
<div class="bs-example">
<ul class="nav nav-tabs nav-justified">
<li class="active"><a href="#">Home</a></li>
<li><a href="#">Profile</a></li>
<li><a href="#">Messages</a></li>
</ul>
<br>
<ul class="nav nav-pills nav-justified">
<li class="active"><a href="#">Home</a></li>
<li><a href="#">Profile</a></li>
<li><a href="#">Messages</a></li>
</ul>
</div>
{% highlight html %}
<ul class="nav nav-tabs nav-justified">
...
</ul>
<ul class="nav nav-pills nav-justified">
...
</ul>
{% endhighlight %}
<h3 id="nav-disabled-links">Disabled state</h3>
<p>For any nav component (tabs, pills, or list), add <code>.disabled</code> for <strong>gray links and no hover effects</strong>.</p>
<div class="bs-callout">
<h4>Link functionality not impacted</h4>
<p>This class will only change the <code>&lt;a&gt;</code>'s appearance, not its functionality. Use custom JavaScript to disable links here.</p>
</div>
<div class="bs-example">
<ul class="nav nav-pills">
<li><a href="#">Clickable link</a></li>
<li><a href="#">Clickable link</a></li>
<li class="disabled"><a href="#">Disabled link</a></li>
</ul>
</div>
{% highlight html %}
<ul class="nav nav-tabs">
...
<li class="disabled"><a href="#">Disabled link</a></li>
...
</ul>
{% endhighlight %}
<h3 id="nav-alignment">Component alignment</h3>
<p>To align nav links, use the <code>.pull-left</code> or <code>.pull-right</code> utility classes. Both classes will add a CSS float in the specified direction.</p>
<hr class="bs-docs-separator">
<h2 id="nav-dropdowns">Dropdowns</h2>
<p>Add dropdown menus with a little extra HTML and the <a href="./javascript.html#dropdowns">dropdowns JavaScript plugin</a>.</p>
<h3>Tabs with dropdowns</h3>
<div class="bs-example">
<ul class="nav nav-tabs">
<li class="active"><a href="#">Home</a></li>
<li><a href="#">Help</a></li>
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
Dropdown <span class="caret"></span>
</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>
{% highlight html %}
<ul class="nav nav-tabs">
...
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
Dropdown <span class="caret"></span>
</a>
<ul class="dropdown-menu">
...
</ul>
</li>
...
</ul>
{% endhighlight %}
<h3>Pills with dropdowns</h3>
<div class="bs-example">
<ul class="nav nav-pills">
<li class="active"><a href="#">Home</a></li>
<li><a href="#">Help</a></li>
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
Dropdown <span class="caret"></span>
</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><!-- /example -->
{% highlight html %}
<ul class="nav nav-pills">
...
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
Dropdown <span class="caret"></span>
</a>
<ul class="dropdown-menu">
...
</ul>
</li>
...
</ul>
{% endhighlight %}
</div>
<!-- Navbar
================================================== -->
<div class="bs-docs-section" id="navbar">
<div class="page-header">
<h1>Navbar</h1>
</div>
<h2 id="navbar-basic">Basic navbar</h2>
<p>To start, navbars are static (not fixed to the top) and include support for a project name and basic navigation. Place one anywhere within a <code>.container</code>, which sets the width of your site and content.</p>
<div class="bs-example">
<div class="navbar">
<a class="navbar-brand" href="#">Title</a>
<ul class="nav navbar-nav">
<li class="active"><a href="#">Home</a></li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
</ul>
</div>
</div><!-- /example -->
{% highlight html %}
<div class="navbar">
<a class="navbar-brand" href="#">Title</a>
<ul class="nav navbar-nav">
<li class="active"><a href="#">Home</a></li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
</ul>
</div>
{% endhighlight %}
<h2>Navbar components</h2>
<h3 id="navbar-brand">Brand</h3>
<p>A simple link to show your brand or project name only requires an anchor tag.</p>
<div class="bs-example">
<div class="navbar">
<a class="navbar-brand" href="#">Title</a>
</div>
</div><!-- /example -->
{% highlight html %}
<a class="navbar-brand" href="#">Title</a>
{% endhighlight %}
<h3 id="navbar-nav">Nav links</h3>
<p>Nav items are simple to add via unordered lists.</p>
<div class="bs-example">
<div class="navbar">
<ul class="nav navbar-nav">
<li class="active"><a href="#">Home</a></li>
<li><a href="#">Link</a></li>
<li class="disabled"><a href="#">Disabled</a></li>
</ul>
</div>
</div><!-- /example -->
{% highlight html %}
<ul class="nav navbar-nav">
<li class="active"><a href="#">Home</a></li>
<li><a href="#">Link</a></li>
<li class="disabled"><a href="#">Disabled</a></li>
</ul>
{% endhighlight %}
<h3 id="navbar-forms">Forms</h3>
<p>To properly style and position a form within the navbar, add the appropriate classes as shown below. For a default form, include <code>.navbar-form</code> and either <code>.pull-left</code> or <code>.pull-right</code> to properly align it.</p>
<div class="bs-example">
<div class="navbar">
<form class="navbar-form pull-left">
<input type="text" style="width: 200px;">
<button type="submit" class="btn btn-default">Submit</button>
</form>
</div>
<div class="navbar">
<form class="navbar-form pull-left">
<select name="" id="" style="width: 200px;">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
</select>
<button type="submit" class="btn btn-default">Submit</button>
</form>
</div>
<div class="navbar">
<form class="navbar-form pull-left">
<input type="text" style="width: 200px;">
<input type="checkbox">
<button type="submit" class="btn btn-default">Submit</button>
</form>
</div>
<div class="navbar">
<form class="navbar-form pull-left">
<input type="text" style="width: 200px;">
<label class="checkbox-inline">
<input type="checkbox"> Remember me
</label>
<button type="submit" class="btn btn-default">Submit</button>
</form>
</div>
</div><!-- /example -->
{% highlight html %}
<form class="navbar-form pull-left">
<input type="text" style="width: 200px;">
<button type="submit" class="btn btn-default">Submit</button>
</form>
{% endhighlight %}
<h3 id="navbar-buttons">Buttons</h3>
<p>For buttons not residing in a <code>&lt;form&gt;</code>, add this class to vertically center buttons within a navbar.</p>
<div class="bs-example">
<div class="navbar">
<a href="#" class="navbar-brand">Brand</a>
<button type="button" class="btn btn-default navbar-btn">Sign in</button>
</div>
</div>
{% highlight html %}
<button type="button" class="btn btn-default navbar-btn">Sign in</button>
{% endhighlight %}
<h3 id="navbar-text">Text</h3>
<p>Wrap strings of text in an element with <code>.navbar-text</code>, usually on a <code>&lt;p&gt;</code> tag for proper leading and color.</p>
<div class="bs-example">
<div class="navbar">
<a href="#" class="navbar-brand">Brand</a>
<p class="navbar-text">Signed in as Mark Otto</p>
</div>
</div>
{% highlight html %}
<div class="navbar">
<a href="#" class="navbar-brand">Brand</a>
<p class="navbar-text">Signed in as Mark Otto</p>
</div>
{% endhighlight %}
<h3 id="navbar-links">Links</h3>
<p>For folks using standard links that are not within the regular navbar navigation component, use the <code>.navbar-link</code> class to add the proper colors for the default and inverse navbar options.</p>
<div class="bs-example">
<div class="navbar">
<a href="#" class="navbar-brand">Brand</a>
<p class="navbar-text pull-right">Signed in as <a href="#" class="navbar-link">Mark Otto</a></p>
</div>
</div>
{% highlight html %}
<div class="navbar">
<a href="#" class="navbar-brand">Brand</a>
<p class="navbar-text pull-right">Signed in as <a href="#" class="navbar-link">Mark Otto</a></p>
</div>
{% endhighlight %}
<h3 id="navbar-component-alignment">Component alignment</h3>
<p>Align nav links, forms, buttons, or text, using the <code>.pull-left</code> or <code>.pull-right</code> utility classes. Both classes will add a CSS float in the specified direction. To align nav links, put them in a separate <code>&lt;ul&gt;</code> with the respective utility class applied.</p>
<h2>Optional display variations</h2>
<p>Fix the navbar to the top or bottom of the viewport with an additional class on the outermost div, <code>.navbar</code>. These will also remove rounded corners.</p>
<h3 id="navbar-fixed-top">Fixed to top</h3>
<p>Add <code>.navbar-fixed-top</code>.</p>
<div class="bs-example bs-navbar-top-example">
<div class="navbar navbar-fixed-top">
<div class="container" style="width: auto;">
<a class="navbar-brand" href="#">Title</a>
<ul class="nav navbar-nav">
<li class="active"><a href="#">Home</a></li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
</ul>
</div>
</div>
</div><!-- /example -->
{% highlight html %}
<div class="navbar navbar-fixed-top">
...
</div>
{% endhighlight %}
<div class="bs-callout">
<h4>Body padding required</h4>
<p>The fixed navbar will overlay your other content, unless you add <code>padding</code> to the top of the <code>&lt;body&gt;</code>. Try out your own values or use our snippet below. Tip: By default, the navbar is 50px high.</p>
{% highlight css %}
body { padding-top: 70px; }
{% endhighlight %}
<p>Make sure to include this <strong>after</strong> the core Bootstrap CSS.</p>
</div>
<h3 id="navbar-fixed-bottom">Fixed to bottom</h3>
<p>Add <code>.navbar-fixed-bottom</code> instead.</p>
<div class="bs-example bs-navbar-bottom-example">
<div class="navbar navbar-fixed-bottom">
<div class="container" style="width: auto;">
<a class="navbar-brand" href="#">Title</a>
<ul class="nav navbar-nav">
<li class="active"><a href="#">Home</a></li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
</ul>
</div>
</div>
</div><!-- /example -->
{% highlight html %}
<div class="navbar navbar-fixed-bottom">
...
</div>
{% endhighlight %}
<div class="bs-callout">
<h4>Body padding required</h4>
<p>The fixed navbar will overlay your other content, unless you add <code>padding</code> to the bottom of the <code>&lt;body&gt;</code>. Try out your own values or use our snippet below. Tip: By default, the navbar is 50px high.</p>
{% highlight css %}
body { padding-bottom: 70px; }
{% endhighlight %}
<p>Make sure to include this <strong>after</strong> the core Bootstrap CSS.</p>
</div>
<h3 id="navbar-static-top">Static top navbar</h3>
<p>Create a full-width navbar that scrolls away with the page by adding <code>.navbar-static-top</code>. Unlike the <code>.navbar-fixed-*</code> classes, you do not need to change any padding on the <code>body</code>.</p>
<div class="bs-example bs-navbar-top-example">
<div class="navbar navbar-static-top" style="margin: -1px -1px 0;">
<div class="container" style="width: auto;">
<a class="navbar-brand" href="#">Title</a>
<ul class="nav navbar-nav">
<li class="active"><a href="#">Home</a></li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
</ul>
</div>
</div>
</div><!-- /example -->
{% highlight html %}
<div class="navbar navbar-static-top">
...
</div>
{% endhighlight %}
<h2 id="navbar-responsive">Responsive navbar</h2>
<p>To implement a collapsing responsive navbar, wrap your navbar content in a containing div, <code>.nav-collapse.collapse</code>, and add the navbar toggle button, <code>.navbar-toggle</code>.</p>
<div class="bs-example">
<div class="navbar">
<div class="container">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Title</a>
<div class="nav-collapse collapse navbar-responsive-collapse">
<ul class="nav navbar-nav">
<li class="active"><a href="#">Home</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 class="nav-header">Nav header</li>
<li><a href="#">Separated link</a></li>
<li><a href="#">One more separated link</a></li>
</ul>
</li>
</ul>
<form class="navbar-form pull-left" action="">
<input type="text" class="col col-lg-8" placeholder="Search">
</form>
<ul class="nav navbar-nav pull-right">
<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>
</div><!-- /.nav-collapse -->
</div><!-- /.container -->
</div><!-- /.navbar -->
</div><!-- /example -->
{% highlight html %}
<div class="navbar">
<div class="container">
<!-- .navbar-toggle is used as the toggle for collapsed navbar content -->
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<!-- Be sure to leave the brand out there if you want it shown -->
<a class="navbar-brand" href="#">Title</a>
<!-- Place everything within .navbar-collapse to hide it until above 768px -->
<div class="nav-collapse collapse navbar-responsive-collapse">
...
</div><!-- /.nav-collapse -->
</div><!-- /.container -->
</div><!-- /.navbar -->
{% endhighlight %}
<div class="bs-callout">
<h4>Plugin dependency</h4>
<p>The responsive navbar requires the <a href="#collapse">collapse plugin</a> to be included in your version of Bootstrap.</p>
</div>
<h2>Inverted variation</h2>
<p>Modify the look of the navbar by adding <code>.navbar-inverse</code>.</p>
<div class="bs-example">
<div class="navbar navbar-inverse">
<div class="container">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-inverse-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Title</a>
<div class="nav-collapse collapse navbar-inverse-collapse">
<ul class="nav navbar-nav">
<li class="active"><a href="#">Home</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 class="nav-header">Nav header</li>
<li><a href="#">Separated link</a></li>
<li><a href="#">One more separated link</a></li>
</ul>
</li>
</ul>
<form class="navbar-form pull-left" action="">
<input type="text" class="col col-lg-8" placeholder="Search">
</form>
<ul class="nav navbar-nav pull-right">
<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>
</div><!-- /.nav-collapse -->
</div><!-- /.container -->
</div><!-- /.navbar -->
</div><!-- /example -->
{% highlight html %}
<div class="navbar navbar-inverse">
...
</div>
{% endhighlight %}
</div>
<!-- Breadcrumbs
================================================== -->
<div class="bs-docs-section" id="breadcrumbs">
<div class="page-header">
<h1>Breadcrumbs <small></small></h1>
</div>
<p class="lead">Indicate the current page's location within a navigational hierarchy.</p>
<p>Separators are automatically added in CSS through `:after` and `content`.</p>
<div class="bs-example">
<ul class="breadcrumb">
<li class="active">Home</li>
</ul>
<ul class="breadcrumb">
<li><a href="#">Home</a></li>
<li class="active">Library</li>
</ul>
<ul class="breadcrumb" style="margin-bottom: 5px;">
<li><a href="#">Home</a></li>
<li><a href="#">Library</a></li>
<li class="active">Data</li>
</ul>
</div>
{% highlight html %}
<ul class="breadcrumb">
<li><a href="#">Home</a></li>
<li><a href="#">Library</a></li>
<li class="active">Data</li>
</ul>
{% endhighlight %}
</div>
<!-- Pagination
================================================== -->
<div class="bs-docs-section" id="pagination">
<div class="page-header">
<h1>Pagination</h1>
</div>
<p class="lead">Provide pagination links for your site or app with the multi-page pagination component, or the simpler <a href="./docs/#pagination-pager">pager alternative</a>.</p>
<h2 id="pagination-default">Standard pagination</h2>
<p>Simple pagination inspired by Rdio, great for apps and search results. The large block is hard to miss, easily scalable, and provides large click areas.</p>
<div class="bs-example">
<ul class="pagination">
<li><a href="#">&laquo;</a></li>
<li><a href="#">1</a></li>
<li><a href="#">2</a></li>
<li><a href="#">3</a></li>
<li><a href="#">4</a></li>
<li><a href="#">5</a></li>
<li><a href="#">&raquo;</a></li>
</ul>
</div>
{% highlight html %}
<ul class="pagination">
<li><a href="#">&laquo;</a></li>
<li><a href="#">1</a></li>
<li><a href="#">2</a></li>
<li><a href="#">3</a></li>
<li><a href="#">4</a></li>
<li><a href="#">5</a></li>
<li><a href="#">&raquo;</a></li>
</ul>
{% endhighlight %}
<h3>Disabled and active states</h3>
<p>Links are customizable for different circumstances. Use <code>.disabled</code> for unclickable links and <code>.active</code> to indicate the current page.</p>
<div class="bs-example">
<ul class="pagination">
<li class="disabled"><a href="#">&laquo;</a></li>
<li class="active"><a href="#">1</a></li>
<li><a href="#">2</a></li>
<li><a href="#">3</a></li>
<li><a href="#">4</a></li>
<li><a href="#">5</a></li>
<li><a href="#">&raquo;</a></li>
</ul>
</div>
{% highlight html %}
<ul class="pagination">
<li class="disabled"><a href="#">&laquo;</a></li>
<li class="active"><a href="#">1</a></li>
...
</ul>
{% endhighlight %}
<p>You can optionally swap out active or disabled anchors for <code>&lt;span&gt;</code> to remove click functionality while retaining intended styles.</p>
{% highlight html %}
<ul class="pagination">
<li class="disabled"><span>&laquo;</span></li>
<li class="active"><span>1</span></li>
...
</ul>
{% endhighlight %}
<h3>Sizes</h3>
<p>Fancy larger or smaller pagination? Add <code>.pagination-large</code> or <code>.pagination-small</code> for additional sizes.</p>
<div class="bs-example">
<div>
<ul class="pagination pagination-large">
<li><a href="#">&laquo;</a></li>
<li><a href="#">1</a></li>
<li><a href="#">2</a></li>
<li><a href="#">3</a></li>
<li><a href="#">4</a></li>
<li><a href="#">5</a></li>
<li><a href="#">&raquo;</a></li>
</ul>
</div>
<div>
<ul class="pagination">
<li><a href="#">&laquo;</a></li>
<li><a href="#">1</a></li>
<li><a href="#">2</a></li>
<li><a href="#">3</a></li>
<li><a href="#">4</a></li>
<li><a href="#">5</a></li>
<li><a href="#">&raquo;</a></li>
</ul>
</div>
<div>
<ul class="pagination pagination-small">
<li><a href="#">&laquo;</a></li>
<li><a href="#">1</a></li>
<li><a href="#">2</a></li>
<li><a href="#">3</a></li>
<li><a href="#">4</a></li>
<li><a href="#">5</a></li>
<li><a href="#">&raquo;</a></li>
</ul>
</div>
</div>
{% highlight html %}
<ul class="pagination pagination-large">...</ul>
<ul class="pagination pagination">...</ul>
<ul class="pagination pagination-small">...</ul>
{% endhighlight %}
<h2 id="pagination-pager">Pager</h2>
<p>Quick previous and next links for simple pagination implementations with light markup and styles. It's great for simple sites like blogs or magazines.</p>
<h3>Default example</h3>
<p>By default, the pager centers links.</p>
<div class="bs-example">
<ul class="pager">
<li><a href="#">Previous</a></li>
<li><a href="#">Next</a></li>
</ul>
</div>
{% highlight html %}
<ul class="pager">
<li><a href="#">Previous</a></li>
<li><a href="#">Next</a></li>
</ul>
{% endhighlight %}
<h3>Aligned links</h3>
<p>Alternatively, you can align each link to the sides:</p>
<div class="bs-example">
<ul class="pager">
<li class="previous"><a href="#">&larr; Older</a></li>
<li class="next"><a href="#">Newer &rarr;</a></li>
</ul>
</div>
{% highlight html %}
<ul class="pager">
<li class="previous"><a href="#">&larr; Older</a></li>
<li class="next"><a href="#">Newer &rarr;</a></li>
</ul>
{% endhighlight %}
<h3>Optional disabled state</h3>
<p>Pager links also use the general <code>.disabled</code> utility class from the pagination.</p>
<div class="bs-example">
<ul class="pager">
<li class="previous disabled"><a href="#">&larr; Older</a></li>
<li class="next"><a href="#">Newer &rarr;</a></li>
</ul>
</div>
{% highlight html %}
<ul class="pager">
<li class="previous disabled"><a href="#">&larr; Older</a></li>
<li class="next"><a href="#">Newer &rarr;</a></li>
</ul>
{% endhighlight %}
</div>
<!-- Labels
================================================== -->
<div class="bs-docs-section" id="labels">
<div class="page-header">
<h1>Labels</h1>
</div>
<p class="lead"></p>
<h3>Example</h3>
<div class="bs-example">
<h1>Example heading <span class="label">New</span></h1>
<h2>Example heading <span class="label">New</span></h2>
<h3>Example heading <span class="label">New</span></h3>
<h4>Example heading <span class="label">New</span></h4>
<h5>Example heading <span class="label">New</span></h5>
<h6>Example heading <span class="label">New</span></h6>
</div>
{% highlight html %}
<h3>Example heading <span class="label">New</span></h3>
{% endhighlight %}
<h3>Available variations</h3>
<p>Add any of the below mentioned modifier classes to change the appearance of a label.</p>
<div class="bs-example">
<span class="label">Default</span>
<span class="label label-success">Success</span>
<span class="label label-warning">Warning</span>
<span class="label label-danger">Danger</span>
<span class="label label-info">Info</span>
</div>
{% highlight html %}
<span class="label">Default</span>
<span class="label label-success">Success</span>
<span class="label label-warning">Warning</span>
<span class="label label-danger">Danger</span>
<span class="label label-info">Info</span>
{% endhighlight %}
</div>
<!-- Badges
================================================== -->
<div class="bs-docs-section" id="badges">
<div class="page-header">
<h1>Badges</h1>
</div>
<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>
<div class="bs-example">
<a href="#">Inbox <span class="badge">42</span></a>
</div>
{% highlight html %}
<a href="#">Inbox <span class="badge">42</span></a>
{% endhighlight %}
<h4>Self collapsing</h4>
<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>
<div class="bs-callout">
<h4>Cross-browser compatibility</h4>
<p>Badges won't self collapse in Internet Explorer 8 because it lacks support for the <code>:empty</code> selector.</p>
</div>
<h4>Adapts to active nav states</h4>
<p>Built-in styles are included for placing badges in active states in pill and list navigations.</p>
<div class="bs-example">
<ul class="nav nav-pills">
<li class="active"><a href="#">Home <span class="badge">42</span></a></li>
<li><a href="#">Profile</a></li>
<li><a href="#">Messages <span class="badge">3</span></a></li>
</ul>
<br>
<ul class="nav nav-pills nav-stacked" style="max-width: 260px;">
<li class="active">
<a href="#">
<span class="badge pull-right">42</span>
Home
</a>
</li>
<li><a href="#">Profile</a></li>
<li>
<a href="#">
<span class="badge pull-right">3</span>
Messages
</a>
</li>
</ul>
</div>
{% highlight html %}
<ul class="nav nav-pills nav-stacked">
<li class="active">
<a href="#">
<span class="badge pull-right">42</span>
Home
</a>
</li>
...
</ul>
{% endhighlight %}
</div>
<!-- Typographic components
================================================== -->
<div class="bs-docs-section" id="type-components">
<div class="page-header">
<h1>Typographic components</h1>
</div>
<h2 id="type-components-jumbotron">Jumbotron</h2>
<p>A lightweight, flexible component to showcase key content on your site. It works well on marketing and content-heavy sites.</p>
<div class="bs-example">
<div class="jumbotron">
<h1>Hello, world!</h1>
<p>This is a simple hero unit, a simple jumbotron-style component for calling extra attention to featured content or information.</p>
<p><a class="btn btn-primary btn-large">Learn more</a></p>
</div>
</div>
{% highlight html %}
<div class="jumbotron">
<h1>Hello, world!</h1>
<p>...</p>
<p><a class="btn btn-primary btn-large">Learn more</a></p>
</div>
{% endhighlight %}
<h2 id="type-components-page-header">Page header</h2>
<p>A simple shell for an <code>h1</code> to appropriately space out and segment sections of content on a page. It can utilize the <code>h1</code>'s default <code>small</code> element, as well as most other components (with additional styles).</p>
<div class="bs-example">
<div class="page-header">
<h1>Example page header <small>Subtext for header</small></h1>
</div>
</div>
{% highlight html %}
<div class="page-header">
<h1>Example page header <small>Subtext for header</small></h1>
</div>
{% endhighlight %}
</div>
<!-- Thumbnails
================================================== -->
<div class="bs-docs-section" id="thumbnails">
<div class="page-header">
<h1>Thumbnails</h1>
</div>
<p class="lead">Extend Bootstrap's <a href="./docs/#grid">grid system</a> with the thumbnail component to easily display grids of images, videos, text, and more.</p>
<h3>Default thumbnails</h3>
<p>By default, Bootstrap's thumbnails are designed to showcase linked images with minimal required markup.</p>
<div class="bs-example">
<div class="row">
<div class="col col-lg-3">
<a href="#" class="thumbnail">
<img data-src="holder.js/260x180" alt="">
</a>
</div>
<div class="col col-lg-3">
<a href="#" class="thumbnail">
<img data-src="holder.js/260x180" alt="">
</a>
</div>
<div class="col col-lg-3">
<a href="#" class="thumbnail">
<img data-src="holder.js/260x180" alt="">
</a>
</div>
<div class="col col-lg-3">
<a href="#" class="thumbnail">
<img data-src="holder.js/260x180" alt="">
</a>
</div>
</div>
</div><!-- /.bs-example -->
{% highlight html %}
<div class="row">
<div class="col col-lg-3">
<a href="#" class="thumbnail">
<img data-src="holder.js/260x180" alt="">
</a>
</div>
...
</div>
{% endhighlight %}
<h3>Custom content thumbnails</h3>
<p>With a bit of extra markup, it's possible to add any kind of HTML content like headings, paragraphs, or buttons into thumbnails.</p>
<div class="bs-example">
<div class="row">
<div class="col col-lg-4">
<div class="thumbnail">
<img data-src="holder.js/300x200" alt="">
<div class="caption">
<h3>Thumbnail label</h3>
<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>
<p><a href="#" class="btn btn-primary">Action</a> <a href="#" class="btn btn-default">Action</a></p>
</div>
</div>
</div>
<div class="col col-lg-4">
<div class="thumbnail">
<img data-src="holder.js/300x200" alt="">
<div class="caption">
<h3>Thumbnail label</h3>
<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>
<p><a href="#" class="btn btn-primary">Action</a> <a href="#" class="btn btn-default">Action</a></p>
</div>
</div>
</div>
<div class="col col-lg-4">
<div class="thumbnail">
<img data-src="holder.js/300x200" alt="">
<div class="caption">
<h3>Thumbnail label</h3>
<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>
<p><a href="#" class="btn btn-primary">Action</a> <a href="#" class="btn btn-default">Action</a></p>
</div>
</div>
</div>
</div>
</div><!-- /.bs-example -->
{% highlight html %}
<div class="row">
<div class="col col-lg-3">
<div class="thumbnail">
<img data-src="holder.js/300x200" alt="">
<div class="caption">
<h3>Thumbnail label</h3>
<p>...</p>
<p><a href="#" class="btn btn-primary">Action</a> <a href="#" class="btn btn-default">Action</a></p>
</div>
</div>
</div>
</div>
{% endhighlight %}
</div>
<!-- Alerts
================================================== -->
<div class="bs-docs-section" id="alerts">
<div class="page-header">
<h1>Alerts</h1>
</div>
<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="./docs/#js-alerts">alerts jQuery plugin</a>.</p>
<h3 id="alerts-default">Default alert</h3>
<p>Wrap any text and an optional dismiss button in <code>.alert</code> for a basic warning alert message. <strong>To ensure proper behavior across all devices</strong>, be sure to use <code>&lt;button&gt;</code> element with the <code>data-dismiss="alert"</code> data attribute.</p>
<div class="bs-example">
<div class="alert">
<button type="button" class="close" data-dismiss="alert">&times;</button>
<strong>Warning!</strong> Best check yo self, you're not looking too good.
</div>
</div>
{% highlight html %}
<div class="alert">
<button type="button" class="close" data-dismiss="alert">&times;</button>
<strong>Warning!</strong> Best check yo self, you're not looking too good.
</div>
{% endhighlight %}
<h3 id="alerts-block">Block alerts</h3>
<p>For longer messages, increase the padding on the top and bottom of the alert wrapper by adding <code>.alert-block</code>.</p>
<div class="bs-example">
<div class="alert alert-block">
<button type="button" class="close" data-dismiss="alert">&times;</button>
<h4>Warning!</h4>
<p>Best check yo self, you're not looking too good. Nulla vitae elit libero, a pharetra augue. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.</p>
</div>
</div>
{% highlight html %}
<div class="alert alert-block">
<button type="button" class="close" data-dismiss="alert">&times;</button>
<h4>Warning!</h4>
<p>...</p>
</div>
{% endhighlight %}
<h3 id="alerts-alternatives">Contextual alternatives</h3>
<p>Add optional classes to change an alert's connotation.</p>
<div class="bs-example">
<div class="alert alert-danger">
<button type="button" class="close" data-dismiss="alert">&times;</button>
<strong>Oh snap!</strong> Change a few things up and try submitting again.
</div>
<div class="alert alert-success">
<button type="button" class="close" data-dismiss="alert">&times;</button>
<strong>Well done!</strong> You successfully read this important alert message.
</div>
<div class="alert alert-info">
<button type="button" class="close" data-dismiss="alert">&times;</button>
<strong>Heads up!</strong> This alert needs your attention, but it's not super important.
</div>
</div>
{% highlight html %}
<div class="alert alert-danger">...</div>
<div class="alert alert-success">...</div>
<div class="alert alert-info">...</div>
{% endhighlight %}
<h3 id="alerts-links">Links in alerts</h3>
<p>Use the <code>.alert-link</code> utility class to quickly provide matching colored links within any alert.</p>
<div class="bs-example">
<div class="alert alert-danger">
<button type="button" class="close" data-dismiss="alert">&times;</button>
<strong>Oh snap!</strong> <a href="#" class="alert-link">Change a few things up</a> and try submitting again.
</div>
<div class="alert alert-success">
<button type="button" class="close" data-dismiss="alert">&times;</button>
<strong>Well done!</strong> You successfully read <a href="#" class="alert-link">this important alert message</a>.
</div>
<div class="alert alert-info">
<button type="button" class="close" data-dismiss="alert">&times;</button>
<strong>Heads up!</strong> This <a href="#" class="alert-link">alert needs your attention</a>, but it's not super important.
</div>
</div>
{% highlight html %}
<div class="alert alert-danger">
<a href="#" class="alert-link">...</a>
</div>
<div class="alert alert-success">
<a href="#" class="alert-link">...</a>
</div>
<div class="alert alert-info">
<a href="#" class="alert-link">...</a>
</div>
{% endhighlight %}
</div>
<!-- Progress bars
================================================== -->
<div class="bs-docs-section" id="progress">
<div class="page-header">
<h1>Progress bars</h1>
</div>
<p class="lead">Provide up-to-date feedback on the progress of a workflow or action with simple yet flexible progress bars.</p>
<div class="bs-callout">
<h4>Cross-browser compatibility</h4>
<p>Progress bars use CSS3 transitions and animations to achieve some of their effects. These features are not supported in Internet Explorer 9 and below or older versions of Firefox. Opera 12 does not support animations.</p>
</div>
<h3 id="progress-basic">Basic</h3>
<p>Default progress bar with a vertical gradient.</p>
<div class="bs-example">
<div class="progress">
<div class="progress-bar" style="width: 60%;"></div>
</div>
</div>
{% highlight html %}
<div class="progress">
<div class="progress-bar" style="width: 60%;"></div>
</div>
{% endhighlight %}
<h3 id="progress-alternatives">Contextual alternatives</h3>
<p>Progress bars use some of the same button and alert classes for consistent styles.</p>
<div class="bs-example">
<div class="progress" style="margin-bottom: 9px;">
<div class="progress-bar progress-bar-info" style="width: 20%"></div>
</div>
<div class="progress" style="margin-bottom: 9px;">
<div class="progress-bar progress-bar-success" style="width: 40%"></div>
</div>
<div class="progress" style="margin-bottom: 9px;">
<div class="progress-bar progress-bar-warning" style="width: 60%"></div>
</div>
<div class="progress">
<div class="progress-bar progress-bar-danger" style="width: 80%"></div>
</div>
</div>
{% highlight html %}
<div class="progress">
<div class="progress-bar progress-bar-info" style="width: 20%"></div>
</div>
<div class="progress">
<div class="progress-bar progress-bar-success" style="width: 40%"></div>
</div>
<div class="progress">
<div class="progress-bar progress-bar-warning" style="width: 60%"></div>
</div>
<div class="progress">
<div class="progress-bar progress-bar-danger" style="width: 80%"></div>
</div>
{% endhighlight %}
<h3 id="progress-striped">Striped</h3>
<p>Uses a gradient to create a striped effect. Not available in IE8.</p>
<div class="bs-example">
<div class="progress progress-striped" style="margin-bottom: 9px;">
<div class="progress-bar progress-bar-info" style="width: 20%"></div>
</div>
<div class="progress progress-striped" style="margin-bottom: 9px;">
<div class="progress-bar progress-bar-success" style="width: 40%"></div>
</div>
<div class="progress progress-striped" style="margin-bottom: 9px;">
<div class="progress-bar progress-bar-warning" style="width: 60%"></div>
</div>
<div class="progress progress-striped">
<div class="progress-bar progress-bar-danger" style="width: 80%"></div>
</div>
</div>
{% highlight html %}
<div class="progress progress-striped">
<div class="progress-bar progress-bar-info" style="width: 20%"></div>
</div>
<div class="progress progress-striped">
<div class="progress-bar progress-bar-success" style="width: 40%"></div>
</div>
<div class="progress progress-striped">
<div class="progress-bar progress-bar-warning" style="width: 60%"></div>
</div>
<div class="progress progress-striped">
<div class="progress-bar progress-bar-danger" style="width: 80%"></div>
</div>
{% endhighlight %}
<h3 id="progress-animated">Animated</h3>
<p>Add <code>.active</code> to <code>.progress-striped</code> to animate the stripes right to left. Not available in all versions of IE.</p>
<div class="bs-example">
<div class="progress progress-striped active">
<div class="progress-bar" style="width: 45%"></div>
</div>
</div>
{% highlight html %}
<div class="progress progress-striped active">
<div class="progress-bar" style="width: 45%"></div>
</div>
{% endhighlight %}
<h3 id="progress-stacked">Stacked</h3>
<p>Place multiple bars into the same <code>.progress</code> to stack them.</p>
<div class="bs-example">
<div class="progress">
<div class="progress-bar progress-bar-success" style="width: 35%"></div>
<div class="progress-bar progress-bar-warning" style="width: 20%"></div>
<div class="progress-bar progress-bar-danger" style="width: 10%"></div>
</div>
</div>
{% highlight html %}
<div class="progress">
<div class="progress-bar progress-bar-success" style="width: 35%"></div>
<div class="progress-bar progress-bar-warning" style="width: 20%"></div>
<div class="progress-bar progress-bar-danger" style="width: 10%"></div>
</div>
{% endhighlight %}
</div>
<!-- Media object
================================================== -->
<div class="bs-docs-section" id="media">
<div class="page-header">
<h1>Media object</h1>
</div>
<p class="lead">Abstract object styles for building various types of components (like blog comments, Tweets, etc) that feature a left- or right-aligned image alongside textual content.</p>
<h3>Default example</h3>
<p>The default media allow to float a media object (images, video, audio) to the left or right of a content block.</p>
<div class="bs-example">
<div class="media">
<a class="pull-left" href="#">
<img class="media-object" data-src="holder.js/64x64">
</a>
<div class="media-body">
<h4 class="media-heading">Media heading</h4>
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
</div>
</div>
<div class="media">
<a class="pull-left" href="#">
<img class="media-object" data-src="holder.js/64x64">
</a>
<div class="media-body">
<h4 class="media-heading">Media heading</h4>
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
<div class="media">
<a class="pull-left" href="#">
<img class="media-object" data-src="holder.js/64x64">
</a>
<div class="media-body">
<h4 class="media-heading">Media heading</h4>
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
</div>
</div>
</div>
</div>
</div><!-- /.bs-example -->
{% highlight html %}
<div class="media">
<a class="pull-left" href="#">
<img class="media-object" src="...">
</a>
<div class="media-body">
<h4 class="media-heading">Media heading</h4>
...
</div>
</div>
{% endhighlight %}
<h3>Media list</h3>
<p>With a bit of extra markup, you can use media inside list (useful for comment threads or articles lists).</p>
<div class="bs-example">
<ul class="media-list">
<li class="media">
<a class="pull-left" href="#">
<img class="media-object" data-src="holder.js/64x64">
</a>
<div class="media-body">
<h4 class="media-heading">Media heading</h4>
<p>Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.</p>
<!-- Nested media object -->
<div class="media">
<a class="pull-left" href="#">
<img class="media-object" data-src="holder.js/64x64">
</a>
<div class="media-body">
<h4 class="media-heading">Nested media heading</h4>
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.
<!-- Nested media object -->
<div class="media">
<a class="pull-left" href="#">
<img class="media-object" data-src="holder.js/64x64">
</a>
<div class="media-body">
<h4 class="media-heading">Nested media heading</h4>
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.
</div>
</div>
</div>
</div>
<!-- Nested media object -->
<div class="media">
<a class="pull-left" href="#">
<img class="media-object" data-src="holder.js/64x64">
</a>
<div class="media-body">
<h4 class="media-heading">Nested media heading</h4>
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.
</div>
</div>
</div>
</li>
<li class="media">
<a class="pull-right" href="#">
<img class="media-object" data-src="holder.js/64x64">
</a>
<div class="media-body">
<h4 class="media-heading">Media heading</h4>
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.
</div>
</li>
</ul>
</div>
{% highlight html %}
<ul class="media-list">
<li class="media">
<a class="pull-left" href="#">
<img class="media-object" src="...">
</a>
<div class="media-body">
<h4 class="media-heading">Media heading</h4>
...
</div>
</li>
</ul>
{% endhighlight %}
</div>
<!-- List group
================================================== -->
<div class="bs-docs-section" id="list-group">
<div class="page-header">
<h1>List group</h1>
</div>
<p class="lead">List groups are a flexible and powerful component for displaying not only simple lists of elements, but complex ones with custom content.</p>
<h3 id="list-group-basic">Basic list group</h3>
<p>The most basic list group is simply an unordered list with list items, and the proper classes. Build upon it with the options that follow, or your own CSS as needed.</p>
<div class="bs-example">
<ul class="list-group">
<li class="list-group-item">Cras justo odio</li>
<li class="list-group-item">Dapibus ac facilisis in</li>
<li class="list-group-item">Morbi leo risus</li>
<li class="list-group-item">Porta ac consectetur ac</li>
<li class="list-group-item">Vestibulum at eros</li>
</ul>
</div>
{% highlight html %}
<ul class="list-group">
<li class="list-group-item">Cras justo odio</li>
<li class="list-group-item">Dapibus ac facilisis in</li>
<li class="list-group-item">Morbi leo risus</li>
<li class="list-group-item">Porta ac consectetur ac</li>
<li class="list-group-item">Vestibulum at eros</li>
</ul>
{% endhighlight %}
<h3 id="list-group-chevrons">With chevrons</h3>
<p>Add Glyphicon chevrons that are automatically moved to the right.</p>
<div class="bs-example">
<ul class="list-group">
<li class="list-group-item">
<span class="glyphicon glyphicon-chevron-right"></span>
Cras justo odio
</li>
<li class="list-group-item">
<span class="glyphicon glyphicon-chevron-right"></span>
Dapibus ac facilisis in
</li>
<li class="list-group-item">
<span class="glyphicon glyphicon-chevron-right"></span>
Morbi leo risus
</li>
</ul>
</div>
{% highlight html %}
<ul class="list-group">
<li class="list-group-item">
<span class="glyphicon glyphicon-chevron-right"></span>
Cras justo odio
</li>
</ul>
{% endhighlight %}
<h3 id="list-group-badges">With badges</h3>
<p>Add the badges component to any list group item and it will automatically be positioned on the right.</p>
<div class="bs-example">
<ul class="list-group">
<li class="list-group-item">
<span class="badge">14</span>
Cras justo odio
</li>
<li class="list-group-item">
<span class="badge">2</span>
Dapibus ac facilisis in
</li>
<li class="list-group-item">
<span class="badge">1</span>
Morbi leo risus
</li>
</ul>
</div>
{% highlight html %}
<ul class="list-group">
<li class="list-group-item">
<span class="badge">14</span>
Cras justo odio
</li>
</ul>
{% endhighlight %}
<h3 id="list-group-badges-chevrons">With badges and chevrons</h3>
<p>Why not both?</p>
<div class="bs-example">
<ul class="list-group">
<li class="list-group-item">
<span class="glyphicon glyphicon-chevron-right"></span>
<span class="badge">14</span>
Cras justo odio
</li>
<li class="list-group-item">
<span class="glyphicon glyphicon-chevron-right"></span>
<span class="badge">2</span>
Dapibus ac facilisis in
</li>
<li class="list-group-item">
<span class="glyphicon glyphicon-chevron-right"></span>
<span class="badge">1</span>
Morbi leo risus
</li>
</ul>
</div>
{% highlight html %}
<ul class="list-group">
<li class="list-group-item">
<span class="glyphicon glyphicon-chevron-right"></span>
<span class="badge">14</span>
Cras justo odio
</li>
</ul>
{% endhighlight %}
<h3 id="list-group-linked">Linked list group</h3>
<p>Linkify list group items by using anchor tags instead of list items (that also means a parent <code>&lt;div&gt;</code> instead of an <code>&lt;ul&gt;</code>). No need for individual parents around each element.</p>
<div class="bs-example">
<div class="list-group">
<a href="#" class="list-group-item active">
Cras justo odio
<span class="glyphicon glyphicon-chevron-right"></span>
</a>
<a href="#" class="list-group-item">Dapibus ac facilisis in
<span class="glyphicon glyphicon-chevron-right"></span>
</a>
<a href="#" class="list-group-item">Morbi leo risus
<span class="glyphicon glyphicon-chevron-right"></span>
</a>
<a href="#" class="list-group-item">Porta ac consectetur ac
<span class="glyphicon glyphicon-chevron-right"></span>
</a>
<a href="#" class="list-group-item">Vestibulum at eros
<span class="glyphicon glyphicon-chevron-right"></span>
</a>
</div>
</div>
{% highlight html %}
<div class="list-group">
<a href="#" class="list-group-item active">
Cras justo odio
<span class="glyphicon glyphicon-chevron-right"></span>
</a>
<a href="#" class="list-group-item">Dapibus ac facilisis in
<span class="glyphicon glyphicon-chevron-right"></span>
</a>
<a href="#" class="list-group-item">Morbi leo risus
<span class="glyphicon glyphicon-chevron-right"></span>
</a>
<a href="#" class="list-group-item">Porta ac consectetur ac
<span class="glyphicon glyphicon-chevron-right"></span>
</a>
<a href="#" class="list-group-item">Vestibulum at eros
<span class="glyphicon glyphicon-chevron-right"></span>
</a>
</div>
{% endhighlight %}
<h3 id="list-group-custom-content">Custom content</h3>
<p>Add nearly any HTML within, even for linked list groups like the one below.</p>
<div class="bs-example">
<div class="list-group">
<a href="#" class="list-group-item active">
<h4 class="list-group-item-heading">List group item heading</h4>
<p class="list-group-item-text">Donec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit.</p>
</a>
<a href="#" class="list-group-item">
<h4 class="list-group-item-heading">List group item heading</h4>
<p class="list-group-item-text">Donec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit.</p>
</a>
<a href="#" class="list-group-item">
<h4 class="list-group-item-heading">List group item heading</h4>
<p class="list-group-item-text">Donec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit.</p>
</a>
</div>
</div>
{% highlight html %}
<div class="list-group">
<a href="#" class="list-group-item active">
<h4 class="list-group-item-heading">List group item heading</h4>
<p class="list-group-item-text">...</p>
</a>
</div>
{% endhighlight %}
</div>
<!-- Panels
================================================== -->
<div class="bs-docs-section" id="panels">
<div class="page-header">
<h1>Panels</h1>
</div>
<p class="lead">While not always necessary, sometimes you need to put your DOM in a box. For those situations, try the panel component.</p>
<h3 id="panels-basic">Basic panel</h3>
<p>By default, all the <code>.panel</code> does is apply some basic border and padding to contain some content.</p>
<div class="bs-example">
<div class="panel">
Basic panel example
</div>
</div>
{% highlight html %}
<div class="panel">
Basic panel example
</div>
{% endhighlight %}
<h3 id="panels-heading">Panel with heading</h3>
<p>Easily add a heading to your panel with <code>.panel-heading</code>. Use it on a <code>&lt;div&gt;</code> or any heading element (e.g., <code>&lt;h3&gt;</code>).</p>
<div class="bs-example">
<div class="panel">
<div class="panel-heading">Panel heading</div>
Panel content
</div>
</div>
{% highlight html %}
<div class="panel">
<div class="panel-heading">Panel heading</div>
Panel content
</div>
{% endhighlight %}
<h3 id="panels-footer">Panel with footer</h3>
<p>Wrap buttons or secondary text in <code>.panel-footer</code>.</p>
<div class="bs-example">
<div class="panel">
Panel content
<div class="panel-footer">Panel footer</div>
</div>
</div>
{% highlight html %}
<div class="panel">
Panel content
<div class="panel-footer">Panel footer</div>
</div>
{% endhighlight %}
<h3 id="panels-alternatives">Contextual alternatives</h3>
<p>Like other components, easily make a panel more meaningful to a particular context by adding any of the contextual state classes.</p>
<div class="bs-example">
<div class="panel panel-primary">
<div class="panel-heading">Panel heading</div>
Panel content
</div>
<div class="panel panel-success">
<div class="panel-heading">Panel heading</div>
Panel content
</div>
<div class="panel panel-warning">
<div class="panel-heading">Panel heading</div>
Panel content
</div>
<div class="panel panel-danger">
<div class="panel-heading">Panel heading</div>
Panel content
</div>
<div class="panel panel-info">
<div class="panel-heading">Panel heading</div>
Panel content
</div>
</div>
{% highlight html %}
<div class="panel panel-primary">...</div>
<div class="panel panel-success">...</div>
<div class="panel panel-warning">...</div>
<div class="panel panel-danger">...</div>
<div class="panel panel-info">...</div>
{% endhighlight %}
<h3 id="panels-list-group">With list groups</h3>
<p>Easily include full-width <a href="./docs/#list-group">list groups</a> within any panel.</p>
<div class="bs-example">
<div class="panel">
<!-- Default panel contents -->
<div class="panel-heading">Panel heading</div>
<p>Some default panel content here. Nulla vitae elit libero, a pharetra augue. Aenean lacinia bibendum nulla sed consectetur. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
<!-- List group -->
<ul class="list-group list-group-flush">
<li class="list-group-item">Cras justo odio</li>
<li class="list-group-item">Dapibus ac facilisis in</li>
<li class="list-group-item">Morbi leo risus</li>
<li class="list-group-item">Porta ac consectetur ac</li>
<li class="list-group-item">Vestibulum at eros</li>
</ul>
</div>
</div>
{% highlight html %}
<div class="panel">
<!-- Default panel contents -->
<div class="panel-heading">Panel heading</div>
<p>...</p>
<!-- List group -->
<ul class="list-group list-group-flush">
<li class="list-group-item">Cras justo odio</li>
<li class="list-group-item">Dapibus ac facilisis in</li>
<li class="list-group-item">Morbi leo risus</li>
<li class="list-group-item">Porta ac consectetur ac</li>
<li class="list-group-item">Vestibulum at eros</li>
</ul>
</div>
{% endhighlight %}
</div>
<!-- Wells
================================================== -->
<div class="bs-docs-section" id="wells">
<div class="page-header">
<h1>Wells</h1>
</div>
<h3>Default well</h3>
<p>Use the well as a simple effect on an element to give it an inset effect.</p>
<div class="bs-example">
<div class="well">
Look, I'm in a well!
</div>
</div>
{% highlight html %}
<div class="well">...</div>
{% endhighlight %}
<h3>Optional classes</h3>
<p>Control padding and rounded corners with two optional modifier classes.</p>
<div class="bs-example">
<div class="well well-large">
Look, I'm in a well!
</div>
</div>
{% highlight html %}
<div class="well well-large">...</div>
{% endhighlight %}
<div class="bs-example">
<div class="well well-small">
Look, I'm in a well!
</div>
</div>
{% highlight html %}
<div class="well well-small">...</div>
{% endhighlight %}
</div>

2038
docs/css.html Normal file
View File

@ -0,0 +1,2038 @@
---
layout: default
title: CSS
slug: css
lead: "Fundamental HTML elements styled and enhanced with extensible classes."
---
<!-- Global Bootstrap settings
================================================== -->
<div class="bs-docs-section" id="overview">
<div class="page-header">
<h1>Overview</h1>
</div>
<p class="lead">Get the lowdown on the key pieces of Bootstrap's infrastructure, including our approach to better, faster, stronger web development.</p>
<h3 id="overview-doctype">HTML5 doctype required</h3>
<p>Bootstrap makes use of certain HTML elements and CSS properties that require the use of the HTML5 doctype. Include it at the beginning of all your projects.</p>
{% highlight html %}
<!DOCTYPE html>
<html lang="en">
...
</html>
{% endhighlight %}
<h3 id="overview-mobile">Mobile first</h3>
<p>With Bootstrap 2, we added optional mobile friendly styles for key aspects of the framework. With Bootstrap 3, we've rewritten the project to be mobile friendly from the start. Instead of adding on optional mobile styles, they're baked right into the core. In fact, <strong>Bootstrap is mobile first</strong>. Mobile first styles can be found throughout the entire library instead of in separate files.</p>
<p>To ensure proper rendering and touch zooming, <strong>add the viewport meta tag</strong> to your <code>&lt;head&gt;</code>.</p>
{% highlight html %}
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{% endhighlight %}
<h3 id="overview-responsive-images">Responsive images</h3>
<p>We automatically attempt to scale images to appropriate sizes with a global <code>max-width: 100%;</code> on all <code>&lt;img&gt;</code> elements. If you run into problems (e.g., with Google Maps), be sure to disable this property on a per-case basis.</p>
<h3 id="overview-type-links">Typography and links</h3>
<p>Bootstrap sets basic global display, typography, and link styles. Specifically, we:</p>
<ul>
<li>Remove <code>margin</code> on the body</li>
<li>Set <code>background-color: white;</code> on the <code>body</code></li>
<li>Use the <code>@font-family-base</code>, <code>@font-size-base</code>, and <code>@line-height-base</code> attributes as our typographic base</li>
<li>Set the global link color via <code>@link-color</code> and apply link underlines only on <code>:hover</code></li>
</ul>
<p>These styles can be found within <strong>scaffolding.less</strong>.</p>
<h3 id="overview-reset">Normalize reset</h3>
<p>For improved cross-browser rendering, we use <a href="http://necolas.github.com/normalize.css/" target="_blank">Normalize</a>, a project by <a href="http://twitter.com/necolas" target="_blank">Nicolas Gallagher</a> and <a href="http://twitter.com/jon_neal" target="_blank">Jonathan Neal</a>.</p>
<h3 id="overview-container">Centering with container</h3>
<p>Easily center a page's contents by wrapping its contents in a container. Containers set `max-width` at various media query breakpoints to match our grid system.</p>
{% highlight html %}
<div class="container">
...
</div>
{% endhighlight %}
</div>
<!-- Grid system
================================================== -->
<div class="bs-docs-section" id="grid">
<div class="page-header">
<h1>Grid system</h1>
</div>
<p class="lead">Bootstrap includes a responsive, percent-based grid system that appropriately scales up to 12 columns as the device or viewport size increases&mdash;in other words, it's mobile first. It includes <a href="#grid-example">predefined classes</a> for this, as well as powerful <a href="#grid-less">mixins for generating semantic layouts</a>.</p>
<h3 id="grid-example">Grid example</h3>
<p>On mobile devices, the grid starts out stacked. Above 768px, it becomes horizontal as media queries kick in to apply <code>float</code>s and <code>width</code>s. To create a basic grid layout, wrap a series of <code>.col-lg-*</code> elements within a <code>.row</code>. As this is a 12-column grid, each <code>.col-lg-*</code> spans a number of those 12 columns, and should always add up to 12 for each row (or the number of columns in the parent), even at mobile resolutions.</p>
<p>Be sure to checkout the <a href="../examples/grid/">full-page grid example</a> as well.</p>
<div class="bs-docs-grid">
<div class="row show-grid">
<div class="col col-lg-1">1</div>
<div class="col col-lg-1">1</div>
<div class="col col-lg-1">1</div>
<div class="col col-lg-1">1</div>
<div class="col col-lg-1">1</div>
<div class="col col-lg-1">1</div>
<div class="col col-lg-1">1</div>
<div class="col col-lg-1">1</div>
<div class="col col-lg-1">1</div>
<div class="col col-lg-1">1</div>
<div class="col col-lg-1">1</div>
<div class="col col-lg-1">1</div>
</div>
<div class="row show-grid">
<div class="col col-lg-4">4</div>
<div class="col col-lg-4">4</div>
<div class="col col-lg-4">4</div>
</div>
<div class="row show-grid">
<div class="col col-lg-6">6</div>
<div class="col col-lg-6">6</div>
</div>
</div>
{% highlight html %}
<div class="row">
<div class="col col-lg-1">1</div>
<div class="col col-lg-1">1</div>
<div class="col col-lg-1">1</div>
<div class="col col-lg-1">1</div>
<div class="col col-lg-1">1</div>
<div class="col col-lg-1">1</div>
<div class="col col-lg-1">1</div>
<div class="col col-lg-1">1</div>
<div class="col col-lg-1">1</div>
<div class="col col-lg-1">1</div>
<div class="col col-lg-1">1</div>
<div class="col col-lg-1">1</div>
</div>
<div class="row">
<div class="col col-lg-4">4</div>
<div class="col col-lg-4">4</div>
<div class="col col-lg-4">4</div>
</div>
<div class="row">
<div class="col col-lg-6">6</div>
<div class="col col-lg-6">6</div>
</div>
{% endhighlight %}
<h3 id="grid-offsetting">Offsetting columns</h3>
<p>Move columns to the right using <code>.col-offset-*</code> classes. These classes increase the left margin of a column by <code>*</code> columns. For example, <code>.col-offset-4</code> moves <code>.col col-lg-4</code> over four columns.</p>
<div class="bs-docs-grid">
<div class="row show-grid">
<div class="col col-lg-4">4</div>
<div class="col col-lg-4 col-offset-4">4 offset 4</div>
</div><!-- /row -->
<div class="row show-grid">
<div class="col col-lg-3 col-offset-3">3 offset 3</div>
<div class="col col-lg-3 col-offset-3">3 offset 3</div>
</div><!-- /row -->
<div class="row show-grid">
<div class="col col-lg-6 col-offset-3">6 offset 3</div>
</div><!-- /row -->
</div>
{% highlight html %}
<div class="row">
<div class="col col-lg-4">...</div>
<div class="col col-lg-4 col-offset-4">...</div>
</div>
<div class="row">
<div class="col col-lg-3 col-offset-3">3 offset 3</div>
<div class="col col-lg-3 col-offset-3">3 offset 3</div>
</div>
<div class="row">
<div class="col col-lg-6 col-offset-3">...</div>
</div>
{% endhighlight %}
<h3 id="grid-nesting">Nesting columns</h3>
<p>To nest your content with the default grid, add a new <code>.row</code> and set of <code>.col-lg-*</code> columns within an existing <code>.col-lg-*</code> column. Nested rows should include a set of columns that add up to 12.</p>
<div class="row show-grid">
<div class="col col-lg-9">
Level 1: 9 columns
<div class="row show-grid">
<div class="col col-lg-6">
Level 2: 6 columns
</div>
<div class="col col-lg-6">
Level 2: 6 columns
</div>
</div>
</div>
</div>
{% highlight html %}
<div class="row">
<div class="col col-lg-9">
Level 1: 9 columns
<div class="row">
<div class="col col-lg-6">
Level 2: 6 columns
</div>
<div class="col col-lg-6">
Level 2: 6 columns
</div>
</div>
</div>
</div>
{% endhighlight %}
<h3 id="grid-column-ordering">Column ordering</h3>
<p>Easily change the order of our built-in grid columns with <code>.col-push-*</code> and <code>.col-pull-*</code> modifier classes.</p>
<div class="row show-grid">
<div class="col col-lg-9 col-push-3">9</div>
<div class="col col-lg-3 col-pull-9">3</div>
</div>
{% highlight html %}
<div class="row show-grid">
<div class="col col-lg-9 col-push-3">9</div>
<div class="col col-lg-3 col-pull-9">3</div>
</div>
{% endhighlight %}
<h3 id="grid-small">Small device grid</h3>
<p>Use the small device grid classes, like <code>.col-sm-6</code>, to create columned layouts on phone and tablet devices (anything under 768px). Offsets, pushes, and pulls are not available with the small grid at this time.</p>
<div class="row show-grid">
<div class="col col-lg-4 col-sm-6">4 cols, 6 small cols</div>
<div class="col col-lg-4 col-sm-6">4 cols, 6 small cols</div>
<div class="col col-lg-4 col-sm-12">4 cols, 12 small cols</div>
</div>
{% highlight html %}
<div class="row">
<div class="col col-lg-4 col-sm-6">4 cols, 6 small cols</div>
<div class="col col-lg-4 col-sm-6">4 cols, 6 small cols</div>
<div class="col col-lg-4 col-sm-12">4 cols, 12 small cols</div>
</div>
{% endhighlight %}
<h3 id="grid-less">LESS mixins and variables</h3>
<p>In addition to <a href="#grid-example">prebuilt grid classes</a> for fast layouts, Bootstrap includes LESS variables and mixins for quickly generating your own simple, semantic layouts.</p>
<h4>Variables</h4>
<p>Variables determine the number of columns, the gutter width, and the media query point at which to begin floating columns. We use these to generate the predefined grid classes documented above, as well as for the custom mixins listed below.</p>
{% highlight css %}
@grid-columns: 12;
@grid-gutter-width: 30px;
@grid-float-breakpoint: 768px;
{% endhighlight %}
<h4>Mixins</h4>
<p>Mixins are used in conjunction with the grid variables to generate semantic CSS for individual grid columns.</p>
{% highlight css %}
// Creates a wrapper for a series of columns
.make-row() {
// Negative margin the row out to align the content of columns
margin-left: (@grid-gutter-width / -2);
margin-right: (@grid-gutter-width / -2);
// Then clear the floated columns
.clearfix();
}
// Generate the columns
.make-column(@columns) {
@media (min-width: @grid-float-breakpoint) {
float: left;
// Calculate width based on number of columns available
width: percentage(@columns / @grid-columns);
}
// Prevent columns from collapsing when empty
min-height: 1px;
// Set inner padding as gutters instead of margin
padding-left: (@grid-gutter-width / 2);
padding-right: (@grid-gutter-width / 2);
}
// Generate the column offsets
.make-column-offset(@columns) {
@media (min-width: @grid-float-breakpoint) {
margin-left: percentage((@columns / @grid-columns));
}
}
{% endhighlight %}
<h4>Example usage</h4>
<p>You can modify the variables to your own custom values, or just use the mixins with their default values. Here's an example of using the default settings to create a two-column layout with a gap between.</p>
{% highlight css %}
.wrapper {
.make-row();
}
.content-main {
.make-column(8);
}
.content-secondary {
.make-column(3);
.make-column-offset(1);
}
{% endhighlight %}
{% highlight html %}
<div class="wrapper">
<div class="content-main">...</div>
<div class="content-secondary">...</div>
</div>
{% endhighlight %}
</div>
<!-- Typography
================================================== -->
<div class="bs-docs-section" id="type">
<div class="page-header">
<h1>Typography</h1>
</div>
<!-- Headings -->
<h2 id="type-headings">Headings</h2>
<p>All HTML headings, <code>&lt;h1&gt;</code> through <code>&lt;h6&gt;</code> are available.</p>
<div class="bs-example bs-example-type">
<table class="table">
<tbody>
<tr>
<th><h1>Bootstrap heading</h1></th>
<td>Semibold 38px</td>
</tr>
<tr>
<th><h2>Bootstrap heading</h2></th>
<td>Semibold 32px</td>
</tr>
<tr>
<th><h3>Bootstrap heading</h3></th>
<td>Semibold 24px</td>
</tr>
<tr>
<th><h4>Bootstrap heading</h4></th>
<td>Semibold 18px</td>
</tr>
<tr>
<th><h5>Bootstrap heading</h5></th>
<td>Semibold 16px</td>
</tr>
<tr>
<th><h6>Bootstrap heading</h6></th>
<td>Semibold 12px</td>
</tr>
</tbody>
</table>
</div>
{% highlight html %}
<h1>...</h1>
<h2>...</h2>
<h3>...</h3>
<h4>...</h4>
<h5>...</h5>
<h6>...</h6>
{% endhighlight %}
<!-- Body copy -->
<h2 id="type-body-copy">Body copy</h2>
<p>Bootstrap's global default <code>font-size</code> is <strong>14px</strong>, with a <code>line-height</code> of <strong>1.428</strong>. This is applied to the <code>&lt;body&gt;</code> and all paragraphs. In addition, <code>&lt;p&gt;</code> (paragraphs) receive a bottom margin of half their computed line-height (10px by default).</p>
<div class="bs-example">
<p>Nullam quis risus eget urna mollis ornare vel eu leo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nullam id dolor id nibh ultricies vehicula.</p>
<p>Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec ullamcorper nulla non metus auctor fringilla. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Donec ullamcorper nulla non metus auctor fringilla.</p>
<p>Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit.</p>
</div>
{% highlight html %}
<p>...</p>
{% endhighlight %}
<!-- Body copy .lead -->
<h3>Lead body copy</h3>
<p>Make a paragraph stand out by adding <code>.lead</code>.</p>
<div class="bs-example">
<p class="lead">Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Duis mollis, est non commodo luctus.</p>
</div>
{% highlight html %}
<p class="lead">...</p>
{% endhighlight %}
<!-- Using LESS -->
<h3>Built with Less</h3>
<p>The typographic scale is based on two LESS variables in <strong>variables.less</strong>: <code>@font-size-base</code> and <code>@line-height-base</code>. The first is the base font-size used throughout and the second is the base line-height. We use those variables and some simple math to create the margins, paddings, and line-heights of all our type and more. Customize them and Bootstrap adapts.</p>
<!-- Emphasis -->
<h2 id="type-emphasis">Emphasis</h2>
<p>Make use of HTML's default emphasis tags with lightweight styles.</p>
<h3>Small text</h3>
<p>For de-emphasizing inline or blocks of text, use the <code>&lt;small&gt;</code> tag to set text at 85% the size of the parent. Heading elements receive their own <code>font-size</code> for nested <code>&lt;small&gt;</code> elements.</p>
<div class="bs-example">
<p><small>This line of text is meant to be treated as fine print.</small></p>
</div>
{% highlight html %}
<small>This line of text is meant to be treated as fine print.</small>
{% endhighlight %}
<h3>Bold</h3>
<p>For emphasizing a snippet of text with a heavier font-weight.</p>
<div class="bs-example">
<p>The following snippet of text is <strong>rendered as bold text</strong>.</p>
</div>
{% highlight html %}
<strong>rendered as bold text</strong>
{% endhighlight %}
<h3>Italics</h3>
<p>For emphasizing a snippet of text with italics.</p>
<div class="bs-example">
<p>The following snippet of text is <em>rendered as italicized text</em>.</p>
</div>
{% highlight html %}
<em>rendered as italicized text</em>
{% endhighlight %}
<p>Feel free to use <code>&lt;b&gt;</code> and <code>&lt;i&gt;</code> in HTML5. <code>&lt;b&gt;</code> is meant to highlight words or phrases without conveying additional importance while <code>&lt;i&gt;</code> is mostly for voice, technical terms, etc.</p>
<h3>Alignment classes</h3>
<p>Easily realign text to components with text alignment classes.</p>
<div class="bs-example">
<p class="text-left">Left aligned text.</p>
<p class="text-center">Center aligned text.</p>
<p class="text-right">Right aligned text.</p>
</div>
{% highlight html %}
<p class="text-left">Left aligned text.</p>
<p class="text-center">Center aligned text.</p>
<p class="text-right">Right aligned text.</p>
{% endhighlight %}
<h3>Emphasis classes</h3>
<p>Convey meaning through color with a handful of emphasis utility classes.</p>
<div class="bs-example">
<p class="text-muted">Fusce dapibus, tellus ac cursus commodo, tortor mauris nibh.</p>
<p class="text-warning">Etiam porta sem malesuada magna mollis euismod.</p>
<p class="text-danger">Donec ullamcorper nulla non metus auctor fringilla.</p>
<p class="text-success">Duis mollis, est non commodo luctus, nisi erat porttitor ligula.</p>
</div>
{% highlight html %}
<p class="text-muted">...</p>
<p class="text-warning">...</p>
<p class="text-danger">...</p>
<p class="text-success">...</p>
{% endhighlight %}
<!-- Abbreviations -->
<h2 id="type-abbreviations">Abbreviations</h2>
<p>Stylized implementation of HTML's <code>&lt;abbr&gt;</code> element for abbreviations and acronyms to show the expanded version on hover. Abbreviations with a <code>title</code> attribute have a light dotted bottom border and a help cursor on hover, providing additional context on hover.</p>
<h3>Basic abbreviation</h3>
<p>For expanded text on long hover of an abbreviation, include the <code>title</code> attribute with the <code>&lt;abbr&gt;</code> element.</p>
<div class="bs-example">
<p>An abbreviation of the word attribute is <abbr title="attribute">attr</abbr>.</p>
</div>
{% highlight html %}
<abbr title="attribute">attr</abbr>
{% endhighlight %}
<h3>Initialism</h3>
<p>Add <code>.initialism</code> to an abbreviation for a slightly smaller font-size.</p>
<div class="bs-example">
<p><abbr title="HyperText Markup Language" class="initialism">HTML</abbr> is the best thing since sliced bread.</p>
</div>
{% highlight html %}
<abbr title="HyperText Markup Language" class="initialism">HTML</abbr>
{% endhighlight %}
<!-- Addresses -->
<h2 id="type-addresses">Addresses</h2>
<p>Present contact information for the nearest ancestor or the entire body of work. Preserve formatting by ending all lines with <code>&lt;br&gt;</code>.</p>
<div class="bs-example">
<address>
<strong>Twitter, Inc.</strong><br>
795 Folsom Ave, Suite 600<br>
San Francisco, CA 94107<br>
<abbr title="Phone">P:</abbr> (123) 456-7890
</address>
<address>
<strong>Full Name</strong><br>
<a href="mailto:#">first.last@example.com</a>
</address>
</div>
{% highlight html %}
<address>
<strong>Twitter, Inc.</strong><br>
795 Folsom Ave, Suite 600<br>
San Francisco, CA 94107<br>
<abbr title="Phone">P:</abbr> (123) 456-7890
</address>
<address>
<strong>Full Name</strong><br>
<a href="mailto:#">first.last@example.com</a>
</address>
{% endhighlight %}
<!-- Blockquotes -->
<h2 id="type-blockquotes">Blockquotes</h2>
<p>For quoting blocks of content from another source within your document.</p>
<h3>Default blockquote</h3>
<p>Wrap <code>&lt;blockquote&gt;</code> around any <abbr title="HyperText Markup Language">HTML</abbr> as the quote. For straight quotes we recommend a <code>&lt;p&gt;</code>.</p>
<div class="bs-example">
<blockquote>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p>
</blockquote>
</div>
{% highlight html %}
<blockquote>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p>
</blockquote>
{% endhighlight %}
<h3>Blockquote options</h3>
<p>Style and content changes for simple variations on a standard blockquote.</p>
<h4>Naming a source</h4>
<p>Add <code>&lt;small&gt;</code> tag for identifying the source. Wrap the name of the source work in <code>&lt;cite&gt;</code>.</p>
<div class="bs-example">
<blockquote>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p>
<small>Someone famous in <cite title="Source Title">Source Title</cite></small>
</blockquote>
</div>
{% highlight html %}
<blockquote>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p>
<small>Someone famous <cite title="Source Title">Source Title</cite></small>
</blockquote>
{% endhighlight %}
<h4>Alternate displays</h4>
<p>Use <code>.pull-right</code> for a floated, right-aligned blockquote.</p>
<div class="bs-example" style="overflow: hidden;">
<blockquote class="pull-right">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p>
<small>Someone famous in <cite title="Source Title">Source Title</cite></small>
</blockquote>
</div>
{% highlight html %}
<blockquote class="pull-right">
...
</blockquote>
{% endhighlight %}
<!-- Lists -->
<h2 id="type-lists">Lists</h2>
<h3>Unordered</h3>
<p>A list of items in which the order does <em>not</em> explicitly matter.</p>
<div class="bs-example">
<ul>
<li>Lorem ipsum dolor sit amet</li>
<li>Consectetur adipiscing elit</li>
<li>Integer molestie lorem at massa</li>
<li>Facilisis in pretium nisl aliquet</li>
<li>Nulla volutpat aliquam velit
<ul>
<li>Phasellus iaculis neque</li>
<li>Purus sodales ultricies</li>
<li>Vestibulum laoreet porttitor sem</li>
<li>Ac tristique libero volutpat at</li>
</ul>
</li>
<li>Faucibus porta lacus fringilla vel</li>
<li>Aenean sit amet erat nunc</li>
<li>Eget porttitor lorem</li>
</ul>
</div>
{% highlight html %}
<ul>
<li>...</li>
</ul>
{% endhighlight %}
<h3>Ordered</h3>
<p>A list of items in which the order <em>does</em> explicitly matter.</p>
<div class="bs-example">
<ol>
<li>Lorem ipsum dolor sit amet</li>
<li>Consectetur adipiscing elit</li>
<li>Integer molestie lorem at massa</li>
<li>Facilisis in pretium nisl aliquet</li>
<li>Nulla volutpat aliquam velit</li>
<li>Faucibus porta lacus fringilla vel</li>
<li>Aenean sit amet erat nunc</li>
<li>Eget porttitor lorem</li>
</ol>
</div>
{% highlight html %}
<ol>
<li>...</li>
</ol>
{% endhighlight %}
<h3>Unstyled</h3>
<p>Remove the default <code>list-style</code> and left margin on list items (immediate children only). <strong>This only applies to immediate children list items</strong>, meaning you will need to add the class for any nested lists as well.</p>
<div class="bs-example">
<ul class="list-unstyled">
<li>Lorem ipsum dolor sit amet</li>
<li>Consectetur adipiscing elit</li>
<li>Integer molestie lorem at massa</li>
<li>Facilisis in pretium nisl aliquet</li>
<li>Nulla volutpat aliquam velit
<ul>
<li>Phasellus iaculis neque</li>
<li>Purus sodales ultricies</li>
<li>Vestibulum laoreet porttitor sem</li>
<li>Ac tristique libero volutpat at</li>
</ul>
</li>
<li>Faucibus porta lacus fringilla vel</li>
<li>Aenean sit amet erat nunc</li>
<li>Eget porttitor lorem</li>
</ul>
</div>
{% highlight html %}
<ul class="list-unstyled">
<li>...</li>
</ul>
{% endhighlight %}
<h3>Inline</h3>
<p>Place all list items on a single line with <code>inline-block</code> and some light padding.</p>
<div class="bs-example">
<ul class="list-inline">
<li>Lorem ipsum</li>
<li>Phasellus iaculis</li>
<li>Nulla volutpat</li>
</ul>
</div>
{% highlight html %}
<ul class="list-inline">
<li>...</li>
</ul>
{% endhighlight %}
<h3>Description</h3>
<p>A list of terms with their associated descriptions.</p>
<div class="bs-example">
<dl>
<dt>Description lists</dt>
<dd>A description list is perfect for defining terms.</dd>
<dt>Euismod</dt>
<dd>Vestibulum id ligula porta felis euismod semper eget lacinia odio sem nec elit.</dd>
<dd>Donec id elit non mi porta gravida at eget metus.</dd>
<dt>Malesuada porta</dt>
<dd>Etiam porta sem malesuada magna mollis euismod.</dd>
</dl>
</div>
{% highlight html %}
<dl>
<dt>...</dt>
<dd>...</dd>
</dl>
{% endhighlight %}
<h4>Horizontal description</h4>
<p>Make terms and descriptions in <code>&lt;dl&gt;</code> line up side-by-side.</p>
<div class="bs-example">
<dl class="dl-horizontal">
<dt>Description lists</dt>
<dd>A description list is perfect for defining terms.</dd>
<dt>Euismod</dt>
<dd>Vestibulum id ligula porta felis euismod semper eget lacinia odio sem nec elit.</dd>
<dd>Donec id elit non mi porta gravida at eget metus.</dd>
<dt>Malesuada porta</dt>
<dd>Etiam porta sem malesuada magna mollis euismod.</dd>
<dt>Felis euismod semper eget lacinia</dt>
<dd>Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.</dd>
</dl>
</div>
{% highlight html %}
<dl class="dl-horizontal">
<dt>...</dt>
<dd>...</dd>
</dl>
{% endhighlight %}
<h5>Auto-truncating</h5>
<p>
Horizontal description lists will truncate terms that are too long to fit in the left column fix <code>text-overflow</code>. In narrower viewports, they will change to the default stacked layout.
</p>
</div>
<!-- Code
================================================== -->
<div class="bs-docs-section" id="code">
<div class="page-header">
<h1>Code</h1>
</div>
<h2>Inline</h2>
<p>Wrap inline snippets of code with <code>&lt;code&gt;</code>.</p>
<div class="bs-example">
For example, <code>&lt;section&gt;</code> should be wrapped as inline.
</div>
{% highlight html %}
For example, <code>&lt;section&gt;</code> should be wrapped as inline.
{% endhighlight %}
<h2>Basic block</h2>
<p>Use <code>&lt;pre&gt;</code> for multiple lines of code. Be sure to escape any angle brackets in the code for proper rendering.</p>
<div class="bs-example">
<pre>&lt;p&gt;Sample text here...&lt;/p&gt;</pre>
</div>
{% highlight html %}
<pre>&lt;p&gt;Sample text here...&lt;/p&gt;</pre>
{% endhighlight %}
<p>You may optionally add the <code>.pre-scrollable</code> class which will set a max-height of 350px and provide a y-axis scrollbar.</p>
</div>
<!-- Tables
================================================== -->
<div class="bs-docs-section" id="tables">
<div class="page-header">
<h1>Tables</h1>
</div>
<h2 id="tables-example">Basic example</h2>
<p>For basic styling&mdash;light padding and only horizontal dividers&mdash;add the base class <code>.table</code> to any <code>&lt;table&gt;</code>. It may seem super redundant, but given the widespread use of tables for other plugins like calendars and date pickers, we've opted to isolate our custom table styles.</p>
<div class="bs-example">
<table class="table">
<thead>
<tr>
<th>#</th>
<th>First Name</th>
<th>Last Name</th>
<th>Username</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>Mark</td>
<td>Otto</td>
<td>@mdo</td>
</tr>
<tr>
<td>2</td>
<td>Jacob</td>
<td>Thornton</td>
<td>@fat</td>
</tr>
<tr>
<td>3</td>
<td>Larry</td>
<td>the Bird</td>
<td>@twitter</td>
</tr>
</tbody>
</table>
</div><!-- /example -->
{% highlight html %}
<table class="table">
...
</table>
{% endhighlight %}
<h2>Optional classes</h2>
<p>Add any of the following classes to the <code>.table</code> base class.</p>
<h3 id="tables-striped">Striped</h3>
<p>Use <code>.table-striped</code> to add zebra-striping to any table row within the <code>&lt;tbody&gt;</code>.</p>
<div class="bs-callout">
<h4>Cross-browser compatibility</h4>
<p>Striped tables are styled via the <code>:nth-child</code> CSS selector, which is not available in IE8.</p>
</div>
<div class="bs-example">
<table class="table table-striped">
<thead>
<tr>
<th>#</th>
<th>First Name</th>
<th>Last Name</th>
<th>Username</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>Mark</td>
<td>Otto</td>
<td>@mdo</td>
</tr>
<tr>
<td>2</td>
<td>Jacob</td>
<td>Thornton</td>
<td>@fat</td>
</tr>
<tr>
<td>3</td>
<td>Larry</td>
<td>the Bird</td>
<td>@twitter</td>
</tr>
</tbody>
</table>
</div><!-- /example -->
{% highlight html %}
<table class="table table-striped">
...
</table>
{% endhighlight %}
<h3 id="tables-bordered">Bordered</h3>
<p>Add <code>.table-bordered</code> for borders and rounded corners.</p>
<div class="bs-example">
<table class="table table-bordered">
<thead>
<tr>
<th>#</th>
<th>First Name</th>
<th>Last Name</th>
<th>Username</th>
</tr>
</thead>
<tbody>
<tr>
<td rowspan="2">1</td>
<td>Mark</td>
<td>Otto</td>
<td>@mdo</td>
</tr>
<tr>
<td>Mark</td>
<td>Otto</td>
<td>@TwBootstrap</td>
</tr>
<tr>
<td>2</td>
<td>Jacob</td>
<td>Thornton</td>
<td>@fat</td>
</tr>
<tr>
<td>3</td>
<td colspan="2">Larry the Bird</td>
<td>@twitter</td>
</tr>
</tbody>
</table>
</div><!-- /example -->
{% highlight html %}
<table class="table table-bordered">
...
</table>
{% endhighlight %}
<h3 id="tables-hover-rows">Hover rows</h3>
<p>Add <code>.table-hover</code> to enable a hover state on table rows within a <code>&lt;tbody&gt;</code>.</p>
<div class="bs-example">
<table class="table table-hover">
<thead>
<tr>
<th>#</th>
<th>First Name</th>
<th>Last Name</th>
<th>Username</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>Mark</td>
<td>Otto</td>
<td>@mdo</td>
</tr>
<tr>
<td>2</td>
<td>Jacob</td>
<td>Thornton</td>
<td>@fat</td>
</tr>
<tr>
<td>3</td>
<td colspan="2">Larry the Bird</td>
<td>@twitter</td>
</tr>
</tbody>
</table>
</div><!-- /example -->
{% highlight html %}
<table class="table table-hover">
...
</table>
{% endhighlight %}
<h3 id="tables-condensed">Condensed</h3>
<p>Add <code>.table-condensed</code> to make tables more compact by cutting cell padding in half.</p>
<div class="bs-example">
<table class="table table-condensed">
<thead>
<tr>
<th>#</th>
<th>First Name</th>
<th>Last Name</th>
<th>Username</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>Mark</td>
<td>Otto</td>
<td>@mdo</td>
</tr>
<tr>
<td>2</td>
<td>Jacob</td>
<td>Thornton</td>
<td>@fat</td>
</tr>
<tr>
<td>3</td>
<td colspan="2">Larry the Bird</td>
<td>@twitter</td>
</tr>
</tbody>
</table>
</div><!-- /example -->
{% highlight html %}
<table class="table table-condensed">
...
</table>
{% endhighlight %}
<h2 id="tables-row-classes">Optional row classes</h2>
<p>Use contextual classes to color table rows.</p>
<table class="table table-bordered table-striped">
<colgroup>
<col class="col col-lg-1">
<col class="col col-lg-7">
</colgroup>
<thead>
<tr>
<th>Class</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<code>.success</code>
</td>
<td>Indicates a successful or positive action.</td>
</tr>
<tr>
<td>
<code>.danger</code>
</td>
<td>Indicates a dangerous or potentially negative action.</td>
</tr>
<tr>
<td>
<code>.warning</code>
</td>
<td>Indicates a warning that might need attention.</td>
</tr>
<tr>
<td>
<code>.info</code>
</td>
<td>Used as an alternative to the default styles.</td>
</tr>
</tbody>
</table>
<div class="bs-example">
<table class="table">
<thead>
<tr>
<th>#</th>
<th>Product</th>
<th>Payment Taken</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<tr class="success">
<td>1</td>
<td>TB - Monthly</td>
<td>01/04/2012</td>
<td>Approved</td>
</tr>
<tr class="danger">
<td>2</td>
<td>TB - Monthly</td>
<td>02/04/2012</td>
<td>Declined</td>
</tr>
<tr class="warning">
<td>3</td>
<td>TB - Monthly</td>
<td>03/04/2012</td>
<td>Pending</td>
</tr>
</tbody>
</table>
</div><!-- /example -->
{% highlight html %}
...
<tr class="success">
<td>1</td>
<td>TB - Monthly</td>
<td>01/04/2012</td>
<td>Approved</td>
</tr>
...
{% endhighlight %}
</div>
<!-- Forms
================================================== -->
<div class="bs-docs-section" id="forms">
<div class="page-header">
<h1>Forms</h1>
</div>
<h2 id="forms-example">Basic example</h2>
<p>Individual form controls automatically receive some global styling. All textual <code>&lt;input&gt;</code>, <code>&lt;textarea&gt;</code>, and <code>&lt;select&gt;</code> elements are set to <code>width: 100%;</code> by default.</p>
<form class="bs-example">
<fieldset>
<legend>Legend</legend>
<label>Label name</label>
<input type="text" placeholder="Type something…">
<p class="help-block">Example block-level help text here.</p>
<div class="checkbox">
<label>
<input type="checkbox"> Check me out
</label>
</div>
<button type="submit" class="btn btn-default">Submit</button>
</fieldset>
</form><!-- /example -->
{% highlight html %}
<form>
<fieldset>
<legend>Legend</legend>
<label>Label name</label>
<input type="text" placeholder="Type something…">
<p class="help-block">Example block-level help text here.</p>
<div class="checkbox">
<label>
<input type="checkbox"> Check me out
</label>
</div>
<button type="submit" class="btn btn-default">Submit</button>
</fieldset>
</form>
{% endhighlight %}
<h2>Optional layouts</h2>
<p>Included with Bootstrap are optional form layouts for common use cases.</p>
<h3 id="forms-inline">Inline form</h3>
<p>Add <code>.form-inline</code> for left-aligned and inline-block controls for a compact layout.</p>
<div class="bs-callout">
<h4>Requires custom widths</h4>
<p>Inputs, selects, and textareas are 100% wide by default in Bootstrap. To use the inline form, you'll have to set a width on the form controls used within.</p>
</div>
<form class="bs-example form-inline">
<input type="text" placeholder="Email">
<input type="password" placeholder="Password">
<div class="checkbox">
<label>
<input type="checkbox"> Remember me
</label>
</div>
<button type="submit" class="btn btn-default">Sign in</button>
</form><!-- /example -->
{% highlight html %}
<form class="form-inline">
<input type="text" placeholder="Email">
<input type="password" placeholder="Password">
<div class="checkbox">
<label>
<input type="checkbox"> Remember me
</label>
</div>
<button type="submit" class="btn btn-default">Sign in</button>
</form>
{% endhighlight %}
<h3 id="forms-horizontal">Horizontal form</h3>
<p>Use Bootstrap's predefined grid classes to align labels and groups of form controls in a horizontal layout.</p>
<form class="bs-example form-horizontal">
<div class="row">
<label for="inputEmail" class="col col-lg-2 control-label">Email</label>
<div class="col col-lg-10">
<input type="text" id="inputEmail" placeholder="Email">
</div>
</div>
<div class="row">
<label for="" class="col col-lg-2 control-label">Password</label>
<div class="col col-lg-10">
<input type="password" id="inputPassword" placeholder="Password">
<div class="checkbox">
<label>
<input type="checkbox"> Remember me
</label>
</div>
</div>
<div class="col col-lg-10 col-offset-2">
<button type="submit" class="btn btn-default">Sign in</button>
</div>
</div>
</form>
{% highlight html %}
<form class="form-horizontal">
<div class="row">
<label for="inputEmail" class="col col-lg-2 control-label">Email</label>
<div class="col col-lg-10">
<input type="text" id="inputEmail" placeholder="Email">
</div>
</div>
<div class="row">
<label for="" class="col col-lg-2 control-label">Password</label>
<div class="col col-lg-10">
<input type="password" id="inputPassword" placeholder="Password">
<div class="checkbox">
<label>
<input type="checkbox"> Remember me
</label>
</div>
</div>
<div class="col col-lg-10 col-offset-2">
<button type="submit" class="btn btn-default">Sign in</button>
</div>
</div>
</form>
{% endhighlight %}
<h2 id="forms-controls">Supported form controls</h2>
<p>Examples of standard form controls supported in an example form layout.</p>
<h3>Inputs</h3>
<p>Most common form control, text-based input fields. Includes support for all HTML5 types: text, password, datetime, datetime-local, date, month, time, week, number, email, url, search, tel, and color.</p>
<div class="bs-callout">
<h4>Type declaration required</h4>
<p>Inputs will only be fully styled if their <code>type</code> is properly declared.</p>
</div>
<form class="bs-example">
<input type="text" placeholder="Text input">
</form>
{% highlight html %}
<input type="text" placeholder="Text input">
{% endhighlight %}
<h3>Textarea</h3>
<p>Form control which supports multiple lines of text. Change <code>rows</code> attribute as necessary.</p>
<form class="bs-example">
<textarea rows="3"></textarea>
</form>
{% highlight html %}
<textarea rows="3"></textarea>
{% endhighlight %}
<h3>Checkboxes and radios</h3>
<p>Checkboxes are for selecting one or several options in a list while radios are for selecting one option from many.</p>
<h4>Default (stacked)</h4>
<form class="bs-example">
<div class="checkbox">
<label>
<input type="checkbox" value="">
Option one is this and that&mdash;be sure to include why it's great
</label>
</div>
<br>
<div class="radio">
<label>
<input type="radio" name="optionsRadios" id="optionsRadios1" value="option1" checked>
Option one is this and that&mdash;be sure to include why it's great
</label>
</div>
<div class="radio">
<label>
<input type="radio" name="optionsRadios" id="optionsRadios2" value="option2">
Option two can be something else and selecting it will deselect option one
</label>
</div>
</form>
{% highlight html %}
<div class="checkbox">
<label>
<input type="checkbox" value="">
Option one is this and that&mdash;be sure to include why it's great
</label>
</div>
<div class="radio">
<label>
<input type="radio" name="optionsRadios" id="optionsRadios1" value="option1" checked>
Option one is this and that&mdash;be sure to include why it's great
</label>
</div>
{% endhighlight %}
<h4>Inline checkboxes</h4>
<p>Use <code>.checkbox-inline</code> or <code>.radio-inline</code> class to a series of checkboxes or radios for controls appear on the same line.</p>
<form class="bs-example">
<label class="checkbox-inline">
<input type="checkbox" id="inlineCheckbox1" value="option1"> 1
</label>
<label class="checkbox-inline">
<input type="checkbox" id="inlineCheckbox2" value="option2"> 2
</label>
<label class="checkbox-inline">
<input type="checkbox" id="inlineCheckbox3" value="option3"> 3
</label>
</form>
{% highlight html %}
<label class="checkbox-inline">
<input type="checkbox" id="inlineCheckbox1" value="option1"> 1
</label>
<label class="checkbox-inline">
<input type="checkbox" id="inlineCheckbox2" value="option2"> 2
</label>
<label class="checkbox-inline">
<input type="checkbox" id="inlineCheckbox3" value="option3"> 3
</label>
{% endhighlight %}
<h3>Selects</h3>
<p>Use the default option or specify a <code>multiple="multiple"</code> to show multiple options at once.</p>
<form class="bs-example">
<select>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
</select>
<br>
<select multiple="multiple">
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
</select>
</form>
{% highlight html %}
<select>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
</select>
<select multiple="multiple">
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
</select>
{% endhighlight %}
<h2 id="forms-control-states">Form control states</h2>
<p>Provide feedback to users or visitors with basic feedback states on form controls and labels.</p>
<h3 id="forms-input-focus">Input focus</h3>
<p>We remove the default <code>outline</code> styles on some form controls and apply a <code>box-shadow</code> in its place for <code>:focus</code>.</p>
<form class="bs-example">
<input class="focused" id="focusedInput" type="text" value="This is focused...">
</form>
{% highlight html %}
<input id="focusedInput" type="text" value="This is focused...">
{% endhighlight %}
<h3 id="forms-invalid-inputs">Invalid inputs</h3>
<p>Style inputs via default browser functionality. Specify a <code>type</code>, add the <code>required</code> attribute if the field is not optional, and (if applicable) specify a <code>pattern</code>.</p>
<div class="bs-callout">
<h4>Cross-browser compatibility</h4>
<p>Invalid inputs are styled via the <code>:invalid</code> CSS selector, which is not supported by Internet Explorer 9 and below.</p>
</div>
<form class="bs-example">
<input type="email" placeholder="test@example.com" required>
</form>
{% highlight html %}
<input type="email" placeholder="test@example.com" required>
{% endhighlight %}
<h3 id="forms-disabled-inputs">Disabled inputs</h3>
<p>Add the <code>disabled</code> attribute on an input to prevent user input and trigger a slightly different look.</p>
<form class="bs-example">
<input class="input-xlarge" id="disabledInput" type="text" placeholder="Disabled input here…" disabled>
</form>
{% highlight html %}
<input id="disabledInput" type="text" placeholder="Disabled input here..." disabled>
{% endhighlight %}
<h3 id="forms-disabled-fieldsets">Disabled fieldsets</h3>
<p>Add the <code>disabled</code> attribute to a <code>&lt;fieldset&gt;</code> to disable all the controls within the <code>&lt;fieldset&gt;</code> at once.</p>
<div class="bs-callout">
<h4>Link functionality of <code>&lt;a&gt;</code> not impacted</h4>
<p>This class will only change the appearance of <code>&lt;a class="btn btn-default"&gt;</code> buttons, not their functionality. Use custom JavaScript to disable links here.</p>
</div>
<div class="bs-callout">
<h4>Cross-browser compatibility</h4>
<p>While Bootstrap will apply these styles in all browsers, IE and Safari don't actually support the <code>&lt;disabled&gt;</code> attribute on a <code>&lt;fieldset&gt;</code>. Use custom JavaScript to disable the fieldset in these browsers.</p>
</div>
<form class="bs-example form-inline">
<fieldset disabled>
<input type="text" placeholder="Disabled input">
<select>
<option>Disabled select</option>
</select>
<div class="checkbox">
<label>
<input type="checkbox"> Can't check this
</label>
</div>
<button type="submit" class="btn btn-primary">Submit</button>
</fieldset>
</form>
{% highlight html %}
<form class="form-inline">
<fieldset disabled>
<div>
<input type="text" placeholder="Disabled input">
</div>
<div>
<select>
<option>Disabled select</option>
</select>
</div>
<div class="checkbox">
<label>
<input type="checkbox"> Can't check this
</label>
</div>
<button type="submit" class="btn btn-primary">Submit</button>
</fieldset>
</form>
{% endhighlight %}
<h3 id="forms-validation">Validation states</h3>
<p>Bootstrap includes validation styles for error, warning, info, and success messages. To use:</p>
<ul>
<li>Add <code>.has-warning</code>, <code>.has-error</code>, or <code>.has-success</code> to the parent element</li>
<li>Add .input-with-feedback to the field(s) in question</li>
</ul>
<p>Validation styles are applied on a per-input basis. With horizontal forms, the <code>&lt;label class="control-label"&gt;</code> will always be styled.</p>
<form class="bs-example form-horizontal">
<div class="control-group has-warning">
<label class="control-label" for="inputWarning">Input with warning</label>
<div class="controls">
<input type="text" class="input-with-feedback" id="inputWarning">
</div>
</div>
<div class="control-group has-error">
<label class="control-label" for="inputError">Input with error</label>
<div class="controls">
<input type="text" class="input-with-feedback" id="inputError">
</div>
</div>
<div class="control-group has-success">
<label class="control-label" for="inputSuccess">Input with success</label>
<div class="controls">
<input type="text" class="input-with-feedback" id="inputSuccess">
</div>
</div>
</form>
{% highlight html %}
<div class="control-group has-warning">
<label class="control-label" for="inputWarning">Input with warning</label>
<div class="controls">
<input type="text" class="input-with-feedback" id="inputWarning">
</div>
</div>
<div class="control-group has-error">
<label class="control-label" for="inputError">Input with error</label>
<div class="controls">
<input type="text" class="input-with-feedback" id="inputError">
</div>
</div>
<div class="control-group has-success">
<label class="control-label" for="inputSuccess">Input with success</label>
<div class="controls">
<input type="text" class="input-with-feedback" id="inputSuccess">
</div>
</div>
{% endhighlight %}
<h2 id="forms-extending">Extending form controls</h2>
<p>Adding on top of existing browser controls, Bootstrap includes other useful form components.</p>
<h3 id="forms-input-groups">Input groups</h3>
<p>Add text or buttons before, after, or on both sides of any text-based input. Use <code>.input-group</code> with a <code>.add-on</code> to prepend or append elements to an <code>&lt;input&gt;</code>.</p>
<div class="bs-callout">
<h4>Cross-browser compatibility</h4>
<p>Avoid using <code>&lt;select&gt;</code> elements here as they cannot be fully styled in WebKit browsers.</p>
</div>
<form class="bs-example">
<div class="input-group col col-lg-9">
<span class="input-group-addon">@</span>
<input type="text" placeholder="Username">
</div>
<br>
<div class="input-group col col-lg-6">
<input type="text">
<span class="input-group-addon">.00</span>
</div>
<br>
<div class="input-group col col-lg-3">
<span class="input-group-addon">$</span>
<input type="text">
<span class="input-group-addon">.00</span>
</div>
</form>
{% highlight html %}
<div class="input-group col col-lg-9">
<span class="input-group-addon">@</span>
<input type="text" placeholder="Username">
</div>
<div class="input-group col col-lg-6">
<input type="text">
<span class="input-group-addon">.00</span>
</div>
<div class="input-group col col-lg-3">
<span class="input-group-addon">$</span>
<input type="text">
<span class="input-group-addon">.00</span>
</div>
{% endhighlight %}
<h4>Optional sizes</h4>
<p>Add the relative form sizing classes to the `.input-group-addon`.</p>
<form class="bs-example">
<div class="input-group col col-lg-9">
<span class="input-group-addon input-large">@</span>
<input type="text" class="input-large" placeholder="Username">
</div>
<br>
<div class="input-group col col-lg-9">
<span class="input-group-addon">@</span>
<input type="text" placeholder="Username">
</div>
<br>
<div class="input-group col col-lg-9">
<span class="input-group-addon input-small">@</span>
<input type="text" class="input-small" placeholder="Username">
</div>
</form>
{% highlight html %}
<div class="input-group col col-lg-9">
<span class="input-group-addon input-large">@</span>
<input type="text" class="input-large" placeholder="Username">
</div>
<div class="input-group col col-lg-9">
<span class="input-group-addon">@</span>
<input type="text" placeholder="Username">
</div>
<div class="input-group col col-lg-9">
<span class="input-group-addon input-small">@</span>
<input type="text" class="input-small" placeholder="Username">
</div>
{% endhighlight %}
<h4>Buttons instead of text</h4>
<p>Buttons in input groups are a bit different and require one extra level of nesting. Instead of <code>.input-group-addon</code>, you'll need to use <code>.input-group-btn</code> to wrap the buttons. This is required due to default browser styles that cannot be overridden.</p>
<form class="bs-example">
<div class="input-group col col-lg-7">
<span class="input-group-btn">
<button class="btn btn-default" type="button">Go!</button>
</span>
<input type="text">
</div>
<br>
<div class="input-group col col-lg-7">
<input type="text">
<span class="input-group-btn">
<button class="btn btn-default" type="button">Go!</button>
</span>
</div>
</form>
{% highlight html %}
<div class="input-group col col-lg-7">
<span class="input-group-btn">
<button class="btn btn-default" type="button">Go!</button>
</span>
<input type="text">
</div>
<div class="input-group col col-lg-7">
<input type="text">
<span class="input-group-btn">
<button class="btn btn-default" type="button">Go!</button>
</span>
</div>
{% endhighlight %}
<h4>Button dropdowns</h4>
<p></p>
<form class="bs-example">
<div class="input-group col col-lg-7">
<div class="input-group-btn">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">Action <span class="caret"></span></button>
<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>
</div><!-- /btn-group -->
<input type="text">
</div><!-- /input-group -->
<br>
<div class="input-group col col-lg-7">
<input type="text">
<div class="input-group-btn">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">Action <span class="caret"></span></button>
<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>
</div><!-- /btn-group -->
</div><!-- /input-group -->
</form>
{% highlight html %}
<div class="input-group col col-lg-7">
<div class="input-group-btn">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">Action <span class="caret"></span></button>
<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>
</div><!-- /btn-group -->
<input type="text">
</div><!-- /input-group -->
<div class="input-group col col-lg-7">
<input type="text">
<div class="input-group-btn">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">Action <span class="caret"></span></button>
<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>
</div><!-- /btn-group -->
</div><!-- /input-group -->
{% endhighlight %}
<h4>Segmented dropdown groups</h4>
<form class="bs-example">
<div class="input-group col col-lg-7">
<div class="input-group-btn">
<button type="button" class="btn btn-default" tabindex="-1">Action</button>
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" tabindex="-1">
<span class="caret"></span>
</button>
<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>
</div>
<input type="text">
</div>
<br>
<div class="input-group col col-lg-7">
<input type="text">
<div class="input-group-btn">
<button type="button" class="btn btn-default" tabindex="-1">Action</button>
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" tabindex="-1">
<span class="caret"></span>
</button>
<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>
</div>
</div>
</form>
{% highlight html %}
<div class="input-group col col-lg-7">
<div class="input-group-btn">
<!-- Button and dropdown menu -->
</div>
<input type="text">
</div>
<div class="input-group col col-lg-7">
<input type="text">
<div class="input-group-btn btn-group">
<!-- Button and dropdown menu -->
</div>
</div>
{% endhighlight %}
<h3 id="forms-control-sizes">Control sizing</h3>
<p>Use relative sizing classes like <code>.input-large</code> or match your inputs to the grid column sizes using <code>.col-lg-*</code> classes.</p>
<h4>Relative sizing</h4>
<p>Create larger or smaller form controls that match button sizes.</p>
<form class="bs-example bs-example-control-sizing">
<div class="controls docs-input-sizes">
<input class="input-large" type="text" placeholder=".input-large">
<input type="text" placeholder="Default input">
<input class="input-small" type="text" placeholder=".input-small">
</div>
</form>
{% highlight html %}
<input class="input-large" type="text" placeholder=".input-large">
<input type="text" placeholder="Default input">
<input class="input-small" type="text" placeholder=".input-small">
{% endhighlight %}
<h4>Column sizing</h4>
<p>Wrap inputs in grid columns, or any custom parent element, to easily enforce desired widths.</p>
<form class="bs-example" style="padding-bottom: 15px;">
<div class="row">
<div class="col col-lg-2">
<input type="text" placeholder="col col-large-2">
</div>
<div class="col col-lg-3">
<input type="text" placeholder="col col-large-3">
</div>
<div class="col col-lg-4">
<input type="text" placeholder="col col-large-4">
</div>
</div>
</form>
{% highlight html %}
<div class="row">
<div class="col col-lg-2">
<input type="text" placeholder="col col-large-2">
</div>
<div class="col col-lg-3">
<input type="text" placeholder="col col-large-3">
</div>
<div class="col col-lg-4">
<input type="text" placeholder="col col-large-4">
</div>
</div>
{% endhighlight %}
<h3 id="forms-help-text">Help text</h3>
<p>Block level help text for form controls.</p>
<form class="bs-example">
<input type="text">
<span class="help-block">A longer block of help text that breaks onto a new line and may extend beyond one line.</span>
</form>
{% highlight html %}
<span class="help-block">A longer block of help text that breaks onto a new line and may extend beyond one line.</span>
{% endhighlight %}
</div>
<!-- Buttons
================================================== -->
<div class="bs-docs-section" id="buttons">
<div class="page-header">
<h1>Buttons</h1>
</div>
<h2 id="buttons-options">Button options</h2>
<p>Use any of the available button classes to quickly create a styled button.</p>
<div class="bs-example">
<button type="button" class="btn btn-default">Default</button>
<button type="button" class="btn btn-primary">Primary</button>
<button type="button" class="btn btn-success">Success</button>
<button type="button" class="btn btn-info">Info</button>
<button type="button" class="btn btn-warning">Warning</button>
<button type="button" class="btn btn-danger">Danger</button>
<button type="button" class="btn btn-link">Link</button>
</div>
{% highlight html %}
<!-- Standard gray button with gradient -->
<button type="button" class="btn btn-default">Default</button>
<!-- Provides extra visual weight and identifies the primary action in a set of buttons -->
<button type="button" class="btn btn-primary">Primary</button>
<!-- Indicates a successful or positive action -->
<button type="button" class="btn btn-success">Success</button>
<!-- Contextual button for informational alert messages -->
<button type="button" class="btn btn-info">Info</button>
<!-- Indicates caution should be taken with this action -->
<button type="button" class="btn btn-warning">Warning</button>
<!-- Indicates a dangerous or potentially negative action -->
<button type="button" class="btn btn-danger">Danger</button>
<!-- Deemphasize a button by making it look like a link while maintaining button behavior -->
<button type="button" class="btn btn-link">Link</button>
{% endhighlight %}
<h2 id="buttons-sizes">Button sizes</h2>
<p>Fancy larger or smaller buttons? Add <code>.btn-large</code> or <code>.btn-small</code> for additional sizes.</p>
<div class="bs-example">
<p>
<button type="button" class="btn btn-primary btn-large">Large button</button>
<button type="button" class="btn btn-default btn-large">Large button</button>
</p>
<p>
<button type="button" class="btn btn-primary">Default button</button>
<button type="button" class="btn btn-default">Default button</button>
</p>
<p>
<button type="button" class="btn btn-primary btn-small">Small button</button>
<button type="button" class="btn btn-default btn-small">Small button</button>
</p>
</div>
{% highlight html %}
<p>
<button type="button" class="btn btn-primary btn-large">Large button</button>
<button type="button" class="btn btn-default btn-large">Large button</button>
</p>
<p>
<button type="button" class="btn btn-primary">Default button</button>
<button type="button" class="btn btn-default">Default button</button>
</p>
<p>
<button type="button" class="btn btn-primary btn-small">Small button</button>
<button type="button" class="btn btn-default btn-small">Small button</button>
</p>
{% endhighlight %}
<p>Create block level buttons&mdash;those that span the full width of a parent&mdash; by adding <code>.btn-block</code>.</p>
<div class="bs-example">
<div class="well" style="max-width: 400px; margin: 0 auto 10px;">
<button type="button" class="btn btn-primary btn-large btn-block">Block level button</button>
<button type="button" class="btn btn-default btn-large btn-block">Block level button</button>
</div>
</div>
{% highlight html %}
<button type="button" class="btn btn-primary btn-large btn-block">Block level button</button>
<button type="button" class="btn btn-default btn-large btn-block">Block level button</button>
{% endhighlight %}
<h2 id="buttons-disabled">Disabled state</h2>
<p>Make buttons look unclickable by fading them back 50%.</p>
<h3>Button element</h3>
<p>Add the <code>disabled</code> attribute to <code>&lt;button&gt;</code> buttons.</p>
<p class="bs-example">
<button type="button" class="btn btn-primary btn-large" disabled="disabled">Primary button</button>
<button type="button" class="btn btn-default btn-large" disabled="disabled">Button</button>
</p>
{% highlight html %}
<button type="button" class="btn btn-large btn-primary" disabled="disabled">Primary button</button>
<button type="button" class="btn btn-default btn-large" disabled="disabled">Button</button>
{% endhighlight %}
<div class="bs-callout">
<h4>Cross-browser compatibility</h4>
<p>If you add the <code>disabled</code> attribute to a <code>&lt;button&gt;</code>, Internet Explorer 9 and below will render text gray with a nasty text-shadow that we cannot fix.</p>
</div>
<h3>Anchor element</h3>
<p>Add the <code>.disabled</code> class to <code>&lt;a&gt;</code> buttons.</p>
<p class="bs-example">
<a href="#" class="btn btn-primary btn-large disabled">Primary link</a>
<a href="#" class="btn btn-default btn-large disabled">Link</a>
</p>
{% highlight html %}
<a href="#" class="btn btn-primary btn-large disabled">Primary link</a>
<a href="#" class="btn btn-default btn-large disabled">Link</a>
{% endhighlight %}
<p>
We use <code>.disabled</code> as a utility class here, similar to the common <code>.active</code> class, so no prefix is required.
</p>
<div class="bs-callout">
<h4>Link functionality not impacted</h4>
<p>This class will only change the <code>&lt;a&gt;</code>'s appearance, not its functionality. Use custom JavaScript to disable links here.</p>
</div>
<h2 id="buttons-tags">Using multiple tags</h2>
<p>Use the button classes on an <code>&lt;a&gt;</code>, <code>&lt;button&gt;</code>, or <code>&lt;input&gt;</code> element.</p>
<form class="bs-example">
<a class="btn btn-default" href="#">Link</a>
<button class="btn btn-default" type="submit">Button</button>
<input class="btn btn-default" type="button" value="Input">
<input class="btn btn-default" type="submit" value="Submit">
</form>
{% highlight html %}
<a class="btn btn-default" href="#">Link</a>
<button class="btn btn-default" type="submit">Button</button>
<input class="btn btn-default" type="button" value="Input">
<input class="btn btn-default" type="submit" value="Submit">
{% endhighlight %}
<div class="bs-callout">
<h4>Cross-browser rendering</h4>
<p>As a best practice, <strong>we highly recommend using the <code>&lt;button&gt;</code> element whenever possible</strong> to ensure matching cross-browser rendering.</p>
</div>
</div>
<!-- Images
================================================== -->
<div class="bs-docs-section" id="images">
<div class="page-header">
<h1>Images</h1>
</div>
<p>Add classes to an <code>&lt;img&gt;</code> element to easily style images in any project.</p>
<div class="bs-callout">
<h4>Cross-browser compatibility</h4>
<p>Keep in mind that Internet Explorer 8 lacks support for rounded corners.</p>
</div>
<div class="bs-example bs-example-images">
<img data-src="holder.js/140x140" class="img-rounded">
<img data-src="holder.js/140x140" class="img-circle">
<img data-src="holder.js/140x140" class="img-thumbnail">
</div>
{% highlight html %}
<img src="..." class="img-rounded">
<img src="..." class="img-circle">
<img src="..." class="img-thumbnail">
{% endhighlight %}
</div>
<!-- Helpers
================================================== -->
<div class="bs-docs-section" id="helper-classes">
<div class="page-header">
<h1>Helper classes</h1>
</div>
<h3>Close icon</h3>
<p>Use the generic close icon for dismissing content like modals and alerts.</p>
<div class="bs-example">
<p><button type="button" class="close">&times;</button></p>
</div>
{% highlight html %}
<button type="button" class="close">&times;</button>
{% endhighlight %}
<h3>.pull-left</h3>
<p>Float an element left</p>
{% highlight html %}
<div class="pull-left">...</div>
{% endhighlight %}
{% highlight css %}
.pull-left {
float: left;
}
{% endhighlight %}
<h3>.pull-right</h3>
<p>Float an element right</p>
{% highlight html %}
<div class="pull-right">...</div>
{% endhighlight %}
{% highlight css %}
.pull-right {
float: right;
}
{% endhighlight %}
<h3>.clearfix</h3>
<p>Clear the <code>float</code> on any element. Utilizes <a href="http://nicolasgallagher.com/micro-clearfix-hack/">the micro clearfix</a> as popularized by Nicolas Gallagher.</p>
{% highlight html %}
<div class="clearfix">...</div>
{% endhighlight %}
{% highlight css %}
// Mixin
.clearfix {
&:before,
&:after {
content: " ";
display: table;
}
&:after {
clear: both;
}
}
// Usage
.element {
.clearfix();
}
{% endhighlight %}
</div>
<!-- Responsive utilities
================================================== -->
<div class="bs-docs-section" id="responsive-utilities">
<div class="page-header">
<h1>Responsive utilities</h1>
</div>
<p class="lead">For faster mobile-friendly development, use these utility classes for showing and hiding content by device via media query. Also included are utility classes for toggling content when printed.</p>
<h3>Responsive classes</h3>
<div class="hidden-sm">
<table class="table table-bordered table-striped responsive-utilities">
<thead>
<tr>
<th>Class</th>
<th>Small devices <small>Up to 768px</small></th>
<th>Medium devices <small>768px to 979px</small></th>
<th>Large devices <small>980px and up</small></th>
</tr>
</thead>
<tbody>
<tr>
<th><code>.visible-sm</code></th>
<td class="is-visible">Visible</td>
<td class="is-hidden">Hidden</td>
<td class="is-hidden">Hidden</td>
</tr>
<tr>
<th><code>.visible-md</code></th>
<td class="is-hidden">Hidden</td>
<td class="is-visible">Visible</td>
<td class="is-hidden">Hidden</td>
</tr>
<tr>
<th><code>.visible-lg</code></th>
<td class="is-hidden">Hidden</td>
<td class="is-hidden">Hidden</td>
<td class="is-visible">Visible</td>
</tr>
<tr>
<th><code>.hidden-sm</code></th>
<td class="is-hidden">Hidden</td>
<td class="is-visible">Visible</td>
<td class="is-visible">Visible</td>
</tr>
<tr>
<th><code>.hidden-md</code></th>
<td class="is-visible">Visible</td>
<td class="is-hidden">Hidden</td>
<td class="is-visible">Visible</td>
</tr>
<tr>
<th><code>.hidden-lg</code></th>
<td class="is-visible">Visible</td>
<td class="is-visible">Visible</td>
<td class="is-hidden">Hidden</td>
</tr>
</tbody>
</table>
</div>
<h3>Print classes</h3>
<table class="table table-bordered table-striped responsive-utilities">
<thead>
<tr>
<th>Class</th>
<th>Browser</th>
<th>Print</th>
</tr>
</thead>
<tbody>
<tr>
<th><code>.visible-print</code></th>
<td class="is-hidden">Hidden</td>
<td class="is-visible">Visible</td>
</tr>
<tr>
<th><code>.hidden-print</code></th>
<td class="is-visible">Visible</td>
<td class="is-hidden">Hidden</td>
</tr>
</tbody>
</table>
<h3>When to use</h3>
<p>Use on a limited basis and avoid creating entirely different versions of the same site. Instead, use them to complement each device's presentation. Responsive utilities are currently only available for block-level toggling, meaning <code>display: none;</code> or <code>display: block;</code>. Use with inline and table elements is currently not supported.</p>
<h3>Test case</h3>
<p>Resize your browser or load on different devices to test the responsive utility classes.</p>
<h4>Visible on...</h4>
<p>Green checkmarks indicate the element <strong>is visible</strong> in your current viewport.</p>
<ul class="responsive-utilities-test visible-on">
<li>
<span class="hidden-sm">Small</span>
<span class="visible-sm">&#10004; Visible on small</span>
</li>
<li>
<span class="hidden-md">Medium</span>
<span class="visible-md">&#10004; Visible on medium</span>
</li>
<li>
<span class="hidden-lg">Large</span>
<span class="visible-lg">&#10004; Visible on large</span>
</li>
</ul>
<h4>Hidden on...</h4>
<p>Here, green checkmarks indicate the element <strong>is hidden</strong> in your current viewport.</p>
<ul class="responsive-utilities-test hidden-on">
<li>
<span class="visible-sm">Small</span>
<span class="hidden-sm">&#10004; Hidden on small</span>
</li>
<li>
<span class="visible-md">Medium</span>
<span class="hidden-md">&#10004; Hidden on medium</span>
</li>
<li>
<span class="visible-lg">Large</span>
<span class="hidden-lg">&#10004; Hidden on desktop</span>
</li>
</ul>
</div>

View File

@ -1,358 +1,1136 @@
---
layout: default
title: Customize and download
slug: customize
lead: Customize Bootstrap's components, LESS variables, and jQuery plugins to get your very own version.
---
<div class="bs-docs-sidebar">
<h5 class="bs-docs-sidenav-heading">Customize and download</h5>
<ul class="nav bs-docs-sidenav">
<li><a href="#components">1. Choose components</a></li>
<li><a href="#plugins">2. Select jQuery plugins</a></li>
<li><a href="#variables">3. Customize variables</a></li>
<li><a href="#download">4. Download</a></li>
</ul>
</div>
<div class="container bs-docs-container">
<!-- Customize form
<!-- Customize
================================================== -->
<form>
<section class="download" id="components">
<form class="bs-customizer">
<div class="bs-docs-section" id="less">
<div class="page-header">
<a class="btn btn-small pull-right toggle-all" href="#">Toggle all</a>
<h1>
1. Choose components
</h1>
<button class="btn btn-default toggle" type="button">Toggle all</button>
<h1>LESS files</h1>
</div>
<div class="row download-builder">
<div class="col-span-3">
<h3>Scaffolding</h3>
<label class="checkbox"><input checked="checked" type="checkbox" value="reset.less"> Normalize and reset</label>
<label class="checkbox"><input checked="checked" type="checkbox" value="print.less"> Print</label>
<label class="checkbox"><input checked="checked" type="checkbox" value="scaffolding.less"> Body type and links</label>
<label class="checkbox"><input checked="checked" type="checkbox" value="grid.less"> Grid system</label>
<label class="checkbox"><input checked="checked" type="checkbox" value="layouts.less"> Layouts</label>
<h3>Base CSS</h3>
<label class="checkbox"><input checked="checked" type="checkbox" value="type.less"> Headings, body, etc</label>
<label class="checkbox"><input checked="checked" type="checkbox" value="code.less"> Code and pre</label>
<label class="checkbox"><input checked="checked" type="checkbox" value="labels-badges.less"> Labels and badges</label>
<label class="checkbox"><input checked="checked" type="checkbox" value="tables.less"> Tables</label>
<label class="checkbox"><input checked="checked" type="checkbox" value="forms.less"> Forms</label>
<label class="checkbox"><input checked="checked" type="checkbox" value="buttons.less"> Buttons</label>
<label class="checkbox"><input checked="checked" type="checkbox" value="sprites.less"> Icons</label>
</div><!-- /span -->
<div class="col-span-3">
<h3>Components</h3>
<label class="checkbox"><input checked="checked" type="checkbox" value="button-groups.less"> Button groups and dropdowns</label>
<label class="checkbox"><input checked="checked" type="checkbox" value="navs.less"> Navs, tabs, and pills</label>
<label class="checkbox"><input checked="checked" type="checkbox" value="navbar.less"> Navbar</label>
<label class="checkbox"><input checked="checked" type="checkbox" value="breadcrumbs.less"> Breadcrumbs</label>
<label class="checkbox"><input checked="checked" type="checkbox" value="pagination.less"> Pagination</label>
<label class="checkbox"><input checked="checked" type="checkbox" value="pager.less"> Pager</label>
<label class="checkbox"><input checked="checked" type="checkbox" value="thumbnails.less"> Thumbnails</label>
<label class="checkbox"><input checked="checked" type="checkbox" value="alerts.less"> Alerts</label>
<label class="checkbox"><input checked="checked" type="checkbox" value="progress-bars.less"> Progress bars</label>
<label class="checkbox"><input checked="checked" type="checkbox" value="hero-unit.less"> Hero unit</label>
<label class="checkbox"><input checked="checked" type="checkbox" value="media.less"> Media component</label>
<h3>JS Components</h3>
<label class="checkbox"><input checked="checked" type="checkbox" value="tooltip.less"> Tooltips</label>
<label class="checkbox"><input checked="checked" type="checkbox" value="popovers.less"> Popovers</label>
<label class="checkbox"><input checked="checked" type="checkbox" value="modals.less"> Modals</label>
<label class="checkbox"><input checked="checked" type="checkbox" value="dropdowns.less"> Dropdowns</label>
<label class="checkbox"><input checked="checked" type="checkbox" value="accordion.less"> Collapse</label>
<label class="checkbox"><input checked="checked" type="checkbox" value="carousel.less"> Carousel</label>
</div><!-- /span -->
<div class="col-span-3">
<h3>Miscellaneous</h3>
<label class="checkbox"><input checked="checked" type="checkbox" value="wells.less"> Wells</label>
<label class="checkbox"><input checked="checked" type="checkbox" value="close.less"> Close icon</label>
<label class="checkbox"><input checked="checked" type="checkbox" value="utilities.less"> Utilities</label>
<label class="checkbox"><input checked="checked" type="checkbox" value="component-animations.less"> Component animations</label>
<h3>Responsive</h3>
<label class="checkbox"><input checked="checked" type="checkbox" value="responsive-utilities.less"> Visible/hidden classes</label>
<label class="checkbox"><input checked="checked" type="checkbox" value="responsive-767px-max.less"> Narrow tablets and below (<767px)</label>
<label class="checkbox"><input checked="checked" type="checkbox" value="responsive-768px-979px.less"> Tablets to desktops (767-979px)</label>
<label class="checkbox"><input checked="checked" type="checkbox" value="responsive-1200px-min.less"> Large desktops (>1200px)</label>
<label class="checkbox"><input checked="checked" type="checkbox" value="responsive-navbar.less"> Responsive navbar</label>
</div><!-- /span -->
</div><!-- /row -->
</section>
<p class="lead">Choose which LESS files to compile into your custom build of Bootstrap. Not sure which files to use? Read through the <a href="/css/">CSS</a> and <a href="/components/">Components</a> pages in the docs</p>
<section class="download" id="plugins">
<div class="page-header">
<a class="btn btn-small pull-right toggle-all" href="#">Toggle all</a>
<h1>
2. Select jQuery plugins
</h1>
<h3>Basics</h3>
<div class="row">
<div class="col col-lg-4">
<h4>Layout</h4>
<div class="checkbox">
<label>
<input type="checkbox" checked value="normalize.less">
Normalize (CSS reset)
</label>
</div>
<div class="row download-builder">
<div class="col-span-3">
<label class="checkbox">
<input type="checkbox" checked="true" value="bootstrap-transition.js">
Transitions <small>(required for any animation)</small>
<div class="checkbox">
<label>
<input type="checkbox" checked value="scaffolding.less">
Scaffolding
</label>
<label class="checkbox">
<input type="checkbox" checked="true" value="bootstrap-modal.js">
Modals
</div>
<div class="checkbox">
<label>
<input type="checkbox" checked value="grid.less">
Grid system
</label>
<label class="checkbox">
<input type="checkbox" checked="true" value="bootstrap-dropdown.js">
Dropdowns
</div>
<div class="checkbox">
<label>
<input type="checkbox" checked value="print.less">
Print media styles
</label>
<label class="checkbox">
<input type="checkbox" checked="true" value="bootstrap-scrollspy.js">
Scrollspy
</div>
</div>
<div class="col col-lg-4">
<h4>Global CSS</h4>
<div class="checkbox">
<label>
<input type="checkbox" checked value="type.less">
Typography
</label>
<label class="checkbox">
<input type="checkbox" checked="true" value="bootstrap-tab.js">
Togglable tabs
</div>
<div class="checkbox">
<label>
<input type="checkbox" checked value="code.less">
Code
</label>
<label class="checkbox">
<input type="checkbox" checked="true" value="bootstrap-tooltip.js">
Tooltips
</div>
<div class="checkbox">
<label>
<input type="checkbox" checked value="tables.less">
Tables
</label>
<label class="checkbox">
<input type="checkbox" checked="true" value="bootstrap-popover.js">
Popovers <small>(requires Tooltips)</small>
</div>
<div class="checkbox">
<label>
<input type="checkbox" checked value="forms.less">
Forms
</label>
</div><!-- /span -->
<div class="col-span-3">
<label class="checkbox">
<input type="checkbox" checked="true" value="bootstrap-affix.js">
Affix
</label>
<label class="checkbox">
<input type="checkbox" checked="true" value="bootstrap-alert.js">
Alert messages
</label>
<label class="checkbox">
<input type="checkbox" checked="true" value="bootstrap-button.js">
</div>
<div class="checkbox">
<label>
<input type="checkbox" checked value="buttons.less">
Buttons
</label>
<label class="checkbox">
<input type="checkbox" checked="true" value="bootstrap-collapse.js">
Collapse
</div>
</div>
<div class="col col-lg-4">
<h4>Utility classes</h4>
<div class="checkbox">
<label>
<input type="checkbox" checked value="utilities.less">
Basic utilities
</label>
<label class="checkbox">
<input type="checkbox" checked="true" value="bootstrap-carousel.js">
</div>
<div class="checkbox">
<label>
<input type="checkbox" checked value="responsive-utilities.less">
Responsive utilities
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" checked value="component-animations.less">
Component animations (for JS)
</label>
</div>
</div>
</div>
<h3>Components</h3>
<div class="row">
<div class="col col-lg-4">
<h4>Navigation</h4>
<div class="checkbox">
<label>
<input type="checkbox" checked value="navs.less">
Navs
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" checked value="navbar.less">
Navbar
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" checked value="pagination.less">
Pagination
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" checked value="pager.less">
Pager
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" checked value="breadcrumbs.less">
Breadcrumbs
</label>
</div>
</div>
<div class="col col-lg-4">
<h4>Content blocks</h4>
<div class="checkbox">
<label>
<input type="checkbox" checked value="jumbotron.less">
Jumbotron
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" checked value="accordion.less">
Accordion
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" checked value="panels.less">
Panels
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" checked value="wells.less">
Wells
</label>
</div>
</div>
<div class="col col-lg-4">
<h4>Behavioral (requires JS)</h4>
<div class="checkbox">
<label>
<input type="checkbox" checked value="alerts.less">
Alerts
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" checked value="dropdowns.less">
Dropdowns
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" checked value="tooltip.less">
Tooltips
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" checked value="popovers.less">
Popovers
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" checked value="modals.less">
Modals
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" checked value="carousel.less">
Carousel
</label>
<label class="checkbox">
<input type="checkbox" checked="true" value="bootstrap-typeahead.js">
Typeahead
</label>
</div><!-- /span -->
<div class="col-span-3">
<h4 class="muted">Heads up!</h4>
<p class="muted">All checked plugins will be compiled into a single file, bootstrap.js. All plugins require the latest version of <a href="http://jquery.com/" target="_blank">jQuery</a> to be included.</p>
</div><!-- /span -->
</div><!-- /row -->
</section>
<section class="download" id="variables">
<div class="page-header">
<a class="btn btn-small pull-right toggle-all" href="#">Reset to defaults</a>
<h1>
3. Customize variables
</h1>
</div>
<div class="row download-builder">
<div class="col-span-3">
<h3>Scaffolding</h3>
<label>@body-background</label>
</div>
</div>
<div class="row">
<div class="col col-lg-4">
<h4>Media</h4>
<div class="checkbox">
<label>
<input type="checkbox" checked value="glyphicons.less">
Glyphicons
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" checked value="thumbnails.less">
Thumbnails
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" checked value="list-group.less">
List groups
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" checked value="media.less">
Media items
</label>
</div>
</div>
<div class="col col-lg-4">
<h4>Miscellaneous</h4>
<div class="checkbox">
<label>
<input type="checkbox" checked value="button-groups.less">
Button groups
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" checked value="progress-bars.less">
Progress bars
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" checked value="badges.less">
Badges
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" checked value="labels.less">
Labels
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" checked value="close.less">
Close icon
</label>
</div>
</div>
</div>
</div>
<div class="bs-docs-section" id="plugins">
<div class="page-header">
<button class="btn btn-default toggle" type="button">Toggle all</button>
<h1>jQuery plugins</h1>
</div>
<p class="lead">Choose which jQuery plugins should be included in your custom JavaScript files. Unsure what to include? Read the <a href="/javascript/">JavaScript</a> page in the docs.</p>
<div class="row">
<div class="col col-lg-6">
<h4>Linked to components</h4>
<div class="checkbox">
<label>
<input type="checkbox" checked value="alert.js">
Alert dismissal
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" checked value="button.js">
Advanced buttons
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" checked value="carousel.js">
Carousel functionality
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" checked value="dropdown.js">
Dropdowns
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" checked value="modal.js">
Modals
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" checked value="tooltip.js">
Tooltips
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" checked value="popover.js">
Popovers <small>(requires Tooltips)</small>
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" checked value="tab.js">
Toggable tabs
</label>
</div>
</div>
<div class="col col-lg-6">
<h4>Magic</h4>
<div class="checkbox">
<label>
<input type="checkbox" checked value="affix.js">
Affix
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" checked value="collapse.js">
Collapse
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" checked value="scrollspy.js">
Scrollspy
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" checked value="transition.js">
Transitions <small>(required for any kind of animation)</small>
</label>
</div>
</div>
</div>
<div class="bs-callout">
<h4>Heads up!</h4>
<p>All checked plugins will be compiled into a single file, bootstrap.js. All plugins require the latest version of <a href="http://jquery.com/" target="_blank">jQuery</a> to be included.</p>
</div>
</div>
<div class="bs-docs-section" id="less-variables">
<div class="page-header">
<button class="btn btn-default toggle" type="button">Reset to defaults</button>
<h1>LESS variables</h1>
</div>
<p class="lead">Customize LESS variables to define colors, sizes and more inside your custom CSS stylesheets.</p>
<h2 id="variables-basics">Basics</h2>
<h3>Body background</h3>
<div class="row">
<div class="col col-lg-6">
<label>@body-bg</label>
<input type="text" placeholder="#fff">
<label>@text-color</label>
<input type="text" placeholder="@grayDark">
<h3>Links</h3>
<label>@link-color</label>
<input type="text" placeholder="#08c">
<label>@link-color-hover</label>
<input type="text" placeholder="darken(@link-color, 15%)">
<h3>Grid system</h3>
<label>@grid-columns</label>
<input type="text" placeholder="12">
<label>@grid-column-width</label>
<input type="text" placeholder="60px">
<label>@grid-gutter-width</label>
<input type="text" placeholder="20px">
<label>@grid-column-width-1200</label>
<input type="text" placeholder="70px">
<label>@grid-gutter-width-1200</label>
<input type="text" placeholder="30px">
<label>@grid-column-width-768</label>
<input type="text" placeholder="42px">
<label>@grid-gutter-width-768</label>
<input type="text" placeholder="20px">
</div><!-- /span -->
<div class="col-span-3">
<p class="help-block">Background color applied to <code>&lt;body&gt;</code>.</p>
</div>
</div>
<h3>Typography</h3>
<div class="row">
<div class="col col-lg-6">
<label>@font-family-sans-serif</label>
<input type="text" placeholder="'Helvetica Neue', Helvetica, Arial, sans-serif">
<p class="help-block">Default sans-serif fonts.</p>
<label>@font-family-serif</label>
<input type="text" placeholder="Georgia, 'Times New Roman', Times, serif">
<p class="help-block">Default serif fonts.</p>
<label>@font-family-monospace</label>
<input type="text" placeholder="Menlo, Monaco, 'Courier New', monospace">
<label>@font-size-base</label>
<input type="text" placeholder="14px">
<input type="text" placeholder="Monaco, Menlo, Consolas, 'Courier New', monospace">
<p class="help-block">Default monospace fonts for <code>&lt;code&gt;</code> and <code>&lt;pre&gt;</code>.</p>
</div>
<div class="col col-lg-6">
<label>@font-family-base</label>
<input type="text" placeholder="@font-family-sans-serif">
<p class="help-block">Used to globally set font-family in Bootstrap.</p>
<label>@font-size-base</label>
<input type="text" placeholder="14px">
<p class="help-block">Used to calculate font-size throughout Bootstrap.</p>
<label>@line-height-base</label>
<input type="text" placeholder="20px">
<label>@headings-font-family</label>
<input type="text" placeholder="inherit">
<input type="text" placeholder="1.428571429">
<p class="help-block">Used to calculate line-height throughout Bootstrap.</p>
<label>@headings-font-weight</label>
<input type="text" placeholder="bold">
<label>@headingsColor</label>
<input type="text" placeholder="inherit">
<input type="text" placeholder="500">
<p class="help-block">Choose a separate font-weight for headings.</p>
<label>@headings-line-height</label>
<input type="text" placeholder="1.1">
<p class="help-block">Choose a separate line-height for headings.</p>
</div>
</div>
<label>@font-size-large</label>
<input type="text" placeholder="@font-size-base * 1.25">
<label>@font-size-small</label>
<input type="text" placeholder="@font-size-base * 0.85">
<label>@font-size-mini</label>
<input type="text" placeholder="@font-size-base * 0.75">
<h3>Colors</h3>
<div class="row">
<div class="col col-lg-6">
<p>Define custom colors used in several contexts.</p>
<label>@brand-primary</label>
<input type="text" placeholder="#428bca">
<p class="help-block">Used for primary buttons, panels and more.</p>
<label>@brand-success</label>
<input type="text" placeholder="#5cb85c">
<p class="help-block">Used to indicate success.</p>
<label>@brand-warning</label>
<input type="text" placeholder="#f0ad4e">
<p class="help-block">Used to indicate a warning.</p>
<label>@brand-danger</label>
<input type="text" placeholder="#d9534f">
<p class="help-block">Used to indicate danger.</p>
<label>@brand-info</label>
<input type="text" placeholder="#5bc0de">
<p class="help-block">Used to indicate informational content.</p>
</div>
<div class="col col-lg-6">
<p>Define your preferred colors for standard text and links.</p>
<label>@text-color</label>
<input type="text" placeholder="@gray-dark">
<p class="help-block">Global color set on the body.</p>
<label>@link-color</label>
<input type="text" placeholder="@brand-primary">
<p class="help-block">Global link color for text.</p>
<label>@link-color-hover</label>
<input type="text" placeholder="darken(@link-color, 15%)">
<p class="help-block">Automatically darken links on hover via color function.</p>
</div>
</div>
<label>@padding-large</label>
<input type="text" placeholder="11px 19px">
<label>@padding-small</label>
<input type="text" placeholder="2px 10px">
<label>@padding-mini</label>
<input type="text" placeholder="1px 6px">
<h3>Media queries breakpoints</h3>
<p>Define the breakpoints at which your layout will change, adapting to different screen sizes.</p>
<div class="row">
<div class="col col-lg-6">
<label>@screen-tiny</label>
<input type="text" placeholder="480px">
<label>@screen-small</label>
<input type="text" placeholder="768px">
</div>
<div class="col col-lg-6">
<label>@screen-medium</label>
<input type="text" placeholder="992px">
<label>@screen-large</label>
<input type="text" placeholder="1200px">
</div>
</div>
<h3>Grid system</h3>
<p>Define your custom responsive grid.</p>
<div class="row">
<div class="col col-lg-6">
<label>@grid-columns</label>
<input type="text" placeholder="12">
<p class="help-block">Number of columns in the grid.</p>
<label>@grid-gutter-width</label>
<input type="text" placeholder="30px">
<p class="help-block">Padding between columns.</p>
</div>
<div class="col col-lg-6">
<label>@grid-float-breakpoint</label>
<input type="text" placeholder="@screen-tablet">
<p class="help-block">Point at which the navbar stops collapsing.</p>
</div>
</div>
<h3>Components</h3>
<p>Define common padding and border radius sizes and more.</p>
<div class="row">
<div class="col col-lg-6">
<h4>Padding</h4>
<label>@padding-base-vertical</label>
<input type="text" placeholder="8px">
<label>@padding-base-horizontal</label>
<input type="text" placeholder="12px">
<label>@padding-large-vertical</label>
<input type="text" placeholder="14px">
<label>@padding-large-horizontal</label>
<input type="text" placeholder="16px">
<label>@padding-small-vertical</label>
<input type="text" placeholder="5px">
<label>@padding-small-horizontal</label>
<input type="text" placeholder="10px">
</div>
<div class="col col-lg-6">
<h4>Border radius sizes</h4>
<label>@border-radius-base</label>
<input type="text" placeholder="4px">
<label>@border-radius-large</label>
<input type="text" placeholder="6px">
<label>@border-radius-small</label>
<input type="text" placeholder="3px">
</div>
</div>
<label>@hero-background</label>
<input type="text" placeholder="@grayLighter">
<label>@hero-heading-color</label>
<input type="text" placeholder="inherit">
<label>@hero-lead-color</label>
<input type="text" placeholder="inherit">
<h4>Active background color</h4>
<div class="row">
<div class="col col-lg-6">
<label>@component-active-bg</label>
<input type="text" placeholder="@brand-primary">
<p class="help-block">Used for active or hovered items in places like navs or dropdowns.</p>
</div>
</div>
<h3>Tables</h3>
<label>@table-background</label>
<input type="text" placeholder="transparent">
<label>@table-background-accent</label>
<input type="text" placeholder="#f9f9f9">
<label>@table-background-hover</label>
<input type="text" placeholder="#f5f5f5">
<label>@table-border-color</label>
<input type="text" placeholder="#ddd">
<h3>Forms</h3>
<label>@input-color-placeholder</label>
<input type="text" placeholder="@grayLight">
<label>@input-background</label>
<h2 id="variables-buttons">Buttons</h2>
<p>For each of Bootstrap's buttons, define text, background and border color.</p>
<div class="row">
<div class="col col-lg-6">
<h4>Default</h4>
<label>@btn-default-color</label>
<input type="text" placeholder="#fff">
<label>@input-border</label>
<input type="text" placeholder="#ccc">
<label>@input-border-radius</label>
<input type="text" placeholder="3px">
<label>@input-background-disabled</label>
<input type="text" placeholder="@grayLighter">
<label>@form-actions-background</label>
<input type="text" placeholder="#f5f5f5">
<label>@btn-backround-primary</label>
<input type="text" placeholder="@link-color">
<label>@btn-backround-primary-highlight</label>
<input type="text" placeholder="darken(#fff, 10%)">
<label>@btn-default-bg</label>
<input type="text" placeholder="#a7a99aa">
<label>@btn-default-border</label>
<input type="text" placeholder="@btn-default-bg">
<h4>Primary</h4>
<label>@btn-primary-color</label>
<input type="text" placeholder="@btn-default-color">
<label>@btn-primary-bg</label>
<input type="text" placeholder="@brand-primary">
<label>@btn-primary-border</label>
<input type="text" placeholder="@btn-primary-bg">
<h4>Info</h4>
<label>@btn-info-color</label>
<input type="text" placeholder="@btn-default-color">
<label>@btn-info-bg</label>
<input type="text" placeholder="@brand-info">
<label>@btn-info-border</label>
<input type="text" placeholder="@btn-info-bg">
</div>
<div class="col col-lg-6">
<h4>Success</h4>
<label>@btn-success-color</label>
<input type="text" placeholder="@btn-default-color">
<label>@btn-success-bg</label>
<input type="text" placeholder="@brand-success">
<label>@btn-success-border</label>
<input type="text" placeholder="@btn-success-bg">
<h4>Warning</h4>
<label>@btn-warning-color</label>
<input type="text" placeholder="@btn-default-color">
<label>@btn-warning-bg</label>
<input type="text" placeholder="@brand-warning">
<label>@btn-warning-border</label>
<input type="text" placeholder="@btn-warning-bg">
<h4>Danger</h4>
<label>@btn-danger-color</label>
<input type="text" placeholder="@btn-default-color">
<label>@btn-danger-bg</label>
<input type="text" placeholder="@brand-danger">
<label>@btn-danger-border</label>
<input type="text" placeholder="@btn-danger-bg">
</div>
</div>
</div><!-- /span -->
<div class="col-span-3">
<h3>Form states &amp; alerts</h3>
<label>@state-warning-text</label>
<input type="text" placeholder="#c09853">
<label>@state-warning-background</label>
<input type="text" placeholder="#fcf8e3">
<label>@state-error-text</label>
<input type="text" placeholder="#b94a48">
<label>@state-error-background</label>
<input type="text" placeholder="#f2dede">
<h2 id="variables-form-states">Form states and alerts</h2>
<p>Define colors for form feedback states and, by default, alerts.</p>
<div class="row">
<div class="col col-lg-6">
<h4>Success</h4>
<label>@state-success-text</label>
<input type="text" placeholder="#468847">
<label>@state-success-background</label>
<label>@state-success-bg</label>
<input type="text" placeholder="#dff0d8">
<label>@state-success-border</label>
<input type="text" placeholder="darken(spin(@state-success-bg, -10), 5%)">
<h4>Warning</h4>
<label>@state-warning-text</label>
<input type="text" placeholder="#c09853">
<label>@state-warning-bg</label>
<input type="text" placeholder="#fcf8e3">
<label>@state-warning-border</label>
<input type="text" placeholder="darken(spin(@state-warning-bg, -10), 3%)">
</div>
<div class="col col-lg-6">
<h4>Danger</h4>
<label>@state-danger-text</label>
<input type="text" placeholder="#b94a48">
<label>@state-danger-bg</label>
<input type="text" placeholder="#f2dede">
<label>@state-danger-border</label>
<input type="text" placeholder="darken(spin(@state-danger-bg, -10), 3%)">
<h4>Info</h4>
<label>@state-info-text</label>
<input type="text" placeholder="#3a87ad">
<label>@state-info-background</label>
<label>@state-info-bg</label>
<input type="text" placeholder="#d9edf7">
<label>@state-info-border</label>
<input type="text" placeholder="darken(spin(@state-info-bg, -10), 7%)">
</div>
</div>
<h3>Navbar</h3>
<h2 id="variables-alerts">Alerts</h2>
<p>Define alert colors and border radius.</p>
<h4>Border radius</h4>
<label>@alert-border-radius</label>
<input type="text" placeholder="@border-radius-base">
<div class="row">
<div class="col col-lg-6">
<h4>Success</h4>
<label>@alert-success-text</label>
<input type="text" placeholder="@state-success-text">
<label>@alert-success-bg</label>
<input type="text" placeholder="@state-success-bg">
<label>@alert-success-border</label>
<input type="text" placeholder="@state-success-border">
<h4>Warning</h4>
<label>@alert-warning-text</label>
<input type="text" placeholder="@state-warning-text">
<label>@alert-warning-bg</label>
<input type="text" placeholder="@state-warning-bg">
<label>@alert-warning-border</label>
<input type="text" placeholder="@state-warning-border">
</div>
<div class="col col-lg-6">
<h4>Danger</h4>
<label>@alert-danger-text</label>
<input type="text" placeholder="@state-danger-text">
<label>@alert-danger-bg</label>
<input type="text" placeholder="@state-danger-bg">
<label>@alert-danger-border</label>
<input type="text" placeholder="@state-danger-border">
<h4>Info</h4>
<label>@alert-info-text</label>
<input type="text" placeholder="@state-info-text">
<label>@alert-info-bg</label>
<input type="text" placeholder="@state-info-bg">
<label>@alert-info-border</label>
<input type="text" placeholder="@state-info-border">
</div>
</div>
<h2 id="variables-navbar">Navbar</h2>
<div class="row">
<div class="col col-lg-6">
<h3>Default navbar</h3>
<h4>Basics</h4>
<label>@navbar-height</label>
<input type="text" placeholder="40px">
<label>@navbar-background</label>
<input type="text" placeholder="@grayDarker">
<label>@navbar-background-highlight</label>
<input type="text" placeholder="@grayDark">
<input type="text" placeholder="50px">
<label>@navbar-color</label>
<input type="text" placeholder="@grayLight">
<input type="text" placeholder="#777">
<label>@navbar-bg</label>
<input type="text" placeholder="#eee">
<h4>Links</h4>
<label>@navbar-link-color</label>
<input type="text" placeholder="#777">
<label>@navbar-link-hover-color</label>
<input type="text" placeholder="#333">
<label>@navbar-link-hover-bg</label>
<input type="text" placeholder="transparent">
<label>@navbar-link-active-color</label>
<input type="text" placeholder="#555">
<label>@navbar-link-active-bg</label>
<input type="text" placeholder="darken(@navbar-bg, 10%)">
<label>@navbar-link-disabled-color</label>
<input type="text" placeholder="#ccc">
<label>@navbar-link-disabled-bg</label>
<input type="text" placeholder="transparent">
<h4>Brand</h4>
<label>@navbar-brand-color</label>
<input type="text" placeholder="@navbar-link-color">
<label>@navbar-link-color</label>
<input type="text" placeholder="@grayLight">
<label>@navbar-link-color-hover</label>
<input type="text" placeholder="#fff">
<label>@navbar-link-color-active</label>
<input type="text" placeholder="@navbar-link-color-hover">
<label>@navbar-link-background-hover</label>
<label>@navbar-brand-hover-color</label>
<input type="text" placeholder="darken(@navbar-link-color, 10%)">
<label>@navbar-brand-hover-bg</label>
<input type="text" placeholder="transparent">
<label>@navbar-link-background-active</label>
<input type="text" placeholder="@navbar-background">
<label>@navbarSearchBackground</label>
<input type="text" placeholder="lighten(@navbar-background, 25%)">
<label>@navbarSearchBackgroundFocus</label>
<input type="text" placeholder="#fff">
<label>@navbarSearchBorder</label>
<input type="text" placeholder="darken(@navbarSearchBackground, 30%)">
<label>@navbarSearchPlaceholderColor</label>
<input type="text" placeholder="#ccc">
<label>@navbar-collapse-width</label>
<input type="text" placeholder="979px">
<label>@navbar-collapse-width-desktop</label>
<input type="text" placeholder="@navbar-collapse-width + 1">
<h3>Dropdowns</h3>
<label>@dropdown-background</label>
<input type="text" placeholder="#fff">
<label>@dropdown-border</label>
<input type="text" placeholder="rgba(0,0,0,.2)">
<label>@dropdown-link-color</label>
<input type="text" placeholder="@grayDark">
<label>@dropdown-link-color-hover</label>
<input type="text" placeholder="#fff">
<label>@dropdown-link-background-hover</label>
<input type="text" placeholder="@link-color">
</div><!-- /span -->
</div><!-- /row -->
</section>
<section class="download" id="download">
<div class="page-header">
<h1>
4. Download
</h1>
</div>
<div class="download-btn">
<a class="btn btn-primary" href="#" onclick="_gaq.push(['_trackEvent', 'Customize', 'Download', 'Customize and Download']);">Customize and Download</a>
<div class="col col-lg-6">
<h3>Inverted navbar</h3>
<h4>Basics</h4>
<label>@navbar-inverse-color</label>
<input type="text" placeholder="@gray-light">
<label>@navbar-inverse-bg</label>
<input type="text" placeholder="#222">
<h4>Links</h4>
<label>@navbar-inverse-link-color</label>
<input type="text" placeholder="@gray-light">
<label>@navbar-inverse-link-hover-color</label>
<input type="text" placeholder="#fff">
<label>@navbar-inverse-link-hover-bg</label>
<input type="text" placeholder="transparent">
<label>@navbar-inverse-link-active-color</label>
<input type="text" placeholder="@navbar-inverse-link-hover-color">
<label>@navbar-inverse-link-active-bg</label>
<input type="text" placeholder="darken(@navbar-inverse-bg, 10%)">
<label>@navbar-inverse-link-disabled-color</label>
<input type="text" placeholder="#444">
<label>@navbar-inverse-link-disabled-bg</label>
<input type="text" placeholder="transparent">
<h4>Brand</h4>
<label>@navbar-inverse-brand-color</label>
<input type="text" placeholder="@navbar-inverse-link-color">
<label>@navbar-inverse-brand-hover-color</label>
<input type="text" placeholder="#fff">
<label>@navbar-inverse-brand-hover-bg</label>
<input type="text" placeholder="transparent">
</div>
</div>
<h2 id="variables-tables">Tables</h2>
<div class="row">
<div class="col col-lg-6">
<label>@table-bg</label>
<input type="text" placeholder="transparent">
<p class="help-block">Default background color used for all tables.</p>
<label>@table-bg-accent</label>
<input type="text" placeholder="#f9f9f9">
<p class="help-block">Background color used for <code>.table-striped</code>.</p>
</div>
<div class="col col-lg-6">
<label>@table-bg-hover</label>
<input type="text" placeholder="#f5f5f5">
<p class="help-block">Background color used for <code>.table-hover</code>.</p>
<label>@table-border-color</label>
<input type="text" placeholder="#ddd">
<p class="help-block">Border color for table and cell borders.</p>
</div>
</div>
<h2 id="variables-forms">Forms</h2>
<div class="row">
<div class="col col-lg-6">
<h3>Background</h3>
<label>@input-bg</label>
<input type="text" placeholder="#fff">
<p class="help-block"><code>&lt;input&gt;</code> background color</p>
<label>@input-bg-disabled</label>
<input type="text" placeholder="@gray-lighter">
<p class="help-block"><code>&lt;input disabled&gt;</code>background color</p>
<h3>Placeholder</h3>
<label>@input-color-placeholder</label>
<input type="text" placeholder="@gray-light">
<p class="help-block">Placeholder text color</p>
</div>
<div class="col col-lg-6">
<h3>Border</h3>
<label>@input-border</label>
<input type="text" placeholder="#ccc">
<p class="help-block"><code>&lt;input&gt;</code> border color</p>
<label>@input-border-radius</label>
<input type="text" placeholder="@border-radius-base">
<p class="help-block"><code>&lt;input&gt;</code>border radius</p>
</div>
</div>
<h2 id="variables-dropdowns">Dropdowns</h2>
<div class="row">
<div class="col col-lg-6">
<h3>Background</h3>
<label>@dropdown-bg</label>
<input type="text" placeholder="#fff">
<p class="help-block">Dropdown menu background color</p>
<label>@dropdown-link-active-bg</label>
<input type="text" placeholder="@component-active-bg">
<p class="help-block">Active dropdown menu entry background color</p>
<label>@dropdown-link-hover-bg</label>
<input type="text" placeholder="@dropdown-link-active-bg">
<p class="help-block">Hovered dropdown menu entry background color</p>
</div>
<div class="col col-lg-6">
<h3>Colors</h3>
<label>@dropdown-link-color</label>
<input type="text" placeholder="@gray-dark">
<p class="help-block">Dropdown text color</p>
<label>@dropdown-link-active-color</label>
<input type="text" placeholder="#fff">
<p class="help-block">Active dropdown menu entry text color</p>
<label>@dropdown-link-hover-bg</label>
<input type="text" placeholder="#fff">
<p class="help-block">Hovered dropdown menu entry text color</p>
</div>
</div>
<h3>Dividers</h3>
<div class="row">
<div class="col col-lg-6">
<label>@dropdown-divider-top</label>
<input type="text" placeholder="#e5e5e5">
<p class="help-block">Dropdown divider top border color</p>
<label>@dropdown-divider-bottom</label>
<input type="text" placeholder="#fff">
<p class="help-block">Dropdown divider bottom border color</p>
</div>
</div>
<h2 id="variables-panels-wells">Panels and wells</h2>
<h3>Default panel styles</h3>
<div class="row">
<div class="col col-lg-6">
<label>@panel-bg</label>
<input type="text" placeholder="#fff">
<p class="help-block">Panel body background color</p>
<label>@panel-heading-bg</label>
<input type="text" placeholder="#f5f5f5">
<p class="help-block">Panel heading background color</p>
<label>@panel-footer-bg</label>
<input type="text" placeholder="#f5f5f5">
<p class="help-block">Panel footer background color</p>
</div>
<div class="col col-lg-6">
<label>@panel-border</label>
<input type="text" placeholder="#ddd">
<p class="help-block">Panel border color</p>
<label>@panel-border-radius</label>
<input type="text" placeholder="@border-radius-base">
<p class="help-block">Panel border radius</p>
</div>
</div>
<h3>Contextual panel colors</h3>
<div class="row">
<div class="col col-lg-6">
<h4>Primary</h4>
<label>@panel-primary-text</label>
<input type="text" placeholder="#fff">
<p class="help-block">Primary text color</p>
<label>@panel-primary-border</label>
<input type="text" placeholder="@brand-primary">
<p class="help-block">Primary border color</p>
<label>@panel-primary-heading-bg</label>
<input type="text" placeholder="@brand-primary">
<p class="help-block">Primary heading background color</p>
<h4>Success</h4>
<label>@panel-success-text</label>
<input type="text" placeholder="@state-success-text">
<p class="help-block">Success text color</p>
<label>@panel-success-border</label>
<input type="text" placeholder="@state-success-border">
<p class="help-block">Success border color</p>
<label>@panel-success-heading-bg</label>
<input type="text" placeholder="@state-success-bg">
<p class="help-block">Success heading background color</p>
<h4>Info</h4>
<label>@panel-info-text</label>
<input type="text" placeholder="@state-info-text">
<p class="help-block">Info text color</p>
<label>@panel-info-border</label>
<input type="text" placeholder="@state-info-border">
<p class="help-block">Info border color</p>
<label>@panel-info-heading-bg</label>
<input type="text" placeholder="@state-info-bg">
<p class="help-block">Info heading background color</p>
</div>
<div class="col col-lg-6">
<h4>Warning</h4>
<label>@panel-warning-text</label>
<input type="text" placeholder="@state-warning-text">
<p class="help-block">Warning text color</p>
<label>@panel-warning-border</label>
<input type="text" placeholder="@state-warning-border">
<p class="help-block">Warning border color</p>
<label>@panel-warning-heading-bg</label>
<input type="text" placeholder="@state-warning-bg">
<p class="help-block">Warning heading background color</p>
<h4>Danger</h4>
<label>@panel-danger-text</label>
<input type="text" placeholder="@state-danger-text">
<p class="help-block">Danger text color</p>
<label>@panel-danger-border</label>
<input type="text" placeholder="@state-danger-border">
<p class="help-block">Danger border color</p>
<label>@panel-danger-heading-bg</label>
<input type="text" placeholder="@state-danger-bg">
<p class="help-block">Danger heading background color</p>
</div>
</div>
<h3>Wells</h3>
<label>@well-bg</label>
<input type="text" placeholder="#f5f5f5">
<h2 id="variables-jumbotron">Jumbotron</h2>
<div class="row">
<div class="col col-lg-4">
<label>@jumbotron-bg</label>
<input type="text" placeholder="@gray-lighter">
<p class="help-block">Jumbotron background color</p>
</div>
<div class="col col-lg-4">
<label>@jumbotron-heading-color</label>
<input type="text" placeholder="inherit">
<p class="help-block">Jumbotron heading color</p>
</div>
<div class="col col-lg-4">
<label>@jumbotron-lead-color</label>
<input type="text" placeholder="inherit">
<p class="help-block">Jumbotron lead paragraph color</p>
</div>
</div>
<h2 id="variables-modals">Modals</h2>
<div class="row">
<div class="col col-lg-4">
<label>@modal-inner-padding</label>
<input type="text" placeholder="20px">
<p class="help-block">Padding applied to the modal body</p>
</div>
<div class="col col-lg-4">
<label>@modal-title-padding</label>
<input type="text" placeholder="15px">
<p class="help-block">Padding applied to the modal title</p>
</div>
<div class="col col-lg-4">
<label>@modal-title-line-height</label>
<input type="text" placeholder="@line-height-base">
<p class="help-block">Modal title line-height</p>
</div>
</div>
<h2 id="variables-list-group">List group</h2>
<h3>Background</h3>
<div class="row">
<div class="col col-lg-4">
<label>@list-group-bg</label>
<input type="text" placeholder="#fff">
<p class="help-block">Default background color</p>
</div>
<div class="col col-lg-4">
<label>@list-group-hover-bg</label>
<input type="text" placeholder="#f5f5f5">
<p class="help-block">Background color of single list elements on hover</p>
</div>
<div class="col col-lg-4">
<label>@list-group-active-bg</label>
<input type="text" placeholder="@component-active-bg">
<p class="help-block">Background color of active list elements</p>
</div>
</div>
<h3>Borders</h3>
<div class="row">
<div class="col col-lg-4">
<label>@list-group-border</label>
<input type="text" placeholder="#ddd">
<p class="help-block">Default border color</p>
</div>
<div class="col col-lg-4">
<label>@list-group-border-radius</label>
<input type="text" placeholder="@border-radius-base">
<p class="help-block">List group border radius</p>
</div>
<div class="col col-lg-4">
<label>@list-group-active-border</label>
<input type="text" placeholder="@list-group-active-bg">
<p class="help-block">Border color of active list elements</p>
</div>
</div>
<label>@list-group-active-color</label>
<input type="text" placeholder="#fff">
<p class="help-block">Text color of active list elements</p>
<h2 id="variables-thumbnails">Thumbnails</h2>
<div class="row">
<div class="col col-lg-6">
<label>@thumbnail-caption-color</label>
<input type="text" placeholder="@text-color">
<p class="help-block">Custom text color for thumbnail captions</p>
<label>@thumbnail-bg</label>
<input type="text" placeholder="@body-bg">
<p class="help-block">Thumbnail background color</p>
</div>
<div class="col col-lg-6">
<label>@thumbnail-border</label>
<input type="text" placeholder="#ddd">
<p class="help-block">Thumbnail border color</p>
<label>@thumbnail-border-radius</label>
<input type="text" placeholder="@border-radius-base">
<p class="help-block">Thumbnail border radius</p>
</div>
</div>
<h2 id="variables-progress">Progress bars</h2>
<div class="row">
<div class="col col-lg-4">
<label>@progress-bg</label>
<input type="text" placeholder="#f5f5f5">
<p class="help-block">Background color of the whole progress component</p>
</div>
<div class="col col-lg-4">
<label>@progress-bar-bg</label>
<input type="text" placeholder="@brand-primary">
<p class="help-block">Default progress bar color</p>
</div>
<div class="col col-lg-4">
<label>@progress-bar-success-bg</label>
<input type="text" placeholder="@brand-success">
<p class="help-block">Success progress bar color</p>
</div>
</div>
<div class="row">
<div class="col col-lg-4">
<label>@progress-bar-warning-bg</label>
<input type="text" placeholder="@brand-warning">
<p class="help-block">Warning progress bar color</p>
</div>
<div class="col col-lg-4">
<label>@progress-bar-danger-bg</label>
<input type="text" placeholder="@brand-danger">
<p class="help-block">Danger progress bar color</p>
</div>
<div class="col col-lg-4">
<label>@progress-bar-info-bg</label>
<input type="text" placeholder="@brand-info">
<p class="help-block">Info progress bar color</p>
</div>
</div>
<h2 id="variables-pagination">Pagination</h2>
<div class="row">
<div class="col col-lg-4">
<label>@pagination-bg</label>
<input type="text" placeholder="#fff">
<p class="help-block">Background color</p>
</div>
<div class="col col-lg-4">
<label>@pagination-border</label>
<input type="text" placeholder="#ddd">
<p class="help-block">Border color</p>
</div>
<div class="col col-lg-4">
<label>@pagination-active-bg</label>
<input type="text" placeholder="#f5f5f5">
<p class="help-block">Active background color</p>
</div>
</div>
<h2 id="variables-labels">Labels</h2>
<div class="row">
<div class="col col-lg-6">
<label>@label-success-bg</label>
<input type="text" placeholder="@brand-success">
<p class="help-block">Success label background color</p>
<label>@label-info-bg</label>
<input type="text" placeholder="@brand-info">
<p class="help-block">Info label background color</p>
</div>
<div class="col col-lg-6">
<label>@label-warning-bg</label>
<input type="text" placeholder="@brand-warning">
<p class="help-block">Warning label background color</p>
<label>@label-danger-bg</label>
<input type="text" placeholder="@brand-danger">
<p class="help-block">Danger label background color</p>
</div>
</div>
<h2 id="variables-tooltips-popovers">Tooltips and popovers</h2>
<h3>Tooltip styles</h3>
<div class="row">
<div class="col col-lg-6">
<label>@tooltip-color</label>
<input type="text" placeholder="#fff">
<p class="help-block">Tooltip text color</p>
<label>@tooltip-bg</label>
<input type="text" placeholder="rgba(0,0,0,.9)">
<p class="help-block">Tooltip background color</p>
</div>
<div class="col col-lg-6">
<label>@tooltip-arrow-width</label>
<input type="text" placeholder="5px">
<p class="help-block">Tooltip arrow width</p>
<label>@tooltip-arrow-color</label>
<input type="text" placeholder="@tooltip-bg">
<p class="help-block">Tooltip arrow color</p>
</div>
</div>
<h3>Popover styles</h3>
<div class="row">
<div class="col col-lg-6">
<label>@popover-bg</label>
<input type="text" placeholder="#fff">
<p class="help-block">Popover body background color</p>
<label>@popover-title-bg</label>
<input type="text" placeholder="darken(@popover-bg, 3%)">
<p class="help-block">Popover title background color</p>
</div>
<div class="col col-lg-6">
<label>@popover-arrow-width</label>
<input type="text" placeholder="10px">
<p class="help-block">Popover arrow width</p>
<label>@popover-arrow-color</label>
<input type="text" placeholder="#fff">
<p class="help-block">Popover arrow color</p>
</div>
</div>
<div class="row">
<div class="col col-lg-6">
<label>@popover-arrow-outer-width</label>
<input type="text" placeholder="(@popover-arrow-width 1)">
<p class="help-block">Popover outer arrow width</p>
</div>
<div class="col col-lg-6">
<label>@popover-arrow-outer-color</label>
<input type="text" placeholder="rgba(0,0,0,.25)">
<p class="help-block">Popover outer arrow color</p>
</div>
</div>
<h2 id="variables-other">Other</h2>
<div class="row">
<div class="col col-lg-6">
<label>@hr-border</label>
<input type="text" placeholder="@gray-lighter">
<p class="help-block">Horizontal line color</p>
</div>
<div class="col col-lg-6">
<label>@component-offset-horizontal</label>
<input type="text" placeholder="180px">
<p class="help-block">Horizontal offset for forms and lists</p>
</div>
</div>
</div>
<div class="bs-docs-section" id="download">
<div class="page-header">
<h1>Download</h1>
</div>
<p class="lead">Hooray! Your custom version of Bootstrap is now ready to be compiled. Just click the button below to finish the process.</p>
<div class="bs-customize-download">
<a class="btn" href="#" onclick="_gaq.push(['_trackEvent', 'Customize', 'Download', 'Customize and Download']);">Customize and Download</a>
</div>
<div class="bs-callout">
<h4>What's included?</h4>
<p>Downloads include compiled CSS, compiled and minified CSS, and compiled jQuery plugins, all nicely packed up into a zipball for your convenience.</p>
</div>
</section><!-- /download -->
</div><!-- /download -->
</form>
</div><!-- /.container -->

View File

@ -1327,10 +1327,14 @@ For example, <code>&lt;section&gt;</code> should be wrapped as inline.
<p>Included with Bootstrap are optional form layouts for common use cases.</p>
<h3 id="forms-inline">Inline form</h3>
<p>Add <code>.form-inline</code> for left-aligned labels and inline-block controls for a compact layout.</p>
<p>Add <code>.form-inline</code> for left-aligned and inline-block controls for a compact layout.</p>
<div class="bs-docs-sidenote">
<h4>Requires custom widths</h4>
<p>Inputs, selects, and textareas are 100% wide by default in Bootstrap. To use the inline form, you'll have to set a width on the form controls used within.</p>
</div>
<form class="bs-docs-example form-inline">
<input type="text" class="col col-lg-3" placeholder="Email">
<input type="password" class="col col-lg-3" placeholder="Password">
<input type="text" placeholder="Email" style="width: 180px;">
<input type="password" placeholder="Password" style="width: 180px;">
<div class="checkbox">
<label>
<input type="checkbox"> Remember me
@ -1340,8 +1344,8 @@ For example, <code>&lt;section&gt;</code> should be wrapped as inline.
</form><!-- /example -->
{% highlight html %}
<form class="form-inline">
<input type="text" class="col col-lg-3" placeholder="Email">
<input type="password" class="col col-lg-3" placeholder="Password">
<input type="text" placeholder="Email" style="width: 180px;">
<input type="password" placeholder="Password" style="width: 180px;">
<div class="checkbox">
<label>
<input type="checkbox"> Remember me
@ -1927,74 +1931,30 @@ For example, <code>&lt;section&gt;</code> should be wrapped as inline.
{% endhighlight %}
<h4>Column sizing</h4>
<p>Use <code>.col col-lg-1</code> to <code>.col col-lg-12</code> for setting widths on inputs that match Bootstrap's grid system.</p>
<form class="bs-docs-example" style="padding-bottom: 15px;">
<div class="controls docs-input-sizes">
<input class="col col-lg-1" type="text" placeholder=".col col-lg-1">
<input class="col col-lg-2" type="text" placeholder=".col col-lg-2">
<input class="col col-lg-3" type="text" placeholder=".col col-lg-3">
<select class="col col-lg-1">
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
</select>
<select class="col col-lg-2">
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
</select>
<select class="col col-lg-3">
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
</select>
</div>
</form>
{% highlight html %}
<input class="col col-lg-1" type="text" placeholder=".col col-lg-1">
<input class="col col-lg-2" type="text" placeholder=".col col-lg-2">
<input class="col col-lg-3" type="text" placeholder=".col col-lg-3">
<select class="col col-lg-1">
...
</select>
<select class="col col-lg-2">
...
</select>
<select class="col col-lg-3">
...
</select>
{% endhighlight %}
<p>If you need multiple inputs on the same line, wrap them in the standard grid markup (with <code>.row</code> and <code>.col-span-*</code> classes). Each input should have it's own column and will expand to fill the available width automatically.</p>
<p>Wrap inputs in grid columns, or any custom parent element, to easily enforce desired widths.</p>
<form class="bs-docs-example" style="padding-bottom: 15px;">
<div class="row">
<div class="col col-lg-4">
<input type="text" placeholder=".col col-lg-4">
<div class="col col-lg-2">
<input type="text" placeholder="col col-large-2">
</div>
<div class="col col-lg-3">
<input type="text" placeholder="col col-large-3">
</div>
<div class="col col-lg-4">
<input type="text" placeholder=".col col-lg-4">
</div>
<div class="col col-lg-4">
<input type="text" placeholder=".col col-lg-4">
<input type="text" placeholder="col col-large-4">
</div>
</div>
</form>
{% highlight html %}
<div class="row">
<div class="col col-lg-4">
<input type="text" placeholder=".col col-lg-4">
<div class="col col-lg-2">
<input type="text" placeholder="col col-large-2">
</div>
<div class="col col-lg-3">
<input type="text" placeholder="col col-large-3">
</div>
<div class="col col-lg-4">
<input type="text" placeholder=".col col-lg-4">
</div>
<div class="col col-lg-4">
<input type="text" placeholder=".col col-lg-4">
<input type="text" placeholder="col col-large-4">
</div>
</div>
{% endhighlight %}
@ -2047,7 +2007,7 @@ For example, <code>&lt;section&gt;</code> should be wrapped as inline.
</div>
<h2 id="buttons-options">Button options</h2>
<p>Button styles can be applied to anything with the <code>.btn</code> class applied. However, typically you'll want to apply these to only <code>&lt;a&gt;</code> and <code>&lt;button&gt;</code> elements for the best rendering.</p>
<p>Use any of the available button classes to quickly create a styled button.</p>
<div class="bs-docs-example">
<button type="button" class="btn btn-default">Default</button>
<button type="button" class="btn btn-primary">Primary</button>
@ -2080,56 +2040,55 @@ For example, <code>&lt;section&gt;</code> should be wrapped as inline.
<button type="button" class="btn btn-link">Link</button>
{% endhighlight %}
<h2 id="buttons-sizes">Button sizes</h2>
<p>Fancy larger or smaller buttons? Add <code>.btn-large</code>, <code>.btn-small</code>, or <code>.btn-mini</code> for additional sizes.</p>
<div class="bs-docs-example">
<p>
<button type="button" class="btn btn-large btn-primary">Large button</button>
<button type="button" class="btn btn-large">Large button</button>
<button type="button" class="btn btn-primary btn-large">Large button</button>
<button type="button" class="btn btn-default btn-large">Large button</button>
</p>
<p>
<button type="button" class="btn btn-primary">Default button</button>
<button type="button" class="btn">Default button</button>
<button type="button" class="btn btn-default">Default button</button>
</p>
<p>
<button type="button" class="btn btn-small btn-primary">Small button</button>
<button type="button" class="btn btn-small">Small button</button>
<button type="button" class="btn btn-primary btn-small">Small button</button>
<button type="button" class="btn btn-default btn-small">Small button</button>
</p>
<p>
<button type="button" class="btn btn-mini btn-primary">Mini button</button>
<button type="button" class="btn btn-mini">Mini button</button>
<button type="button" class="btn btn-primary btn-mini">Mini button</button>
<button type="button" class="btn btn-default btn-mini">Mini button</button>
</p>
</div>
{% highlight html %}
<p>
<button type="button" class="btn btn-large btn-primary">Large button</button>
<button type="button" class="btn btn-large">Large button</button>
<button type="button" class="btn btn-primary btn-large">Large button</button>
<button type="button" class="btn btn-default btn-large">Large button</button>
</p>
<p>
<button type="button" class="btn btn-primary">Default button</button>
<button type="button" class="btn">Default button</button>
<button type="button" class="btn btn-default">Default button</button>
</p>
<p>
<button type="button" class="btn btn-small btn-primary">Small button</button>
<button type="button" class="btn btn-small">Small button</button>
<button type="button" class="btn btn-primary btn-small">Small button</button>
<button type="button" class="btn btn-default btn-small">Small button</button>
</p>
<p>
<button type="button" class="btn btn-mini btn-primary">Mini button</button>
<button type="button" class="btn btn-mini">Mini button</button>
<button type="button" class="btn btn-primary btn-mini">Mini button</button>
<button type="button" class="btn btn-default btn-mini">Mini button</button>
</p>
{% endhighlight %}
<p>Create block level buttons&mdash;those that span the full width of a parent&mdash; by adding <code>.btn-block</code>.</p>
<div class="bs-docs-example">
<div class="well" style="max-width: 400px; margin: 0 auto 10px;">
<button type="button" class="btn btn-large btn-block btn-primary">Block level button</button>
<button type="button" class="btn btn-large btn-block">Block level button</button>
<button type="button" class="btn btn-primary btn-large btn-block">Block level button</button>
<button type="button" class="btn btn-default btn-large btn-block">Block level button</button>
</div>
</div>
{% highlight html %}
<button type="button" class="btn btn-large btn-block btn-primary">Block level button</button>
<button type="button" class="btn btn-large btn-block">Block level button</button>
<button type="button" class="btn btn-primary btn-large btn-block">Block level button</button>
<button type="button" class="btn btn-default btn-large btn-block">Block level button</button>
{% endhighlight %}
@ -2139,12 +2098,12 @@ For example, <code>&lt;section&gt;</code> should be wrapped as inline.
<h3>Button element</h3>
<p>Add the <code>disabled</code> attribute to <code>&lt;button&gt;</code> buttons.</p>
<p class="bs-docs-example">
<button type="button" class="btn btn-large btn-primary" disabled="disabled">Primary button</button>
<button type="button" class="btn btn-large" disabled="disabled">Button</button>
<button type="button" class="btn btn-primary btn-large" disabled="disabled">Primary button</button>
<button type="button" class="btn btn-default btn-large" disabled="disabled">Button</button>
</p>
{% highlight html %}
<button type="button" class="btn btn-large btn-primary" disabled="disabled">Primary button</button>
<button type="button" class="btn btn-large" disabled="disabled">Button</button>
<button type="button" class="btn btn-default btn-large" disabled="disabled">Button</button>
{% endhighlight %}
<div class="bs-docs-sidenote">
@ -2155,12 +2114,12 @@ For example, <code>&lt;section&gt;</code> should be wrapped as inline.
<h3>Anchor element</h3>
<p>Add the <code>.disabled</code> class to <code>&lt;a&gt;</code> buttons.</p>
<p class="bs-docs-example">
<a href="#" class="btn btn-large btn-primary disabled">Primary link</a>
<a href="#" class="btn btn-large disabled">Link</a>
<a href="#" class="btn btn-primary btn-large disabled">Primary link</a>
<a href="#" class="btn btn-default btn-large disabled">Link</a>
</p>
{% highlight html %}
<a href="#" class="btn btn-large btn-primary disabled">Primary link</a>
<a href="#" class="btn btn-large disabled">Link</a>
<a href="#" class="btn btn-primary btn-large disabled">Primary link</a>
<a href="#" class="btn btn-default btn-large disabled">Link</a>
{% endhighlight %}
<p>
We use <code>.disabled</code> as a utility class here, similar to the common <code>.active</code> class, so no prefix is required.
@ -2171,19 +2130,19 @@ For example, <code>&lt;section&gt;</code> should be wrapped as inline.
</div>
<h2 id="buttons-tags">One class, multiple tags</h2>
<p>Use the <code>.btn</code> class on an <code>&lt;a&gt;</code>, <code>&lt;button&gt;</code>, or <code>&lt;input&gt;</code> element.</p>
<h2 id="buttons-tags">Using multiple tags</h2>
<p>Use the button classes on an <code>&lt;a&gt;</code>, <code>&lt;button&gt;</code>, or <code>&lt;input&gt;</code> element.</p>
<form class="bs-docs-example">
<a class="btn" href="">Link</a>
<button class="btn" type="submit">Button</button>
<input class="btn" type="button" value="Input">
<input class="btn" type="submit" value="Submit">
<a class="btn btn-default" href="#">Link</a>
<button class="btn btn-default" type="submit">Button</button>
<input class="btn btn-default" type="button" value="Input">
<input class="btn btn-default" type="submit" value="Submit">
</form>
{% highlight html %}
<a class="btn" href="">Link</a>
<button class="btn" type="submit">Button</button>
<input class="btn" type="button" value="Input">
<input class="btn" type="submit" value="Submit">
<a class="btn btn-default" href="#">Link</a>
<button class="btn btn-default" type="submit">Button</button>
<input class="btn btn-default" type="button" value="Input">
<input class="btn btn-default" type="submit" value="Submit">
{% endhighlight %}
<div class="bs-docs-sidenote">
@ -2599,20 +2558,20 @@ For example, <code>&lt;section&gt;</code> should be wrapped as inline.
<div class="bs-docs-example">
<div class="btn-toolbar">
<div class="btn-group">
<a class="btn" href="#"><span class="glyphicon glyphicon-align-left"></span></a>
<a class="btn" href="#"><span class="glyphicon glyphicon-align-center"></span></a>
<a class="btn" href="#"><span class="glyphicon glyphicon-align-right"></span></a>
<a class="btn" href="#"><span class="glyphicon glyphicon-align-justify"></span></a>
<a class="btn btn-default" href="#"><span class="glyphicon glyphicon-align-left"></span></a>
<a class="btn btn-default" href="#"><span class="glyphicon glyphicon-align-center"></span></a>
<a class="btn btn-default" href="#"><span class="glyphicon glyphicon-align-right"></span></a>
<a class="btn btn-default" href="#"><span class="glyphicon glyphicon-align-justify"></span></a>
</div>
</div>
</div><!-- /bs-docs-example -->
{% highlight html %}
<div class="btn-toolbar">
<div class="btn-group">
<a class="btn" href="#"><span class="glyphicon glyphicon-align-left"></span></a>
<a class="btn" href="#"><span class="glyphicon glyphicon-align-center"></span></a>
<a class="btn" href="#"><span class="glyphicon glyphicon-align-right"></span></a>
<a class="btn" href="#"><span class="glyphicon glyphicon-align-justify"></span></a>
<a class="btn btn-default" href="#"><span class="glyphicon glyphicon-align-left"></span></a>
<a class="btn btn-default" href="#"><span class="glyphicon glyphicon-align-center"></span></a>
<a class="btn btn-default" href="#"><span class="glyphicon glyphicon-align-right"></span></a>
<a class="btn btn-default" href="#"><span class="glyphicon glyphicon-align-justify"></span></a>
</div>
</div>
{% endhighlight %}
@ -2638,8 +2597,8 @@ For example, <code>&lt;section&gt;</code> should be wrapped as inline.
</div><!-- /bs-docs-example -->
{% highlight html %}
<div class="btn-group">
<a class="btn btn-primary" href="#"><span class="glyphicon glyphicon-user"></span> User</a>
<a class="btn btn-primary dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a>
<a class="btn btn-default btn-primary" href="#"><span class="glyphicon glyphicon-user"></span> User</a>
<a class="btn btn-default btn-primary dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="#"><span class="glyphicon glyphicon-pencil"></span> Edit</a></li>
<li><a href="#"><span class="glyphicon glyphicon-trash"></span> Delete</a></li>
@ -2652,18 +2611,18 @@ For example, <code>&lt;section&gt;</code> should be wrapped as inline.
<h5>Large button</h5>
<div class="bs-docs-example">
<a class="btn btn-large" href="#"><span class="glyphicon glyphicon-star"></span> Star</a>
<a class="btn btn-default btn-large" href="#"><span class="glyphicon glyphicon-star"></span> Star</a>
</div><!-- /bs-docs-example -->
{% highlight html %}
<a class="btn btn-large" href="#"><span class="glyphicon glyphicon-star"></span> Star</a>
<a class="btn btn-default btn-large" href="#"><span class="glyphicon glyphicon-star"></span> Star</a>
{% endhighlight %}
<h5>Small button</h5>
<div class="bs-docs-example">
<a class="btn btn-small" href="#"><span class="glyphicon glyphicon-star"></span></a>
<a class="btn btn-default btn-small" href="#"><span class="glyphicon glyphicon-star"></span></a>
</div><!-- /bs-docs-example -->
{% highlight html %}
<a class="btn btn-small" href="#"><span class="glyphicon glyphicon-star"></span></a>
<a class="btn btn-default btn-small" href="#"><span class="glyphicon glyphicon-star"></span></a>
{% endhighlight %}
@ -2878,16 +2837,16 @@ For example, <code>&lt;section&gt;</code> should be wrapped as inline.
<p>Wrap a series of buttons with <code>.btn</code> in <code>.btn-group</code>.</p>
<div class="bs-docs-example">
<div class="btn-group" style="margin: 9px 0 5px;">
<button type="button" class="btn">Left</button>
<button type="button" class="btn">Middle</button>
<button type="button" class="btn">Right</button>
<button type="button" class="btn btn-default">Left</button>
<button type="button" class="btn btn-default">Middle</button>
<button type="button" class="btn btn-default">Right</button>
</div>
</div>
{% highlight html %}
<div class="btn-group">
<button type="button" class="btn">Left</button>
<button type="button" class="btn">Middle</button>
<button type="button" class="btn">Right</button>
<button type="button" class="btn btn-default">Left</button>
<button type="button" class="btn btn-default">Middle</button>
<button type="button" class="btn btn-default">Right</button>
</div>
{% endhighlight %}
@ -2896,18 +2855,18 @@ For example, <code>&lt;section&gt;</code> should be wrapped as inline.
<div class="bs-docs-example">
<div class="btn-toolbar" style="margin: 0;">
<div class="btn-group">
<button type="button" class="btn">1</button>
<button type="button" class="btn">2</button>
<button type="button" class="btn">3</button>
<button type="button" class="btn">4</button>
<button type="button" class="btn btn-default">1</button>
<button type="button" class="btn btn-default">2</button>
<button type="button" class="btn btn-default">3</button>
<button type="button" class="btn btn-default">4</button>
</div>
<div class="btn-group">
<button type="button" class="btn">5</button>
<button type="button" class="btn">6</button>
<button type="button" class="btn">7</button>
<button type="button" class="btn btn-default">5</button>
<button type="button" class="btn btn-default">6</button>
<button type="button" class="btn btn-default">7</button>
</div>
<div class="btn-group">
<button type="button" class="btn">8</button>
<button type="button" class="btn btn-default">8</button>
</div>
</div>
</div>
@ -2923,12 +2882,12 @@ For example, <code>&lt;section&gt;</code> should be wrapped as inline.
<p>Place buttons groups within button groups when you want dropdown menus mixed with a series of buttons.</p>
<div class="bs-docs-example">
<div class="btn-group">
<button type="button" class="btn">1</button>
<button type="button" class="btn">2</button>
<button type="button" class="btn">3</button>
<button type="button" class="btn btn-default">1</button>
<button type="button" class="btn btn-default">2</button>
<button type="button" class="btn btn-default">3</button>
<div class="btn-group">
<button type="button" class="btn dropdown-toggle" data-toggle="dropdown">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
Dropdown
<span class="caret"></span>
</button>
@ -2945,10 +2904,10 @@ For example, <code>&lt;section&gt;</code> should be wrapped as inline.
<p>Make a set of buttons appear vertically stacked rather than horizontally.</p>
<div class="bs-docs-example">
<div class="btn-group btn-group-vertical">
<button type="button" class="btn"><i class="glyphicon glyphicon-align-left"></i></button>
<button type="button" class="btn"><i class="glyphicon glyphicon-align-center"></i></button>
<button type="button" class="btn"><i class="glyphicon glyphicon-align-right"></i></button>
<button type="button" class="btn"><i class="glyphicon glyphicon-align-justify"></i></button>
<button type="button" class="btn btn-default"><i class="glyphicon glyphicon-align-left"></i></button>
<button type="button" class="btn btn-default"><i class="glyphicon glyphicon-align-center"></i></button>
<button type="button" class="btn btn-default"><i class="glyphicon glyphicon-align-right"></i></button>
<button type="button" class="btn btn-default"><i class="glyphicon glyphicon-align-justify"></i></button>
</div>
</div>
{% highlight html %}
@ -2961,9 +2920,9 @@ For example, <code>&lt;section&gt;</code> should be wrapped as inline.
<p>Make a group of buttons stretch at the same size to span the entire width of its parent. <strong>This only works with <code>&lt;a&gt;</code> elements</strong> as the <code>&lt;button&gt;</code> doesn't pick up these styles.</p>
<div class="bs-docs-example">
<div class="btn-group btn-group-justified">
<a href="#" class="btn">Left</a>
<a href="#" class="btn">Right</a>
<a href="#" class="btn">Middle</a>
<a href="#" class="btn btn-default">Left</a>
<a href="#" class="btn btn-default">Right</a>
<a href="#" class="btn btn-default">Middle</a>
</div>
</div>
{% highlight html %}
@ -2994,7 +2953,7 @@ For example, <code>&lt;section&gt;</code> should be wrapped as inline.
<div class="bs-docs-example">
<div class="btn-toolbar" style="margin-bottom: 10px;">
<div class="btn-group">
<button class="btn dropdown-toggle" data-toggle="dropdown">Action <span class="caret"></span></button>
<button class="btn btn-default dropdown-toggle" data-toggle="dropdown">Action <span class="caret"></span></button>
<ul class="dropdown-menu">
<li><a href="#">Action</a></li>
<li><a href="#">Another action</a></li>
@ -3048,7 +3007,7 @@ For example, <code>&lt;section&gt;</code> should be wrapped as inline.
{% highlight html %}
<!-- Single button -->
<div class="btn-group">
<button class="btn dropdown-toggle" data-toggle="dropdown">
<button class="btn btn-default dropdown-toggle" data-toggle="dropdown">
Action <span class="caret"></span>
</button>
<ul class="dropdown-menu">
@ -3066,8 +3025,8 @@ For example, <code>&lt;section&gt;</code> should be wrapped as inline.
<div class="bs-docs-example">
<div class="btn-toolbar" style="margin: 0;">
<div class="btn-group">
<button class="btn">Action</button>
<button class="btn dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button>
<button class="btn btn-default">Action</button>
<button class="btn btn-default dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button>
<ul class="dropdown-menu">
<li><a href="#">Action</a></li>
<li><a href="#">Another action</a></li>
@ -3125,8 +3084,8 @@ For example, <code>&lt;section&gt;</code> should be wrapped as inline.
{% highlight html %}
<!-- Split button -->
<div class="btn-group">
<button class="btn">Action</button>
<button class="btn dropdown-toggle" data-toggle="dropdown">
<button class="btn btn-default">Action</button>
<button class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
@ -3144,7 +3103,7 @@ For example, <code>&lt;section&gt;</code> should be wrapped as inline.
<div class="bs-docs-example">
<div class="btn-toolbar" style="margin: 0;">
<div class="btn-group">
<button class="btn btn-large dropdown-toggle" type="button" data-toggle="dropdown">
<button class="btn btn-default btn-large dropdown-toggle" type="button" data-toggle="dropdown">
Large button <span class="caret"></span>
</button>
<ul class="dropdown-menu">
@ -3156,7 +3115,7 @@ For example, <code>&lt;section&gt;</code> should be wrapped as inline.
</ul>
</div><!-- /btn-group -->
<div class="btn-group">
<button class="btn btn-small dropdown-toggle" type="button" data-toggle="dropdown">
<button class="btn btn-default btn-small dropdown-toggle" type="button" data-toggle="dropdown">
Small button <span class="caret"></span>
</button>
<ul class="dropdown-menu">
@ -3168,7 +3127,7 @@ For example, <code>&lt;section&gt;</code> should be wrapped as inline.
</ul>
</div><!-- /btn-group -->
<div class="btn-group">
<button class="btn btn-mini dropdown-toggle" type="button" data-toggle="dropdown">
<button class="btn btn-default btn-mini dropdown-toggle" type="button" data-toggle="dropdown">
Mini button <span class="caret"></span>
</button>
<ul class="dropdown-menu">
@ -3184,7 +3143,7 @@ For example, <code>&lt;section&gt;</code> should be wrapped as inline.
{% highlight html %}
<!-- Large button group -->
<div class="btn-group">
<button class="btn btn-large dropdown-toggle" type="button" data-toggle="dropdown">
<button class="btn btn-default btn-large dropdown-toggle" type="button" data-toggle="dropdown">
Large button <span class="caret"></span>
</button>
<ul class="dropdown-menu">
@ -3194,7 +3153,7 @@ For example, <code>&lt;section&gt;</code> should be wrapped as inline.
<!-- Small button group -->
<div class="btn-group">
<button class="btn btn-small dropdown-toggle" type="button" data-toggle="dropdown">
<button class="btn btn-default btn-small dropdown-toggle" type="button" data-toggle="dropdown">
Small button <span class="caret"></span>
</button>
<ul class="dropdown-menu">
@ -3204,7 +3163,7 @@ For example, <code>&lt;section&gt;</code> should be wrapped as inline.
<!-- Mini button group -->
<div class="btn-group">
<button class="btn btn-mini dropdown-toggle" type="button" data-toggle="dropdown">
<button class="btn btn-default btn-mini dropdown-toggle" type="button" data-toggle="dropdown">
Mini button <span class="caret"></span>
</button>
<ul class="dropdown-menu">
@ -3218,8 +3177,8 @@ For example, <code>&lt;section&gt;</code> should be wrapped as inline.
<div class="bs-docs-example">
<div class="btn-toolbar">
<div class="btn-group dropup">
<button class="btn">Dropup</button>
<button class="btn dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button>
<button class="btn btn-default">Dropup</button>
<button class="btn btn-default dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button>
<ul class="dropdown-menu">
<li><a href="#">Action</a></li>
<li><a href="#">Another action</a></li>
@ -3229,8 +3188,8 @@ For example, <code>&lt;section&gt;</code> should be wrapped as inline.
</ul>
</div><!-- /btn-group -->
<div class="btn-group dropup">
<button class="btn primary">Right dropup</button>
<button class="btn primary dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button>
<button class="btn btn-primary">Right dropup</button>
<button class="btn btn-primary dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button>
<ul class="dropdown-menu pull-right">
<li><a href="#">Action</a></li>
<li><a href="#">Another action</a></li>
@ -3243,8 +3202,8 @@ For example, <code>&lt;section&gt;</code> should be wrapped as inline.
</div><!-- /example -->
{% highlight html %}
<div class="btn-group dropup">
<button class="btn">Dropup</button>
<button class="btn dropdown-toggle" data-toggle="dropdown">
<button class="btn btn-default">Dropup</button>
<button class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
@ -5003,10 +4962,10 @@ $('#myModal').on('show', function (e) {
================================================== -->
<div class="bs-docs-section" id="transitions">
<div class="page-header">
<h1>Transitions <small>bootstrap-transition.js</small></h1>
<h1>Transitions <small>transition.js</small></h1>
</div>
<h3>About transitions</h3>
<p>For simple transition effects, include bootstrap-transition.js once alongside the other JS files. If you're using the compiled (or minified) bootstrap.js, there is no need to include this&mdash;it's already there.</p>
<p>For simple transition effects, include transition.js once alongside the other JS files. If you're using the compiled (or minified) bootstrap.js, there is no need to include this&mdash;it's already there.</p>
<h3>Use cases</h3>
<p>A few examples of the transition plugin:</p>
<ul>
@ -5025,7 +4984,7 @@ $('#myModal').on('show', function (e) {
================================================== -->
<div class="bs-docs-section" id="modals">
<div class="page-header">
<h1>Modals <small>bootstrap-modal.js</small></h1>
<h1>Modals <small>modal.js</small></h1>
</div>
<h2 id="modals-examples">Examples</h2>
@ -5261,7 +5220,7 @@ $('#myModal').on('hidden', function () {
================================================== -->
<section id="dropdowns">
<div class="page-header">
<h1>Dropdowns <small>bootstrap-dropdown.js</small></h1>
<h1>Dropdowns <small>dropdown.js</small></h1>
</div>
@ -5398,7 +5357,7 @@ $('.dropdown-toggle').dropdown()
================================================== -->
<section id="scrollspy">
<div class="page-header">
<h1>ScrollSpy <small>bootstrap-scrollspy.js</small></h1>
<h1>ScrollSpy <small>scrollspy.js</small></h1>
</div>
@ -5517,7 +5476,7 @@ $('[data-spy="scroll"]').each(function () {
================================================== -->
<section id="tabs">
<div class="page-header">
<h1>Togglable tabs <small>bootstrap-tab.js</small></h1>
<h1>Togglable tabs <small>tab.js</small></h1>
</div>
@ -5644,7 +5603,7 @@ $('a[data-toggle="tab"]').on('shown', function (e) {
================================================== -->
<section id="tooltips">
<div class="page-header">
<h1>Tooltips <small>bootstrap-tooltip.js</small></h1>
<h1>Tooltips <small>tooltip.js</small></h1>
</div>
@ -5785,7 +5744,7 @@ $('#example').tooltip(options)
================================================== -->
<section id="popovers">
<div class="page-header">
<h1>Popovers <small>bootstrap-popover.js</small></h1>
<h1>Popovers <small>popover.js</small></h1>
</div>
<h2>Examples</h2>
@ -5833,7 +5792,6 @@ $('#example').tooltip(options)
<div class="clearfix"></div>
</div>
<p>No markup shown as popovers are generated from JavaScript and content within a <code>data</code> attribute.</p>
<h3>Live demo</h3>
<div class="bs-docs-example" style="padding-bottom: 24px;">
@ -5967,7 +5925,7 @@ $('#example').tooltip(options)
================================================== -->
<div class="bs-docs-section" id="js-alerts">
<div class="page-header">
<h1>Alert messages <small>bootstrap-alert.js</small></h1>
<h1>Alert messages <small>alert.js</small></h1>
</div>
@ -6046,7 +6004,7 @@ $('#my-alert').bind('closed', function () {
================================================== -->
<div class="bs-docs-section" id="js-buttons">
<div class="page-header">
<h1>Buttons <small>bootstrap-button.js</small></h1>
<h1>Buttons <small>button.js</small></h1>
</div>
<h2>Example uses</h2>
@ -6191,7 +6149,7 @@ $('.nav-tabs').button()
================================================== -->
<section id="collapse">
<div class="page-header">
<h1>Collapse <small>bootstrap-collapse.js</small></h1>
<h1>Collapse <small>collapse.js</small></h1>
</div>
<h3>About</h3>
@ -6401,7 +6359,7 @@ $('#myCollapsible').on('hidden', function () {
================================================== -->
<section id="carousel">
<div class="page-header">
<h1>Carousel <small>bootstrap-carousel.js</small></h1>
<h1>Carousel <small>carousel.js</small></h1>
</div>
<h2>Examples</h2>
@ -6613,7 +6571,7 @@ $('.carousel').carousel({
================================================== -->
<section id="typeahead">
<div class="page-header">
<h1>Typeahead <small>bootstrap-typeahead.js</small></h1>
<h1>Typeahead <small>typeahead.js</small></h1>
</div>
@ -6710,7 +6668,7 @@ $('.typeahead').typeahead()
================================================== -->
<section id="affix">
<div class="page-header">
<h1>Affix <small>bootstrap-affix.js</small></h1>
<h1>Affix <small>affix.js</small></h1>
</div>
<h2>Example</h2>

View File

@ -327,19 +327,19 @@ body {
<img class="img-circle" data-src="holder.js/140x140">
<h2>Heading</h2>
<p>Donec sed odio dui. Etiam porta sem malesuada magna mollis euismod. Nullam id dolor id nibh ultricies vehicula ut id elit. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Praesent commodo cursus magna.</p>
<p><a class="btn" href="#">View details &raquo;</a></p>
<p><a class="btn btn-default" href="#">View details &raquo;</a></p>
</div><!-- /.col-lg-4 -->
<div class="col col-lg-4">
<img class="img-circle" data-src="holder.js/140x140">
<h2>Heading</h2>
<p>Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Cras mattis consectetur purus sit amet fermentum. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh.</p>
<p><a class="btn" href="#">View details &raquo;</a></p>
<p><a class="btn btn-default" href="#">View details &raquo;</a></p>
</div><!-- /.col-lg-4 -->
<div class="col col-lg-4">
<img class="img-circle" data-src="holder.js/140x140">
<h2>Heading</h2>
<p>Donec sed odio dui. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Vestibulum id ligula porta felis euismod semper. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.</p>
<p><a class="btn" href="#">View details &raquo;</a></p>
<p><a class="btn btn-default" href="#">View details &raquo;</a></p>
</div><!-- /.col-lg-4 -->
</div><!-- /.row -->

View File

@ -11,10 +11,15 @@ title: Grid template
padding-right: 15px;
}
h4 {
margin-top: 25px;
}
.row {
margin-bottom: 20px;
margin-left: -15px;
margin-right: -15px;
}
.row .row {
margin-top: 10px;
margin-bottom: 0;
}
[class*="col-lg-"] {
padding-top: 15px;
@ -51,6 +56,19 @@ title: Grid template
</div>
<h4>Full width, single column</h4>
<p class="text-muted">No grid classes are necessary for full-width elements.</p>
<p class="text-warning">No grid classes are necessary for full-width elements.</p>
<h4>Two columns with two nested columns</h4>
<div class="row">
<div class="col col-lg-8">
.col .col-lg-8
<div class="row">
<div class="col col-lg-6">.col .col-lg-6</div>
<div class="col col-lg-6">.col .col-lg-6</div>
</div>
</div>
<div class="col col-lg-4">.col .col-lg-4</div>
</div>
</div> <!-- /container -->

View File

@ -63,7 +63,7 @@ title: Jumbotron template
</ul>
</li>
</ul>
<form class="navbar-form pull-right">
<form class="navbar-form form-inline pull-right">
<input type="text" placeholder="Email">
<input type="password" placeholder="Password">
<button type="submit" class="btn">Sign in</button>
@ -88,17 +88,17 @@ title: Jumbotron template
<div class="col col-lg-4">
<h2>Heading</h2>
<p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p>
<p><a class="btn" href="#">View details &raquo;</a></p>
<p><a class="btn btn-default" href="#">View details &raquo;</a></p>
</div>
<div class="col col-lg-4">
<h2>Heading</h2>
<p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p>
<p><a class="btn" href="#">View details &raquo;</a></p>
<p><a class="btn btn-default" href="#">View details &raquo;</a></p>
</div>
<div class="col col-lg-4">
<h2>Heading</h2>
<p>Donec sed odio dui. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Vestibulum id ligula porta felis euismod semper. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.</p>
<p><a class="btn" href="#">View details &raquo;</a></p>
<p><a class="btn btn-default" href="#">View details &raquo;</a></p>
</div>
</div>

View File

@ -121,17 +121,17 @@ title: Justified nav template
<div class="col col-lg-4">
<h2>Heading</h2>
<p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p>
<p><a class="btn" href="#">View details &raquo;</a></p>
<p><a class="btn btn-default" href="#">View details &raquo;</a></p>
</div>
<div class="col col-lg-4">
<h2>Heading</h2>
<p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p>
<p><a class="btn" href="#">View details &raquo;</a></p>
<p><a class="btn btn-default" href="#">View details &raquo;</a></p>
</div>
<div class="col col-lg-4">
<h2>Heading</h2>
<p>Donec sed odio dui. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Vestibulum id ligula porta felis euismod semper. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa.</p>
<p><a class="btn" href="#">View details &raquo;</a></p>
<p><a class="btn btn-default" href="#">View details &raquo;</a></p>
</div>
</div>

282
docs/getting-started.html Normal file
View File

@ -0,0 +1,282 @@
---
layout: default
title: Getting started
slug: getting-started
lead: "An overview of Bootstrap, how to download and use, basic templates and examples, and more."
---
<!-- Getting started
================================================== -->
<div class="bs-docs-section" id="download">
<div class="page-header">
<h1>Download Bootstrap</h1>
</div>
<p class="lead">There are a few easy ways to quickly get started with Bootstrap, each one appealing to a different skill level and use case. Read through to see what suits your particular needs.</p>
<h3>Download compiled CSS and JS</h3>
<p class="lead">The fastest way to get started is to get the compiled and minified versions of our CSS, JavaScript, and fonts. No documentation or original source files are included.</p>
<p><a class="btn btn-large btn-primary" href="assets/bootstrap.zip" onclick="_gaq.push(['_trackEvent', 'Getting started', 'Download', 'Download compiled']);">Download Bootstrap</a></p>
<hr>
<h3 id="download-options">More download options</h3>
<div class="bs-docs-dl-options">
<h4>
<a href="https://github.com/twitter/bootstrap/zipball/master" onclick="_gaq.push(['_trackEvent', 'Getting started', 'Download', 'Download source']);">Download latest source code</a>
</h4>
<p>Get the original files for all CSS and JavaScript by downloading the latest version directly from GitHub.</p>
<h4>
<a href="https://github.com/twitter/bootstrap/" onclick="_gaq.push(['_trackEvent', 'Getting started', 'Download', 'GitHub project']);">Clone or fork via GitHub</a>
</h4>
<p>Clone the entire project or fork your own version of Bootstrap to make it your own by visiting us on GitHub.</p>
<h4>
Install with <a href="http://twitter.github.com/bower">Bower</a>
</h4>
<p>Install and manage the original files for all CSS and JavaScript, along with a local copy of the docs, using <a href="http://twitter.github.com/bower">Bower</a>.</p>
{% highlight bash %}$ bower install bootstrap{% endhighlight %}
</div>
<hr>
<h3 id="download-cdn">Use the Bootstrap CDN</h3>
<p>The folks over at <a href="https://www.netdna.com/">NetDNA</a> have graciously provided CDN support for Bootstrap's CSS and JavaScript. To use, swap your local instances for the <a href="http://www.bootstrapcdn.com/">Bootstrap CDN</a> links listed below.</p>
{% highlight html linenos %}
<!-- Latest compiled and minified CSS -->
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css">
<!-- Latest compiled and minified JavaScript -->
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
{% endhighlight %}
</div>
<!-- File structure
================================================== -->
<div class="bs-docs-section" id="whats-included">
<div class="page-header">
<h1>What's included</h1>
</div>
<p class="lead">Within the download you'll find the following directories and files, logically grouping common assets and providing both compiled and minified variations.</p>
<p>Once downloaded, unzip the compressed folder to see the structure of (the compiled) Bootstrap. You'll see something like this:</p>
{% highlight bash %}
bootstrap/
├── css/
│ ├── bootstrap.css
│ ├── bootstrap.min.css
├── js/
│ ├── bootstrap.js
│ ├── bootstrap.min.js
└── fonts/
├── glyphiconshalflings-regular.eot
├── glyphiconshalflings-regular.otf
├── glyphiconshalflings-regular.svg
├── glyphiconshalflings-regular.ttf
└── glyphiconshalflings-regular.woff
{% endhighlight %}
<p>This is the most basic form of Bootstrap: compiled files for quick drop-in usage in nearly any web project. We provide compiled CSS and JS (<code>bootstrap.*</code>), as well as compiled and minified CSS and JS (<code>bootstrap.min.*</code>). The image files are compressed using <a href="http://imageoptim.com/">ImageOptim</a>, a Mac app for compressing PNGs.</p>
<div class="bs-callout">
<h4>jQuery required</h4>
<p>Please note that <strong>all JavaScript plugins require jQuery</strong> to be included, as shown in the <a href="#examples">starter template</a>.</p>
</div>
</div>
<!-- Examples
================================================== -->
<div class="bs-docs-section" id="examples">
<div class="page-header">
<h1>Templates and examples</h1>
</div>
<p class="lead">Make use of a super basic HTML template, or dive into a few examples we've started for you. We encourage folks to iterate on these examples and not simply use them as an end result.</p>
<h3 id="examples-template">HTML template</h3>
<p>Copy and paste the HTML from below to get started with a bare bones Bootstrap document.</p>
{% highlight html %}
<!DOCTYPE html>
<html>
<head>
<title>Bootstrap 101 Template</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Bootstrap -->
<link href="css/bootstrap.min.css" rel="stylesheet" media="screen">
</head>
<body>
<h1>Hello, world!</h1>
<!-- JavaScript plugins (requires jQuery) -->
<script src="http://code.jquery.com/jquery.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="js/bootstrap.min.js"></script>
<!-- Optionally enable responsive features in IE8 -->
<script src="js/respond.js"></script>
</body>
</html>
{% endhighlight %}
<h3 id="examples-list">Examples</h3>
<div class="row bs-examples">
<div class="col col-lg-4">
<a class="thumbnail" href="/examples/starter-template/" target="_blank">
<img src="/assets/img/examples/bootstrap-example-starter.png" alt="">
</a>
<h4>Starter template</h4>
<p>A barebones HTML page with Bootstrap's CSS and JavaScript included.</p>
</div>
<div class="col col-lg-4">
<a class="thumbnail" href="/examples/grid/" target="_blank">
<img src="/assets/img/examples/bootstrap-example-grid.png" alt="">
</a>
<h4>Basic grid layouts</h4>
<p>Simple grid layouts to familiarize you with using the Bootstrap grid system.</p>
</div>
<div class="col col-lg-4">
<a class="thumbnail" href="/examples/jumbotron/" target="_blank">
<img src="/assets/img/examples/bootstrap-example-marketing.png" alt="">
</a>
<h4>Basic marketing site</h4>
<p>Features a jumbotron for primary message and three supporting elements.</p>
</div>
<div class="col col-lg-4">
<a class="thumbnail" href="/examples/jumbotron-narrow/" target="_blank">
<img src="/assets/img/examples/bootstrap-example-jumbotron-narrow.png" alt="">
</a>
<h4>Narrow marketing</h4>
<p>Slim, lightweight marketing template for small projects or teams.</p>
</div>
<div class="col col-lg-4">
<a class="thumbnail" href="/examples/justified-nav/" target="_blank">
<img src="/assets/img/examples/bootstrap-example-justified-nav.png" alt="">
</a>
<h4>Justified nav</h4>
<p>Marketing page with equal-width navigation links in a modified navbar.</p>
</div>
<div class="col col-lg-4">
<a class="thumbnail" href="/examples/signin/" target="_blank">
<img src="/assets/img/examples/bootstrap-example-signin.png" alt="">
</a>
<h4>Sign in</h4>
<p>Barebones sign in form with custom, larger form controls and a flexible layout.</p>
</div>
<div class="col col-lg-4">
<a class="thumbnail" href="/examples/sticky-footer/" target="_blank">
<img src="/assets/img/examples/bootstrap-example-sticky-footer.png" alt="">
</a>
<h4>Sticky footer</h4>
<p>Pin a fixed-height footer to the bottom of the user's viewport.</p>
</div>
<div class="col col-lg-4">
<a class="thumbnail" href="/examples/sticky-footer-navbar/" target="_blank">
<img src="/assets/img/examples/bootstrap-example-sticky-footer-navbar.png" alt="">
</a>
<h4>Sticky footer w/ navbar</h4>
<p>Add a fixed navbar to the default sticky footer template.</p>
</div>
<div class="col col-lg-4">
<a class="thumbnail" href="/examples/carousel/" target="_blank">
<img src="/assets/img/examples/bootstrap-example-carousel.png" alt="">
</a>
<h4>Carousel jumbotron</h4>
<p>An interactive riff on the basic marketing site featuring a prominent carousel.</p>
</div>
<div class="col col-lg-4">
<a class="thumbnail" href="/examples/navbar/" target="_blank">
<img src="/assets/img/examples/bootstrap-example-navbar.png" alt="">
</a>
<h4>Navbar</h4>
<p>Basic template for showcasing how the navbar works.</p>
</div>
<div class="col col-lg-4">
<a class="thumbnail" href="/examples/navbar-static-top/" target="_blank">
<img src="/assets/img/examples/bootstrap-example-navbar-static-top.png" alt="">
</a>
<h4>Static top navbar</h4>
<p>Basic template for showcasing the static navbar variation.</p>
</div>
<div class="col col-lg-4">
<a class="thumbnail" href="/examples/navbar-fixed-top/" target="_blank">
<img src="/assets/img/examples/bootstrap-example-navbar-fixed-top.png" alt="">
</a>
<h4>Fixed top navbar</h4>
<p>Basic template for showcasing the fixed navbar variation.</p>
</div>
</div>
</div>
<div class="bs-docs-section" id="customizing">
<div class="page-header">
<h1>Customizing Bootstrap</h1>
</div>
<p class="lead">Customizing Bootstrap is best accomplished when you treat it as another dependency in your development stack. Doing so ensures future upgrades are as easy as possible while also familiarizing yourself to the intricacies of the framework.</p>
<p>Once you've downloaded and included Bootstrap's CSS into your templates, you can move on to customizing the included components. To do so, create a new stylesheet (LESS, if you like, or just plain CSS) to house your customizations.</p>
<div class="bs-callout">
<h4>Compiled or minified?</h4>
<p>Unless you plan on reading a good chunk of the compiled CSS, go with the minified. It's the same code, just compacted. Less bandwidth is good, especially in production environments.</p>
</div>
<p>From there, include whatever Bootstrap components and HTML content you need to get your template setup. It's best to have a rough idea in mind of modifications to make and content to include, so be sure to spend a brief amount of time on that before moving on.</p>
<h3>Customizing components</h3>
<p>There are varying degrees to customizing components, but most fall into two camps: light customizations and complete visual overhauls. Luckily, there are plenty of examples of both.</p>
<p>We define light customizations as mostly surface layer changes, things like a color and font changes to existing Bootstrap components. A great example of this is the the <a href="http://translate.twitter.com">Twitter Translation Center</a> (coded by @mdo). Let's look at how to implement the custom button we wrote for this site, <code>.btn-ttc</code>.</p>
<p>Instead of using the provided Bootstrap buttons, which only require just one class to start, <code>.btn</code>, we'll add our own modifier class, <code>.btn-ttc</code>. This will give us a slightly custom look with minimal effort.</p>
{% highlight html %}
<button type="button" class="btn btn-ttc">Save changes</button>
{% endhighlight %}
<p>In the custom stylesheet, add the following CSS:</p>
{% highlight css %}
/* Custom button
-------------------------------------------------- */
/* Override base .btn styles */
/* Apply text and background changes to three key states: default, hover, and active (click). */
.btn-ttc,
.btn-ttc:hover,
.btn-ttc:active {
color: white;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
background-color: #007da7;
}
/* Apply the custom-colored gradients */
/* Note: you'll need to include all the appropriate gradients for various browsers and standards. */
.btn-ttc {
background-repeat: repeat-x;
background-image: linear-gradient(top, #009ED2 0%, #007DA7 100%);
...
}
/* Set the hover state */
/* An easy hover state is just to move the gradient up a small amount. Add other embellishments as you see fit. */
.btn-ttc:hover {
background-position: 0 -15px;
}
{% endhighlight %}
<p>Customizing Bootstrap components takes time, but should be straightforward. <strong>Look to the source code often and duplicate the selectors you need for your modifications.</strong> Placing them after the Bootstrap source makes for easy overriding without complication. <strong>To recap, here's the basic workflow:</strong></p>
<ul>
<li>For each element you want to customize, find its code in the compiled Bootstrap CSS. Copy and paste the selector for a component as-is. For instance, to customize the navbar background, just snag <code>.navbar</code>.</li>
<li>Add all your custom CSS in a separate stylesheet using the selectors you just copied from the Bootstrap source. No need for prefacing with additional classes or using <code>!important</code> here.</li>
<li>Rinse and repeat until you're happy with your customizations.</li>
</ul>
<p>Going beyond light customizations and into visual overhauls is just as straightforward as the above custom button. For a site like <a href="http://yourkarma.com">Karma</a>, which uses Bootstrap as a CSS reset with heavy modifications, more extensive work is involved, but well worth it in the end.</p>
<div class="bs-callout">
<h4>Alternate customization methods</h4>
<p>While not recommended for folks new to Bootstrap, you may use one of two alternate methods for customization. The first is modifying the source .less files (making upgrades super difficult), and the second is mapping source LESS code to <a href="http://ruby.bvision.com/blog/please-stop-embedding-bootstrap-classes-in-your-html">your own classes via mixins</a>. For the time being, neither options are documented here.</p>
</div>
<h3>Removing potential bloat</h3>
<p>Not all sites and applications need to make use of everything Bootstrap has to offer, especially in production environments where bandwidth literally becomes a financial issue. We encourage folks to remove whatever is unused with our <a href="/customize/">Customizer</a>.</p>
<p>Using the Customizer, simply uncheck any component, feature, or asset you don't need. Hit download and swap out the default Bootstrap files with these newly customized ones. You'll get vanilla Bootstrap, but without the features *you* deem unnecessary. All custom builds include compiled and minified versions, so use whichever works for you.</p>
</div>

View File

@ -3,34 +3,18 @@ layout: home
title: Bootstrap
---
<div class="bs-docs-jumbotron masthead">
<div class="container">
<div class="bs-masthead">
<h1>Bootstrap</h1>
<p class="lead">Sleek, intuitive, and powerful mobile-first front-end framework for faster and easier web development.</p>
<p>
<a href="assets/bootstrap.zip" class="btn btn-large" onclick="_gaq.push(['_trackEvent', 'Jumbotron actions', 'Download', 'Download 3.0.0']);">Download Bootstrap</a>
<a href="./docs/" class="btn btn-large" onclick="_gaq.push(['_trackEvent', 'Jumbotron actions', 'Docs', 'View docs']);">View docs</a>
</p>
<div class="bs-docs-social">
<ul class="bs-docs-social-buttons">
<li>
<iframe class="github-btn" src="http://ghbtns.com/github-btn.html?user=twitter&repo=bootstrap&type=watch&count=true" allowtransparency="true" frameborder="0" scrolling="0" width="100px" height="20px"></iframe>
</li>
<li>
<iframe class="github-btn" src="http://ghbtns.com/github-btn.html?user=twitter&repo=bootstrap&type=fork&count=true" allowtransparency="true" frameborder="0" scrolling="0" width="102px" height="20px"></iframe>
</li>
<li class="follow-btn">
<a href="https://twitter.com/twbootstrap" class="twitter-follow-button" data-link-color="#0069D6" data-show-count="true">Follow @twbootstrap</a>
</li>
<li class="tweet-btn">
<a href="https://twitter.com/share" class="twitter-share-button" data-url="http://twitter.github.com/bootstrap/" data-count="horizontal" data-via="twbootstrap" data-related="mdo:Creator of Twitter Bootstrap">Tweet</a>
</li>
</ul>
</div>
{% include social-buttons.html %}
<ul class="masthead-links">
<ul class="bs-masthead-links">
<li>
<a href="./customize/" onclick="_gaq.push(['_trackEvent', 'Jumbotron actions', 'Jumbotron links', 'Customize']);">Customize</a>
</li>
@ -38,7 +22,7 @@ title: Bootstrap
<a href="http://github.com/twitter/bootstrap" onclick="_gaq.push(['_trackEvent', 'Jumbotron actions', 'Jumbotron links', 'GitHub project']);">GitHub project</a>
</li>
<li>
<a href="./docs/#examples" onclick="_gaq.push(['_trackEvent', 'Jumbotron actions', 'Jumbotron links', 'Examples']);">Examples</a>
<a href="./getting-started/#examples" onclick="_gaq.push(['_trackEvent', 'Jumbotron actions', 'Jumbotron links', 'Examples']);">Examples</a>
</li>
<li>
<a href="http://expo.getbootstrap.com" onclick="_gaq.push(['_trackEvent', 'Jumbotron actions', 'Jumbotron links', 'Expo']);">Bootstrap Expo</a>

1751
docs/javascript.html Normal file
View File

@ -0,0 +1,1751 @@
---
layout: default
title: JavaScript plugins
slug: js
lead: "Bring Bootstrap's components to life with over a dozen custom jQuery plugins. Easily include them all, or one by one."
---
<!-- Overview
================================================== -->
<div class="bs-docs-section" id="js-overview">
<div class="page-header">
<h1>Overview</h1>
</div>
<h3 id="js-individual-compiled">Individual or compiled</h3>
<p>Plugins can be included individually, or all at once. <strong>Do not attempt to include both.</strong> Both <strong>bootstrap.js</strong> and <strong>bootstrap.min.js</strong> contain all plugins in a single file.</p>
<div class="bs-callout">
<h4>Plugin dependencies</h4>
<p>Some plugins and CSS components depend on other plugins. If you include plugins individually, make sure to check for these dependencies in the docs.</p>
</div>
<h3 id="js-data-attrs">Data attributes</h3>
<p>You can use all Bootstrap plugins purely through the markup API without writing a single line of JavaScript. This is Bootstrap's first class API and should be your first consideration when using a plugin.</p>
<p>That said, in some situations it may be desirable to turn this functionality off. Therefore, we also provide the ability to disable the data attribute API by unbinding all events on the body namespaced with `'data-api'`. This looks like this:
{% highlight js %}
$('body').off('.data-api')
{% endhighlight %}
<p>Alternatively, to target a specific plugin, just include the plugin's name as a namespace along with the data-api namespace like this:</p>
{% highlight js %}
$('body').off('.alert.data-api')
{% endhighlight %}
<h3 id="js-programmatic-api">Programmatic API</h3>
<p>We also believe you should be able to use all Bootstrap plugins purely through the JavaScript API. All public APIs are single, chainable methods, and return the collection acted upon.</p>
{% highlight js %}
$(".btn.danger").button("toggle").addClass("fat")
{% endhighlight %}
<p>All methods should accept an optional options object, a string which targets a particular method, or nothing (which initiates a plugin with default behavior):</p>
{% highlight js %}
$("#myModal").modal() // initialized with defaults
$("#myModal").modal({ keyboard: false }) // initialized with no keyboard
$("#myModal").modal('show') // initializes and invokes show immediately</p>
{% endhighlight %}
<p>Each plugin also exposes its raw constructor on a `Constructor` property: <code>$.fn.popover.Constructor</code>. If you'd like to get a particular plugin instance, retrieve it directly from an element: <code>$('[rel=popover]').data('popover')</code>.</p>
<h3 id="js-noconflict">No conflict</h3>
<p>Sometimes it is necessary to use Bootstrap plugins with other UI frameworks. In these circumstances, namespace collisions can occasionally occur. If this happens, you may call <code>.noConflict</code> on the plugin you wish to revert the value of.</p>
{% highlight js %}
var bootstrapButton = $.fn.button.noConflict() // return $.fn.button to previously assigned value
$.fn.bootstrapBtn = bootstrapButton // give $().bootstrapBtn the bootstrap functionality
{% endhighlight %}
<h3 id="js-events">Events</h3>
<p>Bootstrap provides custom events for most plugin's unique actions. Generally, these come in an infinitive and past participle form - where the infinitive (ex. <code>show</code>) is triggered at the start of an event, and its past participle form (ex. <code>shown</code>) is trigger on the completion of an action.</p>
<p>As of 3.0.0, all bootstrap events are namespaced.</p>
<p>All infinitive events provide <code>preventDefault</code> functionality. This provides the ability to stop the execution of an action before it starts.</p>
{% highlight js %}
$('#myModal').on('show.bs.modal', function (e) {
if (!data) return e.preventDefault() // stops modal from being shown
})
{% endhighlight %}
</div>
<!-- Transitions
================================================== -->
<div class="bs-docs-section" id="transitions">
<div class="page-header">
<h1>Transitions <small>transition.js</small></h1>
</div>
<h3>About transitions</h3>
<p>For simple transition effects, include transition.js once alongside the other JS files. If you're using the compiled (or minified) bootstrap.js, there is no need to include this&mdash;it's already there.</p>
<h3>Use cases</h3>
<p>A few examples of the transition plugin:</p>
<ul>
<li>Sliding or fading in modals</li>
<li>Fading out tabs</li>
<li>Fading out alerts</li>
<li>Sliding carousel panes</li>
</ul>
<!-- Ideas: include docs for .fade.in, .slide.in, etc -->
</div>
<!-- Modal
================================================== -->
<div class="bs-docs-section" id="modals">
<div class="page-header">
<h1>Modals <small>bootstrap-modal.js</small></h1>
</div>
<h2 id="modals-examples">Examples</h2>
<p>Modals are streamlined, but flexible, dialog prompts with the minimum required functionality and smart defaults.</p>
<h3>Static example</h3>
<p>A rendered modal with header, body, and set of actions in the footer.</p>
<div class="bs-example bs-example-modal">
<div class="modal">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title">Modal title</h4>
</div>
<div class="modal-body">
<p>One fine body&hellip;</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Save changes</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dalog -->
</div><!-- /.modal -->
</div><!-- /example -->
{% highlight html %}
<div class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title">Modal title</h4>
</div>
<div class="modal-body">
<p>One fine body&hellip;</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Save changes</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dalog -->
</div><!-- /.modal -->
{% endhighlight %}
<h3>Live demo</h3>
<p>Toggle a modal via JavaScript by clicking the button below. It will slide down and fade in from the top of the page.</p>
<!-- sample modal content -->
<div id="myModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title" id="myModalLabel">Modal Heading</h4>
</div>
<div class="modal-body">
<h4>Text in a modal</h4>
<p>Duis mollis, est non commodo luctus, nisi erat porttitor ligula.</p>
<h4>Popover in a modal</h4>
<p>This <a href="#" role="button" class="btn btn-default popover-test" title="A Title" data-content="And here's some amazing content. It's very engaging. right?">button</a> should trigger a popover on click.</p>
<h4>Tooltips in a modal</h4>
<p><a href="#" class="tooltip-test" title="Tooltip">This link</a> and <a href="#" class="tooltip-test" title="Tooltip">that link</a> should have tooltips on hover.</p>
<hr>
<h4>Overflowing text to show optional scrollbar</h4>
<p>Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.</p>
<p>Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor.</p>
<p>Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus auctor fringilla.</p>
<p>Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.</p>
<p>Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor.</p>
<p>Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus auctor fringilla.</p>
<p>Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.</p>
<p>Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor.</p>
<p>Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus auctor fringilla.</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Save changes</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dalog -->
</div><!-- /.modal -->
<div class="bs-example" style="padding-bottom: 24px;">
<a data-toggle="modal" href="#myModal" class="btn btn-primary btn-large">Launch demo modal</a>
</div><!-- /example -->
{% highlight html %}
<!-- Button trigger modal -->
<a data-toggle="modal" href="#myModal" class="btn btn-primary btn-large">Launch demo modal</a>
<!-- Modal -->
<div class="modal" id="myModal">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title">Modal title</h4>
</div>
<div class="modal-body">
...
</div>
<div class="modal-footer">
<a href="#" class="btn">Close</a>
<a href="#" class="btn btn-primary">Save changes</a>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dalog -->
</div><!-- /.modal -->
{% endhighlight %}
<h2 id="modals-usage">Usage</h2>
<h3>Via data attributes</h3>
<p>Activate a modal without writing JavaScript. Set <code>data-toggle="modal"</code> on a controller element, like a button, along with a <code>data-target="#foo"</code> or <code>href="#foo"</code> to target a specific modal to toggle.</p>
{% highlight html %}
<button type="button" data-toggle="modal" data-target="#myModal">Launch modal</button>
{% endhighlight %}
<h3>Via JavaScript</h3>
<p>Call a modal with id <code>myModal</code> with a single line of JavaScript:</p>
{% highlight js %}$('#myModal').modal(options){% endhighlight %}
<h3>Options</h3>
<p>Options can be passed via data attributes or JavaScript. For data attributes, append the option name to <code>data-</code>, as in <code>data-backdrop=""</code>.</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th style="width: 100px;">Name</th>
<th style="width: 50px;">type</th>
<th style="width: 50px;">default</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td>backdrop</td>
<td>boolean</td>
<td>true</td>
<td>Includes a modal-backdrop element. Alternatively, specify <code>static</code> for a backdrop which doesn't close the modal on click.</td>
</tr>
<tr>
<td>keyboard</td>
<td>boolean</td>
<td>true</td>
<td>Closes the modal when escape key is pressed</td>
</tr>
<tr>
<td>show</td>
<td>boolean</td>
<td>true</td>
<td>Shows the modal when initialized.</td>
</tr>
<tr>
<td>remote</td>
<td>path</td>
<td>false</td>
<td><p>If a remote url is provided, content will be loaded via jQuery's <code>load</code> method and injected into the <code>.modal-body</code>. If you're using the data api, you may alternatively use the <code>href</code> tag to specify the remote source. An example of this is shown below:</p>
{% highlight html %}
<a data-toggle="modal" href="remote.html" data-target="#modal">Click me</a>
{% endhighlight %}
</tr>
</tbody>
</table>
<h3>Methods</h3>
<h4>.modal(options)</h4>
<p>Activates your content as a modal. Accepts an optional options <code>object</code>.</p>
{% highlight js %}
$('#myModal').modal({
keyboard: false
})
{% endhighlight %}
<h4>.modal('toggle')</h4>
<p>Manually toggles a modal.</p>
{% highlight js %}$('#myModal').modal('toggle'){% endhighlight %}
<h4>.modal('show')</h4>
<p>Manually opens a modal.</p>
{% highlight js %}$('#myModal').modal('show'){% endhighlight %}
<h4>.modal('hide')</h4>
<p>Manually hides a modal.</p>
{% highlight js %}$('#myModal').modal('hide'){% endhighlight %}
<h3>Events</h3>
<p>Bootstrap's modal class exposes a few events for hooking into modal functionality.</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th style="width: 150px;">Event Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>show</td>
<td>This event fires immediately when the <code>show</code> instance method is called.</td>
</tr>
<tr>
<td>shown</td>
<td>This event is fired when the modal has been made visible to the user (will wait for css transitions to complete).</td>
</tr>
<tr>
<td>hide</td>
<td>This event is fired immediately when the <code>hide</code> instance method has been called.</td>
</tr>
<tr>
<td>hidden</td>
<td>This event is fired when the modal has finished being hidden from the user (will wait for css transitions to complete).</td>
</tr>
</tbody>
</table>
{% highlight js %}
$('#myModal').on('hidden.bs.modal', function () {
// do something…
})
{% endhighlight %}
</div>
<!-- Dropdowns
================================================== -->
<section id="dropdowns">
<div class="page-header">
<h1>Dropdowns <small>bootstrap-dropdown.js</small></h1>
</div>
<h2>Examples</h2>
<p>Add dropdown menus to nearly anything with this simple plugin, including the navbar, tabs, and pills.</p>
<h3>Within a navbar</h3>
<div class="bs-example">
<div id="navbar-example" class="navbar navbar-static">
<div class="navbar-inner">
<div class="container" style="width: auto;">
<a class="navbar-brand" href="#">Project Name</a>
<ul class="nav navbar-nav" role="navigation">
<li class="dropdown">
<a id="drop1" href="#" role="button" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
<ul class="dropdown-menu" role="menu" aria-labelledby="drop1">
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Action</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Another action</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Something else here</a></li>
<li role="presentation" class="divider"></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Separated link</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" id="drop2" role="button" class="dropdown-toggle" data-toggle="dropdown">Dropdown 2 <b class="caret"></b></a>
<ul class="dropdown-menu" role="menu" aria-labelledby="drop2">
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Action</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Another action</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Something else here</a></li>
<li role="presentation" class="divider"></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Separated link</a></li>
</ul>
</li>
</ul>
<ul class="nav navbar-nav pull-right">
<li id="fat-menu" class="dropdown">
<a href="#" id="drop3" role="button" class="dropdown-toggle" data-toggle="dropdown">Dropdown 3 <b class="caret"></b></a>
<ul class="dropdown-menu" role="menu" aria-labelledby="drop3">
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Action</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Another action</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Something else here</a></li>
<li role="presentation" class="divider"></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Separated link</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div> <!-- /navbar-example -->
</div> <!-- /example -->
<h3>Within tabs</h3>
<div class="bs-example">
<ul class="nav nav-pills">
<li class="active"><a href="#">Regular link</a></li>
<li class="dropdown">
<a class="dropdown-toggle" id="drop4" role="button" data-toggle="dropdown" href="#">Dropdown <b class="caret"></b></a>
<ul id="menu1" class="dropdown-menu" role="menu" aria-labelledby="drop4">
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Action</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Another action</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Something else here</a></li>
<li role="presentation" class="divider"></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Separated link</a></li>
</ul>
</li>
<li class="dropdown">
<a class="dropdown-toggle" id="drop5" role="button" data-toggle="dropdown" href="#">Dropdown 2 <b class="caret"></b></a>
<ul id="menu2" class="dropdown-menu" role="menu" aria-labelledby="drop5">
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Action</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Another action</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Something else here</a></li>
<li role="presentation" class="divider"></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Separated link</a></li>
</ul>
</li>
<li class="dropdown">
<a class="dropdown-toggle" id="drop5" role="button" data-toggle="dropdown" href="#">Dropdown 3 <b class="caret"></b></a>
<ul id="menu3" class="dropdown-menu" role="menu" aria-labelledby="drop5">
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Action</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Another action</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Something else here</a></li>
<li role="presentation" class="divider"></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Separated link</a></li>
</ul>
</li>
</ul> <!-- /tabs -->
</div> <!-- /example -->
<hr class="bs-docs-separator">
<h2>Usage</h2>
<h3>Via data attributes</h3>
<p>Add <code>data-toggle="dropdown"</code> to a link or button to toggle a dropdown.</p>
{% highlight html %}
<div class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">Dropdown trigger</a>
<ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
...
</ul>
</div>
{% endhighlight %}
<p>To keep URLs intact, use the <code>data-target</code> attribute instead of <code>href="#"</code>.</p>
{% highlight html %}
<div class="dropdown">
<a class="dropdown-toggle" id="dLabel" role="button" data-toggle="dropdown" data-target="#" href="/page.html">
Dropdown <span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
...
</ul>
</div>
{% endhighlight %}
<h3>Via JavaScript</h3>
<p>Call the dropdowns via JavaScript:</p>
{% highlight js %}
$('.dropdown-toggle').dropdown()
{% endhighlight %}
<h3>Options</h3>
<p><em>None</em></p>
<h3>Methods</h3>
<h4>$().dropdown('toggle')</h4>
<p>A programmatic api for toggling menus for a given navbar or tabbed navigation.</p>
</section>
<!-- ScrollSpy
================================================== -->
<section id="scrollspy">
<div class="page-header">
<h1>ScrollSpy <small>bootstrap-scrollspy.js</small></h1>
</div>
<h2>Example in navbar</h2>
<p>The ScrollSpy plugin is for automatically updating nav targets based on scroll position. Scroll the area below the navbar and watch the active class change. The dropdown sub items will be highlighted as well.</p>
<div class="bs-example">
<div id="navbar-example" class="navbar navbar-static">
<div class="navbar-inner">
<div class="container" style="width: auto;">
<a class="navbar-brand" href="#">Project Name</a>
<ul class="nav navbar-nav">
<li><a href="#fat">@fat</a></li>
<li><a href="#mdo">@mdo</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="#one">one</a></li>
<li><a href="#two">two</a></li>
<li class="divider"></li>
<li><a href="#three">three</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<div data-spy="scroll" data-target="#navbar-example" data-offset="0" class="scrollspy-example">
<h4 id="fat">@fat</h4>
<p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p>
<h4 id="mdo">@mdo</h4>
<p>Veniam marfa mustache skateboard, adipisicing fugiat velit pitchfork beard. Freegan beard aliqua cupidatat mcsweeney's vero. Cupidatat four loko nisi, ea helvetica nulla carles. Tattooed cosby sweater food truck, mcsweeney's quis non freegan vinyl. Lo-fi wes anderson +1 sartorial. Carles non aesthetic exercitation quis gentrify. Brooklyn adipisicing craft beer vice keytar deserunt.</p>
<h4 id="one">one</h4>
<p>Occaecat commodo aliqua delectus. Fap craft beer deserunt skateboard ea. Lomo bicycle rights adipisicing banh mi, velit ea sunt next level locavore single-origin coffee in magna veniam. High life id vinyl, echo park consequat quis aliquip banh mi pitchfork. Vero VHS est adipisicing. Consectetur nisi DIY minim messenger bag. Cred ex in, sustainable delectus consectetur fanny pack iphone.</p>
<h4 id="two">two</h4>
<p>In incididunt echo park, officia deserunt mcsweeney's proident master cleanse thundercats sapiente veniam. Excepteur VHS elit, proident shoreditch +1 biodiesel laborum craft beer. Single-origin coffee wayfarers irure four loko, cupidatat terry richardson master cleanse. Assumenda you probably haven't heard of them art party fanny pack, tattooed nulla cardigan tempor ad. Proident wolf nesciunt sartorial keffiyeh eu banh mi sustainable. Elit wolf voluptate, lo-fi ea portland before they sold out four loko. Locavore enim nostrud mlkshk brooklyn nesciunt.</p>
<h4 id="three">three</h4>
<p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p>
<p>Keytar twee blog, culpa messenger bag marfa whatever delectus food truck. Sapiente synth id assumenda. Locavore sed helvetica cliche irony, thundercats you probably haven't heard of them consequat hoodie gluten-free lo-fi fap aliquip. Labore elit placeat before they sold out, terry richardson proident brunch nesciunt quis cosby sweater pariatur keffiyeh ut helvetica artisan. Cardigan craft beer seitan readymade velit. VHS chambray laboris tempor veniam. Anim mollit minim commodo ullamco thundercats.
</p>
</div>
</div><!-- /example -->
<h2>Usage</h2>
<h3>Via data attributes</h3>
<p>To easily add scrollspy behavior to your topbar navigation, add <code>data-spy="scroll"</code> to the element you want to spy on (most typically this would be the <code>&lt;body&gt;</code>. Then add the <code>data-target</code> attribute with the ID or class of the parent element of any Bootstrap <code>.nav</code> component.</p>
{% highlight html %}
<body data-spy="scroll" data-target="#navbar-example">
...
</body>
{% endhighlight %}
<h3>Via JavaScript</h3>
<p>Call the scrollspy via JavaScript:</p>
{% highlight js %}
$('#navbar-example').scrollspy()
{% endhighlight %}
<div class="bs-callout">
<h4>Resolvable ID targets required</h4>
<p>Navbar links must have resolvable id targets. For example, a <code>&lt;a href="#home"&gt;home&lt;/a&gt;</code> must correspond to something in the DOM like <code>&lt;div id="home"&gt;&lt;/div&gt;</code>.</p>
</div>
<h3>Methods</h3>
<h4>.scrollspy('refresh')</h4>
<p>When using scrollspy in conjunction with adding or removing of elements from the DOM, you'll need to call the refresh method like so:</p>
{% highlight js %}
$('[data-spy="scroll"]').each(function () {
var $spy = $(this).scrollspy('refresh')
});
{% endhighlight %}
<h3>Options</h3>
<p>Options can be passed via data attributes or JavaScript. For data attributes, append the option name to <code>data-</code>, as in <code>data-offset=""</code>.</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th style="width: 100px;">Name</th>
<th style="width: 100px;">type</th>
<th style="width: 50px;">default</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td>offset</td>
<td>number</td>
<td>10</td>
<td>Pixels to offset from top when calculating position of scroll.</td>
</tr>
</tbody>
</table>
<h3>Events</h3>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th style="width: 150px;">Event Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>activate</td>
<td>This event fires whenever a new item becomes activated by the scrollspy.</td>
</tr>
</tbody>
</table>
{% highlight js %}
$('#myScrollspy').on('activate.bs.scrollspy', function () {
// do something…
})
{% endhighlight %}
</section>
<!-- Tabs
================================================== -->
<section id="tabs">
<div class="page-header">
<h1>Togglable tabs <small>bootstrap-tab.js</small></h1>
</div>
<h2>Example tabs</h2>
<p>Add quick, dynamic tab functionality to transition through panes of local content, even via dropdown menus.</p>
<div class="bs-example bs-example-tabs">
<ul id="myTab" class="nav nav-tabs">
<li class="active"><a href="#home" data-toggle="tab">Home</a></li>
<li><a href="#profile" data-toggle="tab">Profile</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="#dropdown1" data-toggle="tab">@fat</a></li>
<li><a href="#dropdown2" data-toggle="tab">@mdo</a></li>
</ul>
</li>
</ul>
<div id="myTabContent" class="tab-content">
<div class="tab-pane fade in active" id="home">
<p>Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.</p>
</div>
<div class="tab-pane fade" id="profile">
<p>Food truck fixie locavore, accusamus mcsweeney's marfa nulla single-origin coffee squid. Exercitation +1 labore velit, blog sartorial PBR leggings next level wes anderson artisan four loko farm-to-table craft beer twee. Qui photo booth letterpress, commodo enim craft beer mlkshk aliquip jean shorts ullamco ad vinyl cillum PBR. Homo nostrud organic, assumenda labore aesthetic magna delectus mollit. Keytar helvetica VHS salvia yr, vero magna velit sapiente labore stumptown. Vegan fanny pack odio cillum wes anderson 8-bit, sustainable jean shorts beard ut DIY ethical culpa terry richardson biodiesel. Art party scenester stumptown, tumblr butcher vero sint qui sapiente accusamus tattooed echo park.</p>
</div>
<div class="tab-pane fade" id="dropdown1">
<p>Etsy mixtape wayfarers, ethical wes anderson tofu before they sold out mcsweeney's organic lomo retro fanny pack lo-fi farm-to-table readymade. Messenger bag gentrify pitchfork tattooed craft beer, iphone skateboard locavore carles etsy salvia banksy hoodie helvetica. DIY synth PBR banksy irony. Leggings gentrify squid 8-bit cred pitchfork. Williamsburg banh mi whatever gluten-free, carles pitchfork biodiesel fixie etsy retro mlkshk vice blog. Scenester cred you probably haven't heard of them, vinyl craft beer blog stumptown. Pitchfork sustainable tofu synth chambray yr.</p>
</div>
<div class="tab-pane fade" id="dropdown2">
<p>Trust fund seitan letterpress, keytar raw denim keffiyeh etsy art party before they sold out master cleanse gluten-free squid scenester freegan cosby sweater. Fanny pack portland seitan DIY, art party locavore wolf cliche high life echo park Austin. Cred vinyl keffiyeh DIY salvia PBR, banh mi before they sold out farm-to-table VHS viral locavore cosby sweater. Lomo wolf viral, mustache readymade thundercats keffiyeh craft beer marfa ethical. Wolf salvia freegan, sartorial keffiyeh echo park vegan.</p>
</div>
</div>
</div><!-- /example -->
<hr class="bs-docs-separator">
<h2>Usage</h2>
<p>Enable tabbable tabs via JavaScript (each tab needs to be activated individually):</p>
{% highlight js %}
$('#myTab a').click(function (e) {
e.preventDefault();
$(this).tab('show');
})
{% endhighlight %}
<p>You can activate individual tabs in several ways:</p>
{% highlight js %}
$('#myTab a[href="#profile"]').tab('show'); // Select tab by name
$('#myTab a:first').tab('show'); // Select first tab
$('#myTab a:last').tab('show'); // Select last tab
$('#myTab li:eq(2) a').tab('show'); // Select third tab (0-indexed)
{% endhighlight %}
<h3>Markup</h3>
<p>You can activate a tab or pill navigation without writing any JavaScript by simply specifying <code>data-toggle="tab"</code> or <code>data-toggle="pill"</code> on an element. Adding the <code>nav</code> and <code>nav-tabs</code> classes to the tab <code>ul</code> will apply the Bootstrap tab styling.</p>
{% highlight html %}
<ul class="nav nav-tabs">
<li><a href="#home" data-toggle="tab">Home</a></li>
<li><a href="#profile" data-toggle="tab">Profile</a></li>
<li><a href="#messages" data-toggle="tab">Messages</a></li>
<li><a href="#settings" data-toggle="tab">Settings</a></li>
</ul>
{% endhighlight %}
<p>To make tabs fade in, add <code>.fade</code> to each <code>.tab-pane</code>.</p>
<h3>Methods</h3>
<h4>$().tab</h4>
<p>
Activates a tab element and content container. Tab should have either a <code>data-target</code> or an <code>href</code> targeting a container node in the DOM.
</p>
{% highlight html %}
<ul class="nav nav-tabs" id="myTab">
<li class="active"><a href="#home">Home</a></li>
<li><a href="#profile">Profile</a></li>
<li><a href="#messages">Messages</a></li>
<li><a href="#settings">Settings</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="home">...</div>
<div class="tab-pane" id="profile">...</div>
<div class="tab-pane" id="messages">...</div>
<div class="tab-pane" id="settings">...</div>
</div>
<script>
$(function () {
$('#myTab a:last').tab('show');
})
</script>
{% endhighlight %}
<h3>Events</h3>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th style="width: 150px;">Event Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>show</td>
<td>This event fires on tab show, but before the new tab has been shown. Use <code>event.target</code> and <code>event.relatedTarget</code> to target the active tab and the previous active tab (if available) respectively.</td>
</tr>
<tr>
<td>shown</td>
<td>This event fires on tab show after a tab has been shown. Use <code>event.target</code> and <code>event.relatedTarget</code> to target the active tab and the previous active tab (if available) respectively.</td>
</tr>
</tbody>
</table>
{% highlight js %}
$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
e.target // activated tab
e.relatedTarget // previous tab
})
{% endhighlight %}
</section>
<!-- Tooltips
================================================== -->
<section id="tooltips">
<div class="page-header">
<h1>Tooltips <small>bootstrap-tooltip.js</small></h1>
</div>
<h2>Examples</h2>
<p>Inspired by the excellent jQuery.tipsy plugin written by Jason Frame; Tooltips are an updated version, which don't rely on images, use CSS3 for animations, and data-attributes for local title storage.</p>
<p>Hover over the links below to see tooltips:</p>
<div class="bs-example tooltip-demo">
<p class="muted" style="margin-bottom: 0;">Tight pants next level keffiyeh <a href="#" data-toggle="tooltip" title="Default tooltip">you probably</a> haven't heard of them. Photo booth beard raw denim letterpress vegan messenger bag stumptown. Farm-to-table seitan, mcsweeney's fixie sustainable quinoa 8-bit american apparel <a href="#" data-toggle="tooltip" title="Another tooltip">have a</a> terry richardson vinyl chambray. Beard stumptown, cardigans banh mi lomo thundercats. Tofu biodiesel williamsburg marfa, four loko mcsweeney's cleanse vegan chambray. A really ironic artisan <a href="#" data-toggle="tooltip" title="Another one here too">whatever keytar</a>, scenester farm-to-table banksy Austin <a href="#" data-toggle="tooltip" title="The last tip!">twitter handle</a> freegan cred raw denim single-origin coffee viral.
</p>
</div><!-- /example -->
<h3>Four directions</h3>
<div class="bs-example tooltip-demo">
<ul class="bs-example-tooltips">
<li><a href="#" data-toggle="tooltip" data-placement="top" title="Tooltip on top">Tooltip on top</a></li>
<li><a href="#" data-toggle="tooltip" data-placement="right" title="Tooltip on right">Tooltip on right</a></li>
<li><a href="#" data-toggle="tooltip" data-placement="bottom" title="Tooltip on bottom">Tooltip on bottom</a></li>
<li><a href="#" data-toggle="tooltip" data-placement="left" title="Tooltip on left">Tooltip on left</a></li>
</ul>
</div><!-- /example -->
<h3>Tooltips in input groups</h3>
<p>When using tooltips and popovers with the Bootstrap input groups, you'll have to set the <code>container</code> (documented below) option to avoid unwanted side effects.</p>
<hr class="bs-docs-separator">
<h2>Usage</h2>
<p>Trigger the tooltip via JavaScript:</p>
{% highlight js %}
$('#example').tooltip(options)
{% endhighlight %}
<h3>Options</h3>
<p>Options can be passed via data attributes or JavaScript. For data attributes, append the option name to <code>data-</code>, as in <code>data-animation=""</code>.</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th style="width: 100px;">Name</th>
<th style="width: 100px;">type</th>
<th style="width: 50px;">default</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td>animation</td>
<td>boolean</td>
<td>true</td>
<td>apply a css fade transition to the tooltip</td>
</tr>
<tr>
<td>html</td>
<td>boolean</td>
<td>false</td>
<td>Insert html into the tooltip. If false, jquery's <code>text</code> method will be used to insert content into the dom. Use text if you're worried about XSS attacks.</td>
</tr>
<tr>
<td>placement</td>
<td>string | function</td>
<td>'top'</td>
<td>how to position the tooltip - top | bottom | left | right</td>
</tr>
<tr>
<td>selector</td>
<td>string</td>
<td>false</td>
<td>If a selector is provided, tooltip objects will be delegated to the specified targets.</td>
</tr>
<tr>
<td>title</td>
<td>string | function</td>
<td>''</td>
<td>default title value if `title` tag isn't present</td>
</tr>
<tr>
<td>trigger</td>
<td>string</td>
<td>'hover focus'</td>
<td>how tooltip is triggered - click | hover | focus | manual. Note you case pass trigger multiple, space seperated, trigger types.</td>
</tr>
<tr>
<td>delay</td>
<td>number | object</td>
<td>0</td>
<td>
<p>delay showing and hiding the tooltip (ms) - does not apply to manual trigger type</p>
<p>If a number is supplied, delay is applied to both hide/show</p>
<p>Object structure is: <code>delay: { show: 500, hide: 100 }</code></p>
</td>
</tr>
<tr>
<td>container</td>
<td>string | false</td>
<td>false</td>
<td>
<p>Appends the tooltip to a specific element <code>container: 'body'</code></p>
</td>
</tr>
</tbody>
</table>
<div class="bs-callout">
<h4>Data attributes for individual tooltips</h4>
<p>Options for individual tooltips can alternatively be specified through the use of data attributes, as explained above.</p>
</div>
<h3>Markup</h3>
{% highlight html %}
<a href="#" data-toggle="tooltip" title="first tooltip">Hover over me</a>
{% endhighlight %}
<h3>Methods</h3>
<h4>$().tooltip(options)</h4>
<p>Attaches a tooltip handler to an element collection.</p>
<h4>.tooltip('show')</h4>
<p>Reveals an element's tooltip.</p>
{% highlight js %}$('#element').tooltip('show'){% endhighlight %}
<h4>.tooltip('hide')</h4>
<p>Hides an element's tooltip.</p>
{% highlight js %}$('#element').tooltip('hide'){% endhighlight %}
<h4>.tooltip('toggle')</h4>
<p>Toggles an element's tooltip.</p>
{% highlight js %}$('#element').tooltip('toggle'){% endhighlight %}
<h4>.tooltip('destroy')</h4>
<p>Hides and destroys an element's tooltip.</p>
{% highlight js %}$('#element').tooltip('destroy'){% endhighlight %}
</section>
<!-- Popovers
================================================== -->
<section id="popovers">
<div class="page-header">
<h1>Popovers <small>bootstrap-popover.js</small></h1>
</div>
<h2>Examples</h2>
<p>Add small overlays of content, like those on the iPad, to any element for housing secondary information. Hover over the button to trigger the popover.</p>
<div class="bs-callout">
<h4>Plugin dependency</h4>
<p>Popovers require the <a href="#tooltips">tooltip plugin</a> to be included in your version of Bootstrap.</p>
</div>
<h3>Static popover</h3>
<p>Four options are available: top, right, bottom, and left aligned.</p>
<div class="bs-example bs-example-popover">
<div class="popover top">
<div class="arrow"></div>
<h3 class="popover-title">Popover top</h3>
<div class="popover-content">
<p>Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.</p>
</div>
</div>
<div class="popover right">
<div class="arrow"></div>
<h3 class="popover-title">Popover right</h3>
<div class="popover-content">
<p>Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.</p>
</div>
</div>
<div class="popover bottom">
<div class="arrow"></div>
<h3 class="popover-title">Popover bottom</h3>
<div class="popover-content">
<p>Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.</p>
</div>
</div>
<div class="popover left">
<div class="arrow"></div>
<h3 class="popover-title">Popover left</h3>
<div class="popover-content">
<p>Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.</p>
</div>
</div>
<div class="clearfix"></div>
</div>
<h3>Live demo</h3>
<div class="bs-example" style="padding-bottom: 24px;">
<a href="#" class="btn btn-large btn-danger" data-toggle="popover" title="A Title" data-content="And here's some amazing content. It's very engaging. right?">Click to toggle popover</a>
</div>
<h4>Four directions</h4>
<div class="bs-example tooltip-demo">
<ul class="bs-example-tooltips">
<li><a href="#" class="btn" data-toggle="popover" data-placement="top" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus." title="Popover on top">Popover on top</a></li>
<li><a href="#" class="btn" data-toggle="popover" data-placement="right" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus." title="Popover on right">Popover on right</a></li>
<li><a href="#" class="btn" data-toggle="popover" data-placement="bottom" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus." title="Popover on bottom">Popover on bottom</a></li>
<li><a href="#" class="btn" data-toggle="popover" data-placement="left" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus." title="Popover on left">Popover on left</a></li>
</ul>
</div><!-- /example -->
<hr class="bs-docs-separator">
<h2>Usage</h2>
<p>Enable popovers via JavaScript:</p>
{% highlight js %}$('#example').popover(options){% endhighlight %}
<h3>Options</h3>
<p>Options can be passed via data attributes or JavaScript. For data attributes, append the option name to <code>data-</code>, as in <code>data-animation=""</code>.</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th style="width: 100px;">Name</th>
<th style="width: 100px;">type</th>
<th style="width: 50px;">default</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td>animation</td>
<td>boolean</td>
<td>true</td>
<td>apply a css fade transition to the tooltip</td>
</tr>
<tr>
<td>html</td>
<td>boolean</td>
<td>false</td>
<td>Insert html into the popover. If false, jquery's <code>text</code> method will be used to insert content into the dom. Use text if you're worried about XSS attacks.</td>
</tr>
<tr>
<td>placement</td>
<td>string | function</td>
<td>'right'</td>
<td>how to position the popover - top | bottom | left | right</td>
</tr>
<tr>
<td>selector</td>
<td>string</td>
<td>false</td>
<td>if a selector is provided, tooltip objects will be delegated to the specified targets if a selector is provided, tooltip objects will be delegated to the specified targets. in practice, this is used to enable dynamic HTML content to have popovers added. See <a href="https://github.com/twitter/bootstrap/issues/4215">this</a> and <a href="http://jsfiddle.net/KPeKS/4/">an informative example</a>.</td>
</tr>
<tr>
<td>trigger</td>
<td>string</td>
<td>'click'</td>
<td>how popover is triggered - click | hover | focus | manual</td>
</tr>
<tr>
<td>title</td>
<td>string | function</td>
<td>''</td>
<td>default title value if `title` attribute isn't present</td>
</tr>
<tr>
<td>content</td>
<td>string | function</td>
<td>''</td>
<td>default content value if `data-content` attribute isn't present</td>
</tr>
<tr>
<td>delay</td>
<td>number | object</td>
<td>0</td>
<td>
<p>delay showing and hiding the popover (ms) - does not apply to manual trigger type</p>
<p>If a number is supplied, delay is applied to both hide/show</p>
<p>Object structure is: <code>delay: { show: 500, hide: 100 }</code></p>
</td>
</tr>
<tr>
<td>container</td>
<td>string | false</td>
<td>false</td>
<td>
<p>Appends the popover to a specific element <code>container: 'body'</code></p>
</td>
</tr>
</tbody>
</table>
<div class="bs-callout">
<h4>Data attributes for individual popovers</h4>
<p>Options for individual popovers can alternatively be specified through the use of data attributes, as explained above.</p>
</div>
<h3>Markup</h3>
<p>For performance reasons, the Tooltip and Popover data-apis are opt in. If you would like to use them just specify a selector option.</p>
<h3>Methods</h3>
<h4>$().popover(options)</h4>
<p>Initializes popovers for an element collection.</p>
<h4>.popover('show')</h4>
<p>Reveals an elements popover.</p>
{% highlight js %}$('#element').popover('show'){% endhighlight %}
<h4>.popover('hide')</h4>
<p>Hides an elements popover.</p>
{% highlight js %}$('#element').popover('hide'){% endhighlight %}
<h4>.popover('toggle')</h4>
<p>Toggles an elements popover.</p>
{% highlight js %}$('#element').popover('toggle'){% endhighlight %}
<h4>.popover('destroy')</h4>
<p>Hides and destroys an element's popover.</p>
{% highlight js %}$('#element').popover('destroy'){% endhighlight %}
</section>
<!-- Alert
================================================== -->
<div class="bs-docs-section" id="js-alerts">
<div class="page-header">
<h1>Alert messages <small>bootstrap-alert.js</small></h1>
</div>
<h2>Example alerts</h2>
<p>Add dismiss functionality to all alert messages with this plugin.</p>
<div class="bs-example">
<div class="alert fade in">
<button type="button" class="close" data-dismiss="alert">&times;</button>
<strong>Holy guacamole!</strong> Best check yo self, you're not looking too good.
</div>
</div><!-- /example -->
<div class="bs-example">
<div class="alert alert-block alert-error fade in">
<button type="button" class="close" data-dismiss="alert">&times;</button>
<h4>Oh snap! You got an error!</h4>
<p>Change this and that and try again. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Cras mattis consectetur purus sit amet fermentum.</p>
<p>
<a class="btn btn-danger" href="#">Take this action</a> <a class="btn btn-default" href="#">Or do this</a>
</p>
</div>
</div><!-- /example -->
<hr class="bs-docs-separator">
<h2>Usage</h2>
<p>Enable dismissal of an alert via JavaScript:</p>
{% highlight js %}$(".alert").alert(){% endhighlight %}
<h3>Markup</h3>
<p>Just add <code>data-dismiss="alert"</code> to your close button to automatically give an alert close functionality.</p>
{% highlight html %}<a class="close" data-dismiss="alert" href="#">&times;</a>{% endhighlight %}
<h3>Methods</h3>
<h4>$().alert()</h4>
<p>Wraps all alerts with close functionality. To have your alerts animate out when closed, make sure they have the <code>.fade</code> and <code>.in</code> class already applied to them.</p>
<h4>.alert('close')</h4>
<p>Closes an alert.</p>
{% highlight js %}$(".alert").alert('close'){% endhighlight %}
<h3>Events</h3>
<p>Bootstrap's alert class exposes a few events for hooking into alert functionality.</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th style="width: 150px;">Event Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>close</td>
<td>This event fires immediately when the <code>close</code> instance method is called.</td>
</tr>
<tr>
<td>closed</td>
<td>This event is fired when the alert has been closed (will wait for css transitions to complete).</td>
</tr>
</tbody>
</table>
{% highlight js %}
$('#my-alert').bind('closed.bs.alert', function () {
// do something…
})
{% endhighlight %}
</div>
<!-- Buttons
================================================== -->
<div class="bs-docs-section" id="js-buttons">
<div class="page-header">
<h1>Buttons <small>bootstrap-button.js</small></h1>
</div>
<h2>Example uses</h2>
<p>Do more with buttons. Control button states or create groups of buttons for more components like toolbars.</p>
<h4>Stateful</h4>
<p>Add <code>data-loading-text="Loading..."</code> to use a loading state on a button.</p>
<div class="bs-example" style="padding-bottom: 24px;">
<button type="button" id="fat-btn" data-loading-text="Loading..." class="btn btn-primary">
Loading state
</button>
</div><!-- /example -->
{% highlight html %}
<button type="button" id="fat-btn" data-loading-text="Loading..." class="btn btn-primary">
Loading state
</button>
{% endhighlight %}
<h4>Single toggle</h4>
<p>Add <code>data-toggle="button"</code> to activate toggling on a single button.</p>
<div class="bs-example" style="padding-bottom: 24px;">
<button type="button" class="btn btn-primary" data-toggle="button">Single toggle</button>
</div><!-- /example -->
{% highlight html %}
<button type="button" class="btn btn-primary" data-toggle="button">Single toggle</button>
{% endhighlight %}
<h4>Checkbox</h4>
<p>Add <code>data-toggle="buttons-checkbox"</code> for checkbox style toggling on btn-group.</p>
<div class="bs-example" style="padding-bottom: 24px;">
<div class="btn-group" data-toggle="buttons-checkbox">
<label class="btn btn-primary">
<input type="checkbox"> Option 1
</label>
<label class="btn btn-primary">
<input type="checkbox"> Option 2
</label>
<label class="btn btn-primary">
<input type="checkbox"> Option 3
</label>
</div>
</div><!-- /example -->
{% highlight html %}
<div class="btn-group" data-toggle="buttons-checkbox">
<label class="btn btn-primary">
<input type="checkbox"> Option 1
</label>
<label class="btn btn-primary">
<input type="checkbox"> Option 2
</label>
<label class="btn btn-primary">
<input type="checkbox"> Option 3
</label>
</div>
{% endhighlight %}
<h4>Radio</h4>
<p>Add <code>data-toggle="buttons-radio"</code> for radio style toggling on btn-group.</p>
<div class="bs-example" style="padding-bottom: 24px;">
<div class="btn-group" data-toggle="buttons-radio">
<label class="btn btn-primary">
<input type="radio" name="options" id="option1"> Option 1
</label>
<label class="btn btn-primary">
<input type="radio" name="options" id="option2"> Option 2
</label>
<label class="btn btn-primary">
<input type="radio" name="options" id="option3"> Option 3
</label>
</div>
</div><!-- /example -->
{% highlight html %}
<div class="btn-group" data-toggle="buttons-radio">
<label class="btn btn-primary">
<input type="radio" name="options" id="option1"> Option 1
</label>
<label class="btn btn-primary">
<input type="radio" name="options" id="option2"> Option 2
</label>
<label class="btn btn-primary">
<input type="radio" name="options" id="option3"> Option 3
</label>
</div>
{% endhighlight %}
<hr class="bs-docs-separator">
<h2>Usage</h2>
<p>Enable buttons via JavaScript:</p>
{% highlight js %}
$('.nav-tabs').button()
{% endhighlight %}
<h3>Markup</h3>
<p>Data attributes are integral to the button plugin. Check out the example code below for the various markup types.</p>
<h3>Options</h3>
<p><em>None</em></p>
<h3>Methods</h3>
<h4>$().button('toggle')</h4>
<p>Toggles push state. Gives the button the appearance that it has been activated.</p>
<div class="bs-callout">
<h4>Auto toggling</h4>
<p>You can enable auto toggling of a button by using the <code>data-toggle</code> attribute.</p>
</div>
{% highlight html %}
<button type="button" class="btn" data-toggle="button">...</button>
{% endhighlight %}
<h4>$().button('loading')</h4>
<p>Sets button state to loading - disables button and swaps text to loading text. Loading text should be defined on the button element using the data attribute <code>data-loading-text</code>.
</p>
{% highlight html %}
<button type="button" class="btn" data-loading-text="loading stuff...">...</button>
{% endhighlight %}
<div class="bs-callout">
<h4>Cross-browser compatibility</h4>
<p><a href="https://github.com/twitter/bootstrap/issues/793">Firefox persists the disabled state across page loads</a>. A workaround for this is to use <code>autocomplete="off"</code>.</p>
</div>
<h4>$().button('reset')</h4>
<p>Resets button state - swaps text to original text.</p>
<h4>$().button(string)</h4>
<p>Resets button state - swaps text to any data defined text state.</p>
{% highlight html %}
<button type="button" class="btn" data-complete-text="finished!" >...</button>
<script>
$('.btn').button('complete')
</script>
{% endhighlight %}
</div>
<!-- Collapse
================================================== -->
<section id="collapse">
<div class="page-header">
<h1>Collapse <small>bootstrap-collapse.js</small></h1>
</div>
<h3>About</h3>
<p>Get base styles and flexible support for collapsible components like accordions and navigation.</p>
<div class="bs-callout">
<h4>Plugin dependency</h4>
<p>Collapse requires the <a href="#transitions">transitions plugin</a> to be included in your version of Bootstrap.</p>
</div>
<h2>Example accordion</h2>
<p>Using the collapse plugin, we built a simple accordion style widget:</p>
<div class="bs-example">
<div class="accordion" id="accordion2">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseOne">
Collapsible Group Item #1
</a>
</div>
<div id="collapseOne" class="accordion-body collapse in">
<div class="accordion-inner">
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
</div>
</div>
</div>
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseTwo">
Collapsible Group Item #2
</a>
</div>
<div id="collapseTwo" class="accordion-body collapse">
<div class="accordion-inner">
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
</div>
</div>
</div>
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseThree">
Collapsible Group Item #3
</a>
</div>
<div id="collapseThree" class="accordion-body collapse">
<div class="accordion-inner">
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
</div>
</div>
</div>
</div>
</div><!-- /example -->
{% highlight html %}
<div class="accordion" id="accordion2">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseOne">
Collapsible Group Item #1
</a>
</div>
<div id="collapseOne" class="accordion-body collapse in">
<div class="accordion-inner">
...
</div>
</div>
</div>
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseTwo">
Collapsible Group Item #2
</a>
</div>
<div id="collapseTwo" class="accordion-body collapse">
<div class="accordion-inner">
...
</div>
</div>
</div>
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseThree">
Collapsible Group Item #3
</a>
</div>
<div id="collapseThree" class="accordion-body collapse">
<div class="accordion-inner">
...
</div>
</div>
</div>
</div>
{% endhighlight %}
<p>You can also use the plugin without the accordion markup. Make a button toggle the expanding and collapsing of another element.</p>
{% highlight html %}
<button type="button" class="btn btn-danger" data-toggle="collapse" data-target="#demo">
simple collapsible
</button>
<div id="demo" class="collapse in">...</div>
{% endhighlight %}
<hr class="bs-docs-separator">
<h2>Usage</h2>
<h3>Via data attributes</h3>
<p>Just add <code>data-toggle="collapse"</code> and a <code>data-target</code> to element to automatically assign control of a collapsible element. The <code>data-target</code> attribute accepts a css selector to apply the collapse to. Be sure to add the class <code>collapse</code> to the collapsible element. If you'd like it to default open, add the additional class <code>in</code>.</p>
<p>To add accordion-like group management to a collapsible control, add the data attribute <code>data-parent="#selector"</code>. Refer to the demo to see this in action.</p>
<h3>Via JavaScript</h3>
<p>Enable manually with:</p>
{% highlight js %}
$(".collapse").collapse()
{% endhighlight %}
<h3>Options</h3>
<p>Options can be passed via data attributes or JavaScript. For data attributes, append the option name to <code>data-</code>, as in <code>data-parent=""</code>.</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th style="width: 100px;">Name</th>
<th style="width: 50px;">type</th>
<th style="width: 50px;">default</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td>parent</td>
<td>selector</td>
<td>false</td>
<td>If selector then all collapsible elements under the specified parent will be closed when this collapsible item is shown. (similar to traditional accordion behavior)</td>
</tr>
<tr>
<td>toggle</td>
<td>boolean</td>
<td>true</td>
<td>Toggles the collapsible element on invocation</td>
</tr>
</tbody>
</table>
<h3>Methods</h3>
<h4>.collapse(options)</h4>
<p>Activates your content as a collapsible element. Accepts an optional options <code>object</code>.
{% highlight js %}
$('#myCollapsible').collapse({
toggle: false
})
{% endhighlight %}
<h4>.collapse('toggle')</h4>
<p>Toggles a collapsible element to shown or hidden.</p>
<h4>.collapse('show')</h4>
<p>Shows a collapsible element.</p>
<h4>.collapse('hide')</h4>
<p>Hides a collapsible element.</p>
<h3>Events</h3>
<p>Bootstrap's collapse class exposes a few events for hooking into collapse functionality.</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th style="width: 150px;">Event Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>show</td>
<td>This event fires immediately when the <code>show</code> instance method is called.</td>
</tr>
<tr>
<td>shown</td>
<td>This event is fired when a collapse element has been made visible to the user (will wait for css transitions to complete).</td>
</tr>
<tr>
<td>hide</td>
<td>
This event is fired immediately when the <code>hide</code> method has been called.
</td>
</tr>
<tr>
<td>hidden</td>
<td>This event is fired when a collapse element has been hidden from the user (will wait for css transitions to complete).</td>
</tr>
</tbody>
</table>
{% highlight js %}
$('#myCollapsible').on('hidden.bs.collapse', function () {
// do something…
})
{% endhighlight %}
</section>
<!-- Carousel
================================================== -->
<section id="carousel">
<div class="page-header">
<h1>Carousel <small>bootstrap-carousel.js</small></h1>
</div>
<h2>Examples</h2>
<p>The slideshow below shows a generic plugin and component for cycling through elements like a carousel.</p>
<div class="bs-example">
<div id="carousel-example-generic" class="carousel slide bs-docs-carousel-example">
<ol class="carousel-indicators">
<li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
<li data-target="#carousel-example-generic" data-slide-to="1"></li>
<li data-target="#carousel-example-generic" data-slide-to="2"></li>
</ol>
<div class="carousel-inner">
<div class="item active">
<img data-src="holder.js/900x500/auto/#777:#fff/text:First slide" alt="">
</div>
<div class="item">
<img data-src="holder.js/900x500/auto/#777:#fff/text:Second slide" alt="">
</div>
<div class="item">
<img data-src="holder.js/900x500/auto/#777:#fff/text:Third slide" alt="">
</div>
</div>
<a class="left carousel-control" href="#carousel-example-generic" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left"></span>
</a>
<a class="right carousel-control" href="#carousel-example-generic" data-slide="next">
<span class="glyphicon glyphicon-chevron-right"></span>
</a>
</div>
</div><!-- /example -->
{% highlight html %}
<div id="carousel-example-generic" class="carousel slide">
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
<li data-target="#carousel-example-generic" data-slide-to="1"></li>
<li data-target="#carousel-example-generic" data-slide-to="2"></li>
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner">
<div class="item active">
<img src="..." alt="">
<div class="carousel-caption">
...
</div>
</div>
...
</div>
<!-- Controls -->
<a class="left carousel-control" href="#carousel-example-generic" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left"></span>
</a>
<a class="right carousel-control" href="#carousel-example-generic" data-slide="next">
<span class="glyphicon glyphicon-chevron-right"></span>
</a>
</div>
{% endhighlight %}
<h3>Optional captions</h3>
<p>Add captions to your slides easily with the <code>.carousel-caption</code> element within any <code>.item</code>. Place just about any optional HTML within there and it will be automatically aligned and formatted.</p>
<div class="bs-callout">
<h4>Responsive visibility</h4>
<p><strong>Captions are hidden by default</strong> and will show up only with viewports greater than 768px wide.</p>
</div>
<div class="bs-example">
<div id="carousel-example-captions" class="carousel slide bs-docs-carousel-example">
<ol class="carousel-indicators">
<li data-target="#carousel-example-captions" data-slide-to="0" class="active"></li>
<li data-target="#carousel-example-captions" data-slide-to="1"></li>
<li data-target="#carousel-example-captions" data-slide-to="2"></li>
</ol>
<div class="carousel-inner">
<div class="item active">
<img data-src="holder.js/900x500/auto/#777:#777" alt="">
<div class="carousel-caption">
<h3>First slide label</h3>
<p>Nulla vitae elit libero, a pharetra augue mollis interdum.</p>
</div>
</div>
<div class="item">
<img data-src="holder.js/900x500/auto/#777:#777" alt="">
<div class="carousel-caption">
<h3>Second slide label</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
</div>
</div>
<div class="item">
<img data-src="holder.js/900x500/auto/#777:#777" alt="">
<div class="carousel-caption">
<h3>Third slide label</h3>
<p>Praesent commodo cursus magna, vel scelerisque nisl consectetur.</p>
</div>
</div>
</div>
<a class="left carousel-control" href="#carousel-example-captions" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left"></span>
</a>
<a class="right carousel-control" href="#carousel-example-captions" data-slide="next">
<span class="glyphicon glyphicon-chevron-right"></span>
</a>
</div>
</div><!-- /example -->
{% highlight html %}
<div class="item active">
<img src="..." alt="">
<div class="carousel-caption">
<h3>...</h3>
<p>...</p>
</div>
</div>
{% endhighlight %}
<hr class="bs-docs-separator">
<h2>Usage</h2>
<h3>Via data attributes</h3>
<p>Use data attributes to easily control the position of the carousel. <code>data-slide</code> accepts the keywords <code>prev</code> or <code>next</code>, which alters the slide position relative to its current position. Alternatively, use <code>data-slide-to</code> to pass a raw slide index to the carousel <code>data-slide-to="2"</code>, which shifts the slide position to a particular index beginning with <code>0</code>.</p>
<h3>Via JavaScript</h3>
<p>Call carousel manually with:</p>
{% highlight js %}
$('.carousel').carousel()
{% endhighlight %}
<h3>Options</h3>
<p>Options can be passed via data attributes or JavaScript. For data attributes, append the option name to <code>data-</code>, as in <code>data-interval=""</code>.</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th style="width: 100px;">Name</th>
<th style="width: 50px;">type</th>
<th style="width: 50px;">default</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td>interval</td>
<td>number</td>
<td>5000</td>
<td>The amount of time to delay between automatically cycling an item. If false, carousel will not automatically cycle.</td>
</tr>
<tr>
<td>pause</td>
<td>string</td>
<td>"hover"</td>
<td>Pauses the cycling of the carousel on mouseenter and resumes the cycling of the carousel on mouseleave.</td>
</tr>
</tbody>
</table>
<h3>Methods</h3>
<h4>.carousel(options)</h4>
<p>Initializes the carousel with an optional options <code>object</code> and starts cycling through items.</p>
{% highlight html %}
$('.carousel').carousel({
interval: 2000
})
{% endhighlight %}
<h4>.carousel('cycle')</h4>
<p>Cycles through the carousel items from left to right.</p>
<h4>.carousel('pause')</h4>
<p>Stops the carousel from cycling through items.</p>
<h4>.carousel(number)</h4>
<p>Cycles the carousel to a particular frame (0 based, similar to an array).</p>
<h4>.carousel('prev')</h4>
<p>Cycles to the previous item.</p>
<h4>.carousel('next')</h4>
<p>Cycles to the next item.</p>
<h3>Events</h3>
<p>Bootstrap's carousel class exposes two events for hooking into carousel functionality.</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th style="width: 150px;">Event Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>slide</td>
<td>This event fires immediately when the <code>slide</code> instance method is invoked.</td>
</tr>
<tr>
<td>slid</td>
<td>This event is fired when the carousel has completed its slide transition.</td>
</tr>
</tbody>
</table>
{% highlight js %}
$('#myCarousel').on('slide.bs.carousel', function () {
// do something…
})
{% endhighlight %}
</section>
<!-- Affix
================================================== -->
<section id="affix">
<div class="page-header">
<h1>Affix <small>bootstrap-affix.js</small></h1>
</div>
<h2>Example</h2>
<p>The subnavigation on the left is a live demo of the affix plugin.</p>
<hr class="bs-docs-separator">
<h2>Usage</h2>
<h3>Via data attributes</h3>
<p>To easily add affix behavior to any element, just add <code>data-spy="affix"</code> to the element you want to spy on. Then use offsets to define when to toggle the pinning of an element on and off.</p>
{% highlight html %}
<div data-spy="affix" data-offset-top="200">...</div>
{% endhighlight %}
<div class="bs-callout">
<h4>Requires positioning</h4>
<p>You must manage the position of a pinned element and the behavior of its immediate parent. Position is controlled by <code>affix</code>, <code>affix-top</code>, and <code>affix-bottom</code>. Remember to check for a potentially collapsed parent when the affix kicks in as it's removing content from the normal flow of the page.</p>
</div>
<h3>Via JavaScript</h3>
<p>Call the affix plugin via JavaScript:</p>
{% highlight js %}
$('#navbar').affix()
{% endhighlight %}
<h3>Methods</h3>
<h4>.affix('refresh')</h4>
<p>When using affix in conjunction with adding or removing of elements from the DOM, you'll want to call the refresh method:</p>
{% highlight js %}
$('[data-spy="affix"]').each(function () {
$(this).affix('refresh')
});
{% endhighlight %}
<h3>Options</h3>
<p>Options can be passed via data attributes or JavaScript. For data attributes, append the option name to <code>data-</code>, as in <code>data-offset-top="200"</code>.</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th style="width: 100px;">Name</th>
<th style="width: 100px;">type</th>
<th style="width: 50px;">default</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td>offset</td>
<td>number | function | object</td>
<td>10</td>
<td>Pixels to offset from screen when calculating position of scroll. If a single number is provided, the offset will be applied in both top and left directions. To listen for a single direction, or multiple unique offsets, just provide an object <code>offset: { x: 10 }</code>. Use a function when you need to dynamically provide an offset (useful for some responsive designs).</td>
</tr>
</tbody>
</table>
</section>

120
js/affix.js Normal file
View File

@ -0,0 +1,120 @@
/* ========================================================================
* Bootstrap: affix.js v3.0.0
* http://twitter.github.com/bootstrap/javascript.html#affix
* ========================================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ======================================================================== */
+function ($) { "use strict";
// AFFIX CLASS DEFINITION
// ======================
var Affix = function (element, options) {
this.options = $.extend({}, Affix.DEFAULTS, options)
this.$window = $(window)
.on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))
.on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this))
this.$element = $(element)
this.affixed =
this.unpin = null
this.checkPosition()
}
Affix.DEFAULTS = {
offset: 0
}
Affix.prototype.checkPositionWithEventLoop = function () {
setTimeout($.proxy(this.checkPosition, this), 1)
}
Affix.prototype.checkPosition = function () {
if (!this.$element.is(':visible')) return
var scrollHeight = $(document).height()
var scrollTop = this.$window.scrollTop()
var position = this.$element.offset()
var offset = this.options.offset
var offsetTop = offset.top
var offsetBottom = offset.bottom
var reset = 'affix affix-top affix-bottom'
if (typeof offset != 'object') offsetBottom = offsetTop = offset
if (typeof offsetTop == 'function') offsetTop = offset.top()
if (typeof offsetBottom == 'function') offsetBottom = offset.bottom()
var affix = this.unpin != null && (scrollTop + this.unpin <= position.top) ? false :
offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ? 'bottom' :
offsetTop != null && (scrollTop <= offsetTop) ? 'top' : false
if (this.affixed === affix) return
this.affixed = affix
this.unpin = affix == 'bottom' ? position.top - scrollTop : null
this.$element.removeClass(reset).addClass('affix' + (affix ? '-' + affix : ''))
}
// AFFIX PLUGIN DEFINITION
// =======================
var old = $.fn.affix
$.fn.affix = function (option) {
return this.each(function () {
var $this = $(this)
var data = $this.data('bs.affix')
var options = typeof option == 'object' && option
if (!data) $this.data('bs.affix', (data = new Affix(this, options)))
if (typeof option == 'string') data[option]()
})
}
$.fn.affix.Constructor = Affix
// AFFIX NO CONFLICT
// =================
$.fn.affix.noConflict = function () {
$.fn.affix = old
return this
}
// AFFIX DATA-API
// ==============
$(window).on('load', function () {
$('[data-spy="affix"]').each(function () {
var $spy = $(this)
var data = $spy.data()
data.offset = data.offset || {}
if (data.offsetBottom) data.offset.bottom = data.offsetBottom
if (data.offsetTop) data.offset.top = data.offsetTop
$spy.affix(data)
})
})
}(window.jQuery);

View File

@ -1,8 +1,8 @@
/* ==========================================================
* bootstrap-alert.js v3.0.0
/* ========================================================================
* Bootstrap: alert.js v3.0.0
* http://twitter.github.com/bootstrap/javascript.html#alerts
* ==========================================================
* Copyright 2012 Twitter, Inc.
* ========================================================================
* Copyright 2013 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -15,48 +15,44 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ========================================================== */
* ======================================================================== */
!function ($) {
+function ($) { "use strict";
"use strict"; // jshint ;_;
/* ALERT CLASS DEFINITION
* ====================== */
// ALERT CLASS DEFINITION
// ======================
var dismiss = '[data-dismiss="alert"]'
, Alert = function (el) {
var Alert = function (el) {
$(el).on('click', dismiss, this.close)
}
Alert.prototype.close = function (e) {
var $this = $(this)
, selector = $this.attr('data-target')
, $parent
var selector = $this.attr('data-target')
if (!selector) {
selector = $this.attr('href')
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
}
$parent = $(selector)
var $parent = $(selector)
e && e.preventDefault()
if (e) e.preventDefault()
$parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent())
if (!$parent.length) {
$parent = $this.hasClass('alert') ? $this : $this.parent()
}
$parent.trigger(e = $.Event('close'))
$parent.trigger(e = $.Event('close.bs.alert'))
if (e.isDefaultPrevented()) return
$parent.removeClass('in')
function removeElement() {
$parent
.trigger('closed')
.remove()
$parent.trigger('closed.bs.alert').remove()
}
$.support.transition && $parent.hasClass('fade') ?
@ -65,16 +61,17 @@
}
/* ALERT PLUGIN DEFINITION
* ======================= */
// ALERT PLUGIN DEFINITION
// =======================
var old = $.fn.alert
$.fn.alert = function (option) {
return this.each(function () {
var $this = $(this)
, data = $this.data('alert')
if (!data) $this.data('alert', (data = new Alert(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)
})
}
@ -82,8 +79,8 @@
$.fn.alert.Constructor = Alert
/* ALERT NO CONFLICT
* ================= */
// ALERT NO CONFLICT
// =================
$.fn.alert.noConflict = function () {
$.fn.alert = old
@ -91,9 +88,9 @@
}
/* ALERT DATA-API
* ============== */
// ALERT DATA-API
// ==============
$(document).on('click.alert.data-api', dismiss, Alert.prototype.close)
$(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close)
}(window.jQuery);

117
js/bootstrap-affix.js vendored
View File

@ -1,117 +0,0 @@
/* ==========================================================
* bootstrap-affix.js v3.0.0
* http://twitter.github.com/bootstrap/javascript.html#affix
* ==========================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ========================================================== */
!function ($) {
"use strict"; // jshint ;_;
/* AFFIX CLASS DEFINITION
* ====================== */
var Affix = function (element, options) {
this.options = $.extend({}, $.fn.affix.defaults, options)
this.$window = $(window)
.on('scroll.affix.data-api', $.proxy(this.checkPosition, this))
.on('click.affix.data-api', $.proxy(function () { setTimeout($.proxy(this.checkPosition, this), 1) }, this))
this.$element = $(element)
this.checkPosition()
}
Affix.prototype.checkPosition = function () {
if (!this.$element.is(':visible')) return
var scrollHeight = $(document).height()
, scrollTop = this.$window.scrollTop()
, position = this.$element.offset()
, offset = this.options.offset
, offsetBottom = offset.bottom
, offsetTop = offset.top
, reset = 'affix affix-top affix-bottom'
, affix
if (typeof offset != 'object') offsetBottom = offsetTop = offset
if (typeof offsetTop == 'function') offsetTop = offset.top()
if (typeof offsetBottom == 'function') offsetBottom = offset.bottom()
affix = this.unpin != null && (scrollTop + this.unpin <= position.top) ?
false : offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ?
'bottom' : offsetTop != null && scrollTop <= offsetTop ?
'top' : false
if (this.affixed === affix) return
this.affixed = affix
this.unpin = affix == 'bottom' ? position.top - scrollTop : null
this.$element.removeClass(reset).addClass('affix' + (affix ? '-' + affix : ''))
}
/* AFFIX PLUGIN DEFINITION
* ======================= */
var old = $.fn.affix
$.fn.affix = function (option) {
return this.each(function () {
var $this = $(this)
, data = $this.data('affix')
, options = typeof option == 'object' && option
if (!data) $this.data('affix', (data = new Affix(this, options)))
if (typeof option == 'string') data[option]()
})
}
$.fn.affix.Constructor = Affix
$.fn.affix.defaults = {
offset: 0
}
/* AFFIX NO CONFLICT
* ================= */
$.fn.affix.noConflict = function () {
$.fn.affix = old
return this
}
/* AFFIX DATA-API
* ============== */
$(window).on('load', function () {
$('[data-spy="affix"]').each(function () {
var $spy = $(this)
, data = $spy.data()
data.offset = data.offset || {}
data.offsetBottom && (data.offset.bottom = data.offsetBottom)
data.offsetTop && (data.offset.top = data.offsetTop)
$spy.affix(data)
})
})
}(window.jQuery);

99
js/bootstrap-alert.js vendored
View File

@ -1,99 +0,0 @@
/* ==========================================================
* bootstrap-alert.js v3.0.0
* http://twitter.github.com/bootstrap/javascript.html#alerts
* ==========================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ========================================================== */
!function ($) {
"use strict"; // jshint ;_;
/* ALERT CLASS DEFINITION
* ====================== */
var dismiss = '[data-dismiss="alert"]'
, Alert = function (el) {
$(el).on('click', dismiss, this.close)
}
Alert.prototype.close = function (e) {
var $this = $(this)
, selector = $this.attr('data-target')
, $parent
if (!selector) {
selector = $this.attr('href')
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
}
$parent = $(selector)
e && e.preventDefault()
$parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent())
$parent.trigger(e = $.Event('close'))
if (e.isDefaultPrevented()) return
$parent.removeClass('in')
function removeElement() {
$parent
.trigger('closed')
.remove()
}
$.support.transition && $parent.hasClass('fade') ?
$parent.on($.support.transition.end, removeElement) :
removeElement()
}
/* ALERT PLUGIN DEFINITION
* ======================= */
var old = $.fn.alert
$.fn.alert = function (option) {
return this.each(function () {
var $this = $(this)
, data = $this.data('alert')
if (!data) $this.data('alert', (data = new Alert(this)))
if (typeof option == 'string') data[option].call($this)
})
}
$.fn.alert.Constructor = Alert
/* ALERT NO CONFLICT
* ================= */
$.fn.alert.noConflict = function () {
$.fn.alert = old
return this
}
/* ALERT DATA-API
* ============== */
$(document).on('click.alert.data-api', dismiss, Alert.prototype.close)
}(window.jQuery);

105
js/bootstrap-button.js vendored
View File

@ -1,105 +0,0 @@
/* ============================================================
* bootstrap-button.js v3.0.0
* http://twitter.github.com/bootstrap/javascript.html#buttons
* ============================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ============================================================ */
!function ($) {
"use strict"; // jshint ;_;
/* BUTTON PUBLIC CLASS DEFINITION
* ============================== */
var Button = function (element, options) {
this.$element = $(element)
this.options = $.extend({}, $.fn.button.defaults, options)
}
Button.prototype.setState = function (state) {
var d = 'disabled'
, $el = this.$element
, data = $el.data()
, val = $el.is('input') ? 'val' : 'html'
state = state + 'Text'
data.resetText || $el.data('resetText', $el[val]())
$el[val](data[state] || this.options[state])
// push to event loop to allow forms to submit
setTimeout(function () {
state == 'loadingText' ?
$el.addClass(d).attr(d, d) :
$el.removeClass(d).removeAttr(d)
}, 0)
}
Button.prototype.toggle = function () {
var $parent = this.$element.closest('[data-toggle="buttons-radio"]')
$parent && $parent
.find('.active')
.removeClass('active')
this.$element.toggleClass('active')
}
/* BUTTON PLUGIN DEFINITION
* ======================== */
var old = $.fn.button
$.fn.button = function (option) {
return this.each(function () {
var $this = $(this)
, data = $this.data('button')
, options = typeof option == 'object' && option
if (!data) $this.data('button', (data = new Button(this, options)))
if (option == 'toggle') data.toggle()
else if (option) data.setState(option)
})
}
$.fn.button.defaults = {
loadingText: 'loading...'
}
$.fn.button.Constructor = Button
/* BUTTON NO CONFLICT
* ================== */
$.fn.button.noConflict = function () {
$.fn.button = old
return this
}
/* BUTTON DATA-API
* =============== */
$(document).on('click.button.data-api', '[data-toggle^=button]', function (e) {
var $btn = $(e.target)
if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
$btn.button('toggle')
})
}(window.jQuery);

View File

@ -1,207 +0,0 @@
/* ==========================================================
* bootstrap-carousel.js v3.0.0
* http://twitter.github.com/bootstrap/javascript.html#carousel
* ==========================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ========================================================== */
!function ($) {
"use strict"; // jshint ;_;
/* CAROUSEL CLASS DEFINITION
* ========================= */
var Carousel = function (element, options) {
this.$element = $(element)
this.$indicators = this.$element.find('.carousel-indicators')
this.options = options
this.options.pause == 'hover' && this.$element
.on('mouseenter', $.proxy(this.pause, this))
.on('mouseleave', $.proxy(this.cycle, this))
}
Carousel.prototype = {
cycle: function (e) {
if (!e) this.paused = false
if (this.interval) clearInterval(this.interval);
this.options.interval
&& !this.paused
&& (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
return this
}
, getActiveIndex: function () {
this.$active = this.$element.find('.item.active')
this.$items = this.$active.parent().children()
return this.$items.index(this.$active)
}
, to: function (pos) {
var activeIndex = this.getActiveIndex()
, that = this
if (pos > (this.$items.length - 1) || pos < 0) return
if (this.sliding) {
return this.$element.one('slid', function () {
that.to(pos)
})
}
if (activeIndex == pos) {
return this.pause().cycle()
}
return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos]))
}
, pause: function (e) {
if (!e) this.paused = true
if (this.$element.find('.next, .prev').length && $.support.transition.end) {
this.$element.trigger($.support.transition.end)
this.cycle(true)
}
clearInterval(this.interval)
this.interval = null
return this
}
, next: function () {
if (this.sliding) return
return this.slide('next')
}
, prev: function () {
if (this.sliding) return
return this.slide('prev')
}
, slide: function (type, next) {
var $active = this.$element.find('.item.active')
, $next = next || $active[type]()
, isCycling = this.interval
, direction = type == 'next' ? 'left' : 'right'
, fallback = type == 'next' ? 'first' : 'last'
, that = this
, e
this.sliding = true
isCycling && this.pause()
$next = $next.length ? $next : this.$element.find('.item')[fallback]()
e = $.Event('slide', {
relatedTarget: $next[0]
, direction: direction
})
if ($next.hasClass('active')) return
if (this.$indicators.length) {
this.$indicators.find('.active').removeClass('active')
this.$element.one('slid', function () {
var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()])
$nextIndicator && $nextIndicator.addClass('active')
})
}
if ($.support.transition && this.$element.hasClass('slide')) {
this.$element.trigger(e)
if (e.isDefaultPrevented()) return
$next.addClass(type)
$next[0].offsetWidth // force reflow
$active.addClass(direction)
$next.addClass(direction)
this.$element.one($.support.transition.end, function () {
$next.removeClass([type, direction].join(' ')).addClass('active')
$active.removeClass(['active', direction].join(' '))
that.sliding = false
setTimeout(function () { that.$element.trigger('slid') }, 0)
})
} else {
this.$element.trigger(e)
if (e.isDefaultPrevented()) return
$active.removeClass('active')
$next.addClass('active')
this.sliding = false
this.$element.trigger('slid')
}
isCycling && this.cycle()
return this
}
}
/* CAROUSEL PLUGIN DEFINITION
* ========================== */
var old = $.fn.carousel
$.fn.carousel = function (option) {
return this.each(function () {
var $this = $(this)
, data = $this.data('carousel')
, options = $.extend({}, $.fn.carousel.defaults, typeof option == 'object' && option)
, action = typeof option == 'string' ? option : options.slide
if (!data) $this.data('carousel', (data = new Carousel(this, options)))
if (typeof option == 'number') data.to(option)
else if (action) data[action]()
else if (options.interval) data.pause().cycle()
})
}
$.fn.carousel.defaults = {
interval: 5000
, pause: 'hover'
}
$.fn.carousel.Constructor = Carousel
/* CAROUSEL NO CONFLICT
* ==================== */
$.fn.carousel.noConflict = function () {
$.fn.carousel = old
return this
}
/* CAROUSEL DATA-API
* ================= */
$(document).on('click.carousel.data-api', '[data-slide], [data-slide-to]', function (e) {
var $this = $(this), href
, $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
, options = $.extend({}, $target.data(), $this.data())
, slideIndex
$target.carousel(options)
if (slideIndex = $this.attr('data-slide-to')) {
$target.data('carousel').pause().to(slideIndex).cycle()
}
e.preventDefault()
})
}(window.jQuery);

View File

@ -1,173 +0,0 @@
/* =============================================================
* bootstrap-collapse.js v3.0.0
* http://twitter.github.com/bootstrap/javascript.html#collapse
* =============================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ============================================================ */
!function ($) {
"use strict"; // jshint ;_;
/* COLLAPSE PUBLIC CLASS DEFINITION
* ================================ */
var Collapse = function (element, options) {
this.$element = $(element)
this.options = $.extend({}, $.fn.collapse.defaults, options)
if (this.options.parent) {
this.$parent = $(this.options.parent)
}
this.options.toggle && this.toggle()
}
Collapse.prototype = {
constructor: Collapse
, dimension: function () {
var hasWidth = this.$element.hasClass('width')
return hasWidth ? 'width' : 'height'
}
, show: function () {
var dimension
, scroll
, actives
, hasData
if (this.transitioning || this.$element.hasClass('in')) return
dimension = this.dimension()
scroll = $.camelCase(['scroll', dimension].join('-'))
actives = this.$parent && this.$parent.find('> .accordion-group > .in')
if (actives && actives.length) {
hasData = actives.data('collapse')
if (hasData && hasData.transitioning) return
actives.collapse('hide')
hasData || actives.data('collapse', null)
}
this.$element[dimension](0)
this.transition('addClass', $.Event('show'), 'shown')
$.support.transition && this.$element[dimension](this.$element[0][scroll])
}
, hide: function () {
var dimension
if (this.transitioning || !this.$element.hasClass('in')) return
dimension = this.dimension()
this.reset(this.$element[dimension]())
this.transition('removeClass', $.Event('hide'), 'hidden')
this.$element[dimension](0)
}
, reset: function (size) {
var dimension = this.dimension()
this.$element
.removeClass('collapse')
[dimension](size || 'auto')
[0].offsetWidth
this.$element[size !== null ? 'addClass' : 'removeClass']('collapse')
return this
}
, transition: function (method, startEvent, completeEvent) {
var that = this
, complete = function () {
if (startEvent.type == 'show') that.reset()
that.transitioning = 0
that.$element.trigger(completeEvent)
}
this.$element.trigger(startEvent)
if (startEvent.isDefaultPrevented()) return
this.transitioning = 1
this.$element[method]('in')
$.support.transition && this.$element.hasClass('collapse') ?
this.$element.one($.support.transition.end, complete) :
complete()
}
, toggle: function () {
this[this.$element.hasClass('in') ? 'hide' : 'show']()
}
}
/* COLLAPSE PLUGIN DEFINITION
* ========================== */
var old = $.fn.collapse
$.fn.collapse = function (option) {
return this.each(function () {
var $this = $(this)
, data = $this.data('collapse')
, options = $.extend({}, $.fn.collapse.defaults, $this.data(), typeof option == 'object' && option)
if (!data) $this.data('collapse', (data = new Collapse(this, options)))
if (typeof option == 'string') data[option]()
})
}
$.fn.collapse.defaults = {
toggle: true
}
$.fn.collapse.Constructor = Collapse
/* COLLAPSE NO CONFLICT
* ==================== */
$.fn.collapse.noConflict = function () {
$.fn.collapse = old
return this
}
/* COLLAPSE DATA-API
* ================= */
$(document).on('click.collapse.data-api', '[data-toggle=collapse]', function (e) {
var $this = $(this), href
, target = $this.attr('data-target')
|| e.preventDefault()
|| (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
, option = $(target).data('collapse') ? 'toggle' : $this.data()
, parent = $this.attr('data-parent')
, $parent = parent && $(parent)
if ($parent) {
$parent.find('[data-toggle=collapse][data-parent=' + parent + ']').not($this).addClass('collapsed')
}
$this[$(target).hasClass('in') ? 'addClass' : 'removeClass']('collapsed')
$(target).collapse(option)
})
}(window.jQuery);

View File

@ -1,165 +0,0 @@
/* ============================================================
* bootstrap-dropdown.js v3.0.0
* http://twitter.github.com/bootstrap/javascript.html#dropdowns
* ============================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ============================================================ */
!function ($) {
"use strict"; // jshint ;_;
/* DROPDOWN CLASS DEFINITION
* ========================= */
var toggle = '[data-toggle=dropdown]'
, Dropdown = function (element) {
var $el = $(element).on('click.dropdown.data-api', this.toggle)
$('html').on('click.dropdown.data-api', function () {
$el.parent().removeClass('open')
})
}
Dropdown.prototype = {
constructor: Dropdown
, toggle: function (e) {
var $this = $(this)
, $parent
, isActive
if ($this.is('.disabled, :disabled')) return
$parent = getParent($this)
isActive = $parent.hasClass('open')
clearMenus()
if (!isActive) {
$parent.toggleClass('open')
}
$this.focus()
return false
}
, keydown: function (e) {
var $this
, $items
, $active
, $parent
, isActive
, index
if (!/(38|40|27)/.test(e.keyCode)) return
$this = $(this)
e.preventDefault()
e.stopPropagation()
if ($this.is('.disabled, :disabled')) return
$parent = getParent($this)
isActive = $parent.hasClass('open')
if (!isActive || (isActive && e.keyCode == 27)) {
if (e.which == 27) $parent.find(toggle).focus()
return $this.click()
}
$items = $('[role=menu] li:not(.divider):visible a', $parent)
if (!$items.length) return
index = $items.index($items.filter(':focus'))
if (e.keyCode == 38 && index > 0) index-- // up
if (e.keyCode == 40 && index < $items.length - 1) index++ // down
if (!~index) index = 0
$items
.eq(index)
.focus()
}
}
function clearMenus() {
$(toggle).each(function () {
getParent($(this)).removeClass('open')
})
}
function getParent($this) {
var selector = $this.attr('data-target')
, $parent
if (!selector) {
selector = $this.attr('href')
selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
}
$parent = selector && $(selector)
if (!$parent || !$parent.length) $parent = $this.parent()
return $parent
}
/* DROPDOWN PLUGIN DEFINITION
* ========================== */
var old = $.fn.dropdown
$.fn.dropdown = function (option) {
return this.each(function () {
var $this = $(this)
, data = $this.data('dropdown')
if (!data) $this.data('dropdown', (data = new Dropdown(this)))
if (typeof option == 'string') data[option].call($this)
})
}
$.fn.dropdown.Constructor = Dropdown
/* DROPDOWN NO CONFLICT
* ==================== */
$.fn.dropdown.noConflict = function () {
$.fn.dropdown = old
return this
}
/* APPLY TO STANDARD DROPDOWN ELEMENTS
* =================================== */
$(document)
.on('click.dropdown.data-api', clearMenus)
.on('click.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
.on('click.dropdown-menu', function (e) { e.stopPropagation() })
.on('click.dropdown.data-api' , toggle, Dropdown.prototype.toggle)
.on('keydown.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)
}(window.jQuery);

251
js/bootstrap-modal.js vendored
View File

@ -1,251 +0,0 @@
/* =========================================================
* bootstrap-modal.js v3.0.0
* http://twitter.github.com/bootstrap/javascript.html#modals
* =========================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ========================================================= */
!function ($) {
"use strict"; // jshint ;_;
/* MODAL CLASS DEFINITION
* ====================== */
var Modal = function (element, options) {
this.options = options
this.$element = $(element)
.delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this))
this.options.remote && this.$element.find('.modal-body').load(this.options.remote)
}
Modal.prototype = {
constructor: Modal
, toggle: function () {
return this[!this.isShown ? 'show' : 'hide']()
}
, show: function () {
var that = this
, e = $.Event('show')
this.$element.trigger(e)
if (this.isShown || e.isDefaultPrevented()) return
this.isShown = true
this.escape()
this.backdrop(function () {
var transition = $.support.transition && that.$element.hasClass('fade')
if (!that.$element.parent().length) {
that.$element.appendTo(document.body) //don't move modals dom position
}
that.$element.show()
if (transition) {
that.$element[0].offsetWidth // force reflow
}
that.$element
.addClass('in')
.attr('aria-hidden', false)
that.enforceFocus()
transition ?
that.$element.one($.support.transition.end, function () { that.$element.focus().trigger('shown') }) :
that.$element.focus().trigger('shown')
})
}
, hide: function (e) {
e && e.preventDefault()
var that = this
e = $.Event('hide')
this.$element.trigger(e)
if (!this.isShown || e.isDefaultPrevented()) return
this.isShown = false
this.escape()
$(document).off('focusin.modal')
this.$element
.removeClass('in')
.attr('aria-hidden', true)
$.support.transition && this.$element.hasClass('fade') ?
this.hideWithTransition() :
this.hideModal()
}
, enforceFocus: function () {
var that = this
$(document).on('focusin.modal', function (e) {
if (that.$element[0] !== e.target && !that.$element.has(e.target).length) {
that.$element.focus()
}
})
}
, escape: function () {
var that = this
if (this.isShown && this.options.keyboard) {
this.$element.on('keyup.dismiss.modal', function ( e ) {
e.which == 27 && that.hide()
})
} else if (!this.isShown) {
this.$element.off('keyup.dismiss.modal')
}
}
, hideWithTransition: function () {
var that = this
, timeout = setTimeout(function () {
that.$element.off($.support.transition.end)
that.hideModal()
}, 500)
this.$element.one($.support.transition.end, function () {
clearTimeout(timeout)
that.hideModal()
})
}
, hideModal: function () {
var that = this
this.$element.hide()
this.backdrop(function () {
that.removeBackdrop()
that.$element.trigger('hidden')
})
}
, removeBackdrop: function () {
this.$backdrop && this.$backdrop.remove()
this.$backdrop = null
}
, backdrop: function (callback) {
var that = this
, animate = this.$element.hasClass('fade') ? 'fade' : ''
if (this.isShown && this.options.backdrop) {
var doAnimate = $.support.transition && animate
this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
.appendTo(document.body)
this.$backdrop.click(
this.options.backdrop == 'static' ?
$.proxy(this.$element[0].focus, this.$element[0])
: $.proxy(this.hide, this)
)
if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
this.$backdrop.addClass('in')
if (!callback) return
doAnimate ?
this.$backdrop.one($.support.transition.end, callback) :
callback()
} else if (!this.isShown && this.$backdrop) {
this.$backdrop.removeClass('in')
$.support.transition && this.$element.hasClass('fade')?
this.$backdrop.one($.support.transition.end, callback) :
callback()
} else if (callback) {
callback()
}
}
}
/* MODAL PLUGIN DEFINITION
* ======================= */
var old = $.fn.modal
$.fn.modal = function (option) {
return this.each(function () {
var $this = $(this)
, data = $this.data('modal')
, options = $.extend({}, $.fn.modal.defaults, $this.data(), typeof option == 'object' && option)
if (!data) $this.data('modal', (data = new Modal(this, options)))
if (typeof option == 'string') data[option]()
else if (options.show) data.show()
})
}
$.fn.modal.defaults = {
backdrop: true
, keyboard: true
, show: true
}
$.fn.modal.Constructor = Modal
/* MODAL NO CONFLICT
* ================= */
$.fn.modal.noConflict = function () {
$.fn.modal = old
return this
}
/* MODAL DATA-API
* ============== */
$(document).on('click.modal.data-api', '[data-toggle="modal"]', function (e) {
var $this = $(this)
, href = $this.attr('href')
, $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7
, option = $target.data('modal') ? 'toggle' : $.extend({ remote:!/#/.test(href) && href }, $target.data(), $this.data())
e.preventDefault()
$target
.modal(option)
.one('hide', function () {
$this.focus()
})
})
var $body = $(document.body)
.on('shown', '.modal', function () { $body.addClass('modal-open') })
.on('hidden', '.modal', function () { $body.removeClass('modal-open') })
}(window.jQuery);

View File

@ -1,114 +0,0 @@
/* ===========================================================
* bootstrap-popover.js v3.0.0
* http://twitter.github.com/bootstrap/javascript.html#popovers
* ===========================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* =========================================================== */
!function ($) {
"use strict"; // jshint ;_;
/* POPOVER PUBLIC CLASS DEFINITION
* =============================== */
var Popover = function (element, options) {
this.init('popover', element, options)
}
/* NOTE: POPOVER EXTENDS BOOTSTRAP-TOOLTIP.js
========================================== */
Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype, {
constructor: Popover
, setContent: function () {
var $tip = this.tip()
, title = this.getTitle()
, content = this.getContent()
$tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
$tip.find('.popover-content')[this.options.html ? 'html' : 'text'](content)
$tip.removeClass('fade top bottom left right in')
}
, hasContent: function () {
return this.getTitle() || this.getContent()
}
, getContent: function () {
var content
, $e = this.$element
, o = this.options
content = (typeof o.content == 'function' ? o.content.call($e[0]) : o.content)
|| $e.attr('data-content')
return content
}
, tip: function () {
if (!this.$tip) {
this.$tip = $(this.options.template)
}
return this.$tip
}
, destroy: function () {
this.hide().$element.off('.' + this.type).removeData(this.type)
}
})
/* POPOVER PLUGIN DEFINITION
* ======================= */
var old = $.fn.popover
$.fn.popover = function (option) {
return this.each(function () {
var $this = $(this)
, data = $this.data('popover')
, options = typeof option == 'object' && option
if (!data) $this.data('popover', (data = new Popover(this, options)))
if (typeof option == 'string') data[option]()
})
}
$.fn.popover.Constructor = Popover
$.fn.popover.defaults = $.extend({} , $.fn.tooltip.defaults, {
placement: 'right'
, trigger: 'click'
, content: ''
, template: '<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
})
/* POPOVER NO CONFLICT
* =================== */
$.fn.popover.noConflict = function () {
$.fn.popover = old
return this
}
}(window.jQuery);

View File

@ -1,162 +0,0 @@
/* =============================================================
* bootstrap-scrollspy.js v3.0.0
* http://twitter.github.com/bootstrap/javascript.html#scrollspy
* =============================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ============================================================== */
!function ($) {
"use strict"; // jshint ;_;
/* SCROLLSPY CLASS DEFINITION
* ========================== */
function ScrollSpy(element, options) {
var process = $.proxy(this.process, this)
, $element = $(element).is('body') ? $(window) : $(element)
, href
this.options = $.extend({}, $.fn.scrollspy.defaults, options)
this.$scrollElement = $element.on('scroll.scroll-spy.data-api', process)
this.selector = (this.options.target
|| ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
|| '') + ' .nav li > a'
this.$body = $('body')
this.refresh()
this.process()
}
ScrollSpy.prototype = {
constructor: ScrollSpy
, refresh: function () {
var self = this
, $targets
this.offsets = $([])
this.targets = $([])
$targets = this.$body
.find(this.selector)
.map(function () {
var $el = $(this)
, href = $el.data('target') || $el.attr('href')
, $href = /^#\w/.test(href) && $(href)
return ( $href
&& $href.length
&& [[ $href.position().top + (!$.isWindow(self.$scrollElement.get(0)) && self.$scrollElement.scrollTop()), href ]] ) || null
})
.sort(function (a, b) { return a[0] - b[0] })
.each(function () {
self.offsets.push(this[0])
self.targets.push(this[1])
})
}
, process: function () {
var scrollTop = this.$scrollElement.scrollTop() + this.options.offset
, scrollHeight = this.$scrollElement[0].scrollHeight || this.$body[0].scrollHeight
, maxScroll = scrollHeight - this.$scrollElement.height()
, offsets = this.offsets
, targets = this.targets
, activeTarget = this.activeTarget
, i
if (scrollTop >= maxScroll) {
return activeTarget != (i = targets.last()[0])
&& this.activate ( i )
}
for (i = offsets.length; i--;) {
activeTarget != targets[i]
&& scrollTop >= offsets[i]
&& (!offsets[i + 1] || scrollTop <= offsets[i + 1])
&& this.activate( targets[i] )
}
}
, activate: function (target) {
var active
, selector
this.activeTarget = target
$(this.selector)
.parents('.active')
.removeClass('active')
selector = this.selector
+ '[data-target="' + target + '"],'
+ this.selector + '[href="' + target + '"]'
active = $(selector)
.parents('li')
.addClass('active')
if (active.parent('.dropdown-menu').length) {
active = active.closest('li.dropdown').addClass('active')
}
active.trigger('activate')
}
}
/* SCROLLSPY PLUGIN DEFINITION
* =========================== */
var old = $.fn.scrollspy
$.fn.scrollspy = function (option) {
return this.each(function () {
var $this = $(this)
, data = $this.data('scrollspy')
, options = typeof option == 'object' && option
if (!data) $this.data('scrollspy', (data = new ScrollSpy(this, options)))
if (typeof option == 'string') data[option]()
})
}
$.fn.scrollspy.Constructor = ScrollSpy
$.fn.scrollspy.defaults = {
offset: 10
}
/* SCROLLSPY NO CONFLICT
* ===================== */
$.fn.scrollspy.noConflict = function () {
$.fn.scrollspy = old
return this
}
/* SCROLLSPY DATA-API
* ================== */
$(window).on('load', function () {
$('[data-spy="scroll"]').each(function () {
var $spy = $(this)
$spy.scrollspy($spy.data())
})
})
}(window.jQuery);

144
js/bootstrap-tab.js vendored
View File

@ -1,144 +0,0 @@
/* ========================================================
* bootstrap-tab.js v3.0.0
* http://twitter.github.com/bootstrap/javascript.html#tabs
* ========================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ======================================================== */
!function ($) {
"use strict"; // jshint ;_;
/* TAB CLASS DEFINITION
* ==================== */
var Tab = function (element) {
this.element = $(element)
}
Tab.prototype = {
constructor: Tab
, show: function () {
var $this = this.element
, $ul = $this.closest('ul:not(.dropdown-menu)')
, selector = $this.attr('data-target')
, previous
, $target
, e
if (!selector) {
selector = $this.attr('href')
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
}
if ( $this.parent('li').hasClass('active') ) return
previous = $ul.find('.active:last a')[0]
e = $.Event('show', {
relatedTarget: previous
})
$this.trigger(e)
if (e.isDefaultPrevented()) return
$target = $(selector)
this.activate($this.parent('li'), $ul)
this.activate($target, $target.parent(), function () {
$this.trigger({
type: 'shown'
, relatedTarget: previous
})
})
}
, activate: function ( element, container, callback) {
var $active = container.find('> .active')
, transition = callback
&& $.support.transition
&& $active.hasClass('fade')
function next() {
$active
.removeClass('active')
.find('> .dropdown-menu > .active')
.removeClass('active')
element.addClass('active')
if (transition) {
element[0].offsetWidth // reflow for transition
element.addClass('in')
} else {
element.removeClass('fade')
}
if ( element.parent('.dropdown-menu') ) {
element.closest('li.dropdown').addClass('active')
}
callback && callback()
}
transition ?
$active.one($.support.transition.end, next) :
next()
$active.removeClass('in')
}
}
/* TAB PLUGIN DEFINITION
* ===================== */
var old = $.fn.tab
$.fn.tab = function ( option ) {
return this.each(function () {
var $this = $(this)
, data = $this.data('tab')
if (!data) $this.data('tab', (data = new Tab(this)))
if (typeof option == 'string') data[option]()
})
}
$.fn.tab.Constructor = Tab
/* TAB NO CONFLICT
* =============== */
$.fn.tab.noConflict = function () {
$.fn.tab = old
return this
}
/* TAB DATA-API
* ============ */
$(document).on('click.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
e.preventDefault()
$(this).tab('show')
})
}(window.jQuery);

View File

@ -1,361 +0,0 @@
/* ===========================================================
* bootstrap-tooltip.js v3.0.0
* http://twitter.github.com/bootstrap/javascript.html#tooltips
* Inspired by the original jQuery.tipsy by Jason Frame
* ===========================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ========================================================== */
!function ($) {
"use strict"; // jshint ;_;
/* TOOLTIP PUBLIC CLASS DEFINITION
* =============================== */
var Tooltip = function (element, options) {
this.init('tooltip', element, options)
}
Tooltip.prototype = {
constructor: Tooltip
, init: function (type, element, options) {
var eventIn
, eventOut
, triggers
, trigger
, i
this.type = type
this.$element = $(element)
this.options = this.getOptions(options)
this.enabled = true
triggers = this.options.trigger.split(' ')
for (i = triggers.length; i--;) {
trigger = triggers[i]
if (trigger == 'click') {
this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
} else if (trigger != 'manual') {
eventIn = trigger == 'hover' ? 'mouseenter' : 'focus'
eventOut = trigger == 'hover' ? 'mouseleave' : 'blur'
this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
}
}
this.options.selector ?
(this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
this.fixTitle()
}
, getOptions: function (options) {
options = $.extend({}, $.fn[this.type].defaults, this.$element.data(), options)
if (options.delay && typeof options.delay == 'number') {
options.delay = {
show: options.delay
, hide: options.delay
}
}
return options
}
, enter: function (e) {
var defaults = $.fn[this.type].defaults
, options = {}
, self
this._options && $.each(this._options, function (key, value) {
if (defaults[key] != value) options[key] = value
}, this)
self = $(e.currentTarget)[this.type](options).data(this.type)
if (!self.options.delay || !self.options.delay.show) return self.show()
clearTimeout(this.timeout)
self.hoverState = 'in'
this.timeout = setTimeout(function() {
if (self.hoverState == 'in') self.show()
}, self.options.delay.show)
}
, leave: function (e) {
var self = $(e.currentTarget)[this.type](this._options).data(this.type)
if (this.timeout) clearTimeout(this.timeout)
if (!self.options.delay || !self.options.delay.hide) return self.hide()
self.hoverState = 'out'
this.timeout = setTimeout(function() {
if (self.hoverState == 'out') self.hide()
}, self.options.delay.hide)
}
, show: function () {
var $tip
, pos
, actualWidth
, actualHeight
, placement
, tp
, e = $.Event('show')
if (this.hasContent() && this.enabled) {
this.$element.trigger(e)
if (e.isDefaultPrevented()) return
$tip = this.tip()
this.setContent()
if (this.options.animation) {
$tip.addClass('fade')
}
placement = typeof this.options.placement == 'function' ?
this.options.placement.call(this, $tip[0], this.$element[0]) :
this.options.placement
$tip
.detach()
.css({ top: 0, left: 0, display: 'block' })
this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
pos = this.getPosition()
actualWidth = $tip[0].offsetWidth
actualHeight = $tip[0].offsetHeight
switch (placement) {
case 'bottom':
tp = {top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2}
break
case 'top':
tp = {top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2}
break
case 'left':
tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth}
break
case 'right':
tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width}
break
}
this.applyPlacement(tp, placement)
this.$element.trigger('shown')
}
}
, applyPlacement: function(offset, placement){
var $tip = this.tip()
, width = $tip[0].offsetWidth
, height = $tip[0].offsetHeight
, actualWidth
, actualHeight
, delta
, replace
$tip
.offset(offset)
.addClass(placement)
.addClass('in')
actualWidth = $tip[0].offsetWidth
actualHeight = $tip[0].offsetHeight
if (placement == 'top' && actualHeight != height) {
offset.top = offset.top + height - actualHeight
replace = true
}
if (placement == 'bottom' || placement == 'top') {
delta = 0
if (offset.left < 0){
delta = offset.left * -2
offset.left = 0
$tip.offset(offset)
actualWidth = $tip[0].offsetWidth
actualHeight = $tip[0].offsetHeight
}
this.replaceArrow(delta - width + actualWidth, actualWidth, 'left')
} else {
this.replaceArrow(actualHeight - height, actualHeight, 'top')
}
if (replace) $tip.offset(offset)
}
, replaceArrow: function(delta, dimension, position){
this
.arrow()
.css(position, delta ? (50 * (1 - delta / dimension) + "%") : '')
}
, setContent: function () {
var $tip = this.tip()
, title = this.getTitle()
$tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)
$tip.removeClass('fade in top bottom left right')
}
, hide: function () {
var that = this
, $tip = this.tip()
, e = $.Event('hide')
this.$element.trigger(e)
if (e.isDefaultPrevented()) return
$tip.removeClass('in')
function removeWithAnimation() {
var timeout = setTimeout(function () {
$tip.off($.support.transition.end).detach()
}, 500)
$tip.one($.support.transition.end, function () {
clearTimeout(timeout)
$tip.detach()
})
}
$.support.transition && this.$tip.hasClass('fade') ?
removeWithAnimation() :
$tip.detach()
this.$element.trigger('hidden')
return this
}
, fixTitle: function () {
var $e = this.$element
if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') {
$e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
}
}
, hasContent: function () {
return this.getTitle()
}
, getPosition: function () {
var el = this.$element[0]
return $.extend({}, (typeof el.getBoundingClientRect == 'function') ? el.getBoundingClientRect() : {
width: el.offsetWidth
, height: el.offsetHeight
}, this.$element.offset())
}
, getTitle: function () {
var title
, $e = this.$element
, o = this.options
title = $e.attr('data-original-title')
|| (typeof o.title == 'function' ? o.title.call($e[0]) : o.title)
return title
}
, tip: function () {
return this.$tip = this.$tip || $(this.options.template)
}
, arrow: function(){
return this.$arrow = this.$arrow || this.tip().find(".tooltip-arrow")
}
, validate: function () {
if (!this.$element[0].parentNode) {
this.hide()
this.$element = null
this.options = null
}
}
, enable: function () {
this.enabled = true
}
, disable: function () {
this.enabled = false
}
, toggleEnabled: function () {
this.enabled = !this.enabled
}
, toggle: function (e) {
var self = e ? $(e.currentTarget)[this.type](this._options).data(this.type) : this
self.tip().hasClass('in') ? self.hide() : self.show()
}
, destroy: function () {
this.hide().$element.off('.' + this.type).removeData(this.type)
}
}
/* TOOLTIP PLUGIN DEFINITION
* ========================= */
var old = $.fn.tooltip
$.fn.tooltip = function ( option ) {
return this.each(function () {
var $this = $(this)
, data = $this.data('tooltip')
, options = typeof option == 'object' && option
if (!data) $this.data('tooltip', (data = new Tooltip(this, options)))
if (typeof option == 'string') data[option]()
})
}
$.fn.tooltip.Constructor = Tooltip
$.fn.tooltip.defaults = {
animation: true
, placement: 'top'
, selector: false
, template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'
, trigger: 'hover focus'
, title: ''
, delay: 0
, html: false
, container: false
}
/* TOOLTIP NO CONFLICT
* =================== */
$.fn.tooltip.noConflict = function () {
$.fn.tooltip = old
return this
}
}(window.jQuery);

View File

@ -1,60 +0,0 @@
/* ===================================================
* bootstrap-transition.js v3.0.0
* http://twitter.github.com/bootstrap/javascript.html#transitions
* ===================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ========================================================== */
!function ($) {
"use strict"; // jshint ;_;
/* CSS TRANSITION SUPPORT (http://www.modernizr.com/)
* ======================================================= */
$(function () {
$.support.transition = (function () {
var transitionEnd = (function () {
var el = document.createElement('bootstrap')
, transEndEventNames = {
'WebkitTransition' : 'webkitTransitionEnd'
, 'MozTransition' : 'transitionend'
, 'OTransition' : 'oTransitionEnd otransitionend'
, 'transition' : 'transitionend'
}
, name
for (name in transEndEventNames){
if (el.style[name] !== undefined) {
return transEndEventNames[name]
}
}
}())
return transitionEnd && {
end: transitionEnd
}
})()
})
}(window.jQuery);

View File

@ -1,335 +0,0 @@
/* =============================================================
* bootstrap-typeahead.js v3.0.0
* http://twitter.github.com/bootstrap/javascript.html#typeahead
* =============================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ============================================================ */
!function($){
"use strict"; // jshint ;_;
/* TYPEAHEAD PUBLIC CLASS DEFINITION
* ================================= */
var Typeahead = function (element, options) {
this.$element = $(element)
this.options = $.extend({}, $.fn.typeahead.defaults, options)
this.matcher = this.options.matcher || this.matcher
this.sorter = this.options.sorter || this.sorter
this.highlighter = this.options.highlighter || this.highlighter
this.updater = this.options.updater || this.updater
this.source = this.options.source
this.$menu = $(this.options.menu)
this.shown = false
this.listen()
}
Typeahead.prototype = {
constructor: Typeahead
, select: function () {
var val = this.$menu.find('.active').attr('data-value')
this.$element
.val(this.updater(val))
.change()
return this.hide()
}
, updater: function (item) {
return item
}
, show: function () {
var pos = $.extend({}, this.$element.position(), {
height: this.$element[0].offsetHeight
})
this.$menu
.insertAfter(this.$element)
.css({
top: pos.top + pos.height
, left: pos.left
})
.show()
this.shown = true
return this
}
, hide: function () {
this.$menu.hide()
this.shown = false
return this
}
, lookup: function (event) {
var items
this.query = this.$element.val()
if (!this.query || this.query.length < this.options.minLength) {
return this.shown ? this.hide() : this
}
items = $.isFunction(this.source) ? this.source(this.query, $.proxy(this.process, this)) : this.source
return items ? this.process(items) : this
}
, process: function (items) {
var that = this
items = $.grep(items, function (item) {
return that.matcher(item)
})
items = this.sorter(items)
if (!items.length) {
return this.shown ? this.hide() : this
}
return this.render(items.slice(0, this.options.items)).show()
}
, matcher: function (item) {
return ~item.toLowerCase().indexOf(this.query.toLowerCase())
}
, sorter: function (items) {
var beginswith = []
, caseSensitive = []
, caseInsensitive = []
, item
while (item = items.shift()) {
if (!item.toLowerCase().indexOf(this.query.toLowerCase())) beginswith.push(item)
else if (~item.indexOf(this.query)) caseSensitive.push(item)
else caseInsensitive.push(item)
}
return beginswith.concat(caseSensitive, caseInsensitive)
}
, highlighter: function (item) {
var query = this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$&')
return item.replace(new RegExp('(' + query + ')', 'ig'), function ($1, match) {
return '<strong>' + match + '</strong>'
})
}
, render: function (items) {
var that = this
items = $(items).map(function (i, item) {
i = $(that.options.item).attr('data-value', item)
i.find('a').html(that.highlighter(item))
return i[0]
})
items.first().addClass('active')
this.$menu.html(items)
return this
}
, next: function (event) {
var active = this.$menu.find('.active').removeClass('active')
, next = active.next()
if (!next.length) {
next = $(this.$menu.find('li')[0])
}
next.addClass('active')
}
, prev: function (event) {
var active = this.$menu.find('.active').removeClass('active')
, prev = active.prev()
if (!prev.length) {
prev = this.$menu.find('li').last()
}
prev.addClass('active')
}
, listen: function () {
this.$element
.on('focus', $.proxy(this.focus, this))
.on('blur', $.proxy(this.blur, this))
.on('keypress', $.proxy(this.keypress, this))
.on('keyup', $.proxy(this.keyup, this))
if (this.eventSupported('keydown')) {
this.$element.on('keydown', $.proxy(this.keydown, this))
}
this.$menu
.on('click', $.proxy(this.click, this))
.on('mouseenter', 'li', $.proxy(this.mouseenter, this))
.on('mouseleave', 'li', $.proxy(this.mouseleave, this))
}
, eventSupported: function(eventName) {
var isSupported = eventName in this.$element
if (!isSupported) {
this.$element.setAttribute(eventName, 'return;')
isSupported = typeof this.$element[eventName] === 'function'
}
return isSupported
}
, move: function (e) {
if (!this.shown) return
switch(e.keyCode) {
case 9: // tab
case 13: // enter
case 27: // escape
e.preventDefault()
break
case 38: // up arrow
e.preventDefault()
this.prev()
break
case 40: // down arrow
e.preventDefault()
this.next()
break
}
e.stopPropagation()
}
, keydown: function (e) {
this.suppressKeyPressRepeat = ~$.inArray(e.keyCode, [40,38,9,13,27])
this.move(e)
}
, keypress: function (e) {
if (this.suppressKeyPressRepeat) return
this.move(e)
}
, keyup: function (e) {
switch(e.keyCode) {
case 40: // down arrow
case 38: // up arrow
case 16: // shift
case 17: // ctrl
case 18: // alt
break
case 9: // tab
case 13: // enter
if (!this.shown) return
this.select()
break
case 27: // escape
if (!this.shown) return
this.hide()
break
default:
this.lookup()
}
e.stopPropagation()
e.preventDefault()
}
, focus: function (e) {
this.focused = true
}
, blur: function (e) {
this.focused = false
if (!this.mousedover && this.shown) this.hide()
}
, click: function (e) {
e.stopPropagation()
e.preventDefault()
this.select()
this.$element.focus()
}
, mouseenter: function (e) {
this.mousedover = true
this.$menu.find('.active').removeClass('active')
$(e.currentTarget).addClass('active')
}
, mouseleave: function (e) {
this.mousedover = false
if (!this.focused && this.shown) this.hide()
}
}
/* TYPEAHEAD PLUGIN DEFINITION
* =========================== */
var old = $.fn.typeahead
$.fn.typeahead = function (option) {
return this.each(function () {
var $this = $(this)
, data = $this.data('typeahead')
, options = typeof option == 'object' && option
if (!data) $this.data('typeahead', (data = new Typeahead(this, options)))
if (typeof option == 'string') data[option]()
})
}
$.fn.typeahead.defaults = {
source: []
, items: 8
, menu: '<ul class="typeahead dropdown-menu"></ul>'
, item: '<li><a href="#"></a></li>'
, minLength: 1
}
$.fn.typeahead.Constructor = Typeahead
/* TYPEAHEAD NO CONFLICT
* =================== */
$.fn.typeahead.noConflict = function () {
$.fn.typeahead = old
return this
}
/* TYPEAHEAD DATA-API
* ================== */
$(document).on('focus.typeahead.data-api', '[data-provide="typeahead"]', function (e) {
var $this = $(this)
if ($this.data('typeahead')) return
$this.typeahead($this.data())
})
}(window.jQuery);

View File

@ -1,8 +1,8 @@
/* ============================================================
* bootstrap-button.js v3.0.0
/* ========================================================================
* Bootstrap: button.js v3.0.0
* http://twitter.github.com/bootstrap/javascript.html#buttons
* ============================================================
* Copyright 2012 Twitter, Inc.
* ========================================================================
* Copyright 2013 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -15,30 +15,32 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ============================================================ */
* ======================================================================== */
!function ($) {
+function ($) { "use strict";
"use strict"; // jshint ;_;
/* BUTTON PUBLIC CLASS DEFINITION
* ============================== */
// BUTTON PUBLIC CLASS DEFINITION
// ==============================
var Button = function (element, options) {
this.$element = $(element)
this.options = $.extend({}, $.fn.button.defaults, options)
this.options = $.extend({}, Button.DEFAULTS, options)
}
Button.DEFAULTS = {
loadingText: 'loading...'
}
Button.prototype.setState = function (state) {
var d = 'disabled'
, $el = this.$element
, data = $el.data()
, val = $el.is('input') ? 'val' : 'html'
var $el = this.$element
var val = $el.is('input') ? 'val' : 'html'
var data = $el.data()
state = state + 'Text'
data.resetText || $el.data('resetText', $el[val]())
if (!data.resetText) $el.data('resetText', $el[val]())
$el[val](data[state] || this.options[state])
@ -46,46 +48,44 @@
setTimeout(function () {
state == 'loadingText' ?
$el.addClass(d).attr(d, d) :
$el.removeClass(d).removeAttr(d)
$el.removeClass(d).removeAttr(d);
}, 0)
}
Button.prototype.toggle = function () {
var $parent = this.$element.closest('[data-toggle="buttons-radio"]')
$parent && $parent
.find('.active')
.removeClass('active')
if ($parent) {
$parent.find('.active').removeClass('active')
}
this.$element.toggleClass('active')
}
/* BUTTON PLUGIN DEFINITION
* ======================== */
// BUTTON PLUGIN DEFINITION
// ========================
var old = $.fn.button
$.fn.button = function (option) {
return this.each(function () {
var $this = $(this)
, data = $this.data('button')
, options = typeof option == 'object' && option
if (!data) $this.data('button', (data = new Button(this, options)))
var data = $this.data('button')
var options = typeof option == 'object' && option
if (!data) $this.data('bs.button', (data = new Button(this, options)))
if (option == 'toggle') data.toggle()
else if (option) data.setState(option)
})
}
$.fn.button.defaults = {
loadingText: 'loading...'
}
$.fn.button.Constructor = Button
/* BUTTON NO CONFLICT
* ================== */
// BUTTON NO CONFLICT
// ==================
$.fn.button.noConflict = function () {
$.fn.button = old
@ -93,10 +93,10 @@
}
/* BUTTON DATA-API
* =============== */
// BUTTON DATA-API
// ===============
$(document).on('click.button.data-api', '[data-toggle^=button]', function (e) {
$(document).on('click.bs.button.data-api', '[data-toggle^=button]', function (e) {
var $btn = $(e.target)
if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
$btn.button('toggle')

210
js/carousel.js Normal file
View File

@ -0,0 +1,210 @@
/* ========================================================================
* Bootstrap: carousel.js v3.0.0
* http://twitter.github.com/bootstrap/javascript.html#carousel
* ========================================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ======================================================================== */
+function ($) { "use strict";
// CAROUSEL CLASS DEFINITION
// =========================
var Carousel = function (element, options) {
this.$element = $(element)
this.$indicators = this.$element.find('.carousel-indicators')
this.options = options
this.paused =
this.sliding =
this.interval =
this.$active =
this.$items = null
this.options.pause == 'hover' && this.$element
.on('mouseenter', $.proxy(this.pause, this))
.on('mouseleave', $.proxy(this.cycle, this))
}
Carousel.DEFAULTS = {
interval: 5000
, pause: 'hover'
}
Carousel.prototype.cycle = function (e) {
e || (this.paused = false)
this.interval && clearInterval(this.interval)
this.options.interval
&& !this.paused
&& (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
return this
}
Carousel.prototype.getActiveIndex = function () {
this.$active = this.$element.find('.item.active')
this.$items = this.$active.parent().children()
return this.$items.index(this.$active)
}
Carousel.prototype.to = function (pos) {
var that = this
var activeIndex = this.getActiveIndex()
if (pos > (this.$items.length - 1) || pos < 0) return
if (this.sliding) return this.$element.one('slid', function () { that.to(pos) })
if (activeIndex == pos) return this.pause().cycle()
return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos]))
}
Carousel.prototype.pause = function (e) {
e || (this.paused = true)
if (this.$element.find('.next, .prev').length && $.support.transition.end) {
this.$element.trigger($.support.transition.end)
this.cycle(true)
}
this.interval = clearInterval(this.interval)
return this
}
Carousel.prototype.next = function () {
if (this.sliding) return
return this.slide('next')
}
Carousel.prototype.prev = function () {
if (this.sliding) return
return this.slide('prev')
}
Carousel.prototype.slide = function (type, next) {
var $active = this.$element.find('.item.active')
var $next = next || $active[type]()
var isCycling = this.interval
var direction = type == 'next' ? 'left' : 'right'
var fallback = type == 'next' ? 'first' : 'last'
var that = this
this.sliding = true
isCycling && this.pause()
$next = $next.length ? $next : this.$element.find('.item')[fallback]()
var e = $.Event('slide.bs.carousel', { relatedTarget: $next[0], direction: direction })
if ($next.hasClass('active')) return
if (this.$indicators.length) {
this.$indicators.find('.active').removeClass('active')
this.$element.one('slid', function () {
var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()])
$nextIndicator && $nextIndicator.addClass('active')
})
}
if ($.support.transition && this.$element.hasClass('slide')) {
this.$element.trigger(e)
if (e.isDefaultPrevented()) return
$next.addClass(type)
$next[0].offsetWidth // force reflow
$active.addClass(direction)
$next.addClass(direction)
this.$element.one($.support.transition.end, function () {
$next.removeClass([type, direction].join(' ')).addClass('active')
$active.removeClass(['active', direction].join(' '))
that.sliding = false
setTimeout(function () { that.$element.trigger('slid') }, 0)
})
} else {
this.$element.trigger(e)
if (e.isDefaultPrevented()) return
$active.removeClass('active')
$next.addClass('active')
this.sliding = false
this.$element.trigger('slid')
}
isCycling && this.cycle()
return this
}
// CAROUSEL PLUGIN DEFINITION
// ==========================
var old = $.fn.carousel
$.fn.carousel = function (option) {
return this.each(function () {
var $this = $(this)
var data = $this.data('bs.carousel')
var options = $.extend({}, Carousel.DEFAULTS, typeof option == 'object' && option)
var action = typeof option == 'string' ? option : options.slide
if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))
if (typeof option == 'number') data.to(option)
else if (action) data[action]()
else if (options.interval) data.pause().cycle()
})
}
$.fn.carousel.Constructor = Carousel
// CAROUSEL NO CONFLICT
// ====================
$.fn.carousel.noConflict = function () {
$.fn.carousel = old
return this
}
// CAROUSEL DATA-API
// =================
$(document).on('click.bs.carousel.data-api', '[data-slide], [data-slide-to]', function (e) {
var $this = $(this), href
var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
var options = $.extend({}, $target.data(), $this.data())
var slideIndex
$target.carousel(options)
if (slideIndex = $this.attr('data-slide-to')) {
$target.data('bs-carousel').pause().to(slideIndex).cycle()
}
e.preventDefault()
})
$(window).on('load', function () {
$('[data-ride="carousel"]').each(function () {
var $carousel = $(this)
$carousel.carousel($carousel.data())
})
})
}(window.jQuery);

156
js/collapse.js Normal file
View File

@ -0,0 +1,156 @@
/* ========================================================================
* Bootstrap: collapse.js v3.0.0
* http://twitter.github.com/bootstrap/javascript.html#collapse
* ========================================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ======================================================================== */
+function ($) { "use strict";
// COLLAPSE PUBLIC CLASS DEFINITION
// ================================
var Collapse = function (element, options) {
this.$element = $(element)
this.options = $.extend({}, Collapse.DEFAULTS, options)
this.transitioning = null
if (this.options.parent) this.$parent = $(this.options.parent)
if (this.options.toggle) this.toggle()
}
Collapse.DEFAULTS = {
toggle: true
}
Collapse.prototype.dimension = function () {
var hasWidth = this.$element.hasClass('width')
return hasWidth ? 'width' : 'height'
}
Collapse.prototype.show = function () {
if (this.transitioning || this.$element.hasClass('in')) return
var dimension = this.dimension()
var scroll = $.camelCase(['scroll', dimension].join('-'))
var actives = this.$parent && this.$parent.find('> .accordion-group > .in')
if (actives && actives.length) {
var hasData = actives.data('collapse')
if (hasData && hasData.transitioning) return
actives.collapse('hide')
hasData || actives.data('collapse', null)
}
this.$element[dimension](0)
this.transition('addClass', $.Event('show.bs.collapse'), 'shown.bs.collapse')
if ($.support.transition) this.$element[dimension](this.$element[0][scroll])
}
Collapse.prototype.hide = function () {
if (this.transitioning || !this.$element.hasClass('in')) return
var dimension = this.dimension()
this.reset(this.$element[dimension]())
this.transition('removeClass', $.Event('hide.bs.collapse'), 'hidden')
this.$element[dimension](0)
}
Collapse.prototype.reset = function (size) {
var dimension = this.dimension()
this.$element
.removeClass('collapse')
[dimension](size || 'auto')
[0].offsetWidth
this.$element[size !== null ? 'addClass' : 'removeClass']('collapse')
return this
}
Collapse.prototype.transition = function (method, startEvent, completeEvent) {
var that = this
var complete = function () {
if (startEvent.type == 'show') that.reset()
that.transitioning = 0
that.$element.trigger(completeEvent)
}
this.$element.trigger(startEvent)
if (startEvent.isDefaultPrevented()) return
this.transitioning = 1
this.$element[method]('in')
$.support.transition && this.$element.hasClass('collapse') ?
this.$element.one($.support.transition.end, complete) :
complete()
}
Collapse.prototype.toggle = function () {
this[this.$element.hasClass('in') ? 'hide' : 'show']()
}
// COLLAPSE PLUGIN DEFINITION
// ==========================
var old = $.fn.collapse
$.fn.collapse = function (option) {
return this.each(function () {
var $this = $(this)
var data = $this.data('collapse')
var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)
if (!data) $this.data('collapse', (data = new Collapse(this, options)))
if (typeof option == 'string') data[option]()
})
}
$.fn.collapse.Constructor = Collapse
// COLLAPSE NO CONFLICT
// ====================
$.fn.collapse.noConflict = function () {
$.fn.collapse = old
return this
}
// COLLAPSE DATA-API
// =================
$(document).on('click.bs.collapse.data-api', '[data-toggle=collapse]', function (e) {
var $this = $(this), href
var target = $this.attr('data-target')
|| e.preventDefault()
|| (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
var option = $(target).data('collapse') ? 'toggle' : $this.data()
var parent = $this.attr('data-parent')
var $parent = parent && $(parent)
if ($parent) $parent.find('[data-toggle=collapse][data-parent=' + parent + ']').not($this).addClass('collapsed')
$this[$(target).hasClass('in') ? 'addClass' : 'removeClass']('collapsed')
$(target).collapse(option)
})
}(window.jQuery);

155
js/dropdown.js Normal file
View File

@ -0,0 +1,155 @@
/* ========================================================================
* Bootstrap: dropdown.js v3.0.0
* http://twitter.github.com/bootstrap/javascript.html#dropdowns
* ========================================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ======================================================================== */
+function ($) { "use strict";
// DROPDOWN CLASS DEFINITION
// =========================
var backdrop = '.dropdown-backdrop'
var toggle = '[data-toggle=dropdown]'
var Dropdown = function (element) {
var $el = $(element).on('click.bs.dropdown', this.toggle)
}
Dropdown.prototype.toggle = function (e) {
var $this = $(this)
if ($this.is('.disabled, :disabled')) return
var $parent = getParent($this)
var isActive = $parent.hasClass('open')
clearMenus()
if (!isActive) {
if ('ontouchstart' in document.documentElement) {
// if mobile we we use a backdrop because click events don't delegate
$('<div class="dropdown-backdrop"/>').insertBefore($(this)).on('click', clearMenus)
}
$parent.trigger(e = $.Event('show.bs.dropdown'))
if (e.isDefaultPrevented()) return
$parent
.toggleClass('open')
.trigger('shown.bs.dropdown')
}
$this.focus()
return false
}
Dropdown.prototype.keydown = function (e) {
if (!/(38|40|27)/.test(e.keyCode)) return
var $this = $(this)
e.preventDefault()
e.stopPropagation()
if ($this.is('.disabled, :disabled')) return
var $parent = getParent($this)
var isActive = $parent.hasClass('open')
if (!isActive || (isActive && e.keyCode == 27)) {
if (e.which == 27) $parent.find(toggle).focus()
return $this.click()
}
var $items = $('[role=menu] li:not(.divider):visible a', $parent)
if (!$items.length) return
var index = $items.index($items.filter(':focus'))
if (e.keyCode == 38 && index > 0) index-- // up
if (e.keyCode == 40 && index < $items.length - 1) index++ // down
if (!~index) index=0
$items.eq(index).focus()
}
function clearMenus() {
$(backdrop).remove()
$(toggle).each(function (e) {
var $parent = getParent($(this))
if (!$parent.hasClass('open')) return
$parent.trigger(e = $.Event('hide.bs.dropdown'))
if (e.isDefaultPrevented()) return
$parent.removeClass('open').trigger('hidden.bs.dropdown')
})
}
function getParent($this) {
var selector = $this.attr('data-target')
if (!selector) {
selector = $this.attr('href')
selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
}
var $parent = selector && $(selector)
return $parent && $parent.length ? $parent : $this.parent()
}
// DROPDOWN PLUGIN DEFINITION
// ==========================
var old = $.fn.dropdown
$.fn.dropdown = function (option) {
return this.each(function () {
var $this = $(this)
var data = $this.data('dropdown')
if (!data) $this.data('dropdown', (data = new Dropdown(this)))
if (typeof option == 'string') data[option].call($this)
})
}
$.fn.dropdown.Constructor = Dropdown
// DROPDOWN NO CONFLICT
// ====================
$.fn.dropdown.noConflict = function () {
$.fn.dropdown = old
return this
}
// APPLY TO STANDARD DROPDOWN ELEMENTS
// ===================================
$(document)
.on('click.bs.dropdown.data-api', clearMenus)
.on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
.on('click.bs.dropdown.data-api' , toggle, Dropdown.prototype.toggle)
.on('keydown.bs.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)
}(window.jQuery);

243
js/modal.js Normal file
View File

@ -0,0 +1,243 @@
/* ========================================================================
* Bootstrap: modal.js v3.0.0
* http://twitter.github.com/bootstrap/javascript.html#modals
* ========================================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ======================================================================== */
+function ($) { "use strict";
// MODAL CLASS DEFINITION
// ======================
var Modal = function (element, options) {
this.options = options
this.$element = $(element).delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this))
this.$backdrop =
this.isShown = null
if (this.options.remote) this.$element.find('.modal-body').load(this.options.remote)
}
Modal.DEFAULTS = {
backdrop: true
, keyboard: true
, show: true
}
Modal.prototype.toggle = function () {
return this[!this.isShown ? 'show' : 'hide']()
}
Modal.prototype.show = function () {
var that = this
var e = $.Event('show.bs.modal')
this.$element.trigger(e)
if (this.isShown || e.isDefaultPrevented()) return
this.isShown = true
this.escape()
this.backdrop(function () {
var transition = $.support.transition && that.$element.hasClass('fade')
if (!that.$element.parent().length) {
that.$element.appendTo(document.body) // don't move modals dom position
}
that.$element.show()
if (transition) {
that.$element[0].offsetWidth // force reflow
}
that.$element
.addClass('in')
.attr('aria-hidden', false)
that.enforceFocus()
transition ?
that.$element.one($.support.transition.end, function () { that.$element.focus().trigger('shown.bs.modal') }) :
that.$element.focus().trigger('shown.bs.modal')
})
}
Modal.prototype.hide = function (e) {
if (e) e.preventDefault()
e = $.Event('hide.bs.modal')
this.$element.trigger(e)
if (!this.isShown || e.isDefaultPrevented()) return
this.isShown = false
this.escape()
$(document).off('focusin.bs.modal')
this.$element
.removeClass('in')
.attr('aria-hidden', true)
$.support.transition && this.$element.hasClass('fade') ?
this.hideWithTransition() :
this.hideModal()
}
Modal.prototype.enforceFocus = function () {
$(document)
.off('focusin.bs.modal') // guard against infinite focus loop
.on('focusin.bs.modal', function (e) {
if (this.$element[0] !== e.target && !this.$element.has(e.target).length) {
this.$element.focus()
}
}, this)
}
Modal.prototype.escape = function () {
if (this.isShown && this.options.keyboard) {
this.$element.on('keyup.dismiss.bs.modal', function ( e ) {
e.which == 27 && this.hide()
}, this)
} else if (!this.isShown) {
this.$element.off('keyup.dismiss.bs.modal')
}
}
Modal.prototype.hideWithTransition = function () {
var that = this
var timeout = setTimeout(function () {
that.$element.off($.support.transition.end)
that.hideModal()
}, 500)
this.$element.one($.support.transition.end, function () {
clearTimeout(timeout)
that.hideModal()
})
}
Modal.prototype.hideModal = function () {
var that = this
this.$element.hide()
this.backdrop(function () {
that.removeBackdrop()
that.$element.trigger('hidden.bs.modal')
})
}
Modal.prototype.removeBackdrop = function () {
this.$backdrop && this.$backdrop.remove()
this.$backdrop = null
}
Modal.prototype.backdrop = function (callback) {
var that = this
var animate = this.$element.hasClass('fade') ? 'fade' : ''
if (this.isShown && this.options.backdrop) {
var doAnimate = $.support.transition && animate
this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
.appendTo(document.body)
this.$backdrop.click(
this.options.backdrop == 'static' ?
$.proxy(this.$element[0].focus, this.$element[0])
: $.proxy(this.hide, this)
)
if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
this.$backdrop.addClass('in')
if (!callback) return
doAnimate ?
this.$backdrop.one($.support.transition.end, callback) :
callback()
} else if (!this.isShown && this.$backdrop) {
this.$backdrop.removeClass('in')
$.support.transition && this.$element.hasClass('fade')?
this.$backdrop.one($.support.transition.end, callback) :
callback()
} else if (callback) {
callback()
}
}
// MODAL PLUGIN DEFINITION
// =======================
var old = $.fn.modal
$.fn.modal = function (option) {
return this.each(function () {
var $this = $(this)
var data = $this.data('bs.modal')
var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)
if (!data) $this.data('bs.modal', (data = new Modal(this, options)))
if (typeof option == 'string') data[option]()
else if (options.show) data.show()
})
}
$.fn.modal.Constructor = Modal
// MODAL NO CONFLICT
// =================
$.fn.modal.noConflict = function () {
$.fn.modal = old
return this
}
// MODAL DATA-API
// ==============
$(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) {
var $this = $(this)
var href = $this.attr('href')
var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7
var option = $target.data('modal') ? 'toggle' : $.extend({ remote:!/#/.test(href) && href }, $target.data(), $this.data())
e.preventDefault()
$target
.modal(option)
.one('hide', function () {
$this.focus()
})
})
var $body = $(document.body)
.on('bs.modal.shown', '.modal', function () { $body.addClass('modal-open') })
.on('bs.modal.hidden', '.modal', function () { $body.removeClass('modal-open') })
}(window.jQuery);

109
js/popover.js Normal file
View File

@ -0,0 +1,109 @@
/* ========================================================================
* Bootstrap: popover.js v3.0.0
* http://twitter.github.com/bootstrap/javascript.html#popovers
* ========================================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ======================================================================== */
+function ($) { "use strict";
// POPOVER PUBLIC CLASS DEFINITION
// ===============================
var Popover = function (element, options) {
this.init('popover', element, options)
}
Popover.DEFAULTS = $.extend({} , $.fn.tooltip.Constructor.DEFAULTS, {
placement: 'right'
, trigger: 'click'
, content: ''
, template: '<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
})
// NOTE: POPOVER EXTENDS tooltip.js
// ================================
Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype)
Popover.prototype.constructor = Popover
Popover.prototype.getDefaults = function () {
return Popover.DEFAULTS
}
Popover.prototype.setContent = function () {
var $tip = this.tip()
var title = this.getTitle()
var content = this.getContent()
$tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
$tip.find('.popover-content')[this.options.html ? 'html' : 'text'](content)
$tip.removeClass('fade top bottom left right in')
}
Popover.prototype.hasContent = function () {
return this.getTitle() || this.getContent()
}
Popover.prototype.getContent = function () {
var content = typeof this.options.content == 'function' ?
this.options.content.call(this.$element[0]) :
this.options.content
return content || this.$element.attr('data-content')
}
Popover.prototype.tip = function () {
if (!this.$tip) this.$tip = $(this.options.template)
return this.$tip
}
Popover.prototype.destroy = function () {
this.hide().$element.off('.' + this.type).removeData(this.type)
}
// POPOVER PLUGIN DEFINITION
// =========================
var old = $.fn.popover
$.fn.popover = function (option) {
return this.each(function () {
var $this = $(this)
var data = $this.data('bs.popover')
var options = typeof option == 'object' && option
if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
if (typeof option == 'string') data[option]()
})
}
$.fn.popover.Constructor = Popover
// POPOVER NO CONFLICT
// ===================
$.fn.popover.noConflict = function () {
$.fn.popover = old
return this
}
}(window.jQuery);

156
js/scrollspy.js Normal file
View File

@ -0,0 +1,156 @@
/* ========================================================================
* Bootstrap: scrollspy.js v3.0.0
* http://twitter.github.com/bootstrap/javascript.html#scrollspy
* ========================================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ======================================================================== */
+function ($) { "use strict";
// SCROLLSPY CLASS DEFINITION
// ==========================
function ScrollSpy(element, options) {
var href
var process = $.proxy(this.process, this)
var $element = $(element).is('body') ? $(window) : $(element)
this.$body = $('body')
this.$scrollElement = $element.on('scroll.bs.scroll-spy.data-api', process)
this.options = $.extend({}, ScrollSpy.DEFAULTS, options)
this.selector = (this.options.target
|| ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
|| '') + ' .nav li > a'
this.offsets = $([])
this.targets = $([])
this.activeTarget = null
this.refresh()
this.process()
}
ScrollSpy.DEFAULTS = {
offset: 10
}
ScrollSpy.prototype.refresh = function () {
this.offsets = $([])
this.targets = $([])
var self = this
var $targets = this.$body
.find(this.selector)
.map(function () {
var $el = $(this)
var href = $el.data('target') || $el.attr('href')
var $href = /^#\w/.test(href) && $(href)
return ($href
&& $href.length
&& [[ $href.position().top + (!$.isWindow(self.$scrollElement.get(0)) && self.$scrollElement.scrollTop()), href ]]) || null
})
.sort(function (a, b) { return a[0] - b[0] })
.each(function () {
self.offsets.push(this[0])
self.targets.push(this[1])
})
}
ScrollSpy.prototype.process = function () {
var scrollTop = this.$scrollElement.scrollTop() + this.options.offset
var scrollHeight = this.$scrollElement[0].scrollHeight || this.$body[0].scrollHeight
var maxScroll = scrollHeight - this.$scrollElement.height()
var offsets = this.offsets
var targets = this.targets
var activeTarget = this.activeTarget
var i
if (scrollTop >= maxScroll) {
return activeTarget != (i = targets.last()[0]) && this.activate(i)
}
for (i = offsets.length; i--;) {
activeTarget != targets[i]
&& scrollTop >= offsets[i]
&& (!offsets[i + 1] || scrollTop <= offsets[i + 1])
&& this.activate( targets[i] )
}
}
ScrollSpy.prototype.activate = function (target) {
this.activeTarget = target
$(this.selector)
.parents('.active')
.removeClass('active')
var selector = this.selector
+ '[data-target="' + target + '"],'
+ this.selector + '[href="' + target + '"]'
var active = $(selector)
.parents('li')
.addClass('active')
if (active.parent('.dropdown-menu').length) {
active = active
.closest('li.dropdown')
.addClass('active')
}
active.trigger('activate')
}
// SCROLLSPY PLUGIN DEFINITION
// ===========================
var old = $.fn.scrollspy
$.fn.scrollspy = function (option) {
return this.each(function () {
var $this = $(this)
var data = $this.data('bs.scrollspy')
var options = typeof option == 'object' && option
if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options)))
if (typeof option == 'string') data[option]()
})
}
$.fn.scrollspy.Constructor = ScrollSpy
// SCROLLSPY NO CONFLICT
// =====================
$.fn.scrollspy.noConflict = function () {
$.fn.scrollspy = old
return this
}
// SCROLLSPY DATA-API
// ==================
$(window).on('load', function () {
$('[data-spy="scroll"]').each(function () {
var $spy = $(this)
$spy.scrollspy($spy.data())
})
})
}(window.jQuery);

133
js/tab.js Normal file
View File

@ -0,0 +1,133 @@
/* ========================================================================
* Bootstrap: tab.js v3.0.0
* http://twitter.github.com/bootstrap/javascript.html#tabs
* ========================================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ======================================================================== */
+function ($) { "use strict";
// TAB CLASS DEFINITION
// ====================
var Tab = function (element) {
this.element = $(element)
}
Tab.prototype.show = function () {
var $this = this.element
var $ul = $this.closest('ul:not(.dropdown-menu)')
var selector = $this.attr('data-target')
if (!selector) {
selector = $this.attr('href')
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
}
if ($this.parent('li').hasClass('active')) return
var previous = $ul.find('.active:last a')[0]
var e = $.Event('show.bs.tab', {
relatedTarget: previous
})
$this.trigger(e)
if (e.isDefaultPrevented()) return
var $target = $(selector)
this.activate($this.parent('li'), $ul)
this.activate($target, $target.parent(), function () {
$this.trigger({
type: 'shown.bs.tab'
, relatedTarget: previous
})
})
}
Tab.prototype.activate = function (element, container, callback) {
var $active = container.find('> .active')
var transition = callback
&& $.support.transition
&& $active.hasClass('fade')
function next() {
$active
.removeClass('active')
.find('> .dropdown-menu > .active')
.removeClass('active')
element.addClass('active')
if (transition) {
element[0].offsetWidth // reflow for transition
element.addClass('in')
} else {
element.removeClass('fade')
}
if (element.parent('.dropdown-menu')) {
element.closest('li.dropdown').addClass('active')
}
callback && callback()
}
transition ?
$active.one($.support.transition.end, next) :
next()
$active.removeClass('in')
}
// TAB PLUGIN DEFINITION
// =====================
var old = $.fn.tab
$.fn.tab = function ( option ) {
return this.each(function () {
var $this = $(this)
var data = $this.data('bs.tab')
if (!data) $this.data('bs.tab', (data = new Tab(this)))
if (typeof option == 'string') data[option]()
})
}
$.fn.tab.Constructor = Tab
// TAB NO CONFLICT
// ===============
$.fn.tab.noConflict = function () {
$.fn.tab = old
return this
}
// TAB DATA-API
// ============
$(document).on('click.bs.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
e.preventDefault()
$(this).tab('show')
})
}(window.jQuery);

View File

@ -12,37 +12,36 @@
<script src="vendor/qunit.js"></script>
<!-- phantomjs logging script-->
<script src="unit/bootstrap-phantom.js"></script>
<script src="unit/phantom.js"></script>
<!-- plugin sources -->
<script src="../../js/bootstrap-transition.js"></script>
<script src="../../js/bootstrap-alert.js"></script>
<script src="../../js/bootstrap-button.js"></script>
<script src="../../js/bootstrap-carousel.js"></script>
<script src="../../js/bootstrap-collapse.js"></script>
<script src="../../js/bootstrap-dropdown.js"></script>
<script src="../../js/bootstrap-modal.js"></script>
<script src="../../js/bootstrap-scrollspy.js"></script>
<script src="../../js/bootstrap-tab.js"></script>
<script src="../../js/bootstrap-tooltip.js"></script>
<script src="../../js/bootstrap-popover.js"></script>
<script src="../../js/bootstrap-typeahead.js"></script>
<script src="../../js/bootstrap-affix.js"></script>
<script src="../../js/transition.js"></script>
<script src="../../js/alert.js"></script>
<script src="../../js/button.js"></script>
<script src="../../js/carousel.js"></script>
<script src="../../js/collapse.js"></script>
<script src="../../js/dropdown.js"></script>
<script src="../../js/modal.js"></script>
<script src="../../js/scrollspy.js"></script>
<script src="../../js/tab.js"></script>
<script src="../../js/tooltip.js"></script>
<script src="../../js/popover.js"></script>
<script src="../../js/affix.js"></script>
<!-- unit tests -->
<script src="unit/bootstrap-transition.js"></script>
<script src="unit/bootstrap-alert.js"></script>
<script src="unit/bootstrap-button.js"></script>
<script src="unit/bootstrap-carousel.js"></script>
<script src="unit/bootstrap-collapse.js"></script>
<script src="unit/bootstrap-dropdown.js"></script>
<script src="unit/bootstrap-modal.js"></script>
<script src="unit/bootstrap-scrollspy.js"></script>
<script src="unit/bootstrap-tab.js"></script>
<script src="unit/bootstrap-tooltip.js"></script>
<script src="unit/bootstrap-popover.js"></script>
<script src="unit/bootstrap-typeahead.js"></script>
<script src="unit/bootstrap-affix.js"></script>
<script src="unit/transition.js"></script>
<script src="unit/alert.js"></script>
<script src="unit/button.js"></script>
<script src="unit/carousel.js"></script>
<script src="unit/collapse.js"></script>
<script src="unit/dropdown.js"></script>
<script src="unit/modal.js"></script>
<script src="unit/scrollspy.js"></script>
<script src="unit/tab.js"></script>
<script src="unit/tooltip.js"></script>
<script src="unit/popover.js"></script>
<script src="unit/affix.js"></script>
</head>
<body>
<div>

View File

@ -1,6 +1,6 @@
$(function () {
module("bootstrap-affix")
module("affix")
test("should provide no conflict", function () {
var affix = $.fn.affix.noConflict()
@ -18,7 +18,7 @@ $(function () {
test("should exit early if element is not visible", function () {
var $affix = $('<div style="display: none"></div>').affix()
$affix.data('affix').checkPosition()
$affix.data('bs.affix').checkPosition()
ok(!$affix.hasClass('affix'), 'affix class was not added')
})

View File

@ -1,6 +1,6 @@
$(function () {
module("bootstrap-alerts")
module("alert")
test("should provide no conflict", function () {
var alert = $.fn.alert.noConflict()
@ -48,12 +48,12 @@ $(function () {
$.support.transition = false
stop();
$('<div class="alert"/>')
.bind('close', function (e) {
.on('close.bs.alert', function (e) {
e.preventDefault();
ok(true);
start();
})
.bind('closed', function () {
.on('closed.bs.alert', function () {
ok(false);
})
.alert('close')

View File

@ -1,236 +0,0 @@
$(function () {
module("bootstrap-typeahead")
test("should provide no conflict", function () {
var typeahead = $.fn.typeahead.noConflict()
ok(!$.fn.typeahead, 'typeahead was set back to undefined (org value)')
$.fn.typeahead = typeahead
})
test("should be defined on jquery object", function () {
ok($(document.body).typeahead, 'alert method is defined')
})
test("should return element", function () {
ok($(document.body).typeahead()[0] == document.body, 'document.body returned')
})
test("should listen to an input", function () {
var $input = $('<input />')
$input.typeahead()
ok($._data($input[0], 'events').blur, 'has a blur event')
ok($._data($input[0], 'events').keypress, 'has a keypress event')
ok($._data($input[0], 'events').keyup, 'has a keyup event')
})
test("should create a menu", function () {
var $input = $('<input />')
ok($input.typeahead().data('typeahead').$menu, 'has a menu')
})
test("should listen to the menu", function () {
var $input = $('<input />')
, $menu = $input.typeahead().data('typeahead').$menu
ok($._data($menu[0], 'events').mouseover, 'has a mouseover(pseudo: mouseenter)')
ok($._data($menu[0], 'events').click, 'has a click')
})
test("should show menu when query entered", function () {
var $input = $('<input />')
.appendTo('body')
.typeahead({
source: ['aa', 'ab', 'ac']
})
, typeahead = $input.data('typeahead')
$input.val('a')
typeahead.lookup()
ok(typeahead.$menu.is(":visible"), 'typeahead is visible')
equals(typeahead.$menu.find('li').length, 3, 'has 3 items in menu')
equals(typeahead.$menu.find('.active').length, 1, 'one item is active')
$input.remove()
typeahead.$menu.remove()
})
test("should accept data source via synchronous function", function () {
var $input = $('<input />').typeahead({
source: function () {
return ['aa', 'ab', 'ac']
}
}).appendTo('body')
, typeahead = $input.data('typeahead')
$input.val('a')
typeahead.lookup()
ok(typeahead.$menu.is(":visible"), 'typeahead is visible')
equals(typeahead.$menu.find('li').length, 3, 'has 3 items in menu')
equals(typeahead.$menu.find('.active').length, 1, 'one item is active')
$input.remove()
typeahead.$menu.remove()
})
test("should accept data source via asynchronous function", function () {
var $input = $('<input />').typeahead({
source: function (query, process) {
process(['aa', 'ab', 'ac'])
}
}).appendTo('body')
, typeahead = $input.data('typeahead')
$input.val('a')
typeahead.lookup()
ok(typeahead.$menu.is(":visible"), 'typeahead is visible')
equals(typeahead.$menu.find('li').length, 3, 'has 3 items in menu')
equals(typeahead.$menu.find('.active').length, 1, 'one item is active')
$input.remove()
typeahead.$menu.remove()
})
test("should not explode when regex chars are entered", function () {
var $input = $('<input />').typeahead({
source: ['aa', 'ab', 'ac', 'mdo*', 'fat+']
}).appendTo('body')
, typeahead = $input.data('typeahead')
$input.val('+')
typeahead.lookup()
ok(typeahead.$menu.is(":visible"), 'typeahead is visible')
equals(typeahead.$menu.find('li').length, 1, 'has 1 item in menu')
equals(typeahead.$menu.find('.active').length, 1, 'one item is active')
$input.remove()
typeahead.$menu.remove()
})
test("should hide menu when query entered", function () {
stop()
var $input = $('<input />').typeahead({
source: ['aa', 'ab', 'ac']
}).appendTo('body')
, typeahead = $input.data('typeahead')
$input.val('a')
typeahead.lookup()
ok(typeahead.$menu.is(":visible"), 'typeahead is visible')
equals(typeahead.$menu.find('li').length, 3, 'has 3 items in menu')
equals(typeahead.$menu.find('.active').length, 1, 'one item is active')
$input.blur()
setTimeout(function () {
ok(!typeahead.$menu.is(":visible"), "typeahead is no longer visible")
start()
}, 200)
$input.remove()
typeahead.$menu.remove()
})
test("should set next item when down arrow is pressed", function () {
var $input = $('<input />').typeahead({
source: ['aa', 'ab', 'ac']
}).appendTo('body')
, typeahead = $input.data('typeahead')
$input.val('a')
typeahead.lookup()
ok(typeahead.$menu.is(":visible"), 'typeahead is visible')
equals(typeahead.$menu.find('li').length, 3, 'has 3 items in menu')
equals(typeahead.$menu.find('.active').length, 1, 'one item is active')
ok(typeahead.$menu.find('li').first().hasClass('active'), "first item is active")
// simulate entire key pressing event
$input.trigger({
type: 'keydown'
, keyCode: 40
})
.trigger({
type: 'keypress'
, keyCode: 40
})
.trigger({
type: 'keyup'
, keyCode: 40
})
ok(typeahead.$menu.find('li').first().next().hasClass('active'), "second item is active")
$input.trigger({
type: 'keydown'
, keyCode: 38
})
.trigger({
type: 'keypress'
, keyCode: 38
})
.trigger({
type: 'keyup'
, keyCode: 38
})
ok(typeahead.$menu.find('li').first().hasClass('active'), "first item is active")
$input.remove()
typeahead.$menu.remove()
})
test("should set input value to selected item", function () {
var $input = $('<input />').typeahead({
source: ['aa', 'ab', 'ac']
}).appendTo('body')
, typeahead = $input.data('typeahead')
, changed = false
, focus = false
, blur = false
$input.val('a')
typeahead.lookup()
$input.change(function() { changed = true });
$input.focus(function() { focus = true; blur = false });
$input.blur(function() { blur = true; focus = false });
$(typeahead.$menu.find('li')[2]).mouseover().click()
equals($input.val(), 'ac', 'input value was correctly set')
ok(!typeahead.$menu.is(':visible'), 'the menu was hidden')
ok(changed, 'a change event was fired')
ok(focus && !blur, 'focus is still set')
$input.remove()
typeahead.$menu.remove()
})
test("should start querying when minLength is met", function () {
var $input = $('<input />').typeahead({
source: ['aaaa', 'aaab', 'aaac'],
minLength: 3
}).appendTo('body')
, typeahead = $input.data('typeahead')
$input.val('aa')
typeahead.lookup()
equals(typeahead.$menu.find('li').length, 0, 'has 0 items in menu')
$input.val('aaa')
typeahead.lookup()
equals(typeahead.$menu.find('li').length, 3, 'has 3 items in menu')
$input.remove()
typeahead.$menu.remove()
})
})

View File

@ -1,6 +1,6 @@
$(function () {
module("bootstrap-buttons")
module("button")
test("should provide no conflict", function () {
var button = $.fn.button.noConflict()

View File

@ -1,6 +1,6 @@
$(function () {
module("bootstrap-carousel")
module("carousel")
test("should provide no conflict", function () {
var carousel = $.fn.carousel.noConflict()
@ -20,12 +20,12 @@ $(function () {
$.support.transition = false
stop()
$('<div class="carousel"/>')
.bind('slide', function (e) {
.on('slide.bs.carousel', function (e) {
e.preventDefault();
ok(true);
start();
})
.bind('slid', function () {
.on('slid.bs.carousel', function () {
ok(false);
})
.carousel('next')
@ -35,7 +35,7 @@ $(function () {
var template = '<div id="myCarousel" class="carousel slide"><div class="carousel-inner"><div class="item active"><img alt=""><div class="carousel-caption"><h4>{{_i}}First Thumbnail label{{/i}}</h4><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></div></div><div class="item"><img alt=""><div class="carousel-caption"><h4>{{_i}}Second Thumbnail label{{/i}}</h4><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></div></div><div class="item"><img alt=""><div class="carousel-caption"><h4>{{_i}}Third Thumbnail label{{/i}}</h4><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></div></div></div><a class="left carousel-control" href="#myCarousel" data-slide="prev">&lsaquo;</a><a class="right carousel-control" href="#myCarousel" data-slide="next">&rsaquo;</a></div>'
$.support.transition = false
stop()
$(template).on('slide', function (e) {
$(template).on('slide.bs.carousel', function (e) {
e.preventDefault()
ok(e.direction)
ok(e.direction === 'right' || e.direction === 'left')
@ -48,7 +48,7 @@ $(function () {
$.support.transition = false
stop()
$(template)
.on('slide', function (e) {
.on('slide.bs.carousel', function (e) {
e.preventDefault();
ok(e.relatedTarget);
ok($(e.relatedTarget).hasClass('item'));
@ -63,19 +63,19 @@ $(function () {
template.appendTo("body");
$('[data-slide]').first().click();
ok($('#myCarousel').data('carousel').options.interval == 1814);
ok($('#myCarousel').data('bs.carousel').options.interval == 1814);
$('#myCarousel').remove();
template.appendTo("body").attr("data-modal", "foobar");
$('[data-slide]').first().click();
ok($('#myCarousel').data('carousel').options.interval == 1814, "even if there is an data-modal attribute set");
ok($('#myCarousel').data('bs.carousel').options.interval == 1814, "even if there is an data-modal attribute set");
$('#myCarousel').remove();
template.appendTo("body");
$('[data-slide]').first().click();
$('#myCarousel').attr('data-interval', 1860);
$('[data-slide]').first().click();
ok($('#myCarousel').data('carousel').options.interval == 1814, "attributes should be read only on intitialization");
ok($('#myCarousel').data('bs.carousel').options.interval == 1814, "attributes should be read only on intitialization");
$('#myCarousel').remove();
})
})

View File

@ -1,6 +1,6 @@
$(function () {
module("bootstrap-collapse")
module("collapse")
test("should provide no conflict", function () {
var collapse = $.fn.collapse.noConflict()
@ -32,12 +32,12 @@ $(function () {
$.support.transition = false
stop()
$('<div class="collapse"/>')
.bind('show', function (e) {
.on('show.bs.collapse', function (e) {
e.preventDefault();
ok(true);
start();
})
.bind('shown', function () {
.on('shown.bs.collapse', function () {
ok(false);
})
.collapse('show')
@ -47,10 +47,10 @@ $(function () {
$.support.transition = false
stop()
$('<div class="collapse" style="height: 0px"/>')
.bind('show', function () {
.on('show.bs.collapse', function () {
ok(this.style.height == '0px')
})
.bind('shown', function () {
.on('shown.bs.collapse', function () {
ok(this.style.height == 'auto')
start()
})
@ -66,7 +66,7 @@ $(function () {
var collapsible = $('<div id="test1"></div>')
.appendTo($('#qunit-fixture'))
.on('show', function () {
.on('show.bs.collapse', function () {
ok(!target.hasClass('collapsed'))
start()
})
@ -83,7 +83,7 @@ $(function () {
var collapsible = $('<div id="test1" class="in"></div>')
.appendTo($('#qunit-fixture'))
.on('hide', function () {
.on('hide.bs.collapse', function () {
ok(target.hasClass('collapsed'))
start()
})
@ -115,7 +115,7 @@ $(function () {
var collapsible3 = $('<div id="body3"></div>')
.appendTo(accordion.find('.accordion-group').eq(2))
.on('show', function () {
.on('show.bs.collapse', function () {
ok(target1.hasClass('collapsed'))
ok(target2.hasClass('collapsed'))
ok(!target3.hasClass('collapsed'))

View File

@ -1,6 +1,6 @@
$(function () {
module("bootstrap-dropdowns")
module("dropdowns")
test("should provide no conflict", function () {
var dropdown = $.fn.dropdown.noConflict()
@ -103,6 +103,7 @@ $(function () {
.find('[data-toggle="dropdown"]')
.dropdown()
.click()
ok(dropdown.parent('.dropdown').hasClass('open'), 'open class added on click')
$('body').click()
ok(!dropdown.parent('.dropdown').hasClass('open'), 'open class removed')
@ -148,4 +149,71 @@ $(function () {
$("#qunit-fixture").html("")
})
test("should fire show and hide event", function () {
var dropdownHTML = '<ul class="tabs">'
+ '<li class="dropdown">'
+ '<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown</a>'
+ '<ul class="dropdown-menu">'
+ '<li><a href="#">Secondary link</a></li>'
+ '<li><a href="#">Something else here</a></li>'
+ '<li class="divider"></li>'
+ '<li><a href="#">Another link</a></li>'
+ '</ul>'
+ '</li>'
+ '</ul>'
, dropdown = $(dropdownHTML)
.appendTo('#qunit-fixture')
.find('[data-toggle="dropdown"]')
.dropdown()
stop()
dropdown
.parent('.dropdown')
.bind('show.bs.dropdown', function () {
ok(true, 'show was called')
})
.bind('hide.bs.dropdown', function () {
ok(true, 'hide was called')
start()
})
dropdown.click()
$(document.body).click()
})
test("should fire shown and hiden event", function () {
var dropdownHTML = '<ul class="tabs">'
+ '<li class="dropdown">'
+ '<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown</a>'
+ '<ul class="dropdown-menu">'
+ '<li><a href="#">Secondary link</a></li>'
+ '<li><a href="#">Something else here</a></li>'
+ '<li class="divider"></li>'
+ '<li><a href="#">Another link</a></li>'
+ '</ul>'
+ '</li>'
+ '</ul>'
, dropdown = $(dropdownHTML)
.appendTo('#qunit-fixture')
.find('[data-toggle="dropdown"]')
.dropdown()
stop()
dropdown
.parent('.dropdown')
.bind('shown.bs.dropdown', function () {
ok(true, 'show was called')
})
.bind('hidden.bs.dropdown', function () {
ok(true, 'hide was called')
start()
})
dropdown.click()
$(document.body).click()
})
})

View File

@ -1,6 +1,6 @@
$(function () {
module("bootstrap-modal")
module("modal")
test("should provide no conflict", function () {
var modal = $.fn.modal.noConflict()
@ -20,15 +20,15 @@ $(function () {
})
test("should expose defaults var for settings", function () {
ok($.fn.modal.defaults, 'default object exposed')
ok($.fn.modal.Constructor.DEFAULTS, 'default object exposed')
})
test("should insert into dom when show method is called", function () {
stop()
$.support.transition = false
$("<div id='modal-test'></div>")
.bind("shown", function () {
ok($('#modal-test').length, 'modal insterted into dom')
.on("shown.bs.modal", function () {
ok($('#modal-test').length, 'modal inserted into dom')
$(this).remove()
start()
})
@ -39,10 +39,10 @@ $(function () {
stop()
$.support.transition = false
$("<div id='modal-test'></div>")
.bind("show", function () {
.on("show.bs.modal", function () {
ok(true, "show was called")
})
.bind("shown", function () {
.on("shown.bs.modal", function () {
$(this).remove()
start()
})
@ -53,12 +53,12 @@ $(function () {
stop()
$.support.transition = false
$("<div id='modal-test'></div>")
.bind("show", function (e) {
.on("show.bs.modal", function (e) {
e.preventDefault()
ok(true, "show was called")
start()
})
.bind("shown", function () {
.on("shown.bs.modal", function () {
ok(false, "shown was called")
})
.modal("show")
@ -69,12 +69,12 @@ $(function () {
$.support.transition = false
$("<div id='modal-test'></div>")
.bind("shown", function () {
.on("shown.bs.modal", function () {
ok($('#modal-test').is(":visible"), 'modal visible')
ok($('#modal-test').length, 'modal insterted into dom')
ok($('#modal-test').length, 'modal inserted into dom')
$(this).modal("hide")
})
.bind("hidden", function() {
.on("hidden.bs.modal", function() {
ok(!$('#modal-test').is(":visible"), 'modal hidden')
$('#modal-test').remove()
start()
@ -87,12 +87,12 @@ $(function () {
$.support.transition = false
var div = $("<div id='modal-test'></div>")
div
.bind("shown", function () {
.on("shown.bs.modal", function () {
ok($('#modal-test').is(":visible"), 'modal visible')
ok($('#modal-test').length, 'modal insterted into dom')
ok($('#modal-test').length, 'modal inserted into dom')
div.modal("toggle")
})
.bind("hidden", function() {
.on("hidden.bs.modal", function() {
ok(!$('#modal-test').is(":visible"), 'modal hidden')
div.remove()
start()
@ -105,12 +105,12 @@ $(function () {
$.support.transition = false
var div = $("<div id='modal-test'><span class='close' data-dismiss='modal'></span></div>")
div
.bind("shown", function () {
.on("shown.bs.modal", function () {
ok($('#modal-test').is(":visible"), 'modal visible')
ok($('#modal-test').length, 'modal insterted into dom')
ok($('#modal-test').length, 'modal inserted into dom')
div.find('.close').click()
})
.bind("hidden", function() {
.on("hidden.bs.modal", function() {
ok(!$('#modal-test').is(":visible"), 'modal hidden')
div.remove()
start()
@ -123,11 +123,11 @@ $(function () {
$.support.transition = false
var div = $("<div>", { id: 'modal-test', "data-backdrop": false })
div
.bind("shown", function () {
.on("shown.bs.modal", function () {
ok($('#modal-test').is(":visible"), 'modal visible')
div.modal("hide")
})
.bind("hidden", function() {
.on("hidden.bs.modal", function() {
ok(!$('#modal-test').is(":visible"), 'modal hidden')
div.remove()
start()

View File

@ -1,6 +1,6 @@
$(function () {
module("bootstrap-popover")
module("popover")
test("should provide no conflict", function () {
var popover = $.fn.popover.noConflict()
@ -34,7 +34,7 @@ $(function () {
var popover = $('<a href="#" title="mdo" data-content="http://twitter.com/mdo">@mdo</a>')
.popover()
ok(!!popover.data('popover'), 'popover instance exists')
ok(!!popover.data('bs.popover'), 'popover instance exists')
})
test("should get title and content from options", function () {
@ -99,7 +99,7 @@ $(function () {
test("should destroy popover", function () {
var popover = $('<div/>').popover({trigger: 'hover'}).on('click.foo', function(){})
ok(popover.data('popover'), 'popover has data')
ok(popover.data('bs.popover'), 'popover has data')
ok($._data(popover[0], 'events').mouseover && $._data(popover[0], 'events').mouseout, 'popover has hover event')
ok($._data(popover[0], 'events').click[0].namespace == 'foo', 'popover has extra click.foo event')
popover.popover('show')

View File

@ -1,6 +1,6 @@
$(function () {
module("bootstrap-scrollspy")
module("scrollspy")
test("should provide no conflict", function () {
var scrollspy = $.fn.scrollspy.noConflict()

View File

@ -1,6 +1,6 @@
$(function () {
module("bootstrap-tabs")
module("tabs")
test("should provide no conflict", function () {
var tab = $.fn.tab.noConflict()
@ -53,12 +53,12 @@ $(function () {
$.support.transition = false
stop();
$('<div class="tab"/>')
.bind('show', function (e) {
.on('show.bs.tab', function (e) {
e.preventDefault();
ok(true);
start();
})
.bind('shown', function () {
.on('shown.bs.tab', function () {
ok(false);
})
.tab('show')

View File

@ -1,6 +1,6 @@
$(function () {
module("bootstrap-tooltip")
module("tooltip")
test("should provide no conflict", function () {
var tooltip = $.fn.tooltip.noConflict()
@ -19,7 +19,7 @@ $(function () {
})
test("should expose default settings", function () {
ok(!!$.fn.tooltip.defaults, 'defaults is defined')
ok(!!$.fn.tooltip.Constructor.DEFAULTS, 'defaults is defined')
})
test("should empty title attribute", function () {
@ -69,7 +69,7 @@ $(function () {
test("should fire show event", function () {
stop()
var tooltip = $('<div title="tooltip title"></div>')
.bind("show", function() {
.on("show.bs.tooltip", function() {
ok(true, "show was called")
start()
})
@ -79,7 +79,7 @@ $(function () {
test("should fire shown event", function () {
stop()
var tooltip = $('<div title="tooltip title"></div>')
.bind("shown", function() {
.on("shown.bs.tooltip", function() {
ok(true, "shown was called")
start()
})
@ -89,12 +89,12 @@ $(function () {
test("should not fire shown event when default prevented", function () {
stop()
var tooltip = $('<div title="tooltip title"></div>')
.bind("show", function(e) {
.on("show.bs.tooltip", function(e) {
e.preventDefault()
ok(true, "show was called")
start()
})
.bind("shown", function() {
.on("shown.bs.tooltip", function() {
ok(false, "shown was called")
})
.tooltip('show')
@ -103,10 +103,10 @@ $(function () {
test("should fire hide event", function () {
stop()
var tooltip = $('<div title="tooltip title"></div>')
.bind("shown", function() {
.on("shown.bs.tooltip", function() {
$(this).tooltip('hide')
})
.bind("hide", function() {
.on("hide.bs.tooltip", function() {
ok(true, "hide was called")
start()
})
@ -116,10 +116,10 @@ $(function () {
test("should fire hidden event", function () {
stop()
var tooltip = $('<div title="tooltip title"></div>')
.bind("shown", function() {
.on("shown.bs.tooltip", function() {
$(this).tooltip('hide')
})
.bind("hidden", function() {
.on("hidden.bs.tooltip", function() {
ok(true, "hidden was called")
start()
})
@ -129,15 +129,15 @@ $(function () {
test("should not fire hidden event when default prevented", function () {
stop()
var tooltip = $('<div title="tooltip title"></div>')
.bind("shown", function() {
.on("shown.bs.tooltip", function() {
$(this).tooltip('hide')
})
.bind("hide", function(e) {
.on("hide.bs.tooltip", function(e) {
e.preventDefault()
ok(true, "hide was called")
start()
})
.bind("hidden", function() {
.on("hidden.bs.tooltip", function() {
ok(false, "hidden was called")
})
.tooltip('show')
@ -214,13 +214,13 @@ $(function () {
test("should destroy tooltip", function () {
var tooltip = $('<div/>').tooltip().on('click.foo', function(){})
ok(tooltip.data('tooltip'), 'tooltip has data')
ok(tooltip.data('bs.tooltip'), 'tooltip has data')
ok($._data(tooltip[0], 'events').mouseover && $._data(tooltip[0], 'events').mouseout, 'tooltip has hover event')
ok($._data(tooltip[0], 'events').click[0].namespace == 'foo', 'tooltip has extra click.foo event')
tooltip.tooltip('show')
tooltip.tooltip('destroy')
ok(!tooltip.hasClass('in'), 'tooltip is hidden')
ok(!$._data(tooltip[0], 'tooltip'), 'tooltip does not have data')
ok(!$._data(tooltip[0], 'bs.tooltip'), 'tooltip does not have data')
ok($._data(tooltip[0], 'events').click[0].namespace == 'foo', 'tooltip still has click.foo')
ok(!$._data(tooltip[0], 'events').mouseover && !$._data(tooltip[0], 'events').mouseout, 'tooltip does not have any events')
})

View File

@ -1,6 +1,6 @@
$(function () {
module("bootstrap-transition")
module("transition")
test("should be defined on jquery support object", function () {
ok($.support.transition !== undefined, 'transition object is defined')

353
js/tooltip.js Normal file
View File

@ -0,0 +1,353 @@
/* ========================================================================
* Bootstrap: tooltip.js v3.0.0
* http://twitter.github.com/bootstrap/javascript.html#affix
* Inspired by the original jQuery.tipsy by Jason Frame
* ========================================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ======================================================================== */
+function ($) { "use strict";
// TOOLTIP PUBLIC CLASS DEFINITION
// ===============================
var Tooltip = function (element, options) {
this.type =
this.options =
this.enabled =
this.timeout =
this.hoverState =
this.$element = null
this.init('tooltip', element, options)
}
Tooltip.DEFAULTS = {
animation: true
, placement: 'top'
, selector: false
, template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'
, trigger: 'hover focus'
, title: ''
, delay: 0
, html: false
, container: false
}
Tooltip.prototype.init = function (type, element, options) {
this.enabled = true
this.type = type
this.$element = $(element)
this.options = this.getOptions(options)
var triggers = this.options.trigger.split(' ')
for (var i = triggers.length; i--;) {
var trigger = triggers[i]
if (trigger == 'click') {
this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
} else if (trigger != 'manual') {
var eventIn = trigger == 'hover' ? 'mouseenter' : 'focus'
var eventOut = trigger == 'hover' ? 'mouseleave' : 'blur'
this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
}
}
this.options.selector ?
(this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
this.fixTitle()
}
Tooltip.prototype.getDefaults = function () {
return Tooltip.DEFAULTS
}
Tooltip.prototype.getOptions = function (options) {
options = $.extend({}, this.getDefaults(), this.$element.data(), options)
if (options.delay && typeof options.delay == 'number') {
options.delay = {
show: options.delay
, hide: options.delay
}
}
return options
}
Tooltip.prototype.enter = function (e) {
var defaults = this.getDefaults()
var options = {}
this._options && $.each(this._options, function (key, value) {
if (defaults[key] != value) options[key] = value
})
var self = $(e.currentTarget)[this.type](options).data('bs.' + this.type)
if (!self.options.delay || !self.options.delay.show) return self.show()
clearTimeout(this.timeout)
self.hoverState = 'in'
this.timeout = setTimeout(function() {
if (self.hoverState == 'in') self.show()
}, self.options.delay.show)
}
Tooltip.prototype.leave = function (e) {
var self = $(e.currentTarget)[this.type](this._options).data('bs.' + this.type)
if (this.timeout) clearTimeout(this.timeout)
if (!self.options.delay || !self.options.delay.hide) return self.hide()
self.hoverState = 'out'
this.timeout = setTimeout(function() {
if (self.hoverState == 'out') self.hide()
}, self.options.delay.hide)
}
Tooltip.prototype.show = function () {
var e = $.Event('show.bs.'+ this.type)
if (this.hasContent() && this.enabled) {
this.$element.trigger(e)
if (e.isDefaultPrevented()) return
var $tip = this.tip()
this.setContent()
if (this.options.animation) $tip.addClass('fade')
var placement = typeof this.options.placement == 'function' ?
this.options.placement.call(this, $tip[0], this.$element[0]) :
this.options.placement
$tip
.detach()
.css({ top: 0, left: 0, display: 'block' })
this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
var tp
var pos = this.getPosition()
var actualWidth = $tip[0].offsetWidth
var actualHeight = $tip[0].offsetHeight
switch (placement) {
case 'bottom':
tp = {top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2}
break
case 'top':
tp = {top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2}
break
case 'left':
tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth}
break
case 'right':
tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width}
break
}
this.applyPlacement(tp, placement)
this.$element.trigger('shown.bs.' + this.type)
}
}
Tooltip.prototype.applyPlacement = function(offset, placement) {
var replace
var $tip = this.tip()
var width = $tip[0].offsetWidth
var height = $tip[0].offsetHeight
$tip
.offset(offset)
.addClass(placement)
.addClass('in')
var actualWidth = $tip[0].offsetWidth
var actualHeight = $tip[0].offsetHeight
if (placement == 'top' && actualHeight != height) {
replace = true
offset.top = offset.top + height - actualHeight
}
if (placement == 'bottom' || placement == 'top') {
var delta = 0
if (offset.left < 0){
delta = offset.left * -2
offset.left = 0
$tip.offset(offset)
actualWidth = $tip[0].offsetWidth
actualHeight = $tip[0].offsetHeight
}
this.replaceArrow(delta - width + actualWidth, actualWidth, 'left')
} else {
this.replaceArrow(actualHeight - height, actualHeight, 'top')
}
if (replace) $tip.offset(offset)
}
Tooltip.prototype.replaceArrow = function(delta, dimension, position) {
this.arrow().css(position, delta ? (50 * (1 - delta / dimension) + "%") : '')
}
Tooltip.prototype.setContent = function () {
var $tip = this.tip()
var title = this.getTitle()
$tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)
$tip.removeClass('fade in top bottom left right')
}
Tooltip.prototype.hide = function () {
var that = this
var $tip = this.tip()
var e = $.Event('hide.bs.' + this.type)
this.$element.trigger(e)
if (e.isDefaultPrevented()) return
$tip.removeClass('in')
function removeWithAnimation() {
var timeout = setTimeout(function () {
$tip.off($.support.transition.end).detach()
}, 500)
$tip.one($.support.transition.end, function () {
clearTimeout(timeout)
$tip.detach()
})
}
$.support.transition && this.$tip.hasClass('fade') ?
removeWithAnimation() :
$tip.detach()
this.$element.trigger('hidden.bs.' + this.type)
return this
}
Tooltip.prototype.fixTitle = function () {
var $e = this.$element
if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') {
$e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
}
}
Tooltip.prototype.hasContent = function () {
return this.getTitle()
}
Tooltip.prototype.getPosition = function () {
var el = this.$element[0]
return $.extend({}, (typeof el.getBoundingClientRect == 'function') ? el.getBoundingClientRect() : {
width: el.offsetWidth
, height: el.offsetHeight
}, this.$element.offset())
}
Tooltip.prototype.getTitle = function () {
var title
var $e = this.$element
var o = this.options
title = $e.attr('data-original-title')
|| (typeof o.title == 'function' ? o.title.call($e[0]) : o.title)
return title
}
Tooltip.prototype.tip = function () {
return this.$tip = this.$tip || $(this.options.template)
}
Tooltip.prototype.arrow =function(){
return this.$arrow = this.$arrow || this.tip().find(".tooltip-arrow")
}
Tooltip.prototype.validate = function () {
if (!this.$element[0].parentNode) {
this.hide()
this.$element = null
this.options = null
}
}
Tooltip.prototype.enable = function () {
this.enabled = true
}
Tooltip.prototype.disable = function () {
this.enabled = false
}
Tooltip.prototype.toggleEnabled = function () {
this.enabled = !this.enabled
}
Tooltip.prototype.toggle = function (e) {
var self = e ? $(e.currentTarget)[this.type](this._options).data('bs.' + this.type) : this
self.tip().hasClass('in') ? self.hide() : self.show()
}
Tooltip.prototype.destroy = function () {
this.hide().$element.off('.' + this.type).removeData('bs.' + this.type)
}
// TOOLTIP PLUGIN DEFINITION
// =========================
var old = $.fn.tooltip
$.fn.tooltip = function (option) {
return this.each(function () {
var $this = $(this)
var data = $this.data('bs.tooltip')
var options = typeof option == 'object' && option
if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))
if (typeof option == 'string') data[option]()
})
}
$.fn.tooltip.Constructor = Tooltip
// TOOLTIP NO CONFLICT
// ===================
$.fn.tooltip.noConflict = function () {
$.fn.tooltip = old
return this
}
}(window.jQuery);

47
js/transition.js Normal file
View File

@ -0,0 +1,47 @@
/* ========================================================================
* Bootstrap: transition.js v3.0.0
* http://twitter.github.com/bootstrap/javascript.html#transitions
* ========================================================================
* Copyright 2013 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ======================================================================== */
+function ($) { "use strict";
// CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
// ============================================================
function transitionEnd() {
var el = document.createElement('bootstrap')
var transEndEventNames = {
'WebkitTransition' : 'webkitTransitionEnd'
, 'MozTransition' : 'transitionend'
, 'OTransition' : 'oTransitionEnd otransitionend'
, 'transition' : 'transitionend'
}
for (var name in transEndEventNames) {
if (el.style[name] !== undefined) {
return { end: transEndEventNames[name] }
}
}
}
$(function () {
$.support.transition = transitionEnd()
})
}(window.jQuery);

View File

@ -5,7 +5,7 @@
// Parent container
.accordion {
margin-bottom: @line-height-base;
margin-bottom: @line-height-computed;
}
// Group == heading + body

View File

@ -7,8 +7,8 @@
// -------------------------
.alert {
padding: 8px 35px 8px 14px;
margin-bottom: @line-height-base;
padding: 10px 35px 10px 15px;
margin-bottom: @line-height-computed;
color: @alert-text;
background-color: @alert-bg;
border: 1px solid @alert-border;
@ -24,9 +24,8 @@
hr {
border-top-color: darken(@alert-border, 5%);
}
// Inherit color for immediate links and bolden them some
> a,
> p > a {
// Provide class for links that match alerts
.alert-link {
font-weight: 500;
color: darken(@alert-text, 10%);
}
@ -50,8 +49,7 @@
hr {
border-top-color: darken(@alert-success-border, 5%);
}
> a,
> p > a {
.alert-link {
color: darken(@alert-success-text, 10%);
}
}
@ -62,8 +60,7 @@
hr {
border-top-color: darken(@alert-danger-border, 5%);
}
> a,
> p > a {
.alert-link {
color: darken(@alert-danger-text, 10%);
}
}
@ -74,8 +71,7 @@
hr {
border-top-color: darken(@alert-info-border, 5%);
}
> a,
> p > a {
.alert-link {
color: darken(@alert-info-text, 10%);
}
}
@ -84,8 +80,8 @@
// -------------------------
.alert-block {
padding-top: 14px;
padding-bottom: 14px;
padding-top: 15px;
padding-bottom: 15px;
}
.alert-block > p,
.alert-block > ul {

View File

@ -5,7 +5,7 @@
.breadcrumb {
padding: 8px 15px;
margin: 0 0 @line-height-base;
margin: 0 0 @line-height-computed;
list-style: none;
background-color: #f5f5f5;
border-radius: @border-radius-base;

View File

@ -4,24 +4,21 @@
// Button carets
.btn .caret {
border-top-color: @btn-color;
border-top-color: @btn-default-color;
}
.dropup .btn .caret {
border-bottom-color: @btn-color;
border-bottom-color: @btn-default-color;
}
// Make the div behave like a button
.btn-group {
.btn-group,
.btn-group-vertical {
position: relative;
display: inline-block;
vertical-align: middle; // match .btn alignment given font-size hack above
> .btn {
position: relative;
float: left;
// Prevent double borders when buttons are next to each other
+ btn {
margin-left: -1px;
}
// Bring the "active" button to the front
&:hover,
&:active {
@ -30,6 +27,11 @@
}
}
// Prevent double borders when buttons are next to each other
.btn-group .btn + .btn {
margin-left: -1px;
}
// Optional: Group multiple button groups together for a toolbar
.btn-toolbar {
.clearfix();
@ -46,46 +48,36 @@
}
}
// Float them, remove border radius, then re-add to first and last elements
.btn-group > .btn {
position: relative;
.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {
border-radius: 0;
}
// Set corners individual because sometimes a single button can be in a .btn-group and we need :first-child and :last-child to both match
.btn-group > .btn:first-child {
margin-left: 0;
.border-left-radius(@border-radius-base);
&:not(:last-child):not(.dropdown-toggle) {
.border-right-radius(0);
}
}
// Need .dropdown-toggle since :last-child doesn't apply given a .dropdown-menu immediately after it
.btn-group > .btn:last-child,
.btn-group > .dropdown-toggle {
.border-right-radius(@border-radius-base);
}
// Reset corners for large buttons
.btn-group > .btn.large:first-child {
margin-left: 0;
.border-left-radius(@border-radius-large);
}
.btn-group > .btn.large:last-child,
.btn-group > .large.dropdown-toggle {
.border-right-radius(@border-radius-large);
.btn-group > .btn:last-child:not(:first-child),
.btn-group > .dropdown-toggle:not(:first-child) {
.border-left-radius(0);
}
// Custom edits for including btn-groups within btn-groups (useful for including dropdown buttons within a btn-group)
.btn-group > .btn-group {
float: left;
}
.btn-group > .btn-group > .btn {
.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {
border-radius: 0;
}
.btn-group > .btn-group:last-child > .btn {
.border-right-radius(@border-radius-base);
.btn-group > .btn-group:first-child > .btn:last-child,
.btn-group > .btn-group:first-child > .dropdown-toggle {
.border-right-radius(0);
}
.btn-group > .btn-group:first-child > .btn {
margin-left: 0;
.border-left-radius(@border-radius-base);
.btn-group > .btn-group:last-child > .btn:first-child {
.border-left-radius(0);
}
// On active and open, don't show outline
@ -122,7 +114,6 @@
// Reposition the caret
.btn .caret {
margin-top: 8px;
margin-left: 0;
}
// Carets in other button sizes
@ -143,20 +134,18 @@
float: none;
width: 100%;
max-width: 100%;
+ .btn {
margin-top: -1px;
}
}
.btn-group-vertical .btn:not(:first-child):not(:last-child) {
border-radius: 0;
}
.btn-group-vertical .btn:first-child {
border-radius: 0; // Needs to be here for specificity since we're not zeroing them out again
.border-top-radius(@border-radius-base);
.border-bottom-radius(0);
}
.btn-group-vertical .btn:last-child {
border-radius: 0; // Needs to be here for specificity since we're not zeroing them out again
.border-bottom-radius(@border-radius-base);
}
.btn-group-vertical .btn-large:first-child {
.border-top-radius(@border-radius-large);
}
.btn-group-vertical .btn-large:last-child {
.border-bottom-radius(@border-radius-large);
.border-top-radius(0);
}

View File

@ -9,7 +9,7 @@
// Core styles
.btn {
display: inline-block;
padding: 6px 12px;
padding: @padding-base-vertical @padding-base-horizontal;
margin-bottom: 0; // For input.btn
font-size: @font-size-base;
font-weight: 500;
@ -17,7 +17,7 @@
text-align: center;
vertical-align: middle;
cursor: pointer;
border: 1px solid @btn-border;
border: 1px solid transparent;
border-radius: @border-radius-base;
white-space: nowrap;
@ -50,91 +50,35 @@
}
// Button Sizes
// -------------------------
// Large
.btn-large {
padding: @padding-large;
font-size: @font-size-large;
border-radius: @border-radius-large;
}
// Small
.btn-small {
padding: @padding-small;
font-size: @font-size-small;
border-radius: @border-radius-small;
}
// Mini
.btn-mini {
padding: @padding-mini;
font-size: @font-size-mini;
border-radius: @border-radius-small;
}
// Icons in buttons
// -------------------------
// TODO: figure this shit out
// Block button
// -------------------------
.btn-block {
display: block;
width: 100%;
padding-left: 0;
padding-right: 0;
}
// Vertically space out multiple block buttons
.btn-block + .btn-block {
margin-top: 5px;
}
// Specificity overrides
input[type="submit"],
input[type="reset"],
input[type="button"] {
&.btn-block {
width: 100%;
}
}
// Alternate buttons
// --------------------------------------------------
.btn {
color: @btn-color;
.btn-pseudo-states(@btn-bg, @btn-border);
.btn-default {
.btn-pseudo-states(@btn-default-color, @btn-default-bg, @btn-default-border);
}
.btn-primary {
.btn-pseudo-states(@btn-primary-bg, @btn-primary-border);
.btn-pseudo-states(@btn-primary-color, @btn-primary-bg, @btn-primary-border);
}
// Warning appears as orange
.btn-warning {
.btn-pseudo-states(@btn-warning-bg, @btn-warning-border);
.btn-pseudo-states(@btn-warning-color, @btn-warning-bg, @btn-warning-border);
}
// Danger and error appear as red
.btn-danger {
.btn-pseudo-states(@btn-danger-bg, @btn-danger-border);
.btn-pseudo-states(@btn-danger-color, @btn-danger-bg, @btn-danger-border);
}
// Success appears as green
.btn-success {
.btn-pseudo-states(@btn-success-bg, @btn-success-border);
.btn-pseudo-states(@btn-success-color, @btn-success-bg, @btn-success-border);
}
// Info appears as blue-green
.btn-info {
.btn-pseudo-states(@btn-info-bg, @btn-info-border);
.btn-pseudo-states(@btn-info-color, @btn-info-bg, @btn-info-border);
}
// Link buttons
// --------------------------------------------------
// -------------------------
// Make a button look and behave like a link
.btn-link,
@ -173,3 +117,44 @@ fieldset[disabled] .btn-link {
}
}
}
// Button Sizes
// --------------------------------------------------
.btn-large {
padding: @padding-large-vertical @padding-large-horizontal;
font-size: @font-size-large;
border-radius: @border-radius-large;
}
.btn-small {
padding: @padding-small-vertical @padding-small-horizontal;
font-size: @font-size-small;
line-height: 1.5; // ensure proper height of button next to small input
border-radius: @border-radius-small;
}
// Block button
// --------------------------------------------------
.btn-block {
display: block;
width: 100%;
padding-left: 0;
padding-right: 0;
}
// Vertically space out multiple block buttons
.btn-block + .btn-block {
margin-top: 5px;
}
// Specificity overrides
input[type="submit"],
input[type="reset"],
input[type="button"] {
&.btn-block {
width: 100%;
}
}

View File

@ -128,7 +128,7 @@
position: absolute;
bottom: 20px;
left: 50%;
z-index: 5;
z-index: 15;
width: 100px;
margin: 0 0 0 -50px;
list-style: none;

View File

@ -25,8 +25,8 @@ code {
// Blocks of code
pre {
display: block;
padding: ((@line-height-base - 1) / 2);
margin: 0 0 (@line-height-base / 2);
padding: ((@line-height-computed - 1) / 2);
margin: 0 0 (@line-height-computed / 2);
font-size: (@font-size-base - 1); // 14px to 13px
line-height: @line-height-base;
word-break: break-all;
@ -40,7 +40,7 @@ pre {
// Make prettyprint styles more spaced out for readability
&.prettyprint {
margin-bottom: @line-height-base;
margin-bottom: @line-height-computed;
}
// Account for some code outputs that place code tags in pre tags

View File

@ -11,22 +11,13 @@
}
}
/*.collapse {
position: relative;
height: 0;
overflow: hidden;
.transition(height .35s ease);
&.in {
height: auto;
}
}*/
.collapse {
position: relative;
height: 0;
overflow: hidden;
.transition(height .35s ease);
}
.collapse.in {
&.in {
height: auto;
}
}

View File

@ -3,35 +3,20 @@
// --------------------------------------------------
// Use the .menu class on any <li> element within the topbar or ul.tabs and you'll get some superfancy dropdowns
.dropup,
.dropdown {
position: relative;
}
.dropdown-toggle:active,
.open .dropdown-toggle {
outline: 0;
}
// Dropdown arrow/caret
// --------------------
.caret {
display: inline-block;
width: 0;
height: 0;
vertical-align: top;
margin-left: 2px;
vertical-align: middle;
border-top: 4px solid #000;
border-right: 4px solid transparent;
border-left: 4px solid transparent;
content: "";
}
// Place the caret
.dropdown .caret {
margin-top: 8px;
margin-left: 2px;
}
// The dropdown menu (ul)
// ----------------------
.dropdown-menu {
@ -118,9 +103,27 @@
// Open state for the dropdown
// ---------------------------
.open {
& > .dropdown-menu {
// Show the menu
> .dropdown-menu {
display: block;
}
// Remove the outline when :focus is triggered
> a {
outline: 0;
}
}
// Backdrop to catch body clicks on mobile, etc.
// ---------------------------
.dropdown-backdrop {
position: fixed;
left: 0;
right: 0;
bottom: 0;
top: 0;
z-index: @zindex-dropdown - 10;
}
// Right aligned dropdowns

View File

@ -20,9 +20,9 @@ legend {
display: block;
width: 100%;
padding: 0;
margin-bottom: @line-height-base;
margin-bottom: @line-height-computed;
font-size: (@font-size-base * 1.5);
line-height: (@line-height-base * 2);
line-height: inherit;
color: @gray-dark;
border: 0;
border-bottom: 1px solid #e5e5e5;
@ -54,10 +54,9 @@ input[type="url"],
input[type="search"],
input[type="tel"],
input[type="color"] {
display: inline-block;
display: block;
min-height: @input-height-base; // Make inputs at least the height of their button counterpart (base line-height + padding + border)
padding: 6px 9px;
// margin-bottom: (@line-height-base / 2);
padding: @padding-base-vertical @padding-base-horizontal;
font-size: @font-size-base;
line-height: @line-height-base;
color: @gray;
@ -66,7 +65,13 @@ input[type="color"] {
border: 1px solid @input-border;
border-radius: @input-border-radius;
.box-shadow(inset 0 1px 1px rgba(0,0,0,.075));
.transition(~"border-color linear .2s, box-shadow linear .2s");
.transition(~"border-color ease-in-out .15s, box-shadow ease-in-out .15s");
&:focus {
border-color: rgba(82,168,236,.8);
outline: 0;
.box-shadow(~"inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6)");
}
}
// Reset appearance properties for textual inputs and textarea
@ -98,32 +103,6 @@ textarea {
height: auto;
}
// Everything else
textarea,
input[type="text"],
input[type="password"],
input[type="datetime"],
input[type="datetime-local"],
input[type="date"],
input[type="month"],
input[type="time"],
input[type="week"],
input[type="number"],
input[type="email"],
input[type="url"],
input[type="search"],
input[type="tel"],
input[type="color"] {
// Focus state
&:focus {
border-color: rgba(82,168,236,.8);
outline: 0;
outline: thin dotted \9; /* IE6-9 */
//.box-shadow(~"inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6)");
.box-shadow(0 0 8px rgba(82,168,236,.6));
}
}
// Position radios and checkboxes better
input[type="radio"],
input[type="checkbox"] {
@ -145,8 +124,14 @@ select[size] {
height: auto;
}
// Fix optgroup Firefox bug per https://github.com/twitter/bootstrap/issues/7611
select optgroup {
font-size: inherit;
font-style: inherit;
font-family: inherit;
}
// Focus for select, file, radio, and checkbox
select:focus,
input[type="file"]:focus,
input[type="radio"]:focus,
input[type="checkbox"]:focus {
@ -171,9 +156,11 @@ textarea {
.radio,
.checkbox {
display: block;
min-height: @line-height-base; // clear the floating input if there is no label text
margin-bottom: (@line-height-base / 2);
min-height: @line-height-computed; // clear the floating input if there is no label text
margin-top: 10px;
margin-bottom: 10px;
padding-left: 20px;
vertical-align: middle;
label {
display: inline;
margin-bottom: 0;
@ -181,7 +168,6 @@ textarea {
cursor: pointer;
}
}
.radio input[type="radio"],
.radio-inline input[type="radio"],
.checkbox input[type="checkbox"],
@ -191,7 +177,7 @@ textarea {
}
.radio + .radio,
.checkbox + .checkbox {
margin-top: ((@line-height-base / 4) * -1);
margin-top: -5px; // Move up sibling radios or checkboxes for tighter spacing
}
/*
@ -241,46 +227,19 @@ input[type="search"],
input[type="tel"],
input[type="color"] {
&.input-large {
padding: @padding-large;
padding: @padding-large-vertical @padding-large-horizontal;
font-size: @font-size-large;
border-radius: @border-radius-large;
}
&.input-small {
min-height: @input-height-small;
padding: @padding-small;
padding: @padding-small-vertical @padding-small-horizontal;
font-size: @font-size-small;
border-radius: @border-radius-small;
}
}
// GRID SIZING FOR INPUTS
// ----------------------
// Grid style input sizes
input[class*="span"],
select[class*="span"],
textarea[class*="span"] {
float: none;
margin-left: 0;
margin-right: 0;
}
// Ensure input-prepend/append never wraps
.input-append input[class*="span"],
.input-prepend input[class*="span"] {
display: inline-block;
}
input[class*="span"],
select[class*="span"],
textarea[class*="span"] {
height: @input-height-base;
}
// DISABLED STATE
// --------------
@ -316,15 +275,15 @@ input[type="checkbox"] {
// Warning
.has-warning {
.formFieldState(@state-warning-text, @state-warning-text, @state-warning-bg);
.form-field-validation(@state-warning-text, @state-warning-text, @state-warning-bg);
}
// Error
.has-error {
.formFieldState(@state-danger-text, @state-danger-text, @state-danger-bg);
.form-field-validation(@state-danger-text, @state-danger-text, @state-danger-bg);
}
// Success
.has-success {
.formFieldState(@state-success-text, @state-success-text, @state-success-bg);
.form-field-validation(@state-success-text, @state-success-text, @state-success-bg);
}
// HTML5 invalid states
@ -343,37 +302,15 @@ select:focus:invalid {
// FORM ACTIONS
// ------------
.form-actions {
padding: (@line-height-base - 1) 20px @line-height-base;
margin-top: @line-height-base;
margin-bottom: @line-height-base;
background-color: @form-actions-bg;
border-top: 1px solid #e5e5e5;
.clearfix(); // Adding clearfix to allow for .pull-right button containers
}
// HELP TEXT
// ---------
.help-block,
.help-inline {
color: lighten(@text-color, 25%); // lighten the text some for contrast
}
.help-block {
display: block; // account for any element using help-block
margin-bottom: (@line-height-base / 2);
}
.help-inline {
display: inline-block;
vertical-align: middle;
padding-left: 5px;
margin-top: 5px;
margin-bottom: 10px;
color: lighten(@text-color, 25%); // lighten the text some for contrast
}
@ -387,14 +324,16 @@ select:focus:invalid {
display: table;
// Undo padding and float of grid classes
&[class*="span"] {
&.col {
float: none;
padding: 0;
padding-left: 0;
padding-right: 0;
}
input,
select {
width: 100%;
margin-bottom: 0;
}
}
@ -404,12 +343,8 @@ select:focus:invalid {
.input-group-btn,
.input-group input {
display: table-cell;
margin: 0;
border-radius: 0;
&.input-small {
border-radius: 0;
}
&.input-large {
&:not(:first-child):not(:last-child) {
border-radius: 0;
}
}
@ -424,7 +359,7 @@ select:focus:invalid {
// -------------------------
.input-group-addon {
.box-sizing(border-box);
padding: 6px 8px;
padding: @padding-base-vertical @padding-base-horizontal;
font-size: @font-size-base;
font-weight: normal;
line-height: @line-height-base;
@ -432,40 +367,37 @@ select:focus:invalid {
text-shadow: 0 1px 0 #fff;
background-color: @gray-lighter;
border: 1px solid #ccc;
border-radius: @border-radius-base;
&.input-small {
padding: @padding-small;
padding: @padding-small-vertical @padding-small-horizontal;
font-size: @font-size-small;
border-radius: @border-radius-small;
}
&.input-large {
padding: @padding-large;
padding: @padding-large-vertical @padding-large-horizontal;
font-size: @font-size-large;
border-radius: @border-radius-large;
}
}
// Reset rounded corners
.input-group input:first-child,
.input-group-addon:first-child {
.border-left-radius(@border-radius-base);
&.input-small {
.border-left-radius(@border-radius-small);
}
&.input-large {
.border-left-radius(@border-radius-large);
}
.input-group-addon:first-child,
.input-group-btn:first-child > .btn,
.input-group-btn:first-child > .dropdown-toggle,
.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle) {
.border-right-radius(0);
}
.input-group-addon:first-child {
border-right: 0;
}
.input-group input:last-child,
.input-group-addon:last-child {
.border-right-radius(@border-radius-base);
&.input-small {
.border-right-radius(@border-radius-small);
}
&.input-large {
.border-right-radius(@border-radius-large);
}
.input-group-addon:last-child,
.input-group-btn:last-child > .btn,
.input-group-btn:last-child > .dropdown-toggle,
.input-group-btn:first-child > .btn:not(:first-child) {
.border-left-radius(0);
}
.input-group-addon:last-child {
border-left: 0;
@ -480,7 +412,6 @@ select:focus:invalid {
.input-group-btn > .btn {
position: relative;
float: left; // Collapse white-space
border-radius: 0;
+ .btn {
margin-left: -1px;
}
@ -491,67 +422,42 @@ select:focus:invalid {
}
}
// Prepended buttons
.input-group-btn:first-child {
// Round the left corners only
> .btn:first-child,
> .dropdown-toggle:first-child {
.border-left-radius(@border-radius-base);
&.btn-large { .border-left-radius(@border-radius-large); }
&.btn-small { .border-left-radius(@border-radius-small); }
}
}
// Appended buttons
.input-group-btn:last-child {
// Round the right corners only
> .btn:last-child,
> .dropdown-toggle {
.border-right-radius(@border-radius-base);
&.btn-large { .border-right-radius(@border-radius-large); }
&.btn-small { .border-right-radius(@border-radius-small); }
}
}
// Horizontal forms
// Inline forms
// --------------------------------------------------
@media screen and (min-width: @screen-tablet) {
.form-horizontal {
// Increase spacing between groups
.control-group {
position: relative;
margin-bottom: @line-height-base;
.clearfix();
.form-inline {
input,
select,
textarea {
textarea,
.radio,
.checkbox {
display: inline-block;
}
.radio,
.checkbox {
margin-top: 0;
margin-bottom: 0;
}
}
// Float the labels left
.control-group > .control-label {
float: left;
width: (@component-offset-horizontal - 20);
// Horizontal forms
// --------------------------------------------------
// Horizontal forms are built on grid classes.
.form-horizontal {
.row + .row {
margin-top: 15px;
}
.control-label {
padding-top: 6px;
}
}
// Only right aline form labels here when the columns stop stacking
@media (min-width: 768px) {
.form-horizontal .control-label {
text-align: right;
}
// Move over all input controls and content over
.control-group > .controls {
margin-left: @component-offset-horizontal;
}
// Make sure form actions buttons are aligned with controls
.form-actions {
padding-left: @component-offset-horizontal;
}
}
}

View File

@ -34,6 +34,7 @@
font-style: normal;
font-weight: normal;
line-height: 1;
-webkit-font-smoothing: antialiased;
}
// Individual icons

View File

@ -41,10 +41,6 @@
.container {
max-width: 728px;
}
.row {
margin-left: (@grid-gutter-width / -2);
margin-right: (@grid-gutter-width / -2);
}
}
// Responsive: Desktops and up

View File

@ -67,7 +67,7 @@ a.list-group-item:focus {
// Active class on item itself, not parent
a.list-group-item.active {
z-index: 2; // Place active items above their siblings for proper border styling
color: @list-group-active-text;
color: @list-group-active-color;
background-color: @list-group-active-bg;
border-color: @list-group-active-border;

Some files were not shown because too many files have changed in this diff Show More