@ -0,0 +1,54 @@
|
||||
#!/usr/bin/env python |
||||
# -*- coding: utf-8 -*- |
||||
# This file is part of pygal |
||||
# |
||||
# A python svg graph plotting library |
||||
# Copyright © 2012 Kozea |
||||
# |
||||
# This library is free software: you can redistribute it and/or modify it under |
||||
# the terms of the GNU Lesser General Public License as published by the Free |
||||
# Software Foundation, either version 3 of the License, or (at your option) any |
||||
# later version. |
||||
# |
||||
# This library is distributed in the hope that it will be useful, but WITHOUT |
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
||||
# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more |
||||
# details. |
||||
# |
||||
# You should have received a copy of the GNU Lesser General Public License |
||||
# along with pygal. If not, see <http://www.gnu.org/licenses/>. |
||||
from cabaret import create_app |
||||
import logging |
||||
app = create_app() |
||||
|
||||
try: |
||||
from log_colorizer import make_colored_stream_handler |
||||
handler = make_colored_stream_handler() |
||||
app.logger.handlers = [] |
||||
app.logger.addHandler(handler) |
||||
import werkzeug |
||||
werkzeug._internal._log('debug', '<-- I am with stupid') |
||||
logging.getLogger('werkzeug').handlers = [] |
||||
logging.getLogger('werkzeug').addHandler(handler) |
||||
|
||||
handler.setLevel(logging.DEBUG) |
||||
app.logger.setLevel(logging.DEBUG) |
||||
logging.getLogger('werkzeug').setLevel(logging.DEBUG) |
||||
except: |
||||
pass |
||||
|
||||
|
||||
try: |
||||
import wsreload |
||||
except ImportError: |
||||
app.logger.debug('wsreload not found') |
||||
else: |
||||
url = "http://cabaret.l:12221/*" |
||||
|
||||
def log(httpserver): |
||||
app.logger.debug('WSReloaded after server restart') |
||||
wsreload.monkey_patch_http_server({'url': url}, callback=log) |
||||
app.logger.debug('HTTPServer monkey patched for url %s' % url) |
||||
|
||||
|
||||
app.run(debug=True, threaded=True, host='0.0.0.0', port=12221) |
@ -0,0 +1,49 @@
|
||||
# -*- coding: utf-8 -*- |
||||
# This file is part of pygal |
||||
# |
||||
# A python svg graph plotting library |
||||
# Copyright © 2012 Kozea |
||||
# |
||||
# This library is free software: you can redistribute it and/or modify it under |
||||
# the terms of the GNU Lesser General Public License as published by the Free |
||||
# Software Foundation, either version 3 of the License, or (at your option) any |
||||
# later version. |
||||
# |
||||
# This library is distributed in the hope that it will be useful, but WITHOUT |
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
||||
# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more |
||||
# details. |
||||
# |
||||
# You should have received a copy of the GNU Lesser General Public License |
||||
# along with pygal. If not, see <http://www.gnu.org/licenses/>. |
||||
from flask import Flask, render_template, request |
||||
from pygal import CHARTS_BY_NAME |
||||
from pygal.graph import CHARTS_NAMES |
||||
from pygal.config import Config |
||||
from pygal.style import styles |
||||
from json import loads |
||||
|
||||
|
||||
def create_app(): |
||||
"""Creates the pygal test web app""" |
||||
|
||||
app = Flask(__name__) |
||||
|
||||
@app.route("/") |
||||
def index(): |
||||
configs = Config()._items |
||||
return render_template( |
||||
'index.jinja2', charts_names=CHARTS_NAMES, configs=dict(configs), |
||||
styles_names=styles.keys()) |
||||
|
||||
@app.route("/svg", methods=('POST',)) |
||||
def svg(): |
||||
values = request.values |
||||
chart = CHARTS_BY_NAME[values['type']]( |
||||
disable_xml_declaration=True, |
||||
style=styles[values['style']], **loads(values['opts'])) |
||||
for title, vals in loads(values['vals']).items(): |
||||
chart.add(title, vals) |
||||
return chart.render_response() |
||||
|
||||
return app |
@ -0,0 +1,37 @@
|
||||
# Numerous always-ignore extensions |
||||
*.diff |
||||
*.err |
||||
*.orig |
||||
*.log |
||||
*.rej |
||||
*.swo |
||||
*.swp |
||||
*.zip |
||||
*.vi |
||||
*~ |
||||
*.sass-cache |
||||
|
||||
# OS or Editor folders |
||||
.DS_Store |
||||
._* |
||||
Thumbs.db |
||||
.cache |
||||
.project |
||||
.settings |
||||
.tmproj |
||||
*.esproj |
||||
nbproject |
||||
*.sublime-project |
||||
*.sublime-workspace |
||||
|
||||
# Komodo |
||||
*.komodoproject |
||||
.komodotools |
||||
|
||||
# Folders to ignore |
||||
.hg |
||||
.svn |
||||
.CVS |
||||
.idea |
||||
node_modules |
||||
dist |
@ -0,0 +1,85 @@
|
||||
/* ========================================================== |
||||
* issue-guidelines.js |
||||
* 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. |
||||
* ========================================================== */ |
||||
|
||||
var assert = require('assert') |
||||
|
||||
module.exports = { |
||||
|
||||
'pull-requests': { |
||||
|
||||
'should always be made against -wip branches': function (pull) { |
||||
assert.ok(/\-wip$/.test(pull.base.ref)) |
||||
}, |
||||
|
||||
'should always be made from feature branches': function (pull) { |
||||
assert.notEqual(pull.head.ref, 'master') |
||||
}, |
||||
|
||||
'should always include a unit test if changing js files': function (pull) { |
||||
var hasJS = false |
||||
var hasTests = false |
||||
|
||||
pull.files.forEach(function (file) { |
||||
if (/^js\/[^./]+.js/.test(file.filename)) hasJS = true |
||||
if (/^js\/tests\/unit\/[^.]+.js/.test(file.filename)) hasTests = true |
||||
}) |
||||
|
||||
assert.ok(!hasJS || hasJS && hasTests) |
||||
}, |
||||
|
||||
'after': function (pull) { |
||||
if (pull.reporter.stats.failures) { |
||||
pull.reportFailures(pull.close.bind(pull)) |
||||
} |
||||
} |
||||
|
||||
}, |
||||
|
||||
'issues': { |
||||
|
||||
'before': function (issue) { |
||||
var plus = {} |
||||
var labels = issue.labels.map(function (label) { return label.name }); |
||||
|
||||
if (~labels.indexOf('popular')) return |
||||
|
||||
issue.comments.forEach(function (comment) { |
||||
if (/\+1/.test(comment.body)) plus[comment.user.login] = true |
||||
}) |
||||
|
||||
if (Object.keys(plus).length > 5) { |
||||
issue.tag('popular') |
||||
issue.comment('Tagging this issue as popular, please stop commenting on this issue with +1. thanks!') |
||||
} |
||||
}, |
||||
|
||||
'should include a jsfiddle/jsbin illustrating the problem if tagged with js but not a feature': function (issue) { |
||||
var labels = issue.labels.map(function (label) { return label.name }); |
||||
if (~labels.indexOf('js') && !~labels.indexOf('feature')) assert.ok(/(jsfiddle|jsbin)/.test(issue.body)) |
||||
}, |
||||
|
||||
'after': function (issue) { |
||||
if (issue.reporter.stats.failures) { |
||||
issue.reportFailures(issue.close.bind(issue)) |
||||
} |
||||
} |
||||
|
||||
} |
||||
|
||||
} |
@ -0,0 +1,3 @@
|
||||
language: node_js |
||||
node_js: |
||||
- 0.6 |
@ -0,0 +1,176 @@
|
||||
Apache License |
||||
Version 2.0, January 2004 |
||||
http://www.apache.org/licenses/ |
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION |
||||
|
||||
1. Definitions. |
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction, |
||||
and distribution as defined by Sections 1 through 9 of this document. |
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by |
||||
the copyright owner that is granting the License. |
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all |
||||
other entities that control, are controlled by, or are under common |
||||
control with that entity. For the purposes of this definition, |
||||
"control" means (i) the power, direct or indirect, to cause the |
||||
direction or management of such entity, whether by contract or |
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the |
||||
outstanding shares, or (iii) beneficial ownership of such entity. |
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity |
||||
exercising permissions granted by this License. |
||||
|
||||
"Source" form shall mean the preferred form for making modifications, |
||||
including but not limited to software source code, documentation |
||||
source, and configuration files. |
||||
|
||||
"Object" form shall mean any form resulting from mechanical |
||||
transformation or translation of a Source form, including but |
||||
not limited to compiled object code, generated documentation, |
||||
and conversions to other media types. |
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or |
||||
Object form, made available under the License, as indicated by a |
||||
copyright notice that is included in or attached to the work |
||||
(an example is provided in the Appendix below). |
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object |
||||
form, that is based on (or derived from) the Work and for which the |
||||
editorial revisions, annotations, elaborations, or other modifications |
||||
represent, as a whole, an original work of authorship. For the purposes |
||||
of this License, Derivative Works shall not include works that remain |
||||
separable from, or merely link (or bind by name) to the interfaces of, |
||||
the Work and Derivative Works thereof. |
||||
|
||||
"Contribution" shall mean any work of authorship, including |
||||
the original version of the Work and any modifications or additions |
||||
to that Work or Derivative Works thereof, that is intentionally |
||||
submitted to Licensor for inclusion in the Work by the copyright owner |
||||
or by an individual or Legal Entity authorized to submit on behalf of |
||||
the copyright owner. For the purposes of this definition, "submitted" |
||||
means any form of electronic, verbal, or written communication sent |
||||
to the Licensor or its representatives, including but not limited to |
||||
communication on electronic mailing lists, source code control systems, |
||||
and issue tracking systems that are managed by, or on behalf of, the |
||||
Licensor for the purpose of discussing and improving the Work, but |
||||
excluding communication that is conspicuously marked or otherwise |
||||
designated in writing by the copyright owner as "Not a Contribution." |
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity |
||||
on behalf of whom a Contribution has been received by Licensor and |
||||
subsequently incorporated within the Work. |
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of |
||||
this License, each Contributor hereby grants to You a perpetual, |
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable |
||||
copyright license to reproduce, prepare Derivative Works of, |
||||
publicly display, publicly perform, sublicense, and distribute the |
||||
Work and such Derivative Works in Source or Object form. |
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of |
||||
this License, each Contributor hereby grants to You a perpetual, |
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable |
||||
(except as stated in this section) patent license to make, have made, |
||||
use, offer to sell, sell, import, and otherwise transfer the Work, |
||||
where such license applies only to those patent claims licensable |
||||
by such Contributor that are necessarily infringed by their |
||||
Contribution(s) alone or by combination of their Contribution(s) |
||||
with the Work to which such Contribution(s) was submitted. If You |
||||
institute patent litigation against any entity (including a |
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work |
||||
or a Contribution incorporated within the Work constitutes direct |
||||
or contributory patent infringement, then any patent licenses |
||||
granted to You under this License for that Work shall terminate |
||||
as of the date such litigation is filed. |
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the |
||||
Work or Derivative Works thereof in any medium, with or without |
||||
modifications, and in Source or Object form, provided that You |
||||
meet the following conditions: |
||||
|
||||
(a) You must give any other recipients of the Work or |
||||
Derivative Works a copy of this License; and |
||||
|
||||
(b) You must cause any modified files to carry prominent notices |
||||
stating that You changed the files; and |
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works |
||||
that You distribute, all copyright, patent, trademark, and |
||||
attribution notices from the Source form of the Work, |
||||
excluding those notices that do not pertain to any part of |
||||
the Derivative Works; and |
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its |
||||
distribution, then any Derivative Works that You distribute must |
||||
include a readable copy of the attribution notices contained |
||||
within such NOTICE file, excluding those notices that do not |
||||
pertain to any part of the Derivative Works, in at least one |
||||
of the following places: within a NOTICE text file distributed |
||||
as part of the Derivative Works; within the Source form or |
||||
documentation, if provided along with the Derivative Works; or, |
||||
within a display generated by the Derivative Works, if and |
||||
wherever such third-party notices normally appear. The contents |
||||
of the NOTICE file are for informational purposes only and |
||||
do not modify the License. You may add Your own attribution |
||||
notices within Derivative Works that You distribute, alongside |
||||
or as an addendum to the NOTICE text from the Work, provided |
||||
that such additional attribution notices cannot be construed |
||||
as modifying the License. |
||||
|
||||
You may add Your own copyright statement to Your modifications and |
||||
may provide additional or different license terms and conditions |
||||
for use, reproduction, or distribution of Your modifications, or |
||||
for any such Derivative Works as a whole, provided Your use, |
||||
reproduction, and distribution of the Work otherwise complies with |
||||
the conditions stated in this License. |
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise, |
||||
any Contribution intentionally submitted for inclusion in the Work |
||||
by You to the Licensor shall be under the terms and conditions of |
||||
this License, without any additional terms or conditions. |
||||
Notwithstanding the above, nothing herein shall supersede or modify |
||||
the terms of any separate license agreement you may have executed |
||||
with Licensor regarding such Contributions. |
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade |
||||
names, trademarks, service marks, or product names of the Licensor, |
||||
except as required for reasonable and customary use in describing the |
||||
origin of the Work and reproducing the content of the NOTICE file. |
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or |
||||
agreed to in writing, Licensor provides the Work (and each |
||||
Contributor provides its Contributions) on an "AS IS" BASIS, |
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
||||
implied, including, without limitation, any warranties or conditions |
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A |
||||
PARTICULAR PURPOSE. You are solely responsible for determining the |
||||
appropriateness of using or redistributing the Work and assume any |
||||
risks associated with Your exercise of permissions under this License. |
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory, |
||||
whether in tort (including negligence), contract, or otherwise, |
||||
unless required by applicable law (such as deliberate and grossly |
||||
negligent acts) or agreed to in writing, shall any Contributor be |
||||
liable to You for damages, including any direct, indirect, special, |
||||
incidental, or consequential damages of any character arising as a |
||||
result of this License or out of the use or inability to use the |
||||
Work (including but not limited to damages for loss of goodwill, |
||||
work stoppage, computer failure or malfunction, or any and all |
||||
other commercial damages or losses), even if such Contributor |
||||
has been advised of the possibility of such damages. |
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing |
||||
the Work or Derivative Works thereof, You may choose to offer, |
||||
and charge a fee for, acceptance of support, warranty, indemnity, |
||||
or other liability obligations and/or rights consistent with this |
||||
License. However, in accepting such obligations, You may act only |
||||
on Your own behalf and on Your sole responsibility, not on behalf |
||||
of any other Contributor, and only if You agree to indemnify, |
||||
defend, and hold each Contributor harmless for any liability |
||||
incurred by, or claims asserted against, such Contributor by reason |
||||
of your accepting any such warranty or additional liability. |
||||
|
||||
END OF TERMS AND CONDITIONS |
@ -0,0 +1,108 @@
|
||||
BOOTSTRAP = ./docs/assets/css/bootstrap.css
|
||||
BOOTSTRAP_LESS = ./less/bootstrap.less
|
||||
BOOTSTRAP_RESPONSIVE = ./docs/assets/css/bootstrap-responsive.css
|
||||
BOOTSTRAP_RESPONSIVE_LESS = ./less/responsive.less
|
||||
DATE=$(shell date +%I:%M%p)
|
||||
CHECK=\033[32mâś”\033[39m
|
||||
HR=\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#
|
||||
|
||||
|
||||
#
|
||||
# BUILD DOCS
|
||||
#
|
||||
|
||||
build: |
||||
@echo "\n${HR}"
|
||||
@echo "Building Bootstrap..."
|
||||
@echo "${HR}\n"
|
||||
@jshint js/*.js --config js/.jshintrc
|
||||
@jshint js/tests/unit/*.js --config js/.jshintrc
|
||||
@echo "Running JSHint on javascript... ${CHECK} Done"
|
||||
@recess --compile ${BOOTSTRAP_LESS} > ${BOOTSTRAP}
|
||||
@recess --compile ${BOOTSTRAP_RESPONSIVE_LESS} > ${BOOTSTRAP_RESPONSIVE}
|
||||
@echo "Compiling LESS with Recess... ${CHECK} Done"
|
||||
@node docs/build
|
||||
@cp img/* docs/assets/img/
|
||||
@cp js/*.js docs/assets/js/
|
||||
@cp js/tests/vendor/jquery.js docs/assets/js/
|
||||
@echo "Compiling documentation... ${CHECK} Done"
|
||||
@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
|
||||
@uglifyjs -nc docs/assets/js/bootstrap.js > docs/assets/js/bootstrap.min.tmp.js
|
||||
@echo "/**\n* Bootstrap.js v2.1.1 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
|
||||
@rm docs/assets/js/copyright.js docs/assets/js/bootstrap.min.tmp.js
|
||||
@echo "Compiling and minifying javascript... ${CHECK} Done"
|
||||
@echo "\n${HR}"
|
||||
@echo "Bootstrap successfully built at ${DATE}."
|
||||
@echo "${HR}\n"
|
||||
@echo "Thanks for using Bootstrap,"
|
||||
@echo "<3 @mdo and @fat\n"
|
||||
|
||||
#
|
||||
# RUN JSHINT & QUNIT TESTS IN PHANTOMJS
|
||||
#
|
||||
|
||||
test: |
||||
jshint js/*.js --config js/.jshintrc
|
||||
jshint js/tests/unit/*.js --config js/.jshintrc
|
||||
node js/tests/server.js &
|
||||
phantomjs js/tests/phantom.js "http://localhost:3000/js/tests"
|
||||
kill -9 `cat js/tests/pid.txt`
|
||||
rm js/tests/pid.txt
|
||||
|
||||
#
|
||||
# CLEANS THE ROOT DIRECTORY OF PRIOR BUILDS
|
||||
#
|
||||
|
||||
clean: |
||||
rm -r bootstrap
|
||||
|
||||
#
|
||||
# BUILD SIMPLE BOOTSTRAP DIRECTORY
|
||||
# recess & uglifyjs are required
|
||||
#
|
||||
|
||||
bootstrap: |
||||
mkdir -p bootstrap/img
|
||||
mkdir -p bootstrap/css
|
||||
mkdir -p bootstrap/js
|
||||
cp img/* bootstrap/img/
|
||||
recess --compile ${BOOTSTRAP_LESS} > bootstrap/css/bootstrap.css
|
||||
recess --compress ${BOOTSTRAP_LESS} > bootstrap/css/bootstrap.min.css
|
||||
recess --compile ${BOOTSTRAP_RESPONSIVE_LESS} > bootstrap/css/bootstrap-responsive.css
|
||||
recess --compress ${BOOTSTRAP_RESPONSIVE_LESS} > bootstrap/css/bootstrap-responsive.min.css
|
||||
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
|
||||
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
|
||||
|
||||
#
|
||||
# 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
|
||||
#
|
||||
|
||||
watch: |
||||
echo "Watching less files..."; \
|
||||
watchr -e "watch('less/.*\.less') { system 'make' }"
|
||||
|
||||
#
|
||||
# HAUNT GITHUB ISSUES 4 FAT & MDO ONLY (O_O )
|
||||
#
|
||||
|
||||
haunt: |
||||
@haunt .issue-guidelines.js https://github.com/twitter/bootstrap
|
||||
|
||||
|
||||
.PHONY: docs watch gh-pages |
@ -0,0 +1,139 @@
|
||||
[Twitter Bootstrap](http://twitter.github.com/bootstrap) [![Build Status](https://secure.travis-ci.org/twitter/bootstrap.png)](http://travis-ci.org/twitter/bootstrap) |
||||
================= |
||||
|
||||
Bootstrap is a sleek, intuitive, and powerful front-end framework for faster and easier web development, created and maintained by [Mark Otto](http://twitter.com/mdo) and [Jacob Thornton](http://twitter.com/fat) at Twitter. |
||||
|
||||
To get started, checkout http://getbootstrap.com! |
||||
|
||||
|
||||
|
||||
Quick start |
||||
----------- |
||||
|
||||
Clone the repo, `git clone git://github.com/twitter/bootstrap.git`, or [download the latest release](https://github.com/twitter/bootstrap/zipball/master). |
||||
|
||||
|
||||
|
||||
Versioning |
||||
---------- |
||||
|
||||
For transparency and insight into our release cycle, and for striving to maintain backward compatibility, Bootstrap will be maintained under the Semantic Versioning guidelines as much as possible. |
||||
|
||||
Releases will be numbered with the following format: |
||||
|
||||
`<major>.<minor>.<patch>` |
||||
|
||||
And constructed with the following guidelines: |
||||
|
||||
* Breaking backward compatibility bumps the major (and resets the minor and patch) |
||||
* New additions without breaking backward compatibility bumps the minor (and resets the patch) |
||||
* Bug fixes and misc changes bumps the patch |
||||
|
||||
For more information on SemVer, please visit http://semver.org/. |
||||
|
||||
|
||||
|
||||
Bug tracker |
||||
----------- |
||||
|
||||
Have a bug? Please create an issue here on GitHub that conforms with [necolas's guidelines](https://github.com/necolas/issue-guidelines). |
||||
|
||||
https://github.com/twitter/bootstrap/issues |
||||
|
||||
|
||||
|
||||
Twitter account |
||||
--------------- |
||||
|
||||
Keep up to date on announcements and more by following Bootstrap on Twitter, [@TwBootstrap](http://twitter.com/TwBootstrap). |
||||
|
||||
|
||||
|
||||
Blog |
||||
---- |
||||
|
||||
Read more detailed announcements, discussions, and more on [The Official Twitter Bootstrap Blog](http://blog.getbootstrap.com). |
||||
|
||||
|
||||
|
||||
Mailing list |
||||
------------ |
||||
|
||||
Have a question? Ask on our mailing list! |
||||
|
||||
twitter-bootstrap@googlegroups.com |
||||
|
||||
http://groups.google.com/group/twitter-bootstrap |
||||
|
||||
|
||||
|
||||
IRC |
||||
--- |
||||
|
||||
Server: irc.freenode.net |
||||
|
||||
Channel: ##twitter-bootstrap (the double ## is not a typo) |
||||
|
||||
|
||||
|
||||
Developers |
||||
---------- |
||||
|
||||
We have included a makefile with convenience methods for working with the Bootstrap library. |
||||
|
||||
+ **dependencies** |
||||
Our makefile depends on you having recess, connect, uglify.js, and jshint installed. To install, just run the following command in npm: |
||||
|
||||
``` |
||||
$ npm install recess connect uglify-js jshint -g |
||||
``` |
||||
|
||||
+ **build** - `make` |
||||
Runs the recess compiler to rebuild the `/less` files and compiles the docs pages. Requires recess and uglify-js. <a href="http://twitter.github.com/bootstrap/less.html#compiling">Read more in our docs »</a> |
||||
|
||||
+ **test** - `make test` |
||||
Runs jshint and qunit tests headlessly in [phantomjs](http://code.google.com/p/phantomjs/) (used for ci). Depends on having phantomjs installed. |
||||
|
||||
+ **watch** - `make watch` |
||||
This is a convenience method for watching just Less files and automatically building them whenever you save. Requires the Watchr gem. |
||||
|
||||
|
||||
|
||||
Contributing |
||||
------------ |
||||
|
||||
Please submit all pull requests against *-wip branches. If your unit test contains javascript patches or features, you must include relevant unit tests. Thanks! |
||||
|
||||
|
||||
|
||||
Authors |
||||
------- |
||||
|
||||
**Mark Otto** |
||||
|
||||
+ http://twitter.com/mdo |
||||
+ http://github.com/markdotto |
||||
|
||||
**Jacob Thornton** |
||||
|
||||
+ http://twitter.com/fat |
||||
+ http://github.com/fat |
||||
|
||||
|
||||
|
||||
Copyright and license |
||||
--------------------- |
||||
|
||||
Copyright 2012 Twitter, Inc. |
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); |
||||
you may not use this work except in compliance with the License. |
||||
You may obtain a copy of the License in the LICENSE file, or 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. |
@ -0,0 +1,34 @@
|
||||
{ |
||||
"name": "bootstrap", |
||||
"description": "Sleek, intuitive, and powerful front-end framework for faster and easier web development.", |
||||
"version": "2.1.1", |
||||
"keywords": [ |
||||
"bootstrap", |
||||
"css" |
||||
], |
||||
"homepage": "http://twitter.github.com/bootstrap/", |
||||
"author": { |
||||
"name": "Twitter Inc." |
||||
}, |
||||
"scripts": { |
||||
"test": "make test" |
||||
}, |
||||
"repository": { |
||||
"type": "git", |
||||
"url": "git://github.com/twitter/bootstrap.git" |
||||
}, |
||||
"licenses": [ |
||||
{ |
||||
"type": "Apache-2.0", |
||||
"url": "http://www.apache.org/licenses/LICENSE-2.0" |
||||
} |
||||
], |
||||
"devDependencies": { |
||||
"uglify-js": "1.2.6", |
||||
"jshint": "0.6.1", |
||||
"recess": "1.0.3", |
||||
"connect": "2.1.3" |
||||
}, |
||||
"readme": "[Twitter Bootstrap](http://twitter.github.com/bootstrap) [![Build Status](https://secure.travis-ci.org/twitter/bootstrap.png)](http://travis-ci.org/twitter/bootstrap)\n=================\n\nBootstrap is a sleek, intuitive, and powerful front-end framework for faster and easier web development, created and maintained by [Mark Otto](http://twitter.com/mdo) and [Jacob Thornton](http://twitter.com/fat) at Twitter.\n\nTo get started, checkout http://getbootstrap.com!\n\n\n\nQuick start\n-----------\n\nClone the repo, `git clone git://github.com/twitter/bootstrap.git`, or [download the latest release](https://github.com/twitter/bootstrap/zipball/master).\n\n\n\nVersioning\n----------\n\nFor transparency and insight into our release cycle, and for striving to maintain backward compatibility, Bootstrap will be maintained under the Semantic Versioning guidelines as much as possible.\n\nReleases will be numbered with the following format:\n\n`<major>.<minor>.<patch>`\n\nAnd constructed with the following guidelines:\n\n* Breaking backward compatibility bumps the major (and resets the minor and patch)\n* New additions without breaking backward compatibility bumps the minor (and resets the patch)\n* Bug fixes and misc changes bumps the patch\n\nFor more information on SemVer, please visit http://semver.org/.\n\n\n\nBug tracker\n-----------\n\nHave a bug? Please create an issue here on GitHub that conforms with [necolas's guidelines](https://github.com/necolas/issue-guidelines).\n\nhttps://github.com/twitter/bootstrap/issues\n\n\n\nTwitter account\n---------------\n\nKeep up to date on announcements and more by following Bootstrap on Twitter, [@TwBootstrap](http://twitter.com/TwBootstrap).\n\n\n\nBlog\n----\n\nRead more detailed announcements, discussions, and more on [The Official Twitter Bootstrap Blog](http://blog.getbootstrap.com).\n\n\n\nMailing list\n------------\n\nHave a question? Ask on our mailing list!\n\ntwitter-bootstrap@googlegroups.com\n\nhttp://groups.google.com/group/twitter-bootstrap\n\n\n\nIRC\n---\n\nServer: irc.freenode.net\n\nChannel: ##twitter-bootstrap (the double ## is not a typo)\n\n\n\nDevelopers\n----------\n\nWe have included a makefile with convenience methods for working with the Bootstrap library.\n\n+ **dependencies**\nOur makefile depends on you having recess, connect, uglify.js, and jshint installed. To install, just run the following command in npm:\n\n```\n$ npm install recess connect uglify-js jshint -g\n```\n\n+ **build** - `make`\nRuns the recess compiler to rebuild the `/less` files and compiles the docs pages. Requires recess and uglify-js. <a href=\"http://twitter.github.com/bootstrap/less.html#compiling\">Read more in our docs »</a>\n\n+ **test** - `make test`\nRuns jshint and qunit tests headlessly in [phantomjs](http://code.google.com/p/phantomjs/) (used for ci). Depends on having phantomjs installed.\n\n+ **watch** - `make watch`\nThis is a convenience method for watching just Less files and automatically building them whenever you save. Requires the Watchr gem.\n\n\n\nContributing\n------------\n\nPlease submit all pull requests against *-wip branches. If your unit test contains javascript patches or features, you must include relevant unit tests. Thanks!\n\n\n\nAuthors\n-------\n\n**Mark Otto**\n\n+ http://twitter.com/mdo\n+ http://github.com/markdotto\n\n**Jacob Thornton**\n\n+ http://twitter.com/fat\n+ http://github.com/fat\n\n\n\nCopyright and license\n---------------------\n\nCopyright 2012 Twitter, Inc.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this work except in compliance with the License.\nYou may obtain a copy of the License in the LICENSE file, or at:\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n", |
||||
"_id": "bootstrap@2.1.1" |
||||
} |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 3.9 KiB |
After Width: | Height: | Size: 5.5 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 122 KiB |
After Width: | Height: | Size: 79 KiB |
After Width: | Height: | Size: 48 KiB |
After Width: | Height: | Size: 4.9 KiB |
After Width: | Height: | Size: 6.3 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 39 KiB |
After Width: | Height: | Size: 7.1 KiB |
After Width: | Height: | Size: 46 KiB |
After Width: | Height: | Size: 49 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 5.5 KiB |
After Width: | Height: | Size: 8.6 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 84 B |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 1008 B |
@ -0,0 +1,106 @@
|
||||
## 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') |
||||
|
||||
--- |
||||
|
||||
### PROGRAMATIC 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" |
@ -0,0 +1,154 @@
|
||||
// NOTICE!! DO NOT USE ANY OF THIS JAVASCRIPT
|
||||
// IT'S ALL JUST JUNK FOR OUR DOCS!
|
||||
// ++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
!function ($) { |
||||
|
||||
$(function(){ |
||||
|
||||
var $window = $(window) |
||||
|
||||
// Disable certain links in docs
|
||||
$('section [href^=#]').click(function (e) { |
||||
e.preventDefault() |
||||
}) |
||||
|
||||
// side bar
|
||||
$('.bs-docs-sidenav').affix({ |
||||
offset: { |
||||
top: function () { return $window.width() <= 980 ? 290 : 210 } |
||||
, bottom: 270 |
||||
} |
||||
}) |
||||
|
||||
// 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') |
||||
}) |
||||
|
||||
// add tipsies to grid for scaffolding
|
||||
if ($('#gridSystem').length) { |
||||
$('#gridSystem').tooltip({ |
||||
selector: '.show-grid > div' |
||||
, title: function () { return $(this).width() + 'px' } |
||||
}) |
||||
} |
||||
|
||||
// tooltip demo
|
||||
$('.tooltip-demo').tooltip({ |
||||
selector: "a[rel=tooltip]" |
||||
}) |
||||
|
||||
$('.tooltip-test').tooltip() |
||||
$('.popover-test').popover() |
||||
|
||||
// popover demo
|
||||
$("a[rel=popover]") |
||||
.popover() |
||||
.click(function(e) { |
||||
e.preventDefault() |
||||
}) |
||||
|
||||
// button state demo
|
||||
$('#fat-btn') |
||||
.click(function () { |
||||
var btn = $(this) |
||||
btn.button('loading') |
||||
setTimeout(function () { |
||||
btn.button('reset') |
||||
}, 3000) |
||||
}) |
||||
|
||||
// carousel demo
|
||||
$('#myCarousel').carousel() |
||||
|
||||
// javascript build logic
|
||||
var inputsComponent = $("#components.download input") |
||||
, inputsPlugin = $("#plugins.download input") |
||||
, inputsVariables = $("#variables.download input") |
||||
|
||||
// toggle all plugin checkboxes
|
||||
$('#components.download .toggle-all').on('click', function (e) { |
||||
e.preventDefault() |
||||
inputsComponent.attr('checked', !inputsComponent.is(':checked')) |
||||
}) |
||||
|
||||
$('#plugins.download .toggle-all').on('click', function (e) { |
||||
e.preventDefault() |
||||
inputsPlugin.attr('checked', !inputsPlugin.is(':checked')) |
||||
}) |
||||
|
||||
$('#variables.download .toggle-all').on('click', function (e) { |
||||
e.preventDefault() |
||||
inputsVariables.val('') |
||||
}) |
||||
|
||||
// request built javascript
|
||||
$('.download-btn').on('click', function () { |
||||
|
||||
var css = $("#components.download input:checked") |
||||
.map(function () { return this.value }) |
||||
.toArray() |
||||
, js = $("#plugins.download input:checked") |
||||
.map(function () { return this.value }) |
||||
.toArray() |
||||
, vars = {} |
||||
, img = ['glyphicons-halflings.png', 'glyphicons-halflings-white.png'] |
||||
|
||||
$("#variables.download input") |
||||
.each(function () { |
||||
$(this).val() && (vars[ $(this).prev().text() ] = $(this).val()) |
||||
}) |
||||
|
||||
$.ajax({ |
||||
type: 'POST' |
||||
, url: /\?dev/.test(window.location) ? 'http://localhost:3000' : 'http://bootstrap.herokuapp.com' |
||||
, dataType: 'jsonpi' |
||||
, params: { |
||||
js: js |
||||
, css: css |
||||
, vars: vars |
||||
, img: img |
||||
} |
||||
}) |
||||
}) |
||||
}) |
||||
|
||||
// Modified from the original jsonpi https://github.com/benvinegar/jquery-jsonpi
|
||||
$.ajaxTransport('jsonpi', function(opts, originalOptions, jqXHR) { |
||||
var url = opts.url; |
||||
|
||||
return { |
||||
send: function(_, completeCallback) { |
||||
var name = 'jQuery_iframe_' + jQuery.now() |
||||
, iframe, form |
||||
|
||||
iframe = $('<iframe>') |
||||
.attr('name', name) |
||||
.appendTo('head') |
||||
|
||||
form = $('<form>') |
||||
.attr('method', opts.type) // GET or POST
|
||||
.attr('action', url) |
||||
.attr('target', name) |
||||
|
||||
$.each(opts.params, function(k, v) { |
||||
|
||||
$('<input>') |
||||
.attr('type', 'hidden') |
||||
.attr('name', k) |
||||
.attr('value', typeof v == 'string' ? v : JSON.stringify(v)) |
||||
.appendTo(form) |
||||
}) |
||||
|
||||
form.appendTo('body').submit() |
||||
} |
||||
} |
||||
}) |
||||
|
||||
}(window.jQuery) |
@ -0,0 +1,104 @@
|
||||
/* ========================================================== |
||||
* bootstrap-affix.js v2.1.1 |
||||
* 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)) |
||||
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 |
||||
* ======================= */ |
||||
|
||||
$.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 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); |
@ -0,0 +1,90 @@
|
||||
/* ========================================================== |
||||
* bootstrap-alert.js v2.1.1 |
||||
* 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 |
||||
* ======================= */ |
||||
|
||||
$.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 DATA-API |
||||
* ============== */ |
||||
|
||||
$(function () { |
||||
$('body').on('click.alert.data-api', dismiss, Alert.prototype.close) |
||||
}) |
||||
|
||||
}(window.jQuery); |
@ -0,0 +1,96 @@
|
||||
/* ============================================================ |
||||
* bootstrap-button.js v2.1.1 |
||||
* 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 |
||||
* ======================== */ |
||||
|
||||
$.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 DATA-API |
||||
* =============== */ |
||||
|
||||
$(function () { |
||||
$('body').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); |
@ -0,0 +1,176 @@
|
||||
/* ========================================================== |
||||
* bootstrap-carousel.js v2.1.1 |
||||
* 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.options = options |
||||
this.options.slide && this.slide(this.options.slide) |
||||
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 |
||||
this.options.interval |
||||
&& !this.paused |
||||
&& (this.interval = setInterval($.proxy(this.next, this), this.options.interval)) |
||||
return this |
||||
} |
||||
|
||||
, to: function (pos) { |
||||
var $active = this.$element.find('.item.active') |
||||
, children = $active.parent().children() |
||||
, activePos = children.index($active) |
||||
, that = this |
||||
|
||||
if (pos > (children.length - 1) || pos < 0) return |
||||
|
||||
if (this.sliding) { |
||||
return this.$element.one('slid', function () { |
||||
that.to(pos) |
||||
}) |
||||
} |
||||
|
||||
if (activePos == pos) { |
||||
return this.pause().cycle() |
||||
} |
||||
|
||||
return this.slide(pos > activePos ? 'next' : 'prev', $(children[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() |
||||
} |
||||
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 = $.Event('slide', { |
||||
relatedTarget: $next[0] |
||||
}) |
||||
|
||||
this.sliding = true |
||||
|
||||
isCycling && this.pause() |
||||
|
||||
$next = $next.length ? $next : this.$element.find('.item')[fallback]() |
||||
|
||||
if ($next.hasClass('active')) return |
||||
|
||||
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 |
||||
* ========================== */ |
||||
|
||||
$.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.cycle() |
||||
}) |
||||
} |
||||
|
||||
$.fn.carousel.defaults = { |
||||
interval: 5000 |
||||
, pause: 'hover' |
||||
} |
||||
|
||||
$.fn.carousel.Constructor = Carousel |
||||
|
||||
|
||||
/* CAROUSEL DATA-API |
||||
* ================= */ |
||||
|
||||
$(function () { |
||||
$('body').on('click.carousel.data-api', '[data-slide]', function ( e ) { |
||||
var $this = $(this), href |
||||
, $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
|
||||
, options = !$target.data('modal') && $.extend({}, $target.data(), $this.data()) |
||||
$target.carousel(options) |
||||
e.preventDefault() |
||||
}) |
||||
}) |
||||
|
||||
}(window.jQuery); |
@ -0,0 +1,158 @@
|
||||
/* ============================================================= |
||||
* bootstrap-collapse.js v2.1.1 |
||||
* 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) 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) 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']() |
||||
} |
||||
|
||||
} |
||||
|
||||
|
||||
/* COLLAPSIBLE PLUGIN DEFINITION |
||||
* ============================== */ |
||||
|
||||
$.fn.collapse = function (option) { |
||||
return this.each(function () { |
||||
var $this = $(this) |
||||
, data = $this.data('collapse') |
||||
, options = 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 |
||||
|
||||
|
||||
/* COLLAPSIBLE DATA-API |
||||
* ==================== */ |
||||
|
||||
$(function () { |
||||
$('body').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); |
@ -0,0 +1,150 @@
|
||||
/* ============================================================ |
||||
* bootstrap-dropdown.js v2.1.1 |
||||
* 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)) return $this.click() |
||||
|
||||
$items = $('[role=menu] li:not(.divider) 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() { |
||||
getParent($(toggle)) |
||||
.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) |
||||
$parent.length || ($parent = $this.parent()) |
||||
|
||||
return $parent |
||||
} |
||||
|
||||
|
||||
/* DROPDOWN PLUGIN DEFINITION |
||||
* ========================== */ |
||||
|
||||
$.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 |
||||
|
||||
|
||||
/* APPLY TO STANDARD DROPDOWN ELEMENTS |
||||
* =================================== */ |
||||
|
||||
$(function () { |
||||
$('html') |
||||
.on('click.dropdown.data-api touchstart.dropdown.data-api', clearMenus) |
||||
$('body') |
||||
.on('click.dropdown touchstart.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() }) |
||||
.on('click.dropdown.data-api touchstart.dropdown.data-api' , toggle, Dropdown.prototype.toggle) |
||||
.on('keydown.dropdown.data-api touchstart.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown) |
||||
}) |
||||
|
||||
}(window.jQuery); |
@ -0,0 +1,239 @@
|
||||
/* ========================================================= |
||||
* bootstrap-modal.js v2.1.1 |
||||
* 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 |
||||
|
||||
$('body').addClass('modal-open') |
||||
|
||||
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) |
||||
.focus() |
||||
|
||||
that.enforceFocus() |
||||
|
||||
transition ? |
||||
that.$element.one($.support.transition.end, function () { that.$element.trigger('shown') }) : |
||||
that.$element.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 |
||||
|
||||
$('body').removeClass('modal-open') |
||||
|
||||
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 (that) { |
||||
this.$element |
||||
.hide() |
||||
.trigger('hidden') |
||||
|
||||
this.backdrop() |
||||
} |
||||
|
||||
, removeBackdrop: function () { |
||||
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) |
||||
|
||||
if (this.options.backdrop != 'static') { |
||||
this.$backdrop.click($.proxy(this.hide, this)) |
||||
} |
||||
|
||||
if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
|
||||
|
||||
this.$backdrop.addClass('in') |
||||
|
||||
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, $.proxy(this.removeBackdrop, this)) : |
||||
this.removeBackdrop() |
||||
|
||||
} else if (callback) { |
||||
callback() |
||||
} |
||||
} |
||||
} |
||||
|
||||
|
||||
/* MODAL PLUGIN DEFINITION |
||||
* ======================= */ |
||||
|
||||
$.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 DATA-API |
||||
* ============== */ |
||||
|
||||
$(function () { |
||||
$('body').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() |
||||
}) |
||||
}) |
||||
}) |
||||
|
||||
}(window.jQuery); |
@ -0,0 +1,103 @@
|
||||
/* =========================================================== |
||||
* bootstrap-popover.js v2.1.1 |
||||
* 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 = $e.attr('data-content') |
||||
|| (typeof o.content == 'function' ? o.content.call($e[0]) : o.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 |
||||
* ======================= */ |
||||
|
||||
$.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><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"><p></p></div></div></div>' |
||||
}) |
||||
|
||||
}(window.jQuery); |
@ -0,0 +1,151 @@
|
||||
/* ============================================================= |
||||
* bootstrap-scrollspy.js v2.1.1 |
||||
* 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, 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) |
||||
.parent('.active') |
||||
.removeClass('active') |
||||
|
||||
selector = this.selector |
||||
+ '[data-target="' + target + '"],' |
||||
+ this.selector + '[href="' + target + '"]' |
||||
|
||||
active = $(selector) |
||||
.parent('li') |
||||
.addClass('active') |
||||
|
||||
if (active.parent('.dropdown-menu').length) { |
||||
active = active.closest('li.dropdown').addClass('active') |
||||
} |
||||
|
||||
active.trigger('activate') |
||||
} |
||||
|
||||
} |
||||
|
||||
|
||||
/* SCROLLSPY PLUGIN DEFINITION |
||||
* =========================== */ |
||||
|
||||
$.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 DATA-API |
||||
* ================== */ |
||||
|
||||
$(window).on('load', function () { |
||||
$('[data-spy="scroll"]').each(function () { |
||||
var $spy = $(this) |
||||
$spy.scrollspy($spy.data()) |
||||
}) |
||||
}) |
||||
|
||||
}(window.jQuery); |
@ -0,0 +1,135 @@
|
||||
/* ======================================================== |
||||
* bootstrap-tab.js v2.1.1 |
||||
* 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 a').last()[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 |
||||
* ===================== */ |
||||
|
||||
$.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 DATA-API |
||||
* ============ */ |
||||
|
||||
$(function () { |
||||
$('body').on('click.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) { |
||||
e.preventDefault() |
||||
$(this).tab('show') |
||||
}) |
||||
}) |
||||
|
||||
}(window.jQuery); |
@ -0,0 +1,275 @@
|
||||
/* =========================================================== |
||||
* bootstrap-tooltip.js v2.1.1 |
||||
* 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 |
||||
|
||||
this.type = type |
||||
this.$element = $(element) |
||||
this.options = this.getOptions(options) |
||||
this.enabled = true |
||||
|
||||
if (this.options.trigger == 'click') { |
||||
this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this)) |
||||
} else if (this.options.trigger != 'manual') { |
||||
eventIn = this.options.trigger == 'hover' ? 'mouseenter' : 'focus' |
||||
eventOut = this.options.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, options, this.$element.data()) |
||||
|
||||
if (options.delay && typeof options.delay == 'number') { |
||||
options.delay = { |
||||
show: options.delay |
||||
, hide: options.delay |
||||
} |
||||
} |
||||
|
||||
return options |
||||
} |
||||
|
||||
, enter: function (e) { |
||||
var self = $(e.currentTarget)[this.type](this._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 |
||||
, inside |
||||
, pos |
||||
, actualWidth |
||||
, actualHeight |
||||
, placement |
||||
, tp |
||||
|
||||
if (this.hasContent() && this.enabled) { |
||||
$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 |
||||
|
||||
inside = /in/.test(placement) |
||||
|
||||
$tip |
||||
.remove() |
||||
.css({ top: 0, left: 0, display: 'block' }) |
||||
.appendTo(inside ? this.$element : document.body) |
||||
|
||||
pos = this.getPosition(inside) |
||||
|
||||
actualWidth = $tip[0].offsetWidth |
||||
actualHeight = $tip[0].offsetHeight |
||||
|
||||
switch (inside ? placement.split(' ')[1] : 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 |
||||
} |
||||
|
||||
$tip |
||||
.css(tp) |
||||
.addClass(placement) |
||||
.addClass('in') |
||||
} |
||||
} |
||||
|
||||
, 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() |
||||
|
||||
$tip.removeClass('in') |
||||
|
||||
function removeWithAnimation() { |
||||
var timeout = setTimeout(function () { |
||||
$tip.off($.support.transition.end).remove() |
||||
}, 500) |
||||
|
||||
$tip.one($.support.transition.end, function () { |
||||
clearTimeout(timeout) |
||||
$tip.remove() |
||||
}) |
||||
} |
||||
|
||||
$.support.transition && this.$tip.hasClass('fade') ? |
||||
removeWithAnimation() : |
||||
$tip.remove() |
||||
|
||||
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') || '').removeAttr('title') |
||||
} |
||||
} |
||||
|
||||
, hasContent: function () { |
||||
return this.getTitle() |
||||
} |
||||
|
||||
, getPosition: function (inside) { |
||||
return $.extend({}, (inside ? {top: 0, left: 0} : this.$element.offset()), { |
||||
width: this.$element[0].offsetWidth |
||||
, height: this.$element[0].offsetHeight |
||||
}) |
||||
} |
||||
|
||||
, 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) |
||||
} |
||||
|
||||
, 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 () { |
||||
this[this.tip().hasClass('in') ? 'hide' : 'show']() |
||||
} |
||||
|
||||
, destroy: function () { |
||||
this.hide().$element.off('.' + this.type).removeData(this.type) |
||||
} |
||||
|
||||
} |
||||
|
||||
|
||||
/* TOOLTIP PLUGIN DEFINITION |
||||
* ========================= */ |
||||
|
||||
$.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' |
||||
, title: '' |
||||
, delay: 0 |
||||
, html: true |
||||
} |
||||
|
||||
}(window.jQuery); |
@ -0,0 +1,60 @@
|
||||
/* =================================================== |
||||
* bootstrap-transition.js v2.1.1 |
||||
* 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 ($) { |
||||
|
||||
$(function () { |
||||
|
||||
"use strict"; // jshint ;_;
|
||||
|
||||
|
||||
/* CSS TRANSITION SUPPORT (http://www.modernizr.com/) |
||||
* ======================================================= */ |
||||
|
||||
$.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); |
@ -0,0 +1,300 @@
|
||||
/* ============================================================= |
||||
* bootstrap-typeahead.js v2.1.1 |
||||
* 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.$menu = $(this.options.menu).appendTo('body') |
||||
this.source = this.options.source |
||||
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.offset(), { |
||||
height: this.$element[0].offsetHeight |
||||
}) |
||||
|
||||
this.$menu.css({ |
||||
top: pos.top + pos.height |
||||
, left: pos.left |
||||
}) |
||||
|
||||
this.$menu.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('blur', $.proxy(this.blur, this)) |
||||
.on('keypress', $.proxy(this.keypress, this)) |
||||
.on('keyup', $.proxy(this.keyup, this)) |
||||
|
||||
if ($.browser.chrome || $.browser.webkit || $.browser.msie) { |
||||
this.$element.on('keydown', $.proxy(this.keydown, this)) |
||||
} |
||||
|
||||
this.$menu |
||||
.on('click', $.proxy(this.click, this)) |
||||
.on('mouseenter', 'li', $.proxy(this.mouseenter, this)) |
||||
} |
||||
|
||||
, 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
|
||||
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() |
||||
} |
||||
|
||||
, blur: function (e) { |
||||
var that = this |
||||
setTimeout(function () { that.hide() }, 150) |
||||
} |
||||
|
||||
, click: function (e) { |
||||
e.stopPropagation() |
||||
e.preventDefault() |
||||
this.select() |
||||
} |
||||
|
||||
, mouseenter: function (e) { |
||||
this.$menu.find('.active').removeClass('active') |
||||
$(e.currentTarget).addClass('active') |
||||
} |
||||
|
||||
} |
||||
|
||||
|
||||
/* TYPEAHEAD PLUGIN DEFINITION |
||||
* =========================== */ |
||||
|
||||
$.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 DATA-API |
||||
* ================== */ |
||||
|
||||
$(function () { |
||||
$('body').on('focus.typeahead.data-api', '[data-provide="typeahead"]', function (e) { |
||||
var $this = $(this) |
||||
if ($this.data('typeahead')) return |
||||
e.preventDefault() |
||||
$this.typeahead($this.data()) |
||||
}) |
||||
}) |
||||
|
||||
}(window.jQuery); |
@ -0,0 +1,30 @@
|
||||
.com { color: #93a1a1; } |
||||
.lit { color: #195f91; } |
||||
.pun, .opn, .clo { color: #93a1a1; } |
||||
.fun { color: #dc322f; } |
||||
.str, .atv { color: #D14; } |
||||
.kwd, .prettyprint .tag { color: #1e347b; } |
||||
.typ, .atn, .dec, .var { color: teal; } |
||||
.pln { color: #48484c; } |
||||
|
||||
.prettyprint { |
||||
padding: 8px; |
||||
background-color: #f7f7f9; |
||||
border: 1px solid #e1e1e8; |
||||
} |
||||
.prettyprint.linenums { |
||||
-webkit-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0; |
||||
-moz-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0; |
||||
box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0; |
||||
} |
||||
|
||||
/* Specify class=linenums on a pre to get line numbering */ |
||||
ol.linenums { |
||||
margin: 0 0 0 33px; /* IE indents via margin-left */ |
||||
} |
||||
ol.linenums li { |
||||
padding-left: 12px; |
||||
color: #bebec5; |
||||
line-height: 20px; |
||||
text-shadow: 0 1px 0 #fff; |
||||
} |
@ -0,0 +1,28 @@
|
||||
var q=null;window.PR_SHOULD_USE_CONTINUATION=!0; |
||||
(function(){function L(a){function m(a){var f=a.charCodeAt(0);if(f!==92)return f;var b=a.charAt(1);return(f=r[b])?f:"0"<=b&&b<="7"?parseInt(a.substring(1),8):b==="u"||b==="x"?parseInt(a.substring(2),16):a.charCodeAt(1)}function e(a){if(a<32)return(a<16?"\\x0":"\\x")+a.toString(16);a=String.fromCharCode(a);if(a==="\\"||a==="-"||a==="["||a==="]")a="\\"+a;return a}function h(a){for(var f=a.substring(1,a.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),a= |
||||
[],b=[],o=f[0]==="^",c=o?1:0,i=f.length;c<i;++c){var j=f[c];if(/\\[bdsw]/i.test(j))a.push(j);else{var j=m(j),d;c+2<i&&"-"===f[c+1]?(d=m(f[c+2]),c+=2):d=j;b.push([j,d]);d<65||j>122||(d<65||j>90||b.push([Math.max(65,j)|32,Math.min(d,90)|32]),d<97||j>122||b.push([Math.max(97,j)&-33,Math.min(d,122)&-33]))}}b.sort(function(a,f){return a[0]-f[0]||f[1]-a[1]});f=[];j=[NaN,NaN];for(c=0;c<b.length;++c)i=b[c],i[0]<=j[1]+1?j[1]=Math.max(j[1],i[1]):f.push(j=i);b=["["];o&&b.push("^");b.push.apply(b,a);for(c=0;c< |
||||
f.length;++c)i=f[c],b.push(e(i[0])),i[1]>i[0]&&(i[1]+1>i[0]&&b.push("-"),b.push(e(i[1])));b.push("]");return b.join("")}function y(a){for(var f=a.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),b=f.length,d=[],c=0,i=0;c<b;++c){var j=f[c];j==="("?++i:"\\"===j.charAt(0)&&(j=+j.substring(1))&&j<=i&&(d[j]=-1)}for(c=1;c<d.length;++c)-1===d[c]&&(d[c]=++t);for(i=c=0;c<b;++c)j=f[c],j==="("?(++i,d[i]===void 0&&(f[c]="(?:")):"\\"===j.charAt(0)&& |
||||
(j=+j.substring(1))&&j<=i&&(f[c]="\\"+d[i]);for(i=c=0;c<b;++c)"^"===f[c]&&"^"!==f[c+1]&&(f[c]="");if(a.ignoreCase&&s)for(c=0;c<b;++c)j=f[c],a=j.charAt(0),j.length>=2&&a==="["?f[c]=h(j):a!=="\\"&&(f[c]=j.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return f.join("")}for(var t=0,s=!1,l=!1,p=0,d=a.length;p<d;++p){var g=a[p];if(g.ignoreCase)l=!0;else if(/[a-z]/i.test(g.source.replace(/\\u[\da-f]{4}|\\x[\da-f]{2}|\\[^UXux]/gi,""))){s=!0;l=!1;break}}for(var r= |
||||
{b:8,t:9,n:10,v:11,f:12,r:13},n=[],p=0,d=a.length;p<d;++p){g=a[p];if(g.global||g.multiline)throw Error(""+g);n.push("(?:"+y(g)+")")}return RegExp(n.join("|"),l?"gi":"g")}function M(a){function m(a){switch(a.nodeType){case 1:if(e.test(a.className))break;for(var g=a.firstChild;g;g=g.nextSibling)m(g);g=a.nodeName;if("BR"===g||"LI"===g)h[s]="\n",t[s<<1]=y++,t[s++<<1|1]=a;break;case 3:case 4:g=a.nodeValue,g.length&&(g=p?g.replace(/\r\n?/g,"\n"):g.replace(/[\t\n\r ]+/g," "),h[s]=g,t[s<<1]=y,y+=g.length, |
||||
t[s++<<1|1]=a)}}var e=/(?:^|\s)nocode(?:\s|$)/,h=[],y=0,t=[],s=0,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=document.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);m(a);return{a:h.join("").replace(/\n$/,""),c:t}}function B(a,m,e,h){m&&(a={a:m,d:a},e(a),h.push.apply(h,a.e))}function x(a,m){function e(a){for(var l=a.d,p=[l,"pln"],d=0,g=a.a.match(y)||[],r={},n=0,z=g.length;n<z;++n){var f=g[n],b=r[f],o=void 0,c;if(typeof b=== |
||||
"string")c=!1;else{var i=h[f.charAt(0)];if(i)o=f.match(i[1]),b=i[0];else{for(c=0;c<t;++c)if(i=m[c],o=f.match(i[1])){b=i[0];break}o||(b="pln")}if((c=b.length>=5&&"lang-"===b.substring(0,5))&&!(o&&typeof o[1]==="string"))c=!1,b="src";c||(r[f]=b)}i=d;d+=f.length;if(c){c=o[1];var j=f.indexOf(c),k=j+c.length;o[2]&&(k=f.length-o[2].length,j=k-c.length);b=b.substring(5);B(l+i,f.substring(0,j),e,p);B(l+i+j,c,C(b,c),p);B(l+i+k,f.substring(k),e,p)}else p.push(l+i,b)}a.e=p}var h={},y;(function(){for(var e=a.concat(m), |
||||
l=[],p={},d=0,g=e.length;d<g;++d){var r=e[d],n=r[3];if(n)for(var k=n.length;--k>=0;)h[n.charAt(k)]=r;r=r[1];n=""+r;p.hasOwnProperty(n)||(l.push(r),p[n]=q)}l.push(/[\S\s]/);y=L(l)})();var t=m.length;return e}function u(a){var m=[],e=[];a.tripleQuotedStrings?m.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?m.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/, |
||||
q,"'\"`"]):m.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&e.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var h=a.hashComments;h&&(a.cStyleComments?(h>1?m.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):m.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),e.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):m.push(["com",/^#[^\n\r]*/, |
||||
q,"#"]));a.cStyleComments&&(e.push(["com",/^\/\/[^\n\r]*/,q]),e.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));a.regexLiterals&&e.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]);(h=a.types)&&e.push(["typ",h]);a=(""+a.keywords).replace(/^ | $/g, |
||||
"");a.length&&e.push(["kwd",RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),q]);m.push(["pln",/^\s+/,q," \r\n\t\xa0"]);e.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]);return x(m,e)}function D(a,m){function e(a){switch(a.nodeType){case 1:if(k.test(a.className))break;if("BR"===a.nodeName)h(a), |
||||
a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)e(a);break;case 3:case 4:if(p){var b=a.nodeValue,d=b.match(t);if(d){var c=b.substring(0,d.index);a.nodeValue=c;(b=b.substring(d.index+d[0].length))&&a.parentNode.insertBefore(s.createTextNode(b),a.nextSibling);h(a);c||a.parentNode.removeChild(a)}}}}function h(a){function b(a,d){var e=d?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),g=a.nextSibling;f.appendChild(e);for(var h=g;h;h=g)g=h.nextSibling,f.appendChild(h)}return e} |
||||
for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),e;(e=a.parentNode)&&e.nodeType===1;)a=e;d.push(a)}var k=/(?:^|\s)nocode(?:\s|$)/,t=/\r\n?|\n/,s=a.ownerDocument,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=s.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);for(l=s.createElement("LI");a.firstChild;)l.appendChild(a.firstChild);for(var d=[l],g=0;g<d.length;++g)e(d[g]);m===(m|0)&&d[0].setAttribute("value", |
||||
m);var r=s.createElement("OL");r.className="linenums";for(var n=Math.max(0,m-1|0)||0,g=0,z=d.length;g<z;++g)l=d[g],l.className="L"+(g+n)%10,l.firstChild||l.appendChild(s.createTextNode("\xa0")),r.appendChild(l);a.appendChild(r)}function k(a,m){for(var e=m.length;--e>=0;){var h=m[e];A.hasOwnProperty(h)?window.console&&console.warn("cannot override language handler %s",h):A[h]=a}}function C(a,m){if(!a||!A.hasOwnProperty(a))a=/^\s*</.test(m)?"default-markup":"default-code";return A[a]}function E(a){var m= |
||||
a.g;try{var e=M(a.h),h=e.a;a.a=h;a.c=e.c;a.d=0;C(m,h)(a);var k=/\bMSIE\b/.test(navigator.userAgent),m=/\n/g,t=a.a,s=t.length,e=0,l=a.c,p=l.length,h=0,d=a.e,g=d.length,a=0;d[g]=s;var r,n;for(n=r=0;n<g;)d[n]!==d[n+2]?(d[r++]=d[n++],d[r++]=d[n++]):n+=2;g=r;for(n=r=0;n<g;){for(var z=d[n],f=d[n+1],b=n+2;b+2<=g&&d[b+1]===f;)b+=2;d[r++]=z;d[r++]=f;n=b}for(d.length=r;h<p;){var o=l[h+2]||s,c=d[a+2]||s,b=Math.min(o,c),i=l[h+1],j;if(i.nodeType!==1&&(j=t.substring(e,b))){k&&(j=j.replace(m,"\r"));i.nodeValue= |
||||
j;var u=i.ownerDocument,v=u.createElement("SPAN");v.className=d[a+1];var x=i.parentNode;x.replaceChild(v,i);v.appendChild(i);e<o&&(l[h+1]=i=u.createTextNode(t.substring(b,o)),x.insertBefore(i,v.nextSibling))}e=b;e>=o&&(h+=2);e>=c&&(a+=2)}}catch(w){"console"in window&&console.log(w&&w.stack?w.stack:w)}}var v=["break,continue,do,else,for,if,return,while"],w=[[v,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"], |
||||
"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],F=[w,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],G=[w,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"], |
||||
H=[G,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],w=[w,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],I=[v,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"], |
||||
J=[v,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],v=[v,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],K=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,N=/\S/,O=u({keywords:[F,H,w,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"+ |
||||
I,J,v],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),A={};k(O,["default-code"]);k(x([],[["pln",/^[^<?]+/],["dec",/^<!\w[^>]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]), |
||||
["default-markup","htm","html","mxml","xhtml","xml","xsl"]);k(x([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css", |
||||
/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);k(x([],[["atv",/^[\S\s]+/]]),["uq.val"]);k(u({keywords:F,hashComments:!0,cStyleComments:!0,types:K}),["c","cc","cpp","cxx","cyc","m"]);k(u({keywords:"null,true,false"}),["json"]);k(u({keywords:H,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:K}),["cs"]);k(u({keywords:G,cStyleComments:!0}),["java"]);k(u({keywords:v,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]);k(u({keywords:I,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}), |
||||
["cv","py"]);k(u({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]);k(u({keywords:J,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]);k(u({keywords:w,cStyleComments:!0,regexLiterals:!0}),["js"]);k(u({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes", |
||||
hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);k(x([],[["str",/^[\S\s]+/]]),["regex"]);window.prettyPrintOne=function(a,m,e){var h=document.createElement("PRE");h.innerHTML=a;e&&D(h,e);E({g:m,i:e,h:h});return h.innerHTML};window.prettyPrint=function(a){function m(){for(var e=window.PR_SHOULD_USE_CONTINUATION?l.now()+250:Infinity;p<h.length&&l.now()<e;p++){var n=h[p],k=n.className;if(k.indexOf("prettyprint")>=0){var k=k.match(g),f,b;if(b= |
||||
!k){b=n;for(var o=void 0,c=b.firstChild;c;c=c.nextSibling)var i=c.nodeType,o=i===1?o?b:c:i===3?N.test(c.nodeValue)?b:o:o;b=(f=o===b?void 0:o)&&"CODE"===f.tagName}b&&(k=f.className.match(g));k&&(k=k[1]);b=!1;for(o=n.parentNode;o;o=o.parentNode)if((o.tagName==="pre"||o.tagName==="code"||o.tagName==="xmp")&&o.className&&o.className.indexOf("prettyprint")>=0){b=!0;break}b||((b=(b=n.className.match(/\blinenums\b(?::(\d+))?/))?b[1]&&b[1].length?+b[1]:!0:!1)&&D(n,b),d={g:k,h:n,i:b},E(d))}}p<h.length?setTimeout(m, |
||||
250):a&&a()}for(var e=[document.getElementsByTagName("pre"),document.getElementsByTagName("code"),document.getElementsByTagName("xmp")],h=[],k=0;k<e.length;++k)for(var t=0,s=e[k].length;t<s;++t)h.push(e[k][t]);var e=q,l=Date;l.now||(l={now:function(){return+new Date}});var p=0,d,g=/\blang(?:uage)?-([\w.]+)(?!\S)/;m()};window.PR={createSimpleLexer:x,registerLangHandler:k,sourceDecorator:u,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit", |
||||
PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ"}})(); |
@ -0,0 +1,44 @@
|
||||
#!/usr/bin/env node
|
||||
var hogan = require('hogan.js') |
||||
, fs = require('fs') |
||||
, prod = process.argv[2] == 'production' |
||||
, title = 'Twitter Bootstrap' |
||||
|
||||
var layout, pages |
||||
|
||||
// compile layout template
|
||||
layout = fs.readFileSync(__dirname + '/../templates/layout.mustache', 'utf-8') |
||||
layout = hogan.compile(layout, { sectionTags: [{o:'_i', c:'i'}] }) |
||||
|
||||
// retrieve pages
|
||||
pages = fs.readdirSync(__dirname + '/../templates/pages') |
||||
|
||||
// iterate over pages
|
||||
pages.forEach(function (name) { |
||||
|
||||
if (!name.match(/\.mustache$/)) return |
||||
|
||||
var page = fs.readFileSync(__dirname + '/../templates/pages/' + name, 'utf-8') |
||||
, context = {} |
||||
|
||||
context[name.replace(/\.mustache$/, '')] = 'active' |
||||
context._i = true |
||||
context.production = prod |
||||
context.title = name |
||||
.replace(/\.mustache/, '') |
||||
.replace(/\-.*/, '') |
||||
.replace(/(.)/, function ($1) { return $1.toUpperCase() }) |
||||
|
||||
if (context.title == 'Index') { |
||||
context.title = title |
||||
} else { |
||||
context.title += ' · ' + title |
||||
} |
||||
|
||||
page = hogan.compile(page, { sectionTags: [{o:'_i', c:'i'}] }) |
||||
page = layout.render(context, { |
||||
body: page |
||||
}) |
||||
|
||||
fs.writeFileSync(__dirname + '/../' + name.replace(/mustache$/, 'html'), page, 'utf-8') |
||||
}) |
@ -0,0 +1,6 @@
|
||||
{ |
||||
"name": "bootstrap-doc-builder" |
||||
, "version": "0.0.1" |
||||
, "description": "build bootstrap docs" |
||||
, "dependencies": { "hogan.js": "1.0.5-dev" } |
||||
} |
@ -0,0 +1,480 @@
|
||||
<!DOCTYPE html> |
||||
<html lang="en"> |
||||
<head> |
||||
<meta charset="utf-8"> |
||||
<title>Customize · Twitter Bootstrap</title> |
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
||||
<meta name="description" content=""> |
||||
<meta name="author" content=""> |
||||
|
||||
<!-- Le styles --> |
||||
<link href="assets/css/bootstrap.css" rel="stylesheet"> |
||||
<link href="assets/css/bootstrap-responsive.css" rel="stylesheet"> |
||||
<link href="assets/css/docs.css" rel="stylesheet"> |
||||
<link href="assets/js/google-code-prettify/prettify.css" rel="stylesheet"> |
||||
|
||||
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements --> |
||||
<!--[if lt IE 9]> |
||||
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> |
||||
<![endif]--> |
||||
|
||||
<!-- Le fav and touch icons --> |
||||
<link rel="shortcut icon" href="assets/ico/favicon.ico"> |
||||
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="assets/ico/apple-touch-icon-144-precomposed.png"> |
||||
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="assets/ico/apple-touch-icon-114-precomposed.png"> |
||||
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="assets/ico/apple-touch-icon-72-precomposed.png"> |
||||
<link rel="apple-touch-icon-precomposed" href="assets/ico/apple-touch-icon-57-precomposed.png"> |
||||
|
||||
</head> |
||||
|
||||
<body data-spy="scroll" data-target=".bs-docs-sidebar"> |
||||
|
||||
<!-- Navbar |
||||
================================================== --> |
||||
<div class="navbar navbar-inverse navbar-fixed-top"> |
||||
<div class="navbar-inner"> |
||||
<div class="container"> |
||||
<button type="button" class="btn btn-navbar" 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="brand" href="./index.html">Bootstrap</a> |
||||
<div class="nav-collapse collapse"> |
||||
<ul class="nav"> |
||||
<li class=""> |
||||
<a href="./index.html">Home</a> |
||||
</li> |
||||
<li class=""> |
||||
<a href="./getting-started.html">Get started</a> |
||||
</li> |
||||
<li class=""> |
||||
<a href="./scaffolding.html">Scaffolding</a> |
||||
</li> |
||||
<li class=""> |
||||
<a href="./base-css.html">Base CSS</a> |
||||
</li> |
||||
<li class=""> |
||||
<a href="./components.html">Components</a> |
||||
</li> |
||||
<li class=""> |
||||
<a href="./javascript.html">Javascript</a> |
||||
</li> |
||||
<li class="active"> |
||||
<a href="./customize.html">Customize</a> |
||||
</li> |
||||
</ul> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
<!-- Masthead |
||||
================================================== --> |
||||
<header class="jumbotron subhead" id="overview"> |
||||
<div class="container"> |
||||
<h1>Customize and download</h1> |
||||
<p class="lead"><a href="https://github.com/twitter/bootstrap/zipball/master">Download Bootstrap</a> or customize variables, components, javascript plugins, and more.</p> |
||||
</div> |
||||
</header> |
||||
|
||||
|
||||
<div class="container"> |
||||
|
||||
<!-- Docs nav |
||||
================================================== --> |
||||
<div class="row"> |
||||
<div class="span3 bs-docs-sidebar"> |
||||
<ul class="nav nav-list bs-docs-sidenav"> |
||||
<li><a href="#components"><i class="icon-chevron-right"></i> 1. Choose components</a></li> |
||||
<li><a href="#plugins"><i class="icon-chevron-right"></i> 2. Select jQuery plugins</a></li> |
||||
<li><a href="#variables"><i class="icon-chevron-right"></i> 3. Customize variables</a></li> |
||||
<li><a href="#download"><i class="icon-chevron-right"></i> 4. Download</a></li> |
||||
</ul> |
||||
</div> |
||||
<div class="span9"> |
||||
|
||||
|
||||
<!-- Customize form |
||||
================================================== --> |
||||
<form> |
||||
<section class="download" id="components"> |
||||
<div class="page-header"> |
||||
<a class="btn btn-small pull-right toggle-all" href="#">Toggle all</a> |
||||
<h1> |
||||
1. Choose components |
||||
</h1> |
||||
</div> |
||||
<div class="row download-builder"> |
||||
<div class="span3"> |
||||
<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="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="span3"> |
||||
<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> |
||||
<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="span3"> |
||||
<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> |
||||
|
||||
<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> |
||||
</div> |
||||
<div class="row download-builder"> |
||||
<div class="span3"> |
||||
<label class="checkbox"> |
||||
<input type="checkbox" checked="true" value="bootstrap-transition.js"> |
||||
Transitions <small>(required for any animation)</small> |
||||
</label> |
||||
<label class="checkbox"> |
||||
<input type="checkbox" checked="true" value="bootstrap-modal.js"> |
||||
Modals |
||||
</label> |
||||
<label class="checkbox"> |
||||
<input type="checkbox" checked="true" value="bootstrap-dropdown.js"> |
||||
Dropdowns |
||||
</label> |
||||
<label class="checkbox"> |
||||
<input type="checkbox" checked="true" value="bootstrap-scrollspy.js"> |
||||
Scrollspy |
||||
</label> |
||||
<label class="checkbox"> |
||||
<input type="checkbox" checked="true" value="bootstrap-tab.js"> |
||||
Togglable tabs |
||||
</label> |
||||
<label class="checkbox"> |
||||
<input type="checkbox" checked="true" value="bootstrap-tooltip.js"> |
||||
Tooltips |
||||
</label> |
||||
<label class="checkbox"> |
||||
<input type="checkbox" checked="true" value="bootstrap-popover.js"> |
||||
Popovers <small>(requires Tooltips)</small> |
||||
</label> |
||||
</div><!-- /span --> |
||||
<div class="span3"> |
||||
<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"> |
||||
Buttons |
||||
</label> |
||||
<label class="checkbox"> |
||||
<input type="checkbox" checked="true" value="bootstrap-collapse.js"> |
||||
Collapse |
||||
</label> |
||||
<label class="checkbox"> |
||||
<input type="checkbox" checked="true" value="bootstrap-carousel.js"> |
||||
Carousel |
||||
</label> |
||||
<label class="checkbox"> |
||||
<input type="checkbox" checked="true" value="bootstrap-typeahead.js"> |
||||
Typeahead |
||||
</label> |
||||
</div><!-- /span --> |
||||
<div class="span3"> |
||||
<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="span3"> |
||||
<h3>Scaffolding</h3> |
||||
<label>@bodyBackground</label> |
||||
<input type="text" class="span3" placeholder="@white"> |
||||
<label>@textColor</label> |
||||
<input type="text" class="span3" placeholder="@grayDark"> |
||||
|
||||
<h3>Links</h3> |
||||
<label>@linkColor</label> |
||||
<input type="text" class="span3" placeholder="#08c"> |
||||
<label>@linkColorHover</label> |
||||
<input type="text" class="span3" placeholder="darken(@linkColor, 15%)"> |
||||
<h3>Colors</h3> |
||||
<label>@blue</label> |
||||
<input type="text" class="span3" placeholder="#049cdb"> |
||||
<label>@green</label> |
||||
<input type="text" class="span3" placeholder="#46a546"> |
||||
<label>@red</label> |
||||
<input type="text" class="span3" placeholder="#9d261d"> |
||||
<label>@yellow</label> |
||||
<input type="text" class="span3" placeholder="#ffc40d"> |
||||
<label>@orange</label> |
||||
<input type="text" class="span3" placeholder="#f89406"> |
||||
<label>@pink</label> |
||||
<input type="text" class="span3" placeholder="#c3325f"> |
||||
<label>@purple</label> |
||||
<input type="text" class="span3" placeholder="#7a43b6"> |
||||
|
||||
<h3>Sprites</h3> |
||||
<label>@iconSpritePath</label> |
||||
<input type="text" class="span3" placeholder="'../img/glyphicons-halflings.png'"> |
||||
<label>@iconWhiteSpritePath</label> |
||||
<input type="text" class="span3" placeholder="'../img/glyphicons-halflings-white.png'"> |
||||
|
||||
<h3>Grid system</h3> |
||||
<label>@gridColumns</label> |
||||
<input type="text" class="span3" placeholder="12"> |
||||
<label>@gridColumnWidth</label> |
||||
<input type="text" class="span3" placeholder="60px"> |
||||
<label>@gridGutterWidth</label> |
||||
<input type="text" class="span3" placeholder="20px"> |
||||
<label>@gridColumnWidth1200</label> |
||||
<input type="text" class="span3" placeholder="70px"> |
||||
<label>@gridGutterWidth1200</label> |
||||
<input type="text" class="span3" placeholder="30px"> |
||||
<label>@gridColumnWidth768</label> |
||||
<input type="text" class="span3" placeholder="42px"> |
||||
<label>@gridGutterWidth768</label> |
||||
<input type="text" class="span3" placeholder="20px"> |
||||
|
||||
</div><!-- /span --> |
||||
<div class="span3"> |
||||
|
||||
<h3>Typography</h3> |
||||
<label>@sansFontFamily</label> |
||||
<input type="text" class="span3" placeholder="'Helvetica Neue', Helvetica, Arial, sans-serif"> |
||||
<label>@serifFontFamily</label> |
||||
<input type="text" class="span3" placeholder="Georgia, 'Times New Roman', Times, serif"> |
||||
<label>@monoFontFamily</label> |
||||
<input type="text" class="span3" placeholder="Menlo, Monaco, 'Courier New', monospace"> |
||||
<label>@baseFontSize</label> |
||||
<input type="text" class="span3" placeholder="14px"> |
||||
<label>@baseFontFamily</label> |
||||
<input type="text" class="span3" placeholder="@sansFontFamily"> |
||||
<label>@baseLineHeight</label> |
||||
<input type="text" class="span3" placeholder="20px"> |
||||
<label>@altFontFamily</label> |
||||
<input type="text" class="span3" placeholder="@serifFontFamily"> |
||||
<label>@headingsFontFamily</label> |
||||
<input type="text" class="span3" placeholder="inherit"> |
||||
<label>@headingsFontWeight</label> |
||||
<input type="text" class="span3" placeholder="bold"> |
||||
<label>@headingsColor</label> |
||||
<input type="text" class="span3" placeholder="inherit"> |
||||
<label>@heroUnitBackground</label> |
||||
<input type="text" class="span3" placeholder="@grayLighter"> |
||||
<label>@heroUnitHeadingColor</label> |
||||
<input type="text" class="span3" placeholder="inherit"> |
||||
<label>@heroUnitLeadColor</label> |
||||
<input type="text" class="span3" placeholder="inherit"> |
||||
|
||||
<h3>Tables</h3> |
||||
<label>@tableBackground</label> |
||||
<input type="text" class="span3" placeholder="transparent"> |
||||
<label>@tableBackgroundAccent</label> |
||||
<input type="text" class="span3" placeholder="#f9f9f9"> |
||||
<label>@tableBackgroundHover</label> |
||||
<input type="text" class="span3" placeholder="#f5f5f5"> |
||||
<label>@tableBorder</label> |
||||
<input type="text" class="span3" placeholder="#ddd"> |
||||
|
||||
<h3>Forms</h3> |
||||
<label>@placeholderText</label> |
||||
<input type="text" class="span3" placeholder="@grayLight"> |
||||
<label>@inputBackground</label> |
||||
<input type="text" class="span3" placeholder="@white"> |
||||
<label>@inputBorder</label> |
||||
<input type="text" class="span3" placeholder="#ccc"> |
||||
<label>@inputBorderRadius</label> |
||||
<input type="text" class="span3" placeholder="3px"> |
||||
<label>@inputDisabledBackground</label> |
||||
<input type="text" class="span3" placeholder="@grayLighter"> |
||||
<label>@formActionsBackground</label> |
||||
<input type="text" class="span3" placeholder="#f5f5f5"> |
||||
<label>@btnPrimaryBackground</label> |
||||
<input type="text" class="span3" placeholder="@linkColor"> |
||||
<label>@btnPrimaryBackgroundHighlight</label> |
||||
<input type="text" class="span3" placeholder="darken(@white, 10%);"> |
||||
|
||||
</div><!-- /span --> |
||||
<div class="span3"> |
||||
|
||||
<h3>Form states & alerts</h3> |
||||
<label>@warningText</label> |
||||
<input type="text" class="span3" placeholder="#c09853"> |
||||
<label>@warningBackground</label> |
||||
<input type="text" class="span3" placeholder="#fcf8e3"> |
||||
<label>@errorText</label> |
||||
<input type="text" class="span3" placeholder="#b94a48"> |
||||
<label>@errorBackground</label> |
||||
<input type="text" class="span3" placeholder="#f2dede"> |
||||
<label>@successText</label> |
||||
<input type="text" class="span3" placeholder="#468847"> |
||||
<label>@successBackground</label> |
||||
<input type="text" class="span3" placeholder="#dff0d8"> |
||||
<label>@infoText</label> |
||||
<input type="text" class="span3" placeholder="#3a87ad"> |
||||
<label>@infoBackground</label> |
||||
<input type="text" class="span3" placeholder="#d9edf7"> |
||||
|
||||
<h3>Navbar</h3> |
||||
<label>@navbarHeight</label> |
||||
<input type="text" class="span3" placeholder="40px"> |
||||
<label>@navbarBackground</label> |
||||
<input type="text" class="span3" placeholder="@grayDarker"> |
||||
<label>@navbarBackgroundHighlight</label> |
||||
<input type="text" class="span3" placeholder="@grayDark"> |
||||
<label>@navbarText</label> |
||||
<input type="text" class="span3" placeholder="@grayLight"> |
||||
<label>@navbarBrandColor</label> |
||||
<input type="text" class="span3" placeholder="@navbarLinkColor"> |
||||
<label>@navbarLinkColor</label> |
||||
<input type="text" class="span3" placeholder="@grayLight"> |
||||
<label>@navbarLinkColorHover</label> |
||||
<input type="text" class="span3" placeholder="@white"> |
||||
<label>@navbarLinkColorActive</label> |
||||
<input type="text" class="span3" placeholder="@navbarLinkColorHover"> |
||||
<label>@navbarLinkBackgroundHover</label> |
||||
<input type="text" class="span3" placeholder="transparent"> |
||||
<label>@navbarLinkBackgroundActive</label> |
||||
<input type="text" class="span3" placeholder="@navbarBackground"> |
||||
<label>@navbarSearchBackground</label> |
||||
<input type="text" class="span3" placeholder="lighten(@navbarBackground, 25%)"> |
||||
<label>@navbarSearchBackgroundFocus</label> |
||||
<input type="text" class="span3" placeholder="@white"> |
||||
<label>@navbarSearchBorder</label> |
||||
<input type="text" class="span3" placeholder="darken(@navbarSearchBackground, 30%)"> |
||||
<label>@navbarSearchPlaceholderColor</label> |
||||
<input type="text" class="span3" placeholder="#ccc"> |
||||
|
||||
<h3>Dropdowns</h3> |
||||
<label>@dropdownBackground</label> |
||||
<input type="text" class="span3" placeholder="@white"> |
||||
<label>@dropdownBorder</label> |
||||
<input type="text" class="span3" placeholder="rgba(0,0,0,.2)"> |
||||
<label>@dropdownLinkColor</label> |
||||
<input type="text" class="span3" placeholder="@grayDark"> |
||||
<label>@dropdownLinkColorHover</label> |
||||
<input type="text" class="span3" placeholder="@white"> |
||||
<label>@dropdownLinkBackgroundHover</label> |
||||
<input type="text" class="span3" placeholder="@linkColor"> |
||||
</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="#" >Customize and Download</a> |
||||
<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 --> |
||||
</form> |
||||
|
||||
|
||||
|
||||
</div> |
||||
</div> |
||||
|
||||
</div> |
||||
|
||||
|
||||
|
||||
<!-- Footer |
||||
================================================== --> |
||||
<footer class="footer"> |
||||
<div class="container"> |
||||
<p class="pull-right"><a href="#">Back to top</a></p> |
||||
<p>Designed and built with all the love in the world <a href="http://twitter.com/twitter" target="_blank">@twitter</a> 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 the <a href="http://www.apache.org/licenses/LICENSE-2.0" target="_blank">Apache License v2.0</a>. Documentation licensed under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.</p> |
||||
<p>Icons from <a href="http://glyphicons.com">Glyphicons Free</a>, licensed under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.</p> |
||||
<ul class="footer-links"> |
||||
<li><a href="http://blog.getbootstrap.com">Read the blog</a></li> |
||||
<li><a href="https://github.com/twitter/bootstrap/issues?state=open">Submit issues</a></li> |
||||
<li><a href="https://github.com/twitter/bootstrap/wiki">Roadmap and changelog</a></li> |
||||
</ul> |
||||
</div> |
||||
</footer> |
||||
|
||||
|
||||
|
||||
<!-- Le javascript |
||||
================================================== --> |
||||
<!-- Placed at the end of the document so the pages load faster --> |
||||
<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script> |
||||
<script src="assets/js/jquery.js"></script> |
||||
<script src="assets/js/google-code-prettify/prettify.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/application.js"></script> |
||||
|
||||
|
||||
|
||||
</body> |
||||
</html> |
@ -0,0 +1,154 @@
|
||||
<!DOCTYPE html> |
||||
<html lang="en"> |
||||
<head> |
||||
<meta charset="utf-8"> |
||||
<title>Bootstrap, from Twitter</title> |
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
||||
<meta name="description" content=""> |
||||
<meta name="author" content=""> |
||||
|
||||
<!-- Le styles --> |
||||
<link href="../assets/css/bootstrap.css" rel="stylesheet"> |
||||
<style type="text/css"> |
||||
body { |
||||
padding-top: 60px; |
||||
padding-bottom: 40px; |
||||
} |
||||
.sidebar-nav { |
||||
padding: 9px 0; |
||||
} |
||||
</style> |
||||
<link href="../assets/css/bootstrap-responsive.css" rel="stylesheet"> |
||||
|
||||
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements --> |
||||
<!--[if lt IE 9]> |
||||
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> |
||||
<![endif]--> |
||||
|
||||
<!-- Le fav and touch icons --> |
||||
<link rel="shortcut icon" href="../assets/ico/favicon.ico"> |
||||
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="../assets/ico/apple-touch-icon-144-precomposed.png"> |
||||
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="../assets/ico/apple-touch-icon-114-precomposed.png"> |
||||
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="../assets/ico/apple-touch-icon-72-precomposed.png"> |
||||
<link rel="apple-touch-icon-precomposed" href="../assets/ico/apple-touch-icon-57-precomposed.png"> |
||||
</head> |
||||
|
||||
<body> |
||||
|
||||
<div class="navbar navbar-inverse navbar-fixed-top"> |
||||
<div class="navbar-inner"> |
||||
<div class="container-fluid"> |
||||
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> |
||||
<span class="icon-bar"></span> |
||||
<span class="icon-bar"></span> |
||||
<span class="icon-bar"></span> |
||||
</a> |
||||
<a class="brand" href="#">Project name</a> |
||||
<div class="nav-collapse collapse"> |
||||
<p class="navbar-text pull-right"> |
||||
Logged in as <a href="#" class="navbar-link">Username</a> |
||||
</p> |
||||
<ul class="nav"> |
||||
<li class="active"><a href="#">Home</a></li> |
||||
<li><a href="#about">About</a></li> |
||||
<li><a href="#contact">Contact</a></li> |
||||
</ul> |
||||
</div><!--/.nav-collapse --> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
<div class="container-fluid"> |
||||
<div class="row-fluid"> |
||||
<div class="span3"> |
||||
<div class="well sidebar-nav"> |
||||
<ul class="nav nav-list"> |
||||
<li class="nav-header">Sidebar</li> |
||||
<li class="active"><a href="#">Link</a></li> |
||||
<li><a href="#">Link</a></li> |
||||
<li><a href="#">Link</a></li> |
||||
<li><a href="#">Link</a></li> |
||||
<li class="nav-header">Sidebar</li> |
||||
<li><a href="#">Link</a></li> |
||||
<li><a href="#">Link</a></li> |
||||
<li><a href="#">Link</a></li> |
||||
<li><a href="#">Link</a></li> |
||||
<li><a href="#">Link</a></li> |
||||
<li><a href="#">Link</a></li> |
||||
<li class="nav-header">Sidebar</li> |
||||
<li><a href="#">Link</a></li> |
||||
<li><a href="#">Link</a></li> |
||||
<li><a href="#">Link</a></li> |
||||
</ul> |
||||
</div><!--/.well --> |
||||
</div><!--/span--> |
||||
<div class="span9"> |
||||
<div class="hero-unit"> |
||||
<h1>Hello, world!</h1> |
||||
<p>This is a template for a simple marketing or informational website. It includes a large callout called the hero unit and three supporting pieces of content. Use it as a starting point to create something more unique.</p> |
||||
<p><a class="btn btn-primary btn-large">Learn more »</a></p> |
||||
</div> |
||||
<div class="row-fluid"> |
||||
<div class="span4"> |
||||
<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 »</a></p> |
||||
</div><!--/span--> |
||||
<div class="span4"> |
||||
<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 »</a></p> |
||||
</div><!--/span--> |
||||
<div class="span4"> |
||||
<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 »</a></p> |
||||
</div><!--/span--> |
||||
</div><!--/row--> |
||||
<div class="row-fluid"> |
||||
<div class="span4"> |
||||
<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 »</a></p> |
||||
</div><!--/span--> |
||||
<div class="span4"> |
||||
<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 »</a></p> |
||||
</div><!--/span--> |
||||
<div class="span4"> |
||||
<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 »</a></p> |
||||
</div><!--/span--> |
||||
</div><!--/row--> |
||||
</div><!--/span--> |
||||
</div><!--/row--> |
||||
|
||||
<hr> |
||||
|
||||
<footer> |
||||
<p>© Company 2012</p> |
||||
</footer> |
||||
|
||||
</div><!--/.fluid-container--> |
||||
|
||||
<!-- Le javascript |
||||
================================================== --> |
||||
<!-- 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> |
||||
|
||||
</body> |
||||
</html> |
@ -0,0 +1,126 @@
|
||||
<!DOCTYPE html> |
||||
<html lang="en"> |
||||
<head> |
||||
<meta charset="utf-8"> |
||||
<title>Bootstrap, from Twitter</title> |
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
||||
<meta name="description" content=""> |
||||
<meta name="author" content=""> |
||||
|
||||
<!-- Le styles --> |
||||
<link href="../assets/css/bootstrap.css" rel="stylesheet"> |
||||
<style type="text/css"> |
||||
body { |
||||
padding-top: 60px; |
||||
padding-bottom: 40px; |
||||
} |
||||
</style> |
||||
<link href="../assets/css/bootstrap-responsive.css" rel="stylesheet"> |
||||
|
||||
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements --> |
||||
<!--[if lt IE 9]> |
||||
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> |
||||
<![endif]--> |
||||
|
||||
<!-- Le fav and touch icons --> |
||||
<link rel="shortcut icon" href="../assets/ico/favicon.ico"> |
||||
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="../assets/ico/apple-touch-icon-144-precomposed.png"> |
||||
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="../assets/ico/apple-touch-icon-114-precomposed.png"> |
||||
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="../assets/ico/apple-touch-icon-72-precomposed.png"> |
||||
<link rel="apple-touch-icon-precomposed" href="../assets/ico/apple-touch-icon-57-precomposed.png"> |
||||
</head> |
||||
|
||||
<body> |
||||
|
||||
<div class="navbar navbar-inverse navbar-fixed-top"> |
||||
<div class="navbar-inner"> |
||||
<div class="container"> |
||||
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> |
||||
<span class="icon-bar"></span> |
||||
<span class="icon-bar"></span> |
||||
<span class="icon-bar"></span> |
||||
</a> |
||||
<a class="brand" href="#">Project name</a> |
||||
<div class="nav-collapse collapse"> |
||||
<ul class="nav"> |
||||
<li class="active"><a href="#">Home</a></li> |
||||
<li><a href="#about">About</a></li> |
||||
<li><a href="#contact">Contact</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-right"> |
||||
<input class="span2" type="text" placeholder="Email"> |
||||
<input class="span2" type="password" placeholder="Password"> |
||||
<button type="submit" class="btn">Sign in</button> |
||||
</form> |
||||
</div><!--/.nav-collapse --> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
<div class="container"> |
||||
|
||||
<!-- Main hero unit for a primary marketing message or call to action --> |
||||
<div class="hero-unit"> |
||||
<h1>Hello, world!</h1> |
||||
<p>This is a template for a simple marketing or informational website. It includes a large callout called the hero unit and three supporting pieces of content. Use it as a starting point to create something more unique.</p> |
||||
<p><a class="btn btn-primary btn-large">Learn more »</a></p> |
||||
</div> |
||||
|
||||
<!-- Example row of columns --> |
||||
<div class="row"> |
||||
<div class="span4"> |
||||
<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 »</a></p> |
||||
</div> |
||||
<div class="span4"> |
||||
<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 »</a></p> |
||||
</div> |
||||
<div class="span4"> |
||||
<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 »</a></p> |
||||
</div> |
||||
</div> |
||||
|
||||
<hr> |
||||
|
||||
<footer> |
||||
<p>© Company 2012</p> |
||||
</footer> |
||||
|
||||
</div> <!-- /container --> |
||||
|
||||
<!-- Le javascript |
||||
================================================== --> |
||||
<!-- 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> |
||||
|
||||
</body> |
||||
</html> |
@ -0,0 +1,79 @@
|
||||
<!DOCTYPE html> |
||||
<html lang="en"> |
||||
<head> |
||||
<meta charset="utf-8"> |
||||
<title>Bootstrap, from Twitter</title> |
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
||||
<meta name="description" content=""> |
||||
<meta name="author" content=""> |
||||
|
||||
<!-- Le styles --> |
||||
<link href="../assets/css/bootstrap.css" rel="stylesheet"> |
||||
<style> |
||||
body { |
||||
padding-top: 60px; /* 60px to make the container go all the way to the bottom of the topbar */ |
||||
} |
||||
</style> |
||||
<link href="../assets/css/bootstrap-responsive.css" rel="stylesheet"> |
||||
|
||||
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements --> |
||||
<!--[if lt IE 9]> |
||||
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> |
||||
<![endif]--> |
||||
|
||||
<!-- Le fav and touch icons --> |
||||
<link rel="shortcut icon" href="../assets/ico/favicon.ico"> |
||||
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="../assets/ico/apple-touch-icon-144-precomposed.png"> |
||||
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="../assets/ico/apple-touch-icon-114-precomposed.png"> |
||||
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="../assets/ico/apple-touch-icon-72-precomposed.png"> |
||||
<link rel="apple-touch-icon-precomposed" href="../assets/ico/apple-touch-icon-57-precomposed.png"> |
||||
</head> |
||||
|
||||
<body> |
||||
|
||||
<div class="navbar navbar-inverse navbar-fixed-top"> |
||||
<div class="navbar-inner"> |
||||
<div class="container"> |
||||
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> |
||||
<span class="icon-bar"></span> |
||||
<span class="icon-bar"></span> |
||||
<span class="icon-bar"></span> |
||||
</a> |
||||
<a class="brand" href="#">Project name</a> |
||||
<div class="nav-collapse collapse"> |
||||
<ul class="nav"> |
||||
<li class="active"><a href="#">Home</a></li> |
||||
<li><a href="#about">About</a></li> |
||||
<li><a href="#contact">Contact</a></li> |
||||
</ul> |
||||
</div><!--/.nav-collapse --> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
<div class="container"> |
||||
|
||||
<h1>Bootstrap starter template</h1> |
||||
<p>Use this document as a way to quick start any new project.<br> All you get is this message and a barebones HTML document.</p> |
||||
|
||||
</div> <!-- /container --> |
||||
|
||||
<!-- Le javascript |
||||
================================================== --> |
||||
<!-- 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> |
||||
|
||||
</body> |
||||
</html> |
@ -0,0 +1,286 @@
|
||||
<!DOCTYPE html> |
||||
<html lang="en"> |
||||
<head> |
||||
<meta charset="utf-8"> |
||||
<title>Extend · Twitter Bootstrap</title> |
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
||||
<meta name="description" content=""> |
||||
<meta name="author" content=""> |
||||
|
||||
<!-- Le styles --> |
||||
<link href="assets/css/bootstrap.css" rel="stylesheet"> |
||||
<link href="assets/css/bootstrap-responsive.css" rel="stylesheet"> |
||||
<link href="assets/css/docs.css" rel="stylesheet"> |
||||
<link href="assets/js/google-code-prettify/prettify.css" rel="stylesheet"> |
||||
|
||||
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements --> |
||||
<!--[if lt IE 9]> |
||||
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> |
||||
<![endif]--> |
||||
|
||||
<!-- Le fav and touch icons --> |
||||
<link rel="shortcut icon" href="assets/ico/favicon.ico"> |
||||
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="assets/ico/apple-touch-icon-144-precomposed.png"> |
||||
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="assets/ico/apple-touch-icon-114-precomposed.png"> |
||||
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="assets/ico/apple-touch-icon-72-precomposed.png"> |
||||
<link rel="apple-touch-icon-precomposed" href="assets/ico/apple-touch-icon-57-precomposed.png"> |
||||
|
||||
</head> |
||||
|
||||
<body data-spy="scroll" data-target=".bs-docs-sidebar"> |
||||
|
||||
<!-- Navbar |
||||
================================================== --> |
||||
<div class="navbar navbar-inverse navbar-fixed-top"> |
||||
<div class="navbar-inner"> |
||||
<div class="container"> |
||||
<button type="button" class="btn btn-navbar" 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="brand" href="./index.html">Bootstrap</a> |
||||
<div class="nav-collapse collapse"> |
||||
<ul class="nav"> |
||||
<li class=""> |
||||
<a href="./index.html">Home</a> |
||||
</li> |
||||
<li class=""> |
||||
<a href="./getting-started.html">Get started</a> |
||||
</li> |
||||
<li class=""> |
||||
<a href="./scaffolding.html">Scaffolding</a> |
||||
</li> |
||||
<li class=""> |
||||
<a href="./base-css.html">Base CSS</a> |
||||
</li> |
||||
<li class=""> |
||||
<a href="./components.html">Components</a> |
||||
</li> |
||||
<li class=""> |
||||
<a href="./javascript.html">Javascript</a> |
||||
</li> |
||||
<li class=""> |
||||
<a href="./customize.html">Customize</a> |
||||
</li> |
||||
</ul> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
<!-- Subhead |
||||
================================================== --> |
||||
<header class="jumbotron subhead" id="overview"> |
||||
<div class="container"> |
||||
<h1>Extending Bootstrap</h1> |
||||
<p class="lead">Extend Bootstrap to take advantage of included styles and components, as well as LESS variables and mixins.</p> |
||||
<div> |
||||
</header> |
||||
|
||||
<div class="container"> |
||||
|
||||
<!-- Docs nav |
||||
================================================== --> |
||||
<div class="row"> |
||||
<div class="span3 bs-docs-sidebar"> |
||||
<ul class="nav nav-list bs-docs-sidenav"> |
||||
<li><a href="#built-with-less"><i class="icon-chevron-right"></i> Built with LESS</a></li> |
||||
<li><a href="#compiling"><i class="icon-chevron-right"></i> Compiling Bootstrap</a></li> |
||||
<li><a href="#static-assets"><i class="icon-chevron-right"></i> Use as static assets</a></li> |
||||
</ul> |
||||
</div> |
||||
<div class="span9"> |
||||
|
||||
|
||||
|
||||
<!-- BUILT WITH LESS |
||||
================================================== --> |
||||
<section id="built-with-less"> |
||||
<div class="page-header"> |
||||
<h1>Built with LESS</h1> |
||||
</div> |
||||
|
||||
<img style="float: right; height: 36px; margin: 10px 20px 20px" src="assets/img/less-logo-large.png" alt="LESS CSS"> |
||||
<p class="lead">Bootstrap is made with LESS at its core, a dynamic stylesheet language created by our good friend, <a href="http://cloudhead.io">Alexis Sellier</a>. It makes developing systems-based CSS faster, easier, and more fun.</p> |
||||
|
||||
<h3>Why LESS?</h3> |
||||
<p>One of Bootstrap's creators wrote a quick <a href="http://www.wordsbyf.at/2012/03/08/why-less/">blog post about this</a>, summarized here:</p> |
||||
<ul> |
||||
<li>Bootstrap compiles faster ~6x faster with Less compared to Sass</li> |
||||
<li>Less is written in JavaScript, making it easier to us to dive in and patch compared to Ruby with Sass.</li> |
||||
<li>Less is more; we want to feel like we're writing CSS and making Bootstrap approachable to all.</li> |
||||
</ul> |
||||
|
||||
<h3>What's included?</h3> |
||||
<p>As an extension of CSS, LESS includes variables, mixins for reusable snippets of code, operations for simple math, nesting, and even color functions.</p> |
||||
|
||||
<h3>Learn more</h3> |
||||
<p>Visit the official website at <a href="http://lesscss.org">http://lesscss.org</a> to learn more.</p> |
||||
</section> |
||||
|
||||
|
||||
|
||||
<!-- COMPILING LESS AND BOOTSTRAP |
||||
================================================== --> |
||||
<section id="compiling"> |
||||
<div class="page-header"> |
||||
<h1>Compiling Bootstrap with Less</h1> |
||||
</div> |
||||
|
||||
<p class="lead">Since our CSS is written with Less and utilizes variables and mixins, it needs to be compiled for final production implementation. Here's how.</p> |
||||
|
||||
<div class="alert alert-info"> |
||||
<strong>Note:</strong> If you're submitting a pull request to GitHub with modified CSS, you <strong>must</strong> recompile the CSS via any of these methods. |
||||
</div> |
||||
|
||||
<h2>Tools for compiling</h2> |
||||
|
||||
<h3>Node with makefile</h3> |
||||
<p>Install the LESS command line compiler, JSHint, Recess, and uglify-js globally with npm by running the following command:</p> |
||||
<pre>$ npm install -g less jshint recess uglify-js</pre> |
||||
<p>Once installed just run <code>make</code> from the root of your bootstrap directory and you're all set.</p> |
||||
<p>Additionally, if you have <a href="https://github.com/mynyml/watchr">watchr</a> installed, you may run <code>make watch</code> to have bootstrap automatically rebuilt every time you edit a file in the bootstrap lib (this isn't required, just a convenience method).</p> |
||||
|
||||
<h3>Command line</h3> |
||||
<p>Install the LESS command line tool via Node and run the following command:</p> |
||||
<pre>$ lessc ./less/bootstrap.less > bootstrap.css</pre> |
||||
<p>Be sure to include <code>--compress</code> in that command if you're trying to save some bytes!</p> |
||||
|
||||
<h3>Javascript</h3> |
||||
<p><a href="http://lesscss.org/">Download the latest Less.js</a> and include the path to it (and Bootstrap) in the <code><head></code>.</p> |
||||
<pre class="prettyprint"> |
||||
<link rel="stylesheet/less" href="/path/to/bootstrap.less"> |
||||
<script src="/path/to/less.js"></script> |
||||
</pre> |
||||
<p>To recompile the .less files, just save them and reload your page. Less.js compiles them and stores them in local storage.</p> |
||||
|
||||
<h3>Unofficial Mac app</h3> |
||||
<p><a href="http://incident57.com/less/">The unofficial Mac app</a> watches directories of .less files and compiles the code to local files after every save of a watched .less file. If you like, you can toggle preferences in the app for automatic minifying and which directory the compiled files end up in.</p> |
||||
|
||||
<h3>More apps</h3> |
||||
<h4><a href="http://crunchapp.net/" target="_blank">Crunch</a></h4> |
||||
<p>Crunch is a great looking LESS editor and compiler built on Adobe Air.</p> |
||||
<h4><a href="http://incident57.com/codekit/" target="_blank">CodeKit</a></h4> |
||||
<p>Created by the same guy as the unofficial Mac app, CodeKit is a Mac app that compiles LESS, SASS, Stylus, and CoffeeScript.</p> |
||||
<h4><a href="http://wearekiss.com/simpless" target="_blank">Simpless</a></h4> |
||||
<p>Mac, Linux, and Windows app for drag and drop compiling of LESS files. Plus, the <a href="https://github.com/Paratron/SimpLESS" target="_blank">source code is on GitHub</a>.</p> |
||||
|
||||
</section> |
||||
|
||||
|
||||
|
||||
<!-- Static assets |
||||
================================================== --> |
||||
<section id="static-assets"> |
||||
<div class="page-header"> |
||||
<h1>Use as static assets</h1> |
||||
</div> |
||||
<p class="lead"><a href="./getting-started.html">Quickly start</a> any web project by dropping in the compiled or minified CSS and JS. Layer on custom styles separately for easy upgrades and maintenance moving forward.</p> |
||||
|
||||
<h3>Setup file structure</h3> |
||||
<p>Download the latest compiled Bootstrap and place into your project. For example, you might have something like this:</p> |
||||
<pre class="prettyprint"> |
||||
app/ |
||||
├── layouts/ |
||||
└── templates/ |
||||
public/ |
||||
├── css/ |
||||
│ ├── bootstrap.min.css |
||||
├── js/ |
||||
│ ├── bootstrap.min.js |
||||
└── img/ |
||||
├── glyphicons-halflings.png |
||||
└── glyphicons-halflings-white.png |
||||
</pre> |
||||
|
||||
<h3>Utilize starter template</h3> |
||||
<p>Copy the following base HTML to get started.</p> |
||||
<pre class="prettyprint linenums"> |
||||
<html> |
||||
<head> |
||||
<title>Bootstrap 101 Template</title> |
||||
<!-- Bootstrap --> |
||||
<link href="public/css/bootstrap.min.css" rel="stylesheet"> |
||||
</head> |
||||
<body> |
||||
<h1>Hello, world!</h1> |
||||
<!-- Bootstrap --> |
||||
<script src="public/js/bootstrap.min.js"></script> |
||||
</body> |
||||
</html> |
||||
</pre> |
||||
|
||||
<h3>Layer on custom code</h3> |
||||
<p>Work in your custom CSS, JS, and more as necessary to make Bootstrap your own with your own separate CSS and JS files.</p> |
||||
<pre class="prettyprint linenums"> |
||||
<html> |
||||
<head> |
||||
<title>Bootstrap 101 Template</title> |
||||
<!-- Bootstrap --> |
||||
<link href="public/css/bootstrap.min.css" rel="stylesheet"> |
||||
<!-- Project --> |
||||
<link href="public/css/application.css" rel="stylesheet"> |
||||
</head> |
||||
<body> |
||||
<h1>Hello, world!</h1> |
||||
<!-- Bootstrap --> |
||||
<script src="public/js/bootstrap.min.js"></script> |
||||
<!-- Project --> |
||||
<script src="public/js/application.js"></script> |
||||
</body> |
||||
</html> |
||||
</pre> |
||||
|
||||
</section> |
||||
|
||||
</div> |
||||
</div> |
||||
|
||||
</div> |
||||
|
||||
|
||||
|
||||
<!-- Footer |
||||
================================================== --> |
||||
<footer class="footer"> |
||||
<div class="container"> |
||||
<p class="pull-right"><a href="#">Back to top</a></p> |
||||
<p>Designed and built with all the love in the world <a href="http://twitter.com/twitter" target="_blank">@twitter</a> 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 the <a href="http://www.apache.org/licenses/LICENSE-2.0" target="_blank">Apache License v2.0</a>. Documentation licensed under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.</p> |
||||
<p>Icons from <a href="http://glyphicons.com">Glyphicons Free</a>, licensed under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.</p> |
||||
<ul class="footer-links"> |
||||
<li><a href="http://blog.getbootstrap.com">Read the blog</a></li> |
||||
<li><a href="https://github.com/twitter/bootstrap/issues?state=open">Submit issues</a></li> |
||||
<li><a href="https://github.com/twitter/bootstrap/wiki">Roadmap and changelog</a></li> |
||||
</ul> |
||||
</div> |
||||
</footer> |
||||
|
||||
|
||||
|
||||
<!-- Le javascript |
||||
================================================== --> |
||||
<!-- Placed at the end of the document so the pages load faster --> |
||||
<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script> |
||||
<script src="assets/js/jquery.js"></script> |
||||
<script src="assets/js/google-code-prettify/prettify.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/application.js"></script> |
||||
|
||||
|
||||
|
||||
</body> |
||||
</html> |
@ -0,0 +1,335 @@
|
||||
<!DOCTYPE html> |
||||
<html lang="en"> |
||||
<head> |
||||
<meta charset="utf-8"> |
||||
<title>Getting · Twitter Bootstrap</title> |
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
||||
<meta name="description" content=""> |
||||
<meta name="author" content=""> |
||||
|
||||
<!-- Le styles --> |
||||
<link href="assets/css/bootstrap.css" rel="stylesheet"> |
||||
<link href="assets/css/bootstrap-responsive.css" rel="stylesheet"> |
||||
<link href="assets/css/docs.css" rel="stylesheet"> |
||||
<link href="assets/js/google-code-prettify/prettify.css" rel="stylesheet"> |
||||
|
||||
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements --> |
||||
<!--[if lt IE 9]> |
||||
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> |
||||
<![endif]--> |
||||
|
||||
<!-- Le fav and touch icons --> |
||||
<link rel="shortcut icon" href="assets/ico/favicon.ico"> |
||||
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="assets/ico/apple-touch-icon-144-precomposed.png"> |
||||
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="assets/ico/apple-touch-icon-114-precomposed.png"> |
||||
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="assets/ico/apple-touch-icon-72-precomposed.png"> |
||||
<link rel="apple-touch-icon-precomposed" href="assets/ico/apple-touch-icon-57-precomposed.png"> |
||||
|
||||
</head> |
||||
|
||||
<body data-spy="scroll" data-target=".bs-docs-sidebar"> |
||||
|
||||
<!-- Navbar |
||||
================================================== --> |
||||
<div class="navbar navbar-inverse navbar-fixed-top"> |
||||
<div class="navbar-inner"> |
||||
<div class="container"> |
||||
<button type="button" class="btn btn-navbar" 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="brand" href="./index.html">Bootstrap</a> |
||||
<div class="nav-collapse collapse"> |
||||
<ul class="nav"> |
||||
<li class=""> |
||||
<a href="./index.html">Home</a> |
||||
</li> |
||||
<li class="active"> |
||||
<a href="./getting-started.html">Get started</a> |
||||
</li> |
||||
<li class=""> |
||||
<a href="./scaffolding.html">Scaffolding</a> |
||||
</li> |
||||
<li class=""> |
||||
<a href="./base-css.html">Base CSS</a> |
||||
</li> |
||||
<li class=""> |
||||
<a href="./components.html">Components</a> |
||||
</li> |
||||
<li class=""> |
||||
<a href="./javascript.html">Javascript</a> |
||||
</li> |
||||
<li class=""> |
||||
<a href="./customize.html">Customize</a> |
||||
</li> |
||||
</ul> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
<!-- Subhead |
||||
================================================== --> |
||||
<header class="jumbotron subhead" id="overview"> |
||||
<div class="container"> |
||||
<h1>Getting started</h1> |
||||
<p class="lead">Overview of the project, its contents, and how to get started with a simple template.</p> |
||||
</div> |
||||
</header> |
||||
|
||||
|
||||
<div class="container"> |
||||
|
||||
<!-- Docs nav |
||||
================================================== --> |
||||
<div class="row"> |
||||
<div class="span3 bs-docs-sidebar"> |
||||
<ul class="nav nav-list bs-docs-sidenav"> |
||||
<li><a href="#download-bootstrap"><i class="icon-chevron-right"></i> Download</a></li> |
||||
<li><a href="#file-structure"><i class="icon-chevron-right"></i> File structure</a></li> |
||||
<li><a href="#contents"><i class="icon-chevron-right"></i> What's included</a></li> |
||||
<li><a href="#html-template"><i class="icon-chevron-right"></i> HTML template</a></li> |
||||
<li><a href="#examples"><i class="icon-chevron-right"></i> Examples</a></li> |
||||
<li><a href="#what-next"><i class="icon-chevron-right"></i> What next?</a></li> |
||||
</ul> |
||||
</div> |
||||
<div class="span9"> |
||||
|
||||
|
||||
|
||||
<!-- Download |
||||
================================================== --> |
||||
<section id="download-bootstrap"> |
||||
<div class="page-header"> |
||||
<h1>1. Download</h1> |
||||
</div> |
||||
<p class="lead">Before downloading, be sure to have a code editor (we recommend <a href="http://sublimetext.com/2">Sublime Text 2</a>) and some working knowledge of HTML and CSS. We won't walk through the source files here, but they are available for download. We'll focus on getting started with the compiled Bootstrap files.</p> |
||||
|
||||
<div class="row-fluid"> |
||||
<div class="span6"> |
||||
<h2>Download compiled</h2> |
||||
<p><strong>Fastest way to get started:</strong> get the compiled and minified versions of our CSS, JS, and images. No docs or original source files.</p> |
||||
<p><a class="btn btn-large btn-primary" href="assets/bootstrap.zip" >Download Bootstrap</a></p> |
||||
</div> |
||||
<div class="span6"> |
||||
<h2>Download source</h2> |
||||
<p>Get the original files for all CSS and JavaScript, along with a local copy of the docs by downloading the latest version directly from GitHub.</p> |
||||
<p><a class="btn btn-large" href="https://github.com/twitter/bootstrap/zipball/master" >Download Bootstrap source</a></p> |
||||
</div> |
||||
</div> |
||||
</section> |
||||
|
||||
|
||||
|
||||
<!-- File structure |
||||
================================================== --> |
||||
<section id="file-structure"> |
||||
<div class="page-header"> |
||||
<h1>2. File structure</h1> |
||||
</div> |
||||
<p class="lead">Within the download you'll find the following file structure and contents, 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> |
||||
<pre class="prettyprint"> |
||||
bootstrap/ |
||||
├── css/ |
||||
│ ├── bootstrap.css |
||||
│ ├── bootstrap.min.css |
||||
├── js/ |
||||
│ ├── bootstrap.js |
||||
│ ├── bootstrap.min.js |
||||
├── img/ |
||||
│ ├── glyphicons-halflings.png |
||||
│ ├── glyphicons-halflings-white.png |
||||
└── README.md |
||||
</pre> |
||||
<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> |
||||
<p>Please note that all JavaScript plugins require jQuery to be included.</p> |
||||
</section> |
||||
|
||||
|
||||
|
||||
<!-- Contents |
||||
================================================== --> |
||||
<section id="contents"> |
||||
<div class="page-header"> |
||||
<h1>3. What's included</h1> |
||||
</div> |
||||
<p class="lead">Bootstrap comes equipped with HTML, CSS, and JS for all sorts of things, but they can be summarized with a handful of categories visible at the top of the <a href="http://getbootstrap.com">Bootstrap documentation</a>.</p> |
||||
|
||||
<h2>Docs sections</h2> |
||||
<h4><a href="http://twitter.github.com/bootstrap/scaffolding.html">Scaffolding</a></h4> |
||||
<p>Global styles for the body to reset type and background, link styles, grid system, and two simple layouts.</p> |
||||
<h4><a href="http://twitter.github.com/bootstrap/base-css.html">Base CSS</a></h4> |
||||
<p>Styles for common HTML elements like typography, code, tables, forms, and buttons. Also includes <a href="http://glyphicons.com">Glyphicons</a>, a great little icon set.</p> |
||||
<h4><a href="http://twitter.github.com/bootstrap/components.html">Components</a></h4> |
||||
<p>Basic styles for common interface components like tabs and pills, navbar, alerts, page headers, and more.</p> |
||||
<h4><a href="http://twitter.github.com/bootstrap/javascript.html">Javascript plugins</a></h4> |
||||
<p>Similar to Components, these Javascript plugins are interactive components for things like tooltips, popovers, modals, and more.</p> |
||||
|
||||
<h2>List of components</h2> |
||||
<p>Together, the <strong>Components</strong> and <strong>Javascript plugins</strong> sections provide the following interface elements:</p> |
||||
<ul> |
||||
<li>Button groups</li> |
||||
<li>Button dropdowns</li> |
||||
<li>Navigational tabs, pills, and lists</li> |
||||
<li>Navbar</li> |
||||
<li>Labels</li> |
||||
<li>Badges</li> |
||||
<li>Page headers and hero unit</li> |
||||
<li>Thumbnails</li> |
||||
<li>Alerts</li> |
||||
<li>Progress bars</li> |
||||
<li>Modals</li> |
||||
<li>Dropdowns</li> |
||||
<li>Tooltips</li> |
||||
<li>Popovers</li> |
||||
<li>Accordion</li> |
||||
<li>Carousel</li> |
||||
<li>Typeahead</li> |
||||
</ul> |
||||
<p>In future guides, we may walk through these components individually in more detail. Until then, look for each of these in the documentation for information on how to utilize and customize them.</p> |
||||
</section> |
||||
|
||||
|
||||
|
||||
<!-- HTML template |
||||
================================================== --> |
||||
<section id="html-template"> |
||||
<div class="page-header"> |
||||
<h1>4. Basic HTML template</h1> |
||||
</div> |
||||
<p class="lead">With a brief intro into the contents out of the way, we can focus putting Bootstrap to use. To do that, we'll utilize a basic HTML template that includes everything we mentioned in the <a href="#file-structure">File structure</a>.</p> |
||||
<p>Now, here's a look at a <strong>typical HTML file</strong>:</p> |
||||
<pre class="prettyprint linenums"> |
||||
<!DOCTYPE html> |
||||
<html> |
||||
<head> |
||||
<title>Bootstrap 101 Template</title> |
||||
</head> |
||||
<body> |
||||
<h1>Hello, world!</h1> |
||||
<script src="http://code.jquery.com/jquery-latest.js"></script> |
||||
</body> |
||||
</html> |
||||
</pre> |
||||
<p>To make this <strong>a Bootstrapped template</strong>, just include the appropriate CSS and JS files:</p> |
||||
<pre class="prettyprint linenums"> |
||||
<!DOCTYPE html> |
||||
<html> |
||||
<head> |
||||
<title>Bootstrap 101 Template</title> |
||||
<!-- Bootstrap --> |
||||
<link href="css/bootstrap.min.css" rel="stylesheet"> |
||||
</head> |
||||
<body> |
||||
<h1>Hello, world!</h1> |
||||
<script src="http://code.jquery.com/jquery-latest.js"></script> |
||||
<script src="js/bootstrap.min.js"></script> |
||||
</body> |
||||
</html> |
||||
</pre> |
||||
<p><strong>And you're set!</strong> With those two files added, you can begin to develop any site or application with Bootstrap.</p> |
||||
</section> |
||||
|
||||
|
||||
|
||||
<!-- Examples |
||||
================================================== --> |
||||
<section id="examples"> |
||||
<div class="page-header"> |
||||
<h1>5. Examples</h1> |
||||
</div> |
||||
<p class="lead">Move beyond the base template with a few example layouts. We encourage folks to iterate on these examples and not simply use them as an end result.</p> |
||||
<ul class="thumbnails bootstrap-examples"> |
||||
<li class="span3"> |
||||
<a class="thumbnail" href="examples/hero.html"> |
||||
<img src="assets/img/examples/bootstrap-example-hero.jpg" alt=""> |
||||
</a> |
||||
<h4>Basic marketing site</h4> |
||||
<p>Featuring a hero unit for a primary message and three supporting elements.</p> |
||||
</li> |
||||
<li class="span3"> |
||||
<a class="thumbnail" href="examples/fluid.html"> |
||||
<img src="assets/img/examples/bootstrap-example-fluid.jpg" alt=""> |
||||
</a> |
||||
<h4>Fluid layout</h4> |
||||
<p>Uses our new responsive, fluid grid system to create a seamless liquid layout.</p> |
||||
</li> |
||||
<li class="span3"> |
||||
<a class="thumbnail" href="examples/starter-template.html"> |
||||
<img src="assets/img/examples/bootstrap-example-starter.jpg" alt=""> |
||||
</a> |
||||
<h4>Starter template</h4> |
||||
<p>A barebones HTML document with all the Bootstrap CSS and javascript included.</p> |
||||
</li> |
||||
</ul> |
||||
</section> |
||||
|
||||
|
||||
|
||||
|
||||
<!-- Next |
||||
================================================== --> |
||||
<section id="what-next"> |
||||
<div class="page-header"> |
||||
<h1>What next?</h1> |
||||
</div> |
||||
<p class="lead">Head to the docs for information, examples, and code snippets, or take the next leap and customize Bootstrap for any upcoming project.</p> |
||||
<a class="btn btn-large btn-primary" href="./scaffolding.html" >Visit the Bootstrap docs</a> |
||||
<a class="btn btn-large" href="./customize.html" style="margin-left: 5px;" >Customize Bootstrap</a> |
||||
</section> |
||||
|
||||
|
||||
|
||||
|
||||
</div> |
||||
</div> |
||||
|
||||
</div> |
||||
|
||||
|
||||
|
||||
<!-- Footer |
||||
================================================== --> |
||||
<footer class="footer"> |
||||
<div class="container"> |
||||
<p class="pull-right"><a href="#">Back to top</a></p> |
||||
<p>Designed and built with all the love in the world <a href="http://twitter.com/twitter" target="_blank">@twitter</a> 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 the <a href="http://www.apache.org/licenses/LICENSE-2.0" target="_blank">Apache License v2.0</a>. Documentation licensed under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.</p> |
||||
<p>Icons from <a href="http://glyphicons.com">Glyphicons Free</a>, licensed under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.</p> |
||||
<ul class="footer-links"> |
||||
<li><a href="http://blog.getbootstrap.com">Read the blog</a></li> |
||||
<li><a href="https://github.com/twitter/bootstrap/issues?state=open">Submit issues</a></li> |
||||
<li><a href="https://github.com/twitter/bootstrap/wiki">Roadmap and changelog</a></li> |
||||
</ul> |
||||
</div> |
||||
</footer> |
||||
|
||||
|
||||
|
||||
<!-- Le javascript |
||||
================================================== --> |
||||
<!-- Placed at the end of the document so the pages load faster --> |
||||
<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script> |
||||
<script src="assets/js/jquery.js"></script> |
||||
<script src="assets/js/google-code-prettify/prettify.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/application.js"></script> |
||||
|
||||
|
||||
|
||||
</body> |
||||
</html> |
@ -0,0 +1,206 @@
|
||||
<!DOCTYPE html> |
||||
<html lang="en"> |
||||
<head> |
||||
<meta charset="utf-8"> |
||||
<title>Twitter Bootstrap</title> |
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
||||
<meta name="description" content=""> |
||||
<meta name="author" content=""> |
||||
|
||||
<!-- Le styles --> |
||||
<link href="assets/css/bootstrap.css" rel="stylesheet"> |
||||
<link href="assets/css/bootstrap-responsive.css" rel="stylesheet"> |
||||
<link href="assets/css/docs.css" rel="stylesheet"> |
||||
<link href="assets/js/google-code-prettify/prettify.css" rel="stylesheet"> |
||||
|
||||
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements --> |
||||
<!--[if lt IE 9]> |
||||
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> |
||||
<![endif]--> |
||||
|
||||
<!-- Le fav and touch icons --> |
||||
<link rel="shortcut icon" href="assets/ico/favicon.ico"> |
||||
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="assets/ico/apple-touch-icon-144-precomposed.png"> |
||||
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="assets/ico/apple-touch-icon-114-precomposed.png"> |
||||
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="assets/ico/apple-touch-icon-72-precomposed.png"> |
||||
<link rel="apple-touch-icon-precomposed" href="assets/ico/apple-touch-icon-57-precomposed.png"> |
||||
|
||||
</head> |
||||
|
||||
<body data-spy="scroll" data-target=".bs-docs-sidebar"> |
||||
|
||||
<!-- Navbar |
||||
================================================== --> |
||||
<div class="navbar navbar-inverse navbar-fixed-top"> |
||||
<div class="navbar-inner"> |
||||
<div class="container"> |
||||
<button type="button" class="btn btn-navbar" 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="brand" href="./index.html">Bootstrap</a> |
||||
<div class="nav-collapse collapse"> |
||||
<ul class="nav"> |
||||
<li class="active"> |
||||
<a href="./index.html">Home</a> |
||||
</li> |
||||
<li class=""> |
||||
<a href="./getting-started.html">Get started</a> |
||||
</li> |
||||
<li class=""> |
||||
<a href="./scaffolding.html">Scaffolding</a> |
||||
</li> |
||||
<li class=""> |
||||
<a href="./base-css.html">Base CSS</a> |
||||
</li> |
||||
<li class=""> |
||||
<a href="./components.html">Components</a> |
||||
</li> |
||||
<li class=""> |
||||
<a href="./javascript.html">Javascript</a> |
||||
</li> |
||||
<li class=""> |
||||
<a href="./customize.html">Customize</a> |
||||
</li> |
||||
</ul> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
<div class="jumbotron masthead"> |
||||
<div class="container"> |
||||
<h1>Bootstrap</h1> |
||||
<p>Sleek, intuitive, and powerful front-end framework for faster and easier web development.</p> |
||||
<p><a href="assets/bootstrap.zip" class="btn btn-primary btn-large" >Download Bootstrap</a></p> |
||||
<ul class="masthead-links"> |
||||
<li><a href="http://github.com/twitter/bootstrap" >GitHub project</a></li> |
||||
<li><a href="./extend.html" >Extend</a></li> |
||||
<li>Version 2.1.1</li> |
||||
</ul> |
||||
</div> |
||||
</div> |
||||
|
||||
<div class="bs-docs-social"> |
||||
<div class="container"> |
||||
<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="98px" 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> |
||||
</div> |
||||
|
||||
<div class="container"> |
||||
|
||||
<div class="marketing"> |
||||
|
||||
<h1>Introducing Bootstrap.</h1> |
||||
<p class="marketing-byline">Need reasons to love Bootstrap? Look no further.</p> |
||||
|
||||
<div class="row-fluid"> |
||||
<div class="span4"> |
||||
<img src="assets/img/bs-docs-twitter-github.png"> |
||||
<h2>By nerds, for nerds.</h2> |
||||
<p>Built at Twitter by <a href="http://twitter.com/mdo">@mdo</a> and <a href="http://twitter.com/fat">@fat</a>, Bootstrap utilizes <a href="http://lesscss.org">LESS CSS</a>, is compiled via <a href="http://nodejs.org">Node</a>, and is managed through <a href="http://github.com">GitHub</a> to help nerds do awesome stuff on the web.</p> |
||||
</div> |
||||
<div class="span4"> |
||||
<img src="assets/img/bs-docs-responsive-illustrations.png"> |
||||
<h2>Made for everyone.</h2> |
||||
<p>Bootstrap was made to not only look and behave great in the latest desktop browsers (as well as IE7!), but in tablet and smartphone browsers via <a href="./scaffolding.html#responsive">responsive CSS</a> as well.</p> |
||||
</div> |
||||
<div class="span4"> |
||||
<img src="assets/img/bs-docs-bootstrap-features.png"> |
||||
<h2>Packed with features.</h2> |
||||
<p>A 12-column responsive <a href="./scaffolding.html#grid">grid</a>, dozens of components, <a href="./javascript.html">javascript plugins</a>, typography, form controls, and even a <a href="./customize.html">web-based Customizer</a> to make Bootstrap your own.</p> |
||||
</div> |
||||
</div> |
||||
|
||||
<hr class="soften"> |
||||
|
||||
<h1>Built with Bootstrap.</h1> |
||||
<p class="marketing-byline">For even more sites built with Bootstrap, <a href="http://builtwithbootstrap.tumblr.com/" target="_blank">visit the unofficial Tumblr</a> or <a href="./getting-started.html#examples">browse the examples</a>.</p> |
||||
<div class="row-fluid"> |
||||
<ul class="thumbnails example-sites"> |
||||
<li class="span3"> |
||||
<a class="thumbnail" href="http://soundready.fm/" target="_blank"> |
||||
<img src="assets/img/example-sites/soundready.png" alt="SoundReady.fm"> |
||||
</a> |
||||
</li> |
||||
<li class="span3"> |
||||
<a class="thumbnail" href="http://kippt.com/" target="_blank"> |
||||
<img src="assets/img/example-sites/kippt.png" alt="Kippt"> |
||||
</a> |
||||
</li> |
||||
<li class="span3"> |
||||
<a class="thumbnail" href="http://www.fleetio.com/" target="_blank"> |
||||
<img src="assets/img/example-sites/fleetio.png" alt="Fleetio"> |
||||
</a> |
||||
</li> |
||||
<li class="span3"> |
||||
<a class="thumbnail" href="http://www.jshint.com/" target="_blank"> |
||||
<img src="assets/img/example-sites/jshint.png" alt="JS Hint"> |
||||
</a> |
||||
</li> |
||||
</ul> |
||||
</div> |
||||
|
||||
</div> |
||||
|
||||
</div> |
||||
|
||||
|
||||
|
||||
<!-- Footer |
||||
================================================== --> |
||||
<footer class="footer"> |
||||
<div class="container"> |
||||
<p class="pull-right"><a href="#">Back to top</a></p> |
||||
<p>Designed and built with all the love in the world <a href="http://twitter.com/twitter" target="_blank">@twitter</a> 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 the <a href="http://www.apache.org/licenses/LICENSE-2.0" target="_blank">Apache License v2.0</a>. Documentation licensed under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.</p> |
||||
<p>Icons from <a href="http://glyphicons.com">Glyphicons Free</a>, licensed under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.</p> |
||||
<ul class="footer-links"> |
||||
<li><a href="http://blog.getbootstrap.com">Read the blog</a></li> |
||||
<li><a href="https://github.com/twitter/bootstrap/issues?state=open">Submit issues</a></li> |
||||
<li><a href="https://github.com/twitter/bootstrap/wiki">Roadmap and changelog</a></li> |
||||
</ul> |
||||
</div> |
||||
</footer> |
||||
|
||||
|
||||
|
||||
<!-- Le javascript |
||||
================================================== --> |
||||
<!-- Placed at the end of the document so the pages load faster --> |
||||
<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script> |
||||
<script src="assets/js/jquery.js"></script> |
||||
<script src="assets/js/google-code-prettify/prettify.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/application.js"></script> |
||||
|
||||
|
||||
|
||||
</body> |
||||
</html> |
@ -0,0 +1,584 @@
|
||||
<!DOCTYPE html> |
||||
<html lang="en"> |
||||
<head> |
||||
<meta charset="utf-8"> |
||||
<title>Scaffolding · Twitter Bootstrap</title> |
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
||||
<meta name="description" content=""> |
||||
<meta name="author" content=""> |
||||
|
||||
<!-- Le styles --> |
||||
<link href="assets/css/bootstrap.css" rel="stylesheet"> |
||||
<link href="assets/css/bootstrap-responsive.css" rel="stylesheet"> |
||||
<link href="assets/css/docs.css" rel="stylesheet"> |
||||
<link href="assets/js/google-code-prettify/prettify.css" rel="stylesheet"> |
||||
|
||||
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements --> |
||||
<!--[if lt IE 9]> |
||||
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> |
||||
<![endif]--> |
||||
|
||||
<!-- Le fav and touch icons --> |
||||
<link rel="shortcut icon" href="assets/ico/favicon.ico"> |
||||
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="assets/ico/apple-touch-icon-144-precomposed.png"> |
||||
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="assets/ico/apple-touch-icon-114-precomposed.png"> |
||||
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="assets/ico/apple-touch-icon-72-precomposed.png"> |
||||
<link rel="apple-touch-icon-precomposed" href="assets/ico/apple-touch-icon-57-precomposed.png"> |
||||
|
||||
</head> |
||||
|
||||
<body data-spy="scroll" data-target=".bs-docs-sidebar"> |
||||
|
||||
<!-- Navbar |
||||
================================================== --> |
||||
<div class="navbar navbar-inverse navbar-fixed-top"> |
||||
<div class="navbar-inner"> |
||||
<div class="container"> |
||||
<button type="button" class="btn btn-navbar" 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="brand" href="./index.html">Bootstrap</a> |
||||
<div class="nav-collapse collapse"> |
||||
<ul class="nav"> |
||||
<li class=""> |
||||
<a href="./index.html">Home</a> |
||||
</li> |
||||
<li class=""> |
||||
<a href="./getting-started.html">Get started</a> |
||||
</li> |
||||
<li class="active"> |
||||
<a href="./scaffolding.html">Scaffolding</a> |
||||
</li> |
||||
<li class=""> |
||||
<a href="./base-css.html">Base CSS</a> |
||||
</li> |
||||
<li class=""> |
||||
<a href="./components.html">Components</a> |
||||
</li> |
||||
<li class=""> |
||||
<a href="./javascript.html">Javascript</a> |
||||
</li> |
||||
<li class=""> |
||||
<a href="./customize.html">Customize</a> |
||||
</li> |
||||
</ul> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
<!-- Subhead |
||||
================================================== --> |
||||
<header class="jumbotron subhead" id="overview"> |
||||
<div class="container"> |
||||
<h1>Scaffolding</h1> |
||||
<p class="lead">Bootstrap is built on responsive 12-column grids, layouts, and components.</p> |
||||
</div> |
||||
</header> |
||||
|
||||
<div class="container"> |
||||
|
||||
<!-- Docs nav |
||||
================================================== --> |
||||
<div class="row"> |
||||
<div class="span3 bs-docs-sidebar"> |
||||
<ul class="nav nav-list bs-docs-sidenav"> |
||||
<li><a href="#global"><i class="icon-chevron-right"></i> Global styles</a></li> |
||||
<li><a href="#gridSystem"><i class="icon-chevron-right"></i> Grid system</a></li> |
||||
<li><a href="#fluidGridSystem"><i class="icon-chevron-right"></i> Fluid grid system</a></li> |
||||
<li><a href="#layouts"><i class="icon-chevron-right"></i> Layouts</a></li> |
||||
<li><a href="#responsive"><i class="icon-chevron-right"></i> Responsive design</a></li> |
||||
</ul> |
||||
</div> |
||||
<div class="span9"> |
||||
|
||||
|
||||
|
||||
<!-- Global Bootstrap settings |
||||
================================================== --> |
||||
<section id="global"> |
||||
<div class="page-header"> |
||||
<h1>Global settings</h1> |
||||
</div> |
||||
|
||||
<h3>Requires HTML5 doctype</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> |
||||
<pre class="prettyprint linenums"> |
||||
<!DOCTYPE html> |
||||
<html lang="en"> |
||||
... |
||||
</html> |
||||
</pre> |
||||
|
||||
<h3>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>@baseFontFamily</code>, <code>@baseFontSize</code>, and <code>@baseLineHeight</code> attributes as our typographic base</li> |
||||
<li>Set the global link color via <code>@linkColor</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>Reset via Normalize</h3> |
||||
<p>With Bootstrap 2, the old reset block has been dropped in favor of <a href="http://necolas.github.com/normalize.css/" target="_blank">Normalize.css</a>, a project by <a href="http://twitter.com/necolas" target="_blank">Nicolas Gallagher</a> that also powers the <a href="http://html5boilerplate.com" target="_blank">HTML5 Boilerplate</a>. While we use much of Normalize within our <strong>reset.less</strong>, we have removed some elements specifically for Bootstrap.</p> |
||||
|
||||
</section> |
||||
|
||||
|
||||
|
||||
|
||||
<!-- Grid system |
||||
================================================== --> |
||||
<section id="gridSystem"> |
||||
<div class="page-header"> |
||||
<h1>Default grid system</h1> |
||||
</div> |
||||
|
||||
<h2>Live grid example</h2> |
||||
<p>The default Bootstrap grid system utilizes <strong>12 columns</strong>, making for a 940px wide container without <a href="./scaffolding.html#responsive">responsive features</a> enabled. With the responsive CSS file added, the grid adapts to be 724px and 1170px wide depending on your viewport. Below 767px viewports, the columns become fluid and stack vertically.</p> |
||||
<div class="bs-docs-grid"> |
||||
<div class="row show-grid"> |
||||
<div class="span1">1</div> |
||||
<div class="span1">1</div> |
||||
<div class="span1">1</div> |
||||
<div class="span1">1</div> |
||||
<div class="span1">1</div> |
||||
<div class="span1">1</div> |
||||
<div class="span1">1</div> |
||||
<div class="span1">1</div> |
||||
<div class="span1">1</div> |
||||
</div> |
||||
<div class="row show-grid"> |
||||
<div class="span2">2</div> |
||||
<div class="span3">3</div> |
||||
<div class="span4">4</div> |
||||
</div> |
||||
<div class="row show-grid"> |
||||
<div class="span4">4</div> |
||||
<div class="span5">5</div> |
||||
</div> |
||||
<div class="row show-grid"> |
||||
<div class="span9">9</div> |
||||
</div> |
||||
</div> |
||||
|
||||
<h3>Basic grid HTML</h3> |
||||
<p>For a simple two column layout, create a <code>.row</code> and add the appropriate number of <code>.span*</code> columns. As this is a 12-column grid, each <code>.span*</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).</p> |
||||
<pre class="prettyprint linenums"> |
||||
<div class="row"> |
||||
<div class="span4">...</div> |
||||
<div class="span8">...</div> |
||||
</div> |
||||
</pre> |
||||
<p>Given this example, we have <code>.span4</code> and <code>.span8</code>, making for 12 total columns and a complete row.</p> |
||||
|
||||
<h2>Offsetting columns</h2> |
||||
<p>Move columns to the right using <code>.offset*</code> classes. Each class increases the left margin of a column by a whole column. For example, <code>.offset4</code> moves <code>.span4</code> over four columns.</p> |
||||
<div class="bs-docs-grid"> |
||||
<div class="row show-grid"> |
||||
<div class="span4">4</div> |
||||
<div class="span3 offset2">3 offset 2</div> |
||||
</div><!-- /row --> |
||||
<div class="row show-grid"> |
||||
<div class="span3 offset1">3 offset 1</div> |
||||
<div class="span3 offset2">3 offset 2</div> |
||||
</div><!-- /row --> |
||||
<div class="row show-grid"> |
||||
<div class="span6 offset3">6 offset 3</div> |
||||
</div><!-- /row --> |
||||
</div> |
||||
<pre class="prettyprint linenums"> |
||||
<div class="row"> |
||||
<div class="span4">...</div> |
||||
<div class="span3 offset2">...</div> |
||||
</div> |
||||
</pre> |
||||
|
||||
<h2>Nesting columns</h2> |
||||
<p>To nest your content with the default grid, add a new <code>.row</code> and set of <code>.span*</code> columns within an existing <code>.span*</code> column. Nested rows should include a set of columns that add up to the number of columns of its parent.</p> |
||||
<div class="row show-grid"> |
||||
<div class="span9"> |
||||
Level 1 of column |
||||
<div class="row show-grid"> |
||||
<div class="span6"> |
||||
Level 2 |
||||
</div> |
||||
<div class="span3"> |
||||
Level 2 |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<pre class="prettyprint linenums"> |
||||
<div class="row"> |
||||
<div class="span9"> |
||||
Level 1 column |
||||
<div class="row"> |
||||
<div class="span6">Level 2</div> |
||||
<div class="span3">Level 2</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</pre> |
||||
</section> |
||||
|
||||
|
||||
|
||||
<!-- Fluid grid system |
||||
================================================== --> |
||||
<section id="fluidGridSystem"> |
||||
<div class="page-header"> |
||||
<h1>Fluid grid system</h1> |
||||
</div> |
||||
|
||||
<h2>Live fluid grid example</h2> |
||||
<p>The fluid grid system uses percents instead of pixels for column widths. It has the same responsive capabilities as our fixed grid system, ensuring proper proportions for key screen resolutions and devices.</p> |
||||
<div class="bs-docs-grid"> |
||||
<div class="row-fluid show-grid"> |
||||
<div class="span1">1</div> |
||||
<div class="span1">1</div> |
||||
<div class="span1">1</div> |
||||
<div class="span1">1</div> |
||||
<div class="span1">1</div> |
||||
<div class="span1">1</div> |
||||
<div class="span1">1</div> |
||||
<div class="span1">1</div> |
||||
<div class="span1">1</div> |
||||
<div class="span1">1</div> |
||||
<div class="span1">1</div> |
||||
<div class="span1">1</div> |
||||
</div> |
||||
<div class="row-fluid show-grid"> |
||||
<div class="span4">4</div> |
||||
<div class="span4">4</div> |
||||
<div class="span4">4</div> |
||||
</div> |
||||
<div class="row-fluid show-grid"> |
||||
<div class="span4">4</div> |
||||
<div class="span8">8</div> |
||||
</div> |
||||
<div class="row-fluid show-grid"> |
||||
<div class="span6">6</div> |
||||
<div class="span6">6</div> |
||||
</div> |
||||
<div class="row-fluid show-grid"> |
||||
<div class="span12">12</div> |
||||
</div> |
||||
</div> |
||||
|
||||
<h3>Basic fluid grid HTML</h3> |
||||
<p>Make any row "fluid" by changing <code>.row</code> to <code>.row-fluid</code>. The column classes stay the exact same, making it easy to flip between fixed and fluid grids.</p> |
||||
<pre class="prettyprint linenums"> |
||||
<div class="row-fluid"> |
||||
<div class="span4">...</div> |
||||
<div class="span8">...</div> |
||||
</div> |
||||
</pre> |
||||
|
||||
<h2>Fluid offsetting</h2> |
||||
<p>Operates the same way as the fixed grid system offsetting: add <code>.offset*</code> to any column to offset by that many columns.</p> |
||||
<div class="bs-docs-grid"> |
||||
<div class="row-fluid show-grid"> |
||||
<div class="span4">4</div> |
||||
<div class="span4 offset4">4 offset 4</div> |
||||
</div><!-- /row --> |
||||
<div class="row-fluid show-grid"> |
||||
<div class="span3 offset3">3 offset 3</div> |
||||
<div class="span3 offset3">3 offset 3</div> |
||||
</div><!-- /row --> |
||||
<div class="row-fluid show-grid"> |
||||
<div class="span6 offset6">6 offset 6</div> |
||||
</div><!-- /row --> |
||||
</div> |
||||
<pre class="prettyprint linenums"> |
||||
<div class="row-fluid"> |
||||
<div class="span4">...</div> |
||||
<div class="span4 offset2">...</div> |
||||
</div> |
||||
</pre> |
||||
|
||||
<h2>Fluid nesting</h2> |
||||
<p>Nesting with fluid grids is a bit different: the number of nested columns should not match the parent's number of columns. Instead, each level of nested columns are reset because each row takes up 100% of the parent column.</p> |
||||
<div class="row-fluid show-grid"> |
||||
<div class="span12"> |
||||
Fluid 12 |
||||
<div class="row-fluid show-grid"> |
||||
<div class="span6"> |
||||
Fluid 6 |
||||
</div> |
||||
<div class="span6"> |
||||
Fluid 6 |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<pre class="prettyprint linenums"> |
||||
<div class="row-fluid"> |
||||
<div class="span12"> |
||||
Level 1 of column |
||||
<div class="row-fluid"> |
||||
<div class="span6">Level 2</div> |
||||
<div class="span6">Level 2</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</pre> |
||||
|
||||
</section> |
||||
|
||||
|
||||
|
||||
|
||||
<!-- Layouts (Default and fluid) |
||||
================================================== --> |
||||
<section id="layouts"> |
||||
<div class="page-header"> |
||||
<h1>Layouts</h1> |
||||
</div> |
||||
|
||||
<h2>Fixed layout</h2> |
||||
<p>Provides a common fixed-width (and optionally responsive) layout with only <code><div class="container"></code> required.</p> |
||||
<div class="mini-layout"> |
||||
<div class="mini-layout-body"></div> |
||||
</div> |
||||
<pre class="prettyprint linenums"> |
||||
<body> |
||||
<div class="container"> |
||||
... |
||||
</div> |
||||
</body> |
||||
</pre> |
||||
|
||||
<h2>Fluid layout</h2> |
||||
<p>Create a fluid, two-column page with <code><div class="container-fluid"></code>—great for applications and docs.</p> |
||||
<div class="mini-layout fluid"> |
||||
<div class="mini-layout-sidebar"></div> |
||||
<div class="mini-layout-body"></div> |
||||
</div> |
||||
<pre class="prettyprint linenums"> |
||||
<div class="container-fluid"> |
||||
<div class="row-fluid"> |
||||
<div class="span2"> |
||||
<!--Sidebar content--> |
||||
</div> |
||||
<div class="span10"> |
||||
<!--Body content--> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</pre> |
||||
</section> |
||||
|
||||
|
||||
|
||||
|
||||
<!-- Responsive design |
||||
================================================== --> |
||||
<section id="responsive"> |
||||
<div class="page-header"> |
||||
<h1>Responsive design</h1> |
||||
</div> |
||||
|
||||
<h2>Enabling responsive features</h2> |
||||
<p>Turn on responsive CSS in your project by including the proper meta tag and additional stylesheet within the <code><head></code> of your document. If you've compiled Bootstrap from the Customize page, you need only include the meta tag.</p> |
||||
<pre class="prettyprint linenums"> |
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
||||
<link href="assets/css/bootstrap-responsive.css" rel="stylesheet"> |
||||
</pre> |
||||
<p><span class="label label-info">Heads up!</span> Bootstrap doesn't include responsive features by default at this time as not everything needs to be responsive. Instead of encouraging developers to remove this feature, we figure it best to enable it as needed.</p> |
||||
|
||||
<h2>About responsive Bootstrap</h2> |
||||
<img src="assets/img/responsive-illustrations.png" alt="Responsive devices" style="float: right; margin: 0 0 20px 20px;"> |
||||
<p>Media queries allow for custom CSS based on a number of conditions—ratios, widths, display type, etc—but usually focuses around <code>min-width</code> and <code>max-width</code>.</p> |
||||
<ul> |
||||
<li>Modify the width of column in our grid</li> |
||||
<li>Stack elements instead of float wherever necessary</li> |
||||
<li>Resize headings and text to be more appropriate for devices</li> |
||||
</ul> |
||||
<p>Use media queries responsibly and only as a start to your mobile audiences. For larger projects, do consider dedicated code bases and not layers of media queries.</p> |
||||
|
||||
<h2>Supported devices</h2> |
||||
<p>Bootstrap supports a handful of media queries in a single file to help make your projects more appropriate on different devices and screen resolutions. Here's what's included:</p> |
||||
<table class="table table-bordered table-striped"> |
||||
<thead> |
||||
<tr> |
||||
<th>Label</th> |
||||
<th>Layout width</th> |
||||
<th>Column width</th> |
||||
<th>Gutter width</th> |
||||
</tr> |
||||
</thead> |
||||
<tbody> |
||||
<tr> |
||||
<td>Large display</td> |
||||
<td>1200px and up</td> |
||||
<td>70px</td> |
||||
<td>30px</td> |
||||
</tr> |
||||
<tr> |
||||
<td>Default</td> |
||||
<td>980px and up</td> |
||||
<td>60px</td> |
||||
<td>20px</td> |
||||
</tr> |
||||
<tr> |
||||
<td>Portrait tablets</td> |
||||
<td>768px and above</td> |
||||
<td>42px</td> |
||||
<td>20px</td> |
||||
</tr> |
||||
<tr> |
||||
<td>Phones to tablets</td> |
||||
<td>767px and below</td> |
||||
<td class="muted" colspan="2">Fluid columns, no fixed widths</td> |
||||
</tr> |
||||
<tr> |
||||
<td>Phones</td> |
||||
<td>480px and below</td> |
||||
<td class="muted" colspan="2">Fluid columns, no fixed widths</td> |
||||
</tr> |
||||
</tbody> |
||||
</table> |
||||
<pre class="prettyprint linenums"> |
||||
/* Large desktop */ |
||||
@media (min-width: 1200px) { ... } |
||||
|
||||
/* Portrait tablet to landscape and desktop */ |
||||
@media (min-width: 768px) and (max-width: 979px) { ... } |
||||
|
||||
/* Landscape phone to portrait tablet */ |
||||
@media (max-width: 767px) { ... } |
||||
|
||||
/* Landscape phones and down */ |
||||
@media (max-width: 480px) { ... } |
||||
</pre> |
||||
|
||||
|
||||
<h2>Responsive utility classes</h2> |
||||
<p>For faster mobile-friendly development, use these utility classes for showing and hiding content by device. Below is a table of the available classes and their effect on a given media query layout (labeled by device). They can be found in <code>responsive.less</code>.</p> |
||||
<table class="table table-bordered table-striped responsive-utilities"> |
||||
<thead> |
||||
<tr> |
||||
<th>Class</th> |
||||
<th>Phones <small>767px and below</small></th> |
||||
<th>Tablets <small>979px to 768px</small></th> |
||||
<th>Desktops <small>Default</small></th> |
||||
</tr> |
||||
</thead> |
||||
<tbody> |
||||
<tr> |
||||
<th><code>.visible-phone</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-tablet</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-desktop</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-phone</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-tablet</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-desktop</code></th> |
||||
<td class="is-visible">Visible</td> |
||||
<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.</p> |
||||
|
||||
<h3>Responsive utilities test case</h3> |
||||
<p>Resize your browser or load on different devices to test the above classes.</p> |
||||
<h4>Visible on...</h4> |
||||
<p>Green checkmarks indicate that class is visible in your current viewport.</p> |
||||
<ul class="responsive-utilities-test"> |
||||
<li>Phone<span class="visible-phone">✔ Phone</span></li> |
||||
<li>Tablet<span class="visible-tablet">✔ Tablet</span></li> |
||||
<li>Desktop<span class="visible-desktop">✔ Desktop</span></li> |
||||
</ul> |
||||
<h4>Hidden on...</h4> |
||||
<p>Here, green checkmarks indicate that class is hidden in your current viewport.</p> |
||||
<ul class="responsive-utilities-test hidden-on"> |
||||
<li>Phone<span class="hidden-phone">✔ Phone</span></li> |
||||
<li>Tablet<span class="hidden-tablet">✔ Tablet</span></li> |
||||
<li>Desktop<span class="hidden-desktop">✔ Desktop</span></li> |
||||
</ul> |
||||
|
||||
</section> |
||||
|
||||
|
||||
|
||||
</div> |
||||
</div> |
||||
|
||||
</div> |
||||
|
||||
|
||||
|
||||
<!-- Footer |
||||
================================================== --> |
||||
<footer class="footer"> |
||||
<div class="container"> |
||||
<p class="pull-right"><a href="#">Back to top</a></p> |
||||
<p>Designed and built with all the love in the world <a href="http://twitter.com/twitter" target="_blank">@twitter</a> 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 the <a href="http://www.apache.org/licenses/LICENSE-2.0" target="_blank">Apache License v2.0</a>. Documentation licensed under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.</p> |
||||
<p>Icons from <a href="http://glyphicons.com">Glyphicons Free</a>, licensed under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.</p> |
||||
<ul class="footer-links"> |
||||
<li><a href="http://blog.getbootstrap.com">Read the blog</a></li> |
||||
<li><a href="https://github.com/twitter/bootstrap/issues?state=open">Submit issues</a></li> |
||||
<li><a href="https://github.com/twitter/bootstrap/wiki">Roadmap and changelog</a></li> |
||||
</ul> |
||||
</div> |
||||
</footer> |
||||
|
||||
|
||||
|
||||
<!-- Le javascript |
||||
================================================== --> |
||||
<!-- Placed at the end of the document so the pages load faster --> |
||||
<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script> |
||||
<script src="assets/js/jquery.js"></script> |
||||
<script src="assets/js/google-code-prettify/prettify.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/application.js"></script> |
||||
|
||||
|
||||
|
||||
</body> |
||||
</html> |
@ -0,0 +1,147 @@
|
||||
<!DOCTYPE html> |
||||
<html lang="en"> |
||||
<head> |
||||
<meta charset="utf-8"> |
||||
<title>{{title}}</title> |
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
||||
<meta name="description" content=""> |
||||
<meta name="author" content=""> |
||||
|
||||
<!-- Le styles --> |
||||
<link href="assets/css/bootstrap.css" rel="stylesheet"> |
||||
<link href="assets/css/bootstrap-responsive.css" rel="stylesheet"> |
||||
<link href="assets/css/docs.css" rel="stylesheet"> |
||||
<link href="assets/js/google-code-prettify/prettify.css" rel="stylesheet"> |
||||
|
||||
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements --> |
||||
<!--[if lt IE 9]> |
||||
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> |
||||
<![endif]--> |
||||
|
||||
<!-- Le fav and touch icons --> |
||||
<link rel="shortcut icon" href="assets/ico/favicon.ico"> |
||||
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="assets/ico/apple-touch-icon-144-precomposed.png"> |
||||
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="assets/ico/apple-touch-icon-114-precomposed.png"> |
||||
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="assets/ico/apple-touch-icon-72-precomposed.png"> |
||||
<link rel="apple-touch-icon-precomposed" href="assets/ico/apple-touch-icon-57-precomposed.png"> |
||||
|
||||
{{#production}} |
||||
<script type="text/javascript"> |
||||
var _gaq = _gaq || []; |
||||
_gaq.push(['_setAccount', 'UA-146052-10']); |
||||
_gaq.push(['_trackPageview']); |
||||
(function() { |
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; |
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; |
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); |
||||
})(); |
||||
</script> |
||||
{{/production}} |
||||
</head> |
||||
|
||||
<body data-spy="scroll" data-target=".bs-docs-sidebar"> |
||||
|
||||
<!-- Navbar |
||||
================================================== --> |
||||
<div class="navbar navbar-inverse navbar-fixed-top"> |
||||
<div class="navbar-inner"> |
||||
<div class="container"> |
||||
<button type="button" class="btn btn-navbar" 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="brand" href="./index.html">Bootstrap</a> |
||||
<div class="nav-collapse collapse"> |
||||
<ul class="nav"> |
||||
<li class="{{index}}"> |
||||
<a href="./index.html">{{_i}}Home{{/i}}</a> |
||||
</li> |
||||
<li class="{{getting-started}}"> |
||||
<a href="./getting-started.html">{{_i}}Get started{{/i}}</a> |
||||
</li> |
||||
<li class="{{scaffolding}}"> |
||||
<a href="./scaffolding.html">{{_i}}Scaffolding{{/i}}</a> |
||||
</li> |
||||
<li class="{{base-css}}"> |
||||
<a href="./base-css.html">{{_i}}Base CSS{{/i}}</a> |
||||
</li> |
||||
<li class="{{components}}"> |
||||
<a href="./components.html">{{_i}}Components{{/i}}</a> |
||||
</li> |
||||
<li class="{{javascript}}"> |
||||
<a href="./javascript.html">{{_i}}Javascript{{/i}}</a> |
||||
</li> |
||||
<li class="{{customize}}"> |
||||
<a href="./customize.html">{{_i}}Customize{{/i}}</a> |
||||
</li> |
||||
</ul> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
{{>body}} |
||||
|
||||
|
||||
|
||||
<!-- Footer |
||||
================================================== --> |
||||
<footer class="footer"> |
||||
<div class="container"> |
||||
<p class="pull-right"><a href="#">{{_i}}Back to top{{/i}}</a></p> |
||||
<p>{{_i}}Designed and built with all the love in the world <a href="http://twitter.com/twitter" target="_blank">@twitter</a> by <a href="http://twitter.com/mdo" target="_blank">@mdo</a> and <a href="http://twitter.com/fat" target="_blank">@fat</a>.{{/i}}</p> |
||||
<p>{{_i}}Code licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0" target="_blank">Apache License v2.0</a>. Documentation licensed under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.{{/i}}</p> |
||||
<p>{{_i}}Icons from <a href="http://glyphicons.com">Glyphicons Free</a>, licensed under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.{{/i}}</p> |
||||
<ul class="footer-links"> |
||||
<li><a href="http://blog.getbootstrap.com">{{_i}}Read the blog{{/i}}</a></li> |
||||
<li><a href="https://github.com/twitter/bootstrap/issues?state=open">{{_i}}Submit issues{{/i}}</a></li> |
||||
<li><a href="https://github.com/twitter/bootstrap/wiki">{{_i}}Roadmap and changelog{{/i}}</a></li> |
||||
</ul> |
||||
</div> |
||||
</footer> |
||||
|
||||
|
||||
|
||||
<!-- Le javascript |
||||
================================================== --> |
||||
<!-- Placed at the end of the document so the pages load faster --> |
||||
<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script> |
||||
<script src="assets/js/jquery.js"></script> |
||||
<script src="assets/js/google-code-prettify/prettify.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/application.js"></script> |
||||
|
||||
|
||||
{{#production}} |
||||
<!-- Analytics |
||||
================================================== --> |
||||
<script> |
||||
var _gauges = _gauges || []; |
||||
(function() { |
||||
var t = document.createElement('script'); |
||||
t.type = 'text/javascript'; |
||||
t.async = true; |
||||
t.id = 'gauges-tracker'; |
||||
t.setAttribute('data-site-id', '4f0dc9fef5a1f55508000013'); |
||||
t.src = '//secure.gaug.es/track.js'; |
||||
var s = document.getElementsByTagName('script')[0]; |
||||
s.parentNode.insertBefore(t, s); |
||||
})(); |
||||
</script> |
||||
{{/production}} |
||||
|
||||
</body> |
||||
</html> |
@ -0,0 +1,363 @@
|
||||
<!-- Masthead |
||||
================================================== --> |
||||
<header class="jumbotron subhead" id="overview"> |
||||
<div class="container"> |
||||
<h1>{{_i}}Customize and download{{/i}}</h1> |
||||
<p class="lead">{{_i}}<a href="https://github.com/twitter/bootstrap/zipball/master">Download Bootstrap</a> or customize variables, components, javascript plugins, and more.{{/i}}</p> |
||||
</div> |
||||
</header> |
||||
|
||||
|
||||
<div class="container"> |
||||
|
||||
<!-- Docs nav |
||||
================================================== --> |
||||
<div class="row"> |
||||
<div class="span3 bs-docs-sidebar"> |
||||
<ul class="nav nav-list bs-docs-sidenav"> |
||||
<li><a href="#components"><i class="icon-chevron-right"></i> {{_i}}1. Choose components{{/i}}</a></li> |
||||
<li><a href="#plugins"><i class="icon-chevron-right"></i> {{_i}}2. Select jQuery plugins{{/i}}</a></li> |
||||
<li><a href="#variables"><i class="icon-chevron-right"></i> {{_i}}3. Customize variables{{/i}}</a></li> |
||||
<li><a href="#download"><i class="icon-chevron-right"></i> {{_i}}4. Download{{/i}}</a></li> |
||||
</ul> |
||||
</div> |
||||
<div class="span9"> |
||||
|
||||
|
||||
<!-- Customize form |
||||
================================================== --> |
||||
<form> |
||||
<section class="download" id="components"> |
||||
<div class="page-header"> |
||||
<a class="btn btn-small pull-right toggle-all" href="#">{{_i}}Toggle all{{/i}}</a> |
||||
<h1> |
||||
{{_i}}1. Choose components{{/i}} |
||||
</h1> |
||||
</div> |
||||
<div class="row download-builder"> |
||||
<div class="span3"> |
||||
<h3>{{_i}}Scaffolding{{/i}}</h3> |
||||
<label class="checkbox"><input checked="checked" type="checkbox" value="reset.less"> {{_i}}Normalize and reset{{/i}}</label> |
||||
<label class="checkbox"><input checked="checked" type="checkbox" value="scaffolding.less"> {{_i}}Body type and links{{/i}}</label> |
||||
<label class="checkbox"><input checked="checked" type="checkbox" value="grid.less"> {{_i}}Grid system{{/i}}</label> |
||||
<label class="checkbox"><input checked="checked" type="checkbox" value="layouts.less"> {{_i}}Layouts{{/i}}</label> |
||||
<h3>{{_i}}Base CSS{{/i}}</h3> |
||||
<label class="checkbox"><input checked="checked" type="checkbox" value="type.less"> {{_i}}Headings, body, etc{{/i}}</label> |
||||
<label class="checkbox"><input checked="checked" type="checkbox" value="code.less"> {{_i}}Code and pre{{/i}}</label> |
||||
<label class="checkbox"><input checked="checked" type="checkbox" value="labels-badges.less"> {{_i}}Labels and badges{{/i}}</label> |
||||
<label class="checkbox"><input checked="checked" type="checkbox" value="tables.less"> {{_i}}Tables{{/i}}</label> |
||||
<label class="checkbox"><input checked="checked" type="checkbox" value="forms.less"> {{_i}}Forms{{/i}}</label> |
||||
<label class="checkbox"><input checked="checked" type="checkbox" value="buttons.less"> {{_i}}Buttons{{/i}}</label> |
||||
<label class="checkbox"><input checked="checked" type="checkbox" value="sprites.less"> {{_i}}Icons{{/i}}</label> |
||||
</div><!-- /span --> |
||||
<div class="span3"> |
||||
<h3>{{_i}}Components{{/i}}</h3> |
||||
<label class="checkbox"><input checked="checked" type="checkbox" value="button-groups.less"> {{_i}}Button groups and dropdowns{{/i}}</label> |
||||
<label class="checkbox"><input checked="checked" type="checkbox" value="navs.less"> {{_i}}Navs, tabs, and pills{{/i}}</label> |
||||
<label class="checkbox"><input checked="checked" type="checkbox" value="navbar.less"> {{_i}}Navbar{{/i}}</label> |
||||
<label class="checkbox"><input checked="checked" type="checkbox" value="breadcrumbs.less"> {{_i}}Breadcrumbs{{/i}}</label> |
||||
<label class="checkbox"><input checked="checked" type="checkbox" value="pagination.less"> {{_i}}Pagination{{/i}}</label> |
||||
<label class="checkbox"><input checked="checked" type="checkbox" value="pager.less"> {{_i}}Pager{{/i}}</label> |
||||
<label class="checkbox"><input checked="checked" type="checkbox" value="thumbnails.less"> {{_i}}Thumbnails{{/i}}</label> |
||||
<label class="checkbox"><input checked="checked" type="checkbox" value="alerts.less"> {{_i}}Alerts{{/i}}</label> |
||||
<label class="checkbox"><input checked="checked" type="checkbox" value="progress-bars.less"> {{_i}}Progress bars{{/i}}</label> |
||||
<label class="checkbox"><input checked="checked" type="checkbox" value="hero-unit.less"> {{_i}}Hero unit{{/i}}</label> |
||||
<h3>{{_i}}JS Components{{/i}}</h3> |
||||
<label class="checkbox"><input checked="checked" type="checkbox" value="tooltip.less"> {{_i}}Tooltips{{/i}}</label> |
||||
<label class="checkbox"><input checked="checked" type="checkbox" value="popovers.less"> {{_i}}Popovers{{/i}}</label> |
||||
<label class="checkbox"><input checked="checked" type="checkbox" value="modals.less"> {{_i}}Modals{{/i}}</label> |
||||
<label class="checkbox"><input checked="checked" type="checkbox" value="dropdowns.less"> {{_i}}Dropdowns{{/i}}</label> |
||||
<label class="checkbox"><input checked="checked" type="checkbox" value="accordion.less"> {{_i}}Collapse{{/i}}</label> |
||||
<label class="checkbox"><input checked="checked" type="checkbox" value="carousel.less"> {{_i}}Carousel{{/i}}</label> |
||||
</div><!-- /span --> |
||||
<div class="span3"> |
||||
<h3>{{_i}}Miscellaneous{{/i}}</h3> |
||||
<label class="checkbox"><input checked="checked" type="checkbox" value="wells.less"> {{_i}}Wells{{/i}}</label> |
||||
<label class="checkbox"><input checked="checked" type="checkbox" value="close.less"> {{_i}}Close icon{{/i}}</label> |
||||
<label class="checkbox"><input checked="checked" type="checkbox" value="utilities.less"> {{_i}}Utilities{{/i}}</label> |
||||
<label class="checkbox"><input checked="checked" type="checkbox" value="component-animations.less"> {{_i}}Component animations{{/i}}</label> |
||||
<h3>{{_i}}Responsive{{/i}}</h3> |
||||
<label class="checkbox"><input checked="checked" type="checkbox" value="responsive-utilities.less"> {{_i}}Visible/hidden classes{{/i}}</label> |
||||
<label class="checkbox"><input checked="checked" type="checkbox" value="responsive-767px-max.less"> {{_i}}Narrow tablets and below (<767px){{/i}}</label> |
||||
<label class="checkbox"><input checked="checked" type="checkbox" value="responsive-768px-979px.less"> {{_i}}Tablets to desktops (767-979px){{/i}}</label> |
||||
<label class="checkbox"><input checked="checked" type="checkbox" value="responsive-1200px-min.less"> {{_i}}Large desktops (>1200px){{/i}}</label> |
||||
<label class="checkbox"><input checked="checked" type="checkbox" value="responsive-navbar.less"> {{_i}}Responsive navbar{{/i}}</label> |
||||
</div><!-- /span --> |
||||
</div><!-- /row --> |
||||
</section> |
||||
|
||||
<section class="download" id="plugins"> |
||||
<div class="page-header"> |
||||
<a class="btn btn-small pull-right toggle-all" href="#">{{_i}}Toggle all{{/i}}</a> |
||||
<h1> |
||||
{{_i}}2. Select jQuery plugins{{/i}} |
||||
</h1> |
||||
</div> |
||||
<div class="row download-builder"> |
||||
<div class="span3"> |
||||
<label class="checkbox"> |
||||
<input type="checkbox" checked="true" value="bootstrap-transition.js"> |
||||
{{_i}}Transitions <small>(required for any animation)</small>{{/i}} |
||||
</label> |
||||
<label class="checkbox"> |
||||
<input type="checkbox" checked="true" value="bootstrap-modal.js"> |
||||
{{_i}}Modals{{/i}} |
||||
</label> |
||||
<label class="checkbox"> |
||||
<input type="checkbox" checked="true" value="bootstrap-dropdown.js"> |
||||
{{_i}}Dropdowns{{/i}} |
||||
</label> |
||||
<label class="checkbox"> |
||||
<input type="checkbox" checked="true" value="bootstrap-scrollspy.js"> |
||||
{{_i}}Scrollspy{{/i}} |
||||
</label> |
||||
<label class="checkbox"> |
||||
<input type="checkbox" checked="true" value="bootstrap-tab.js"> |
||||
{{_i}}Togglable tabs{{/i}} |
||||
</label> |
||||
<label class="checkbox"> |
||||
<input type="checkbox" checked="true" value="bootstrap-tooltip.js"> |
||||
{{_i}}Tooltips{{/i}} |
||||
</label> |
||||
<label class="checkbox"> |
||||
<input type="checkbox" checked="true" value="bootstrap-popover.js"> |
||||
{{_i}}Popovers <small>(requires Tooltips)</small>{{/i}} |
||||
</label> |
||||
</div><!-- /span --> |
||||
<div class="span3"> |
||||
<label class="checkbox"> |
||||
<input type="checkbox" checked="true" value="bootstrap-affix.js"> |
||||
{{_i}}Affix{{/i}} |
||||
</label> |
||||
<label class="checkbox"> |
||||
<input type="checkbox" checked="true" value="bootstrap-alert.js"> |
||||
{{_i}}Alert messages{{/i}} |
||||
</label> |
||||
<label class="checkbox"> |
||||
<input type="checkbox" checked="true" value="bootstrap-button.js"> |
||||
{{_i}}Buttons{{/i}} |
||||
</label> |
||||
<label class="checkbox"> |
||||
<input type="checkbox" checked="true" value="bootstrap-collapse.js"> |
||||
{{_i}}Collapse{{/i}} |
||||
</label> |
||||
<label class="checkbox"> |
||||
<input type="checkbox" checked="true" value="bootstrap-carousel.js"> |
||||
{{_i}}Carousel{{/i}} |
||||
</label> |
||||
<label class="checkbox"> |
||||
<input type="checkbox" checked="true" value="bootstrap-typeahead.js"> |
||||
{{_i}}Typeahead{{/i}} |
||||
</label> |
||||
</div><!-- /span --> |
||||
<div class="span3"> |
||||
<h4 class="muted">{{_i}}Heads up!{{/i}}</h4> |
||||
<p class="muted">{{_i}}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.{{/i}}</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="#">{{_i}}Reset to defaults{{/i}}</a> |
||||
<h1> |
||||
{{_i}}3. Customize variables{{/i}} |
||||
</h1> |
||||
</div> |
||||
<div class="row download-builder"> |
||||
<div class="span3"> |
||||
<h3>{{_i}}Scaffolding{{/i}}</h3> |
||||
<label>@bodyBackground</label> |
||||
<input type="text" class="span3" placeholder="@white"> |
||||
<label>@textColor</label> |
||||
<input type="text" class="span3" placeholder="@grayDark"> |
||||
|
||||
<h3>{{_i}}Links{{/i}}</h3> |
||||
<label>@linkColor</label> |
||||
<input type="text" class="span3" placeholder="#08c"> |
||||
<label>@linkColorHover</label> |
||||
<input type="text" class="span3" placeholder="darken(@linkColor, 15%)"> |
||||
<h3>{{_i}}Colors{{/i}}</h3> |
||||
<label>@blue</label> |
||||
<input type="text" class="span3" placeholder="#049cdb"> |
||||
<label>@green</label> |
||||
<input type="text" class="span3" placeholder="#46a546"> |
||||
<label>@red</label> |
||||
<input type="text" class="span3" placeholder="#9d261d"> |
||||
<label>@yellow</label> |
||||
<input type="text" class="span3" placeholder="#ffc40d"> |
||||
<label>@orange</label> |
||||
<input type="text" class="span3" placeholder="#f89406"> |
||||
<label>@pink</label> |
||||
<input type="text" class="span3" placeholder="#c3325f"> |
||||
<label>@purple</label> |
||||
<input type="text" class="span3" placeholder="#7a43b6"> |
||||
|
||||
<h3>{{_i}}Sprites{{/i}}</h3> |
||||
<label>@iconSpritePath</label> |
||||
<input type="text" class="span3" placeholder="'../img/glyphicons-halflings.png'"> |
||||
<label>@iconWhiteSpritePath</label> |
||||
<input type="text" class="span3" placeholder="'../img/glyphicons-halflings-white.png'"> |
||||
|
||||
<h3>{{_i}}Grid system{{/i}}</h3> |
||||
<label>@gridColumns</label> |
||||
<input type="text" class="span3" placeholder="12"> |
||||
<label>@gridColumnWidth</label> |
||||
<input type="text" class="span3" placeholder="60px"> |
||||
<label>@gridGutterWidth</label> |
||||
<input type="text" class="span3" placeholder="20px"> |
||||
<label>@gridColumnWidth1200</label> |
||||
<input type="text" class="span3" placeholder="70px"> |
||||
<label>@gridGutterWidth1200</label> |
||||
<input type="text" class="span3" placeholder="30px"> |
||||
<label>@gridColumnWidth768</label> |
||||
<input type="text" class="span3" placeholder="42px"> |
||||
<label>@gridGutterWidth768</label> |
||||
<input type="text" class="span3" placeholder="20px"> |
||||
|
||||
</div><!-- /span --> |
||||
<div class="span3"> |
||||
|
||||
<h3>{{_i}}Typography{{/i}}</h3> |
||||
<label>@sansFontFamily</label> |
||||
<input type="text" class="span3" placeholder="'Helvetica Neue', Helvetica, Arial, sans-serif"> |
||||
<label>@serifFontFamily</label> |
||||
<input type="text" class="span3" placeholder="Georgia, 'Times New Roman', Times, serif"> |
||||
<label>@monoFontFamily</label> |
||||
<input type="text" class="span3" placeholder="Menlo, Monaco, 'Courier New', monospace"> |
||||
<label>@baseFontSize</label> |
||||
<input type="text" class="span3" placeholder="14px"> |
||||
<label>@baseFontFamily</label> |
||||
<input type="text" class="span3" placeholder="@sansFontFamily"> |
||||
<label>@baseLineHeight</label> |
||||
<input type="text" class="span3" placeholder="20px"> |
||||
<label>@altFontFamily</label> |
||||
<input type="text" class="span3" placeholder="@serifFontFamily"> |
||||
<label>@headingsFontFamily</label> |
||||
<input type="text" class="span3" placeholder="inherit"> |
||||
<label>@headingsFontWeight</label> |
||||
<input type="text" class="span3" placeholder="bold"> |
||||
<label>@headingsColor</label> |
||||
<input type="text" class="span3" placeholder="inherit"> |
||||
<label>@heroUnitBackground</label> |
||||
<input type="text" class="span3" placeholder="@grayLighter"> |
||||
<label>@heroUnitHeadingColor</label> |
||||
<input type="text" class="span3" placeholder="inherit"> |
||||
<label>@heroUnitLeadColor</label> |
||||
<input type="text" class="span3" placeholder="inherit"> |
||||
|
||||
<h3>{{_i}}Tables{{/i}}</h3> |
||||
<label>@tableBackground</label> |
||||
<input type="text" class="span3" placeholder="transparent"> |
||||
<label>@tableBackgroundAccent</label> |
||||
<input type="text" class="span3" placeholder="#f9f9f9"> |
||||
<label>@tableBackgroundHover</label> |
||||
<input type="text" class="span3" placeholder="#f5f5f5"> |
||||
<label>@tableBorder</label> |
||||
<input type="text" class="span3" placeholder="#ddd"> |
||||
|
||||
<h3>{{_i}}Forms{{/i}}</h3> |
||||
<label>@placeholderText</label> |
||||
<input type="text" class="span3" placeholder="@grayLight"> |
||||
<label>@inputBackground</label> |
||||
<input type="text" class="span3" placeholder="@white"> |
||||
<label>@inputBorder</label> |
||||
<input type="text" class="span3" placeholder="#ccc"> |
||||
<label>@inputBorderRadius</label> |
||||
<input type="text" class="span3" placeholder="3px"> |
||||
<label>@inputDisabledBackground</label> |
||||
<input type="text" class="span3" placeholder="@grayLighter"> |
||||
<label>@formActionsBackground</label> |
||||
<input type="text" class="span3" placeholder="#f5f5f5"> |
||||
<label>@btnPrimaryBackground</label> |
||||
<input type="text" class="span3" placeholder="@linkColor"> |
||||
<label>@btnPrimaryBackgroundHighlight</label> |
||||
<input type="text" class="span3" placeholder="darken(@white, 10%);"> |
||||
|
||||
</div><!-- /span --> |
||||
<div class="span3"> |
||||
|
||||
<h3>{{_i}}Form states & alerts{{/i}}</h3> |
||||
<label>@warningText</label> |
||||
<input type="text" class="span3" placeholder="#c09853"> |
||||
<label>@warningBackground</label> |
||||
<input type="text" class="span3" placeholder="#fcf8e3"> |
||||
<label>@errorText</label> |
||||
<input type="text" class="span3" placeholder="#b94a48"> |
||||
<label>@errorBackground</label> |
||||
<input type="text" class="span3" placeholder="#f2dede"> |
||||
<label>@successText</label> |
||||
<input type="text" class="span3" placeholder="#468847"> |
||||
<label>@successBackground</label> |
||||
<input type="text" class="span3" placeholder="#dff0d8"> |
||||
<label>@infoText</label> |
||||
<input type="text" class="span3" placeholder="#3a87ad"> |
||||
<label>@infoBackground</label> |
||||
<input type="text" class="span3" placeholder="#d9edf7"> |
||||
|
||||
<h3>{{_i}}Navbar{{/i}}</h3> |
||||
<label>@navbarHeight</label> |
||||
<input type="text" class="span3" placeholder="40px"> |
||||
<label>@navbarBackground</label> |
||||
<input type="text" class="span3" placeholder="@grayDarker"> |
||||
<label>@navbarBackgroundHighlight</label> |
||||
<input type="text" class="span3" placeholder="@grayDark"> |
||||
<label>@navbarText</label> |
||||
<input type="text" class="span3" placeholder="@grayLight"> |
||||
<label>@navbarBrandColor</label> |
||||
<input type="text" class="span3" placeholder="@navbarLinkColor"> |
||||
<label>@navbarLinkColor</label> |
||||
<input type="text" class="span3" placeholder="@grayLight"> |
||||
<label>@navbarLinkColorHover</label> |
||||
<input type="text" class="span3" placeholder="@white"> |
||||
<label>@navbarLinkColorActive</label> |
||||
<input type="text" class="span3" placeholder="@navbarLinkColorHover"> |
||||
<label>@navbarLinkBackgroundHover</label> |
||||
<input type="text" class="span3" placeholder="transparent"> |
||||
<label>@navbarLinkBackgroundActive</label> |
||||
<input type="text" class="span3" placeholder="@navbarBackground"> |
||||
<label>@navbarSearchBackground</label> |
||||
<input type="text" class="span3" placeholder="lighten(@navbarBackground, 25%)"> |
||||
<label>@navbarSearchBackgroundFocus</label> |
||||
<input type="text" class="span3" placeholder="@white"> |
||||
<label>@navbarSearchBorder</label> |
||||
<input type="text" class="span3" placeholder="darken(@navbarSearchBackground, 30%)"> |
||||
<label>@navbarSearchPlaceholderColor</label> |
||||
<input type="text" class="span3" placeholder="#ccc"> |
||||
|
||||
<h3>{{_i}}Dropdowns{{/i}}</h3> |
||||
<label>@dropdownBackground</label> |
||||
<input type="text" class="span3" placeholder="@white"> |
||||
<label>@dropdownBorder</label> |
||||
<input type="text" class="span3" placeholder="rgba(0,0,0,.2)"> |
||||
<label>@dropdownLinkColor</label> |
||||
<input type="text" class="span3" placeholder="@grayDark"> |
||||
<label>@dropdownLinkColorHover</label> |
||||
<input type="text" class="span3" placeholder="@white"> |
||||
<label>@dropdownLinkBackgroundHover</label> |
||||
<input type="text" class="span3" placeholder="@linkColor"> |
||||
</div><!-- /span --> |
||||
</div><!-- /row --> |
||||
</section> |
||||
|
||||
<section class="download" id="download"> |
||||
<div class="page-header"> |
||||
<h1> |
||||
{{_i}}4. Download{{/i}} |
||||
</h1> |
||||
</div> |
||||
<div class="download-btn"> |
||||
<a class="btn btn-primary" href="#" {{#production}}onclick="_gaq.push(['_trackEvent', 'Customize', 'Download', 'Customize and Download']);"{{/production}}>Customize and Download</a> |
||||
<h4>{{_i}}What's included?{{/i}}</h4> |
||||
<p>{{_i}}Downloads include compiled CSS, compiled and minified CSS, and compiled jQuery plugins, all nicely packed up into a zipball for your convenience.{{/i}}</p> |
||||
</div> |
||||
</section><!-- /download --> |
||||
</form> |
||||
|
||||
|
||||
|
||||
</div>{{! /span9 }} |
||||
</div>{{! row}} |
||||
|
||||
</div>{{! /.container }} |
@ -0,0 +1,169 @@
|
||||
<!-- Subhead |
||||
================================================== --> |
||||
<header class="jumbotron subhead" id="overview"> |
||||
<div class="container"> |
||||
<h1>{{_i}}Extending Bootstrap{{/i}}</h1> |
||||
<p class="lead">{{_i}}Extend Bootstrap to take advantage of included styles and components, as well as LESS variables and mixins.{{/i}}</p> |
||||
<div> |
||||
</header> |
||||
|
||||
<div class="container"> |
||||
|
||||
<!-- Docs nav |
||||
================================================== --> |
||||
<div class="row"> |
||||
<div class="span3 bs-docs-sidebar"> |
||||
<ul class="nav nav-list bs-docs-sidenav"> |
||||
<li><a href="#built-with-less"><i class="icon-chevron-right"></i> {{_i}}Built with LESS{{/i}}</a></li> |
||||
<li><a href="#compiling"><i class="icon-chevron-right"></i> {{_i}}Compiling Bootstrap{{/i}}</a></li> |
||||
<li><a href="#static-assets"><i class="icon-chevron-right"></i> {{_i}}Use as static assets{{/i}}</a></li> |
||||
</ul> |
||||
</div> |
||||
<div class="span9"> |
||||
|
||||
|
||||
|
||||
<!-- BUILT WITH LESS |
||||
================================================== --> |
||||
<section id="built-with-less"> |
||||
<div class="page-header"> |
||||
<h1>{{_i}}Built with LESS{{/i}}</h1> |
||||
</div> |
||||
|
||||
<img style="float: right; height: 36px; margin: 10px 20px 20px" src="assets/img/less-logo-large.png" alt="LESS CSS"> |
||||
<p class="lead">{{_i}}Bootstrap is made with LESS at its core, a dynamic stylesheet language created by our good friend, <a href="http://cloudhead.io">Alexis Sellier</a>. It makes developing systems-based CSS faster, easier, and more fun.{{/i}}</p> |
||||
|
||||
<h3>{{_i}}Why LESS?{{/i}}</h3> |
||||
<p>{{_i}}One of Bootstrap's creators wrote a quick <a href="http://www.wordsbyf.at/2012/03/08/why-less/">blog post about this</a>, summarized here:{{/i}}</p> |
||||
<ul> |
||||
<li>{{_i}}Bootstrap compiles faster ~6x faster with Less compared to Sass{{/i}}</li> |
||||
<li>{{_i}}Less is written in JavaScript, making it easier to us to dive in and patch compared to Ruby with Sass.{{/i}}</li> |
||||
<li>{{_i}}Less is more; we want to feel like we're writing CSS and making Bootstrap approachable to all.{{/i}}</li> |
||||
</ul> |
||||
|
||||
<h3>{{_i}}What's included?{{/i}}</h3> |
||||
<p>{{_i}}As an extension of CSS, LESS includes variables, mixins for reusable snippets of code, operations for simple math, nesting, and even color functions.{{/i}}</p> |
||||
|
||||
<h3>{{_i}}Learn more{{/i}}</h3> |
||||
<p>{{_i}}Visit the official website at <a href="http://lesscss.org">http://lesscss.org</a> to learn more.{{/i}}</p> |
||||
</section> |
||||
|
||||
|
||||
|
||||
<!-- COMPILING LESS AND BOOTSTRAP |
||||
================================================== --> |
||||
<section id="compiling"> |
||||
<div class="page-header"> |
||||
<h1>{{_i}}Compiling Bootstrap with Less{{/i}}</h1> |
||||
</div> |
||||
|
||||
<p class="lead">{{_i}}Since our CSS is written with Less and utilizes variables and mixins, it needs to be compiled for final production implementation. Here's how.{{/i}}</p> |
||||
|
||||
<div class="alert alert-info"> |
||||
{{_i}}<strong>Note:</strong> If you're submitting a pull request to GitHub with modified CSS, you <strong>must</strong> recompile the CSS via any of these methods.{{/i}} |
||||
</div> |
||||
|
||||
<h2>{{_i}}Tools for compiling{{/i}}</h2> |
||||
|
||||
<h3>{{_i}}Node with makefile{{/i}}</h3> |
||||
<p>{{_i}}Install the LESS command line compiler, JSHint, Recess, and uglify-js globally with npm by running the following command:{{/i}}</p> |
||||
<pre>$ npm install -g less jshint recess uglify-js</pre> |
||||
<p>{{_i}}Once installed just run <code>make</code> from the root of your bootstrap directory and you're all set.{{/i}}</p> |
||||
<p>{{_i}}Additionally, if you have <a href="https://github.com/mynyml/watchr">watchr</a> installed, you may run <code>make watch</code> to have bootstrap automatically rebuilt every time you edit a file in the bootstrap lib (this isn't required, just a convenience method).{{/i}}</p> |
||||
|
||||
<h3>{{_i}}Command line{{/i}}</h3> |
||||
<p>{{_i}}Install the LESS command line tool via Node and run the following command:{{/i}}</p> |
||||
<pre>$ lessc ./less/bootstrap.less > bootstrap.css</pre> |
||||
<p>{{_i}}Be sure to include <code>--compress</code> in that command if you're trying to save some bytes!{{/i}}</p> |
||||
|
||||
<h3>{{_i}}Javascript{{/i}}</h3> |
||||
<p>{{_i}}<a href="http://lesscss.org/">Download the latest Less.js</a> and include the path to it (and Bootstrap) in the <code><head></code>.{{/i}}</p> |
||||
<pre class="prettyprint"> |
||||
<link rel="stylesheet/less" href="/path/to/bootstrap.less"> |
||||
<script src="/path/to/less.js"></script> |
||||
</pre> |
||||
<p>{{_i}}To recompile the .less files, just save them and reload your page. Less.js compiles them and stores them in local storage.{{/i}}</p> |
||||
|
||||
<h3>{{_i}}Unofficial Mac app{{/i}}</h3> |
||||
<p>{{_i}}<a href="http://incident57.com/less/">The unofficial Mac app</a> watches directories of .less files and compiles the code to local files after every save of a watched .less file. If you like, you can toggle preferences in the app for automatic minifying and which directory the compiled files end up in.{{/i}}</p> |
||||
|
||||
<h3>{{_i}}More apps{{/i}}</h3> |
||||
<h4><a href="http://crunchapp.net/" target="_blank">Crunch</a></h4> |
||||
<p>{{_i}}Crunch is a great looking LESS editor and compiler built on Adobe Air.{{/i}}</p> |
||||
<h4><a href="http://incident57.com/codekit/" target="_blank">CodeKit</a></h4> |
||||
<p>{{_i}}Created by the same guy as the unofficial Mac app, CodeKit is a Mac app that compiles LESS, SASS, Stylus, and CoffeeScript.{{/i}}</p> |
||||
<h4><a href="http://wearekiss.com/simpless" target="_blank">Simpless</a></h4> |
||||
<p>{{_i}}Mac, Linux, and Windows app for drag and drop compiling of LESS files. Plus, the <a href="https://github.com/Paratron/SimpLESS" target="_blank">source code is on GitHub</a>.{{/i}}</p> |
||||
|
||||
</section> |
||||
|
||||
|
||||
|
||||
<!-- Static assets |
||||
================================================== --> |
||||
<section id="static-assets"> |
||||
<div class="page-header"> |
||||
<h1>{{_i}}Use as static assets{{/i}}</h1> |
||||
</div> |
||||
<p class="lead">{{_i}}<a href="./getting-started.html">Quickly start</a> any web project by dropping in the compiled or minified CSS and JS. Layer on custom styles separately for easy upgrades and maintenance moving forward.{{/i}}</p> |
||||
|
||||
<h3>{{_i}}Setup file structure{{/i}}</h3> |
||||
<p>{{_i}}Download the latest compiled Bootstrap and place into your project. For example, you might have something like this:{{/i}}</p> |
||||
<pre class="prettyprint"> |
||||
app/ |
||||
├── layouts/ |
||||
└── templates/ |
||||
public/ |
||||
├── css/ |
||||
│ ├── bootstrap.min.css |
||||
├── js/ |
||||
│ ├── bootstrap.min.js |
||||
└── img/ |
||||
├── glyphicons-halflings.png |
||||
└── glyphicons-halflings-white.png |
||||
</pre> |
||||
|
||||
<h3>{{_i}}Utilize starter template{{/i}}</h3> |
||||
<p>{{_i}}Copy the following base HTML to get started.{{/i}}</p> |
||||
<pre class="prettyprint linenums"> |
||||
<html> |
||||
<head> |
||||
<title>Bootstrap 101 Template</title> |
||||
<!-- Bootstrap --> |
||||
<link href="public/css/bootstrap.min.css" rel="stylesheet"> |
||||
</head> |
||||
<body> |
||||
<h1>Hello, world!</h1> |
||||
<!-- Bootstrap --> |
||||
<script src="public/js/bootstrap.min.js"></script> |
||||
</body> |
||||
</html> |
||||
</pre> |
||||
|
||||
<h3>{{_i}}Layer on custom code{{/i}}</h3> |
||||
<p>{{_i}}Work in your custom CSS, JS, and more as necessary to make Bootstrap your own with your own separate CSS and JS files.{{/i}}</p> |
||||
<pre class="prettyprint linenums"> |
||||
<html> |
||||
<head> |
||||
<title>Bootstrap 101 Template</title> |
||||
<!-- Bootstrap --> |
||||
<link href="public/css/bootstrap.min.css" rel="stylesheet"> |
||||
<!-- Project --> |
||||
<link href="public/css/application.css" rel="stylesheet"> |
||||
</head> |
||||
<body> |
||||
<h1>Hello, world!</h1> |
||||
<!-- Bootstrap --> |
||||
<script src="public/js/bootstrap.min.js"></script> |
||||
<!-- Project --> |
||||
<script src="public/js/application.js"></script> |
||||
</body> |
||||
</html> |
||||
</pre> |
||||
|
||||
</section> |
||||
|
||||
</div>{{! /span9 }} |
||||
</div>{{! row}} |
||||
|
||||
</div>{{! /.container }} |
@ -0,0 +1,218 @@
|
||||
<!-- Subhead |
||||
================================================== --> |
||||
<header class="jumbotron subhead" id="overview"> |
||||
<div class="container"> |
||||
<h1>{{_i}}Getting started{{/i}}</h1> |
||||
<p class="lead">{{_i}}Overview of the project, its contents, and how to get started with a simple template.{{/i}}</p> |
||||
</div> |
||||
</header> |
||||
|
||||
|
||||
<div class="container"> |
||||
|
||||
<!-- Docs nav |
||||
================================================== --> |
||||
<div class="row"> |
||||
<div class="span3 bs-docs-sidebar"> |
||||
<ul class="nav nav-list bs-docs-sidenav"> |
||||
<li><a href="#download-bootstrap"><i class="icon-chevron-right"></i> {{_i}}Download{{/i}}</a></li> |
||||
<li><a href="#file-structure"><i class="icon-chevron-right"></i> {{_i}}File structure{{/i}}</a></li> |
||||
<li><a href="#contents"><i class="icon-chevron-right"></i> {{_i}}What's included{{/i}}</a></li> |
||||
<li><a href="#html-template"><i class="icon-chevron-right"></i> {{_i}}HTML template{{/i}}</a></li> |
||||
<li><a href="#examples"><i class="icon-chevron-right"></i> {{_i}}Examples{{/i}}</a></li> |
||||
<li><a href="#what-next"><i class="icon-chevron-right"></i> {{_i}}What next?{{/i}}</a></li> |
||||
</ul> |
||||
</div> |
||||
<div class="span9"> |
||||
|
||||
|
||||
|
||||
<!-- Download |
||||
================================================== --> |
||||
<section id="download-bootstrap"> |
||||
<div class="page-header"> |
||||
<h1>{{_i}}1. Download{{/i}}</h1> |
||||
</div> |
||||
<p class="lead">{{_i}}Before downloading, be sure to have a code editor (we recommend <a href="http://sublimetext.com/2">Sublime Text 2</a>) and some working knowledge of HTML and CSS. We won't walk through the source files here, but they are available for download. We'll focus on getting started with the compiled Bootstrap files.{{/i}}</p> |
||||
|
||||
<div class="row-fluid"> |
||||
<div class="span6"> |
||||
<h2>{{_i}}Download compiled{{/i}}</h2> |
||||
<p>{{_i}}<strong>Fastest way to get started:</strong> get the compiled and minified versions of our CSS, JS, and images. No docs or original source files.{{/i}}</p> |
||||
<p><a class="btn btn-large btn-primary" href="assets/bootstrap.zip" {{#production}}onclick="_gaq.push(['_trackEvent', 'Getting started', 'Download', 'Download compiled']);"{{/production}}>{{_i}}Download Bootstrap{{/i}}</a></p> |
||||
</div> |
||||
<div class="span6"> |
||||
<h2>Download source</h2> |
||||
<p>Get the original files for all CSS and JavaScript, along with a local copy of the docs by downloading the latest version directly from GitHub.</p> |
||||
<p><a class="btn btn-large" href="https://github.com/twitter/bootstrap/zipball/master" {{#production}}onclick="_gaq.push(['_trackEvent', 'Getting started', 'Download', 'Download source']);"{{/production}}>{{_i}}Download Bootstrap source{{/i}}</a></p> |
||||
</div> |
||||
</div> |
||||
</section> |
||||
|
||||
|
||||
|
||||
<!-- File structure |
||||
================================================== --> |
||||
<section id="file-structure"> |
||||
<div class="page-header"> |
||||
<h1>{{_i}}2. File structure{{/i}}</h1> |
||||
</div> |
||||
<p class="lead">{{_i}}Within the download you'll find the following file structure and contents, logically grouping common assets and providing both compiled and minified variations.{{/i}}</p> |
||||
<p>{{_i}}Once downloaded, unzip the compressed folder to see the structure of (the compiled) Bootstrap. You'll see something like this:{{/i}}</p> |
||||
<pre class="prettyprint"> |
||||
bootstrap/ |
||||
├── css/ |
||||
│ ├── bootstrap.css |
||||
│ ├── bootstrap.min.css |
||||
├── js/ |
||||
│ ├── bootstrap.js |
||||
│ ├── bootstrap.min.js |
||||
├── img/ |
||||
│ ├── glyphicons-halflings.png |
||||
│ ├── glyphicons-halflings-white.png |
||||
└── README.md |
||||
</pre> |
||||
<p>{{_i}}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.{{/i}}</p> |
||||
<p>{{_i}}Please note that all JavaScript plugins require jQuery to be included.{{/i}}</p> |
||||
</section> |
||||
|
||||
|
||||
|
||||
<!-- Contents |
||||
================================================== --> |
||||
<section id="contents"> |
||||
<div class="page-header"> |
||||
<h1>{{_i}}3. What's included{{/i}}</h1> |
||||
</div> |
||||
<p class="lead">{{_i}}Bootstrap comes equipped with HTML, CSS, and JS for all sorts of things, but they can be summarized with a handful of categories visible at the top of the <a href="http://getbootstrap.com">Bootstrap documentation</a>.{{/i}}</p> |
||||
|
||||
<h2>{{_i}}Docs sections{{/i}}</h2> |
||||
<h4><a href="http://twitter.github.com/bootstrap/scaffolding.html">{{_i}}Scaffolding{{/i}}</a></h4> |
||||
<p>{{_i}}Global styles for the body to reset type and background, link styles, grid system, and two simple layouts.{{/i}}</p> |
||||
<h4><a href="http://twitter.github.com/bootstrap/base-css.html">{{_i}}Base CSS{{/i}}</a></h4> |
||||
<p>{{_i}}Styles for common HTML elements like typography, code, tables, forms, and buttons. Also includes <a href="http://glyphicons.com">Glyphicons</a>, a great little icon set.{{/i}}</p> |
||||
<h4><a href="http://twitter.github.com/bootstrap/components.html">{{_i}}Components{{/i}}</a></h4> |
||||
<p>{{_i}}Basic styles for common interface components like tabs and pills, navbar, alerts, page headers, and more.{{/i}}</p> |
||||
<h4><a href="http://twitter.github.com/bootstrap/javascript.html">{{_i}}Javascript plugins{{/i}}</a></h4> |
||||
<p>{{_i}}Similar to Components, these Javascript plugins are interactive components for things like tooltips, popovers, modals, and more.{{/i}}</p> |
||||
|
||||
<h2>{{_i}}List of components{{/i}}</h2> |
||||
<p>{{_i}}Together, the <strong>Components</strong> and <strong>Javascript plugins</strong> sections provide the following interface elements:{{/i}}</p> |
||||
<ul> |
||||
<li>{{_i}}Button groups{{/i}}</li> |
||||
<li>{{_i}}Button dropdowns{{/i}}</li> |
||||
<li>{{_i}}Navigational tabs, pills, and lists{{/i}}</li> |
||||
<li>{{_i}}Navbar{{/i}}</li> |
||||
<li>{{_i}}Labels{{/i}}</li> |
||||
<li>{{_i}}Badges{{/i}}</li> |
||||
<li>{{_i}}Page headers and hero unit{{/i}}</li> |
||||
<li>{{_i}}Thumbnails{{/i}}</li> |
||||
<li>{{_i}}Alerts{{/i}}</li> |
||||
<li>{{_i}}Progress bars{{/i}}</li> |
||||
<li>{{_i}}Modals{{/i}}</li> |
||||
<li>{{_i}}Dropdowns{{/i}}</li> |
||||
<li>{{_i}}Tooltips{{/i}}</li> |
||||
<li>{{_i}}Popovers{{/i}}</li> |
||||
<li>{{_i}}Accordion{{/i}}</li> |
||||
<li>{{_i}}Carousel{{/i}}</li> |
||||
<li>{{_i}}Typeahead{{/i}}</li> |
||||
</ul> |
||||
<p>{{_i}}In future guides, we may walk through these components individually in more detail. Until then, look for each of these in the documentation for information on how to utilize and customize them.{{/i}}</p> |
||||
</section> |
||||
|
||||
|
||||
|
||||
<!-- HTML template |
||||
================================================== --> |
||||
<section id="html-template"> |
||||
<div class="page-header"> |
||||
<h1>{{_i}}4. Basic HTML template{{/i}}</h1> |
||||
</div> |
||||
<p class="lead">{{_i}}With a brief intro into the contents out of the way, we can focus putting Bootstrap to use. To do that, we'll utilize a basic HTML template that includes everything we mentioned in the <a href="#file-structure">File structure</a>.{{/i}}</p> |
||||
<p>{{_i}}Now, here's a look at a <strong>typical HTML file</strong>:{{/i}}</p> |
||||
<pre class="prettyprint linenums"> |
||||
<!DOCTYPE html> |
||||
<html> |
||||
<head> |
||||
<title>Bootstrap 101 Template</title> |
||||
</head> |
||||
<body> |
||||
<h1>Hello, world!</h1> |
||||
<script src="http://code.jquery.com/jquery-latest.js"></script> |
||||
</body> |
||||
</html> |
||||
</pre> |
||||
<p>{{_i}}To make this <strong>a Bootstrapped template</strong>, just include the appropriate CSS and JS files:{{/i}}</p> |
||||
<pre class="prettyprint linenums"> |
||||
<!DOCTYPE html> |
||||
<html> |
||||
<head> |
||||
<title>Bootstrap 101 Template</title> |
||||
<!-- Bootstrap --> |
||||
<link href="css/bootstrap.min.css" rel="stylesheet"> |
||||
</head> |
||||
<body> |
||||
<h1>Hello, world!</h1> |
||||
<script src="http://code.jquery.com/jquery-latest.js"></script> |
||||
<script src="js/bootstrap.min.js"></script> |
||||
</body> |
||||
</html> |
||||
</pre> |
||||
<p>{{_i}}<strong>And you're set!</strong> With those two files added, you can begin to develop any site or application with Bootstrap.{{/i}}</p> |
||||
</section> |
||||
|
||||
|
||||
|
||||
<!-- Examples |
||||
================================================== --> |
||||
<section id="examples"> |
||||
<div class="page-header"> |
||||
<h1>{{_i}}5. Examples{{/i}}</h1> |
||||
</div> |
||||
<p class="lead">{{_i}}Move beyond the base template with a few example layouts. We encourage folks to iterate on these examples and not simply use them as an end result.{{/i}}</p> |
||||
<ul class="thumbnails bootstrap-examples"> |
||||
<li class="span3"> |
||||
<a class="thumbnail" href="examples/hero.html"> |
||||
<img src="assets/img/examples/bootstrap-example-hero.jpg" alt=""> |
||||
</a> |
||||
<h4>{{_i}}Basic marketing site{{/i}}</h4> |
||||
<p>{{_i}}Featuring a hero unit for a primary message and three supporting elements.{{/i}}</p> |
||||
</li> |
||||
<li class="span3"> |
||||
<a class="thumbnail" href="examples/fluid.html"> |
||||
<img src="assets/img/examples/bootstrap-example-fluid.jpg" alt=""> |
||||
</a> |
||||
<h4>{{_i}}Fluid layout{{/i}}</h4> |
||||
<p>{{_i}}Uses our new responsive, fluid grid system to create a seamless liquid layout.{{/i}}</p> |
||||
</li> |
||||
<li class="span3"> |
||||
<a class="thumbnail" href="examples/starter-template.html"> |
||||
<img src="assets/img/examples/bootstrap-example-starter.jpg" alt=""> |
||||
</a> |
||||
<h4>{{_i}}Starter template{{/i}}</h4> |
||||
<p>{{_i}}A barebones HTML document with all the Bootstrap CSS and javascript included.{{/i}}</p> |
||||
</li> |
||||
</ul> |
||||
</section> |
||||
|
||||
|
||||
|
||||
|
||||
<!-- Next |
||||
================================================== --> |
||||
<section id="what-next"> |
||||
<div class="page-header"> |
||||
<h1>{{_i}}What next?{{/i}}</h1> |
||||
</div> |
||||
<p class="lead">{{_i}}Head to the docs for information, examples, and code snippets, or take the next leap and customize Bootstrap for any upcoming project.{{/i}}</p> |
||||
<a class="btn btn-large btn-primary" href="./scaffolding.html" {{#production}}onclick="_gaq.push(['_trackEvent', 'Getting started', 'Next steps', 'Visit docs']);"{{/production}}>{{_i}}Visit the Bootstrap docs{{/i}}</a> |
||||
<a class="btn btn-large" href="./customize.html" style="margin-left: 5px;" {{#production}}onclick="_gaq.push(['_trackEvent', 'Getting started', 'Next steps', 'Customize']);"{{/production}}>{{_i}}Customize Bootstrap{{/i}}</a> |
||||
</section> |
||||
|
||||
|
||||
|
||||
|
||||
</div>{{! /span9 }} |
||||
</div>{{! row}} |
||||
|
||||
</div>{{! /.container }} |
@ -0,0 +1,89 @@
|
||||
<div class="jumbotron masthead"> |
||||
<div class="container"> |
||||
<h1>Bootstrap</h1> |
||||
<p>Sleek, intuitive, and powerful front-end framework for faster and easier web development.</p> |
||||
<p><a href="assets/bootstrap.zip" class="btn btn-primary btn-large" {{#production}}onclick="_gaq.push(['_trackEvent', 'Jumbotron actions', 'Download', 'Download 2.1.1']);"{{/production}}>{{_i}}Download Bootstrap{{/i}}</a></p> |
||||
<ul class="masthead-links"> |
||||
<li><a href="http://github.com/twitter/bootstrap" {{#production}}onclick="_gaq.push(['_trackEvent', 'Jumbotron actions', 'Jumbotron links', 'GitHub project']);"{{/production}}>GitHub project</a></li> |
||||
<li><a href="./extend.html" {{#production}}onclick="_gaq.push(['_trackEvent', 'Jumbotron actions', 'Jumbotron links', 'Extend']);"{{/production}}>Extend</a></li> |
||||
<li>Version 2.1.1</li> |
||||
</ul> |
||||
</div> |
||||
</div> |
||||
|
||||
<div class="bs-docs-social"> |
||||
<div class="container"> |
||||
<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="98px" 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">{{_i}}Follow @twbootstrap{{/i}}</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> |
||||
</div> |
||||
|
||||
<div class="container"> |
||||
|
||||
<div class="marketing"> |
||||
|
||||
<h1>{{_i}}Introducing Bootstrap.{{/i}}</h1> |
||||
<p class="marketing-byline">{{_i}}Need reasons to love Bootstrap? Look no further.{{/i}}</p> |
||||
|
||||
<div class="row-fluid"> |
||||
<div class="span4"> |
||||
<img src="assets/img/bs-docs-twitter-github.png"> |
||||
<h2>{{_i}}By nerds, for nerds.{{/i}}</h2> |
||||
<p>{{_i}}Built at Twitter by <a href="http://twitter.com/mdo">@mdo</a> and <a href="http://twitter.com/fat">@fat</a>, Bootstrap utilizes <a href="http://lesscss.org">LESS CSS</a>, is compiled via <a href="http://nodejs.org">Node</a>, and is managed through <a href="http://github.com">GitHub</a> to help nerds do awesome stuff on the web.{{/i}}</p> |
||||
</div> |
||||
<div class="span4"> |
||||
<img src="assets/img/bs-docs-responsive-illustrations.png"> |
||||
<h2>{{_i}}Made for everyone.{{/i}}</h2> |
||||
<p>{{_i}}Bootstrap was made to not only look and behave great in the latest desktop browsers (as well as IE7!), but in tablet and smartphone browsers via <a href="./scaffolding.html#responsive">responsive CSS</a> as well.{{/i}}</p> |
||||
</div> |
||||
<div class="span4"> |
||||
<img src="assets/img/bs-docs-bootstrap-features.png"> |
||||
<h2>{{_i}}Packed with features.{{/i}}</h2> |
||||
<p>{{_i}}A 12-column responsive <a href="./scaffolding.html#grid">grid</a>, dozens of components, <a href="./javascript.html">javascript plugins</a>, typography, form controls, and even a <a href="./customize.html">web-based Customizer</a> to make Bootstrap your own.{{/i}}</p> |
||||
</div> |
||||
</div> |
||||
|
||||
<hr class="soften"> |
||||
|
||||
<h1>{{_i}}Built with Bootstrap.{{/i}}</h1> |
||||
<p class="marketing-byline">{{_i}}For even more sites built with Bootstrap, <a href="http://builtwithbootstrap.tumblr.com/" target="_blank">visit the unofficial Tumblr</a> or <a href="./getting-started.html#examples">browse the examples</a>.{{/i}}</p> |
||||
<div class="row-fluid"> |
||||
<ul class="thumbnails example-sites"> |
||||
<li class="span3"> |
||||
<a class="thumbnail" href="http://soundready.fm/" target="_blank"> |
||||
<img src="assets/img/example-sites/soundready.png" alt="SoundReady.fm"> |
||||
</a> |
||||
</li> |
||||
<li class="span3"> |
||||
<a class="thumbnail" href="http://kippt.com/" target="_blank"> |
||||
<img src="assets/img/example-sites/kippt.png" alt="Kippt"> |
||||
</a> |
||||
</li> |
||||
<li class="span3"> |
||||
<a class="thumbnail" href="http://www.fleetio.com/" target="_blank"> |
||||
<img src="assets/img/example-sites/fleetio.png" alt="Fleetio"> |
||||
</a> |
||||
</li> |
||||
<li class="span3"> |
||||
<a class="thumbnail" href="http://www.jshint.com/" target="_blank"> |
||||
<img src="assets/img/example-sites/jshint.png" alt="JS Hint"> |
||||
</a> |
||||
</li> |
||||
</ul> |
||||
</div> |
||||
|
||||
</div>{{! /.marketing }} |
||||
|
||||
</div>{{! /.container }} |
@ -0,0 +1,471 @@
|
||||
<!-- Subhead |
||||
================================================== --> |
||||
<header class="jumbotron subhead" id="overview"> |
||||
<div class="container"> |
||||
<h1>{{_i}}Scaffolding{{/i}}</h1> |
||||
<p class="lead">{{_i}}Bootstrap is built on responsive 12-column grids, layouts, and components.{{/i}}</p> |
||||
</div> |
||||
</header> |
||||
|
||||
<div class="container"> |
||||
|
||||
<!-- Docs nav |
||||
================================================== --> |
||||
<div class="row"> |
||||
<div class="span3 bs-docs-sidebar"> |
||||
<ul class="nav nav-list bs-docs-sidenav"> |
||||
<li><a href="#global"><i class="icon-chevron-right"></i> {{_i}}Global styles{{/i}}</a></li> |
||||
<li><a href="#gridSystem"><i class="icon-chevron-right"></i> {{_i}}Grid system{{/i}}</a></li> |
||||
<li><a href="#fluidGridSystem"><i class="icon-chevron-right"></i> {{_i}}Fluid grid system{{/i}}</a></li> |
||||
<li><a href="#layouts"><i class="icon-chevron-right"></i> {{_i}}Layouts{{/i}}</a></li> |
||||
<li><a href="#responsive"><i class="icon-chevron-right"></i> {{_i}}Responsive design{{/i}}</a></li> |
||||
</ul> |
||||
</div> |
||||
<div class="span9"> |
||||
|
||||
|
||||
|
||||
<!-- Global Bootstrap settings |
||||
================================================== --> |
||||
<section id="global"> |
||||
<div class="page-header"> |
||||
<h1>{{_i}}Global settings{{/i}}</h1> |
||||
</div> |
||||
|
||||
<h3>{{_i}}Requires HTML5 doctype{{/i}}</h3> |
||||
<p>{{_i}}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.{{/i}}</p> |
||||
<pre class="prettyprint linenums"> |
||||
<!DOCTYPE html> |
||||
<html lang="en"> |
||||
... |
||||
</html> |
||||
</pre> |
||||
|
||||
<h3>{{_i}}Typography and links{{/i}}</h3> |
||||
<p>{{_i}}Bootstrap sets basic global display, typography, and link styles. Specifically, we:{{/i}}</p> |
||||
<ul> |
||||
<li>{{_i}}Remove <code>margin</code> on the body{{/i}}</li> |
||||
<li>{{_i}}Set <code>background-color: white;</code> on the <code>body</code>{{/i}}</li> |
||||
<li>{{_i}}Use the <code>@baseFontFamily</code>, <code>@baseFontSize</code>, and <code>@baseLineHeight</code> attributes as our typographic base{{/i}}</li> |
||||
<li>{{_i}}Set the global link color via <code>@linkColor</code> and apply link underlines only on <code>:hover</code>{{/i}}</li> |
||||
</ul> |
||||
<p>{{_i}}These styles can be found within <strong>scaffolding.less</strong>.{{/i}}</p> |
||||
|
||||
<h3>{{_i}}Reset via Normalize{{/i}}</h3> |
||||
<p>{{_i}}With Bootstrap 2, the old reset block has been dropped in favor of <a href="http://necolas.github.com/normalize.css/" target="_blank">Normalize.css</a>, a project by <a href="http://twitter.com/necolas" target="_blank">Nicolas Gallagher</a> that also powers the <a href="http://html5boilerplate.com" target="_blank">HTML5 Boilerplate</a>. While we use much of Normalize within our <strong>reset.less</strong>, we have removed some elements specifically for Bootstrap.{{/i}}</p> |
||||
|
||||
</section> |
||||
|
||||
|
||||
|
||||
|
||||
<!-- Grid system |
||||
================================================== --> |
||||
<section id="gridSystem"> |
||||
<div class="page-header"> |
||||
<h1>{{_i}}Default grid system{{/i}}</h1> |
||||
</div> |
||||
|
||||
<h2>{{_i}}Live grid example{{/i}}</h2> |
||||
<p>{{_i}}The default Bootstrap grid system utilizes <strong>12 columns</strong>, making for a 940px wide container without <a href="./scaffolding.html#responsive">responsive features</a> enabled. With the responsive CSS file added, the grid adapts to be 724px and 1170px wide depending on your viewport. Below 767px viewports, the columns become fluid and stack vertically.{{/i}}</p> |
||||
<div class="bs-docs-grid"> |
||||
<div class="row show-grid"> |
||||
<div class="span1">1</div> |
||||
<div class="span1">1</div> |
||||
<div class="span1">1</div> |
||||
<div class="span1">1</div> |
||||
<div class="span1">1</div> |
||||
<div class="span1">1</div> |
||||
<div class="span1">1</div> |
||||
<div class="span1">1</div> |
||||
<div class="span1">1</div> |
||||
</div> |
||||
<div class="row show-grid"> |
||||
<div class="span2">2</div> |
||||
<div class="span3">3</div> |
||||
<div class="span4">4</div> |
||||
</div> |
||||
<div class="row show-grid"> |
||||
<div class="span4">4</div> |
||||
<div class="span5">5</div> |
||||
</div> |
||||
<div class="row show-grid"> |
||||
<div class="span9">9</div> |
||||
</div> |
||||
</div> |
||||
|
||||
<h3>{{_i}}Basic grid HTML{{/i}}</h3> |
||||
<p>{{_i}}For a simple two column layout, create a <code>.row</code> and add the appropriate number of <code>.span*</code> columns. As this is a 12-column grid, each <code>.span*</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).{{/i}}</p> |
||||
<pre class="prettyprint linenums"> |
||||
<div class="row"> |
||||
<div class="span4">...</div> |
||||
<div class="span8">...</div> |
||||
</div> |
||||
</pre> |
||||
<p>{{_i}}Given this example, we have <code>.span4</code> and <code>.span8</code>, making for 12 total columns and a complete row.{{/i}}</p> |
||||
|
||||
<h2>{{_i}}Offsetting columns{{/i}}</h2> |
||||
<p>{{_i}}Move columns to the right using <code>.offset*</code> classes. Each class increases the left margin of a column by a whole column. For example, <code>.offset4</code> moves <code>.span4</code> over four columns.{{/i}}</p> |
||||
<div class="bs-docs-grid"> |
||||
<div class="row show-grid"> |
||||
<div class="span4">4</div> |
||||
<div class="span3 offset2">3 offset 2</div> |
||||
</div><!-- /row --> |
||||
<div class="row show-grid"> |
||||
<div class="span3 offset1">3 offset 1</div> |
||||
<div class="span3 offset2">3 offset 2</div> |
||||
</div><!-- /row --> |
||||
<div class="row show-grid"> |
||||
<div class="span6 offset3">6 offset 3</div> |
||||
</div><!-- /row --> |
||||
</div> |
||||
<pre class="prettyprint linenums"> |
||||
<div class="row"> |
||||
<div class="span4">...</div> |
||||
<div class="span3 offset2">...</div> |
||||
</div> |
||||
</pre> |
||||
|
||||
<h2>{{_i}}Nesting columns{{/i}}</h2> |
||||
<p>{{_i}}To nest your content with the default grid, add a new <code>.row</code> and set of <code>.span*</code> columns within an existing <code>.span*</code> column. Nested rows should include a set of columns that add up to the number of columns of its parent.{{/i}}</p> |
||||
<div class="row show-grid"> |
||||
<div class="span9"> |
||||
{{_i}}Level 1 of column{{/i}} |
||||
<div class="row show-grid"> |
||||
<div class="span6"> |
||||
{{_i}}Level 2{{/i}} |
||||
</div> |
||||
<div class="span3"> |
||||
{{_i}}Level 2{{/i}} |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<pre class="prettyprint linenums"> |
||||
<div class="row"> |
||||
<div class="span9"> |
||||
{{_i}}Level 1 column{{/i}} |
||||
<div class="row"> |
||||
<div class="span6">{{_i}}Level 2{{/i}}</div> |
||||
<div class="span3">{{_i}}Level 2{{/i}}</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</pre> |
||||
</section> |
||||
|
||||
|
||||
|
||||
<!-- Fluid grid system |
||||
================================================== --> |
||||
<section id="fluidGridSystem"> |
||||
<div class="page-header"> |
||||
<h1>{{_i}}Fluid grid system{{/i}}</h1> |
||||
</div> |
||||
|
||||
<h2>{{_i}}Live fluid grid example{{/i}}</h2> |
||||
<p>{{_i}}The fluid grid system uses percents instead of pixels for column widths. It has the same responsive capabilities as our fixed grid system, ensuring proper proportions for key screen resolutions and devices.{{/i}}</p> |
||||
<div class="bs-docs-grid"> |
||||
<div class="row-fluid show-grid"> |
||||
<div class="span1">1</div> |
||||
<div class="span1">1</div> |
||||
<div class="span1">1</div> |
||||
<div class="span1">1</div> |
||||
<div class="span1">1</div> |
||||
<div class="span1">1</div> |
||||
<div class="span1">1</div> |
||||
<div class="span1">1</div> |
||||
<div class="span1">1</div> |
||||
<div class="span1">1</div> |
||||
<div class="span1">1</div> |
||||
<div class="span1">1</div> |
||||
</div> |
||||
<div class="row-fluid show-grid"> |
||||
<div class="span4">4</div> |
||||
<div class="span4">4</div> |
||||
<div class="span4">4</div> |
||||
</div> |
||||
<div class="row-fluid show-grid"> |
||||
<div class="span4">4</div> |
||||
<div class="span8">8</div> |
||||
</div> |
||||
<div class="row-fluid show-grid"> |
||||
<div class="span6">6</div> |
||||
<div class="span6">6</div> |
||||
</div> |
||||
<div class="row-fluid show-grid"> |
||||
<div class="span12">12</div> |
||||
</div> |
||||
</div> |
||||
|
||||
<h3>{{_i}}Basic fluid grid HTML{{/i}}</h3> |
||||
<p>{{_i}}Make any row "fluid" by changing <code>.row</code> to <code>.row-fluid</code>. The column classes stay the exact same, making it easy to flip between fixed and fluid grids.{{/i}}</p> |
||||
<pre class="prettyprint linenums"> |
||||
<div class="row-fluid"> |
||||
<div class="span4">...</div> |
||||
<div class="span8">...</div> |
||||
</div> |
||||
</pre> |
||||
|
||||
<h2>{{_i}}Fluid offsetting{{/i}}</h2> |
||||
<p>{{_i}}Operates the same way as the fixed grid system offsetting: add <code>.offset*</code> to any column to offset by that many columns.{{/i}}</p> |
||||
<div class="bs-docs-grid"> |
||||
<div class="row-fluid show-grid"> |
||||
<div class="span4">4</div> |
||||
<div class="span4 offset4">4 offset 4</div> |
||||
</div><!-- /row --> |
||||
<div class="row-fluid show-grid"> |
||||
<div class="span3 offset3">3 offset 3</div> |
||||
<div class="span3 offset3">3 offset 3</div> |
||||
</div><!-- /row --> |
||||
<div class="row-fluid show-grid"> |
||||
<div class="span6 offset6">6 offset 6</div> |
||||
</div><!-- /row --> |
||||
</div> |
||||
<pre class="prettyprint linenums"> |
||||
<div class="row-fluid"> |
||||
<div class="span4">...</div> |
||||
<div class="span4 offset2">...</div> |
||||
</div> |
||||
</pre> |
||||
|
||||
<h2>{{_i}}Fluid nesting{{/i}}</h2> |
||||
<p>{{_i}}Nesting with fluid grids is a bit different: the number of nested columns should not match the parent's number of columns. Instead, each level of nested columns are reset because each row takes up 100% of the parent column.{{/i}}</p> |
||||
<div class="row-fluid show-grid"> |
||||
<div class="span12"> |
||||
{{_i}}Fluid 12{{/i}} |
||||
<div class="row-fluid show-grid"> |
||||
<div class="span6"> |
||||
{{_i}}Fluid 6{{/i}} |
||||
</div> |
||||
<div class="span6"> |
||||
{{_i}}Fluid 6{{/i}} |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<pre class="prettyprint linenums"> |
||||
<div class="row-fluid"> |
||||
<div class="span12"> |
||||
{{_i}}Level 1 of column{{/i}} |
||||
<div class="row-fluid"> |
||||
<div class="span6">{{_i}}Level 2{{/i}}</div> |
||||
<div class="span6">{{_i}}Level 2{{/i}}</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</pre> |
||||
|
||||
</section> |
||||
|
||||
|
||||
|
||||
|
||||
<!-- Layouts (Default and fluid) |
||||
================================================== --> |
||||
<section id="layouts"> |
||||
<div class="page-header"> |
||||
<h1>{{_i}}Layouts{{/i}}</h1> |
||||
</div> |
||||
|
||||
<h2>{{_i}}Fixed layout{{/i}}</h2> |
||||
<p>{{_i}}Provides a common fixed-width (and optionally responsive) layout with only <code><div class="container"></code> required.{{/i}}</p> |
||||
<div class="mini-layout"> |
||||
<div class="mini-layout-body"></div> |
||||
</div> |
||||
<pre class="prettyprint linenums"> |
||||
<body> |
||||
<div class="container"> |
||||
... |
||||
</div> |
||||
</body> |
||||
</pre> |
||||
|
||||
<h2>{{_i}}Fluid layout{{/i}}</h2> |
||||
<p>{{_i}}Create a fluid, two-column page with <code><div class="container-fluid"></code>—great for applications and docs.{{/i}}</p> |
||||
<div class="mini-layout fluid"> |
||||
<div class="mini-layout-sidebar"></div> |
||||
<div class="mini-layout-body"></div> |
||||
</div> |
||||
<pre class="prettyprint linenums"> |
||||
<div class="container-fluid"> |
||||
<div class="row-fluid"> |
||||
<div class="span2"> |
||||
<!--{{_i}}Sidebar content{{/i}}--> |
||||
</div> |
||||
<div class="span10"> |
||||
<!--{{_i}}Body content{{/i}}--> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</pre> |
||||
</section> |
||||
|
||||
|
||||
|
||||
|
||||
<!-- Responsive design |
||||
================================================== --> |
||||
<section id="responsive"> |
||||
<div class="page-header"> |
||||
<h1>{{_i}}Responsive design{{/i}}</h1> |
||||
</div> |
||||
|
||||
{{! Enabling }} |
||||
<h2>{{_i}}Enabling responsive features{{/i}}</h2> |
||||
<p>{{_i}}Turn on responsive CSS in your project by including the proper meta tag and additional stylesheet within the <code><head></code> of your document. If you've compiled Bootstrap from the Customize page, you need only include the meta tag.{{/i}}</p> |
||||
<pre class="prettyprint linenums"> |
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
||||
<link href="assets/css/bootstrap-responsive.css" rel="stylesheet"> |
||||
</pre> |
||||
<p><span class="label label-info">{{_i}}Heads up!{{/i}}</span> {{_i}} Bootstrap doesn't include responsive features by default at this time as not everything needs to be responsive. Instead of encouraging developers to remove this feature, we figure it best to enable it as needed.{{/i}}</p> |
||||
|
||||
{{! About }} |
||||
<h2>{{_i}}About responsive Bootstrap{{/i}}</h2> |
||||
<img src="assets/img/responsive-illustrations.png" alt="Responsive devices" style="float: right; margin: 0 0 20px 20px;"> |
||||
<p>{{_i}}Media queries allow for custom CSS based on a number of conditions—ratios, widths, display type, etc—but usually focuses around <code>min-width</code> and <code>max-width</code>.{{/i}}</p> |
||||
<ul> |
||||
<li>{{_i}}Modify the width of column in our grid{{/i}}</li> |
||||
<li>{{_i}}Stack elements instead of float wherever necessary{{/i}}</li> |
||||
<li>{{_i}}Resize headings and text to be more appropriate for devices{{/i}}</li> |
||||
</ul> |
||||
<p>{{_i}}Use media queries responsibly and only as a start to your mobile audiences. For larger projects, do consider dedicated code bases and not layers of media queries.{{/i}}</p> |
||||
|
||||
{{! Supported }} |
||||
<h2>{{_i}}Supported devices{{/i}}</h2> |
||||
<p>{{_i}}Bootstrap supports a handful of media queries in a single file to help make your projects more appropriate on different devices and screen resolutions. Here's what's included:{{/i}}</p> |
||||
<table class="table table-bordered table-striped"> |
||||
<thead> |
||||
<tr> |
||||
<th>{{_i}}Label{{/i}}</th> |
||||
<th>{{_i}}Layout width{{/i}}</th> |
||||
<th>{{_i}}Column width{{/i}}</th> |
||||
<th>{{_i}}Gutter width{{/i}}</th> |
||||
</tr> |
||||
</thead> |
||||
<tbody> |
||||
<tr> |
||||
<td>{{_i}}Large display{{/i}}</td> |
||||
<td>1200px and up</td> |
||||
<td>70px</td> |
||||
<td>30px</td> |
||||
</tr> |
||||
<tr> |
||||
<td>{{_i}}Default{{/i}}</td> |
||||
<td>980px and up</td> |
||||
<td>60px</td> |
||||
<td>20px</td> |
||||
</tr> |
||||
<tr> |
||||
<td>{{_i}}Portrait tablets{{/i}}</td> |
||||
<td>768px and above</td> |
||||
<td>42px</td> |
||||
<td>20px</td> |
||||
</tr> |
||||
<tr> |
||||
<td>{{_i}}Phones to tablets{{/i}}</td> |
||||
<td>767px and below</td> |
||||
<td class="muted" colspan="2">{{_i}}Fluid columns, no fixed widths{{/i}}</td> |
||||
</tr> |
||||
<tr> |
||||
<td>{{_i}}Phones{{/i}}</td> |
||||
<td>480px and below</td> |
||||
<td class="muted" colspan="2">{{_i}}Fluid columns, no fixed widths{{/i}}</td> |
||||
</tr> |
||||
</tbody> |
||||
</table> |
||||
<pre class="prettyprint linenums"> |
||||
/* {{_i}}Large desktop{{/i}} */ |
||||
@media (min-width: 1200px) { ... } |
||||
|
||||
/* {{_i}}Portrait tablet to landscape and desktop{{/i}} */ |
||||
@media (min-width: 768px) and (max-width: 979px) { ... } |
||||
|
||||
/* {{_i}}Landscape phone to portrait tablet{{/i}} */ |
||||
@media (max-width: 767px) { ... } |
||||
|
||||
/* {{_i}}Landscape phones and down{{/i}} */ |
||||
@media (max-width: 480px) { ... } |
||||
</pre> |
||||
|
||||
|
||||
{{! Responsive utility classes }} |
||||
<h2>{{_i}}Responsive utility classes{{/i}}</h2> |
||||
<p>{{_i}}For faster mobile-friendly development, use these utility classes for showing and hiding content by device. Below is a table of the available classes and their effect on a given media query layout (labeled by device). They can be found in <code>responsive.less</code>.{{/i}}</p> |
||||
<table class="table table-bordered table-striped responsive-utilities"> |
||||
<thead> |
||||
<tr> |
||||
<th>{{_i}}Class{{/i}}</th> |
||||
<th>{{_i}}Phones <small>767px and below</small>{{/i}}</th> |
||||
<th>{{_i}}Tablets <small>979px to 768px</small>{{/i}}</th> |
||||
<th>{{_i}}Desktops <small>Default</small>{{/i}}</th> |
||||
</tr> |
||||
</thead> |
||||
<tbody> |
||||
<tr> |
||||
<th><code>.visible-phone</code></th> |
||||
<td class="is-visible">{{_i}}Visible{{/i}}</td> |
||||
<td class="is-hidden">{{_i}}Hidden{{/i}}</td> |
||||
<td class="is-hidden">{{_i}}Hidden{{/i}}</td> |
||||
</tr> |
||||
<tr> |
||||
<th><code>.visible-tablet</code></th> |
||||
<td class="is-hidden">{{_i}}Hidden{{/i}}</td> |
||||
<td class="is-visible">{{_i}}Visible{{/i}}</td> |
||||
<td class="is-hidden">{{_i}}Hidden{{/i}}</td> |
||||
</tr> |
||||
<tr> |
||||
<th><code>.visible-desktop</code></th> |
||||
<td class="is-hidden">{{_i}}Hidden{{/i}}</td> |
||||
<td class="is-hidden">{{_i}}Hidden{{/i}}</td> |
||||
<td class="is-visible">{{_i}}Visible{{/i}}</td> |
||||
</tr> |
||||
<tr> |
||||
<th><code>.hidden-phone</code></th> |
||||
<td class="is-hidden">{{_i}}Hidden{{/i}}</td> |
||||
<td class="is-visible">{{_i}}Visible{{/i}}</td> |
||||
<td class="is-visible">{{_i}}Visible{{/i}}</td> |
||||
</tr> |
||||
<tr> |
||||
<th><code>.hidden-tablet</code></th> |
||||
<td class="is-visible">{{_i}}Visible{{/i}}</td> |
||||
<td class="is-hidden">{{_i}}Hidden{{/i}}</td> |
||||
<td class="is-visible">{{_i}}Visible{{/i}}</td> |
||||
</tr> |
||||
<tr> |
||||
<th><code>.hidden-desktop</code></th> |
||||
<td class="is-visible">{{_i}}Visible{{/i}}</td> |
||||
<td class="is-visible">{{_i}}Visible{{/i}}</td> |
||||
<td class="is-hidden">{{_i}}Hidden{{/i}}</td> |
||||
</tr> |
||||
</tbody> |
||||
</table> |
||||
|
||||
<h3>{{_i}}When to use{{/i}}</h3> |
||||
<p>{{_i}}Use on a limited basis and avoid creating entirely different versions of the same site. Instead, use them to complement each device's presentation.{{/i}}</p> |
||||
|
||||
<h3>{{_i}}Responsive utilities test case{{/i}}</h3> |
||||
<p>{{_i}}Resize your browser or load on different devices to test the above classes.{{/i}}</p> |
||||
<h4>{{_i}}Visible on...{{/i}}</h4> |
||||
<p>{{_i}}Green checkmarks indicate that class is visible in your current viewport.{{/i}}</p> |
||||
<ul class="responsive-utilities-test"> |
||||
<li>{{_i}}Phone{{/i}}<span class="visible-phone">✔ {{_i}}Phone{{/i}}</span></li> |
||||
<li>{{_i}}Tablet{{/i}}<span class="visible-tablet">✔ {{_i}}Tablet{{/i}}</span></li> |
||||
<li>{{_i}}Desktop{{/i}}<span class="visible-desktop">✔ {{_i}}Desktop{{/i}}</span></li> |
||||
</ul> |
||||
<h4>{{_i}}Hidden on...{{/i}}</h4> |
||||
<p>{{_i}}Here, green checkmarks indicate that class is hidden in your current viewport.{{/i}}</p> |
||||
<ul class="responsive-utilities-test hidden-on"> |
||||
<li>{{_i}}Phone{{/i}}<span class="hidden-phone">✔ {{_i}}Phone{{/i}}</span></li> |
||||
<li>{{_i}}Tablet{{/i}}<span class="hidden-tablet">✔ {{_i}}Tablet{{/i}}</span></li> |
||||
<li>{{_i}}Desktop{{/i}}<span class="hidden-desktop">✔ {{_i}}Desktop{{/i}}</span></li> |
||||
</ul> |
||||
|
||||
</section> |
||||
|
||||
|
||||
|
||||
</div>{{! /span9 }} |
||||
</div>{{! row}} |
||||
|
||||
</div>{{! /.container }} |
After Width: | Height: | Size: 8.6 KiB |
After Width: | Height: | Size: 12 KiB |
@ -0,0 +1,12 @@
|
||||
{ |
||||
"validthis": true, |
||||
"laxcomma" : true, |
||||
"laxbreak" : true, |
||||
"browser" : true, |
||||
"eqnull" : true, |
||||
"debug" : true, |
||||
"devel" : true, |
||||
"boss" : true, |
||||
"expr" : true, |
||||
"asi" : true |
||||
} |
@ -0,0 +1,104 @@
|
||||
/* ========================================================== |
||||
* bootstrap-affix.js v2.1.1 |
||||
* 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)) |
||||
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 |
||||
* ======================= */ |
||||
|
||||
$.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 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); |
@ -0,0 +1,90 @@
|
||||
/* ========================================================== |
||||
* bootstrap-alert.js v2.1.1 |
||||
* 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 |
||||
* ======================= */ |
||||
|
||||
$.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 DATA-API |
||||
* ============== */ |
||||
|
||||
$(function () { |
||||
$('body').on('click.alert.data-api', dismiss, Alert.prototype.close) |
||||
}) |
||||
|
||||
}(window.jQuery); |
@ -0,0 +1,96 @@
|
||||
/* ============================================================ |
||||
* bootstrap-button.js v2.1.1 |
||||
* 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 |
||||
* ======================== */ |
||||
|
||||
$.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 DATA-API |
||||
* =============== */ |
||||
|
||||
$(function () { |
||||
$('body').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); |
@ -0,0 +1,176 @@
|
||||
/* ========================================================== |
||||
* bootstrap-carousel.js v2.1.1 |
||||
* 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.options = options |
||||
this.options.slide && this.slide(this.options.slide) |
||||
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 |
||||
this.options.interval |
||||
&& !this.paused |
||||
&& (this.interval = setInterval($.proxy(this.next, this), this.options.interval)) |
||||
return this |
||||
} |
||||
|
||||
, to: function (pos) { |
||||
var $active = this.$element.find('.item.active') |
||||
, children = $active.parent().children() |
||||
, activePos = children.index($active) |
||||
, that = this |
||||
|
||||
if (pos > (children.length - 1) || pos < 0) return |
||||
|
||||
if (this.sliding) { |
||||
return this.$element.one('slid', function () { |
||||
that.to(pos) |
||||
}) |
||||
} |
||||
|
||||
if (activePos == pos) { |
||||
return this.pause().cycle() |
||||
} |
||||
|
||||
return this.slide(pos > activePos ? 'next' : 'prev', $(children[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() |
||||
} |
||||
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 = $.Event('slide', { |
||||
relatedTarget: $next[0] |
||||
}) |
||||
|
||||
this.sliding = true |
||||
|
||||
isCycling && this.pause() |
||||
|
||||
$next = $next.length ? $next : this.$element.find('.item')[fallback]() |
||||
|
||||
if ($next.hasClass('active')) return |
||||
|
||||
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 |
||||
* ========================== */ |
||||
|
||||
$.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.cycle() |
||||
}) |
||||
} |
||||
|
||||
$.fn.carousel.defaults = { |
||||
interval: 5000 |
||||
, pause: 'hover' |
||||
} |
||||
|
||||
$.fn.carousel.Constructor = Carousel |
||||
|
||||
|
||||
/* CAROUSEL DATA-API |
||||
* ================= */ |
||||
|
||||
$(function () { |
||||
$('body').on('click.carousel.data-api', '[data-slide]', function ( e ) { |
||||
var $this = $(this), href |
||||
, $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
|
||||
, options = !$target.data('modal') && $.extend({}, $target.data(), $this.data()) |
||||
$target.carousel(options) |
||||
e.preventDefault() |
||||
}) |
||||
}) |
||||
|
||||
}(window.jQuery); |
@ -0,0 +1,158 @@
|
||||
/* ============================================================= |
||||
* bootstrap-collapse.js v2.1.1 |
||||
* 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) 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) 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']() |
||||
} |
||||
|
||||
} |
||||
|
||||
|
||||
/* COLLAPSIBLE PLUGIN DEFINITION |
||||
* ============================== */ |
||||
|
||||
$.fn.collapse = function (option) { |
||||
return this.each(function () { |
||||
var $this = $(this) |
||||
, data = $this.data('collapse') |
||||
, options = 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 |
||||
|
||||
|
||||
/* COLLAPSIBLE DATA-API |
||||
* ==================== */ |
||||
|
||||
$(function () { |
||||
$('body').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); |
@ -0,0 +1,150 @@
|
||||
/* ============================================================ |
||||
* bootstrap-dropdown.js v2.1.1 |
||||
* 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)) return $this.click() |
||||
|
||||
$items = $('[role=menu] li:not(.divider) 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() { |
||||
getParent($(toggle)) |
||||
.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) |
||||
$parent.length || ($parent = $this.parent()) |
||||
|
||||
return $parent |
||||
} |
||||
|
||||
|
||||
/* DROPDOWN PLUGIN DEFINITION |
||||
* ========================== */ |
||||
|
||||
$.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 |
||||
|
||||
|
||||
/* APPLY TO STANDARD DROPDOWN ELEMENTS |
||||
* =================================== */ |
||||
|
||||
$(function () { |
||||
$('html') |
||||
.on('click.dropdown.data-api touchstart.dropdown.data-api', clearMenus) |
||||
$('body') |
||||
.on('click.dropdown touchstart.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() }) |
||||
.on('click.dropdown.data-api touchstart.dropdown.data-api' , toggle, Dropdown.prototype.toggle) |
||||
.on('keydown.dropdown.data-api touchstart.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown) |
||||
}) |
||||
|
||||
}(window.jQuery); |
@ -0,0 +1,239 @@
|
||||
/* ========================================================= |
||||
* bootstrap-modal.js v2.1.1 |
||||
* 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 |
||||
|
||||
$('body').addClass('modal-open') |
||||
|
||||
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) |
||||
.focus() |
||||
|
||||
that.enforceFocus() |
||||
|
||||
transition ? |
||||
that.$element.one($.support.transition.end, function () { that.$element.trigger('shown') }) : |
||||
that.$element.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 |
||||
|
||||
$('body').removeClass('modal-open') |
||||
|
||||
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 (that) { |
||||
this.$element |
||||
.hide() |
||||
.trigger('hidden') |
||||
|
||||
this.backdrop() |
||||
} |
||||
|
||||
, removeBackdrop: function () { |
||||
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) |
||||
|
||||
if (this.options.backdrop != 'static') { |
||||
this.$backdrop.click($.proxy(this.hide, this)) |
||||
} |
||||
|
||||
if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
|
||||
|
||||
this.$backdrop.addClass('in') |
||||
|
||||
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, $.proxy(this.removeBackdrop, this)) : |
||||
this.removeBackdrop() |
||||
|
||||
} else if (callback) { |
||||
callback() |
||||
} |
||||
} |
||||
} |
||||
|
||||
|
||||
/* MODAL PLUGIN DEFINITION |
||||
* ======================= */ |
||||
|
||||
$.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 DATA-API |
||||
* ============== */ |
||||
|
||||
$(function () { |
||||
$('body').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() |
||||
}) |
||||
}) |
||||
}) |
||||
|
||||
}(window.jQuery); |
@ -0,0 +1,103 @@
|
||||
/* =========================================================== |
||||
* bootstrap-popover.js v2.1.1 |
||||
* 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 = $e.attr('data-content') |
||||
|| (typeof o.content == 'function' ? o.content.call($e[0]) : o.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 |
||||
* ======================= */ |
||||
|
||||
$.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><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"><p></p></div></div></div>' |
||||
}) |
||||
|
||||
}(window.jQuery); |
@ -0,0 +1,151 @@
|
||||
/* ============================================================= |
||||
* bootstrap-scrollspy.js v2.1.1 |
||||
* 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, 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) |
||||
.parent('.active') |
||||
.removeClass('active') |
||||
|
||||
selector = this.selector |
||||
+ '[data-target="' + target + '"],' |
||||
+ this.selector + '[href="' + target + '"]' |
||||
|
||||
active = $(selector) |
||||
.parent('li') |
||||
.addClass('active') |
||||
|
||||
if (active.parent('.dropdown-menu').length) { |
||||
active = active.closest('li.dropdown').addClass('active') |
||||
} |
||||
|
||||
active.trigger('activate') |
||||
} |
||||
|
||||
} |
||||
|
||||
|
||||
/* SCROLLSPY PLUGIN DEFINITION |
||||
* =========================== */ |
||||
|
||||
$.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 DATA-API |
||||
* ================== */ |
||||
|
||||
$(window).on('load', function () { |
||||
$('[data-spy="scroll"]').each(function () { |
||||
var $spy = $(this) |
||||
$spy.scrollspy($spy.data()) |
||||
}) |
||||
}) |
||||
|
||||
}(window.jQuery); |
@ -0,0 +1,135 @@
|
||||
/* ======================================================== |
||||
* bootstrap-tab.js v2.1.1 |
||||
* 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 a').last()[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 |
||||
* ===================== */ |
||||
|
||||
$.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 DATA-API |
||||
* ============ */ |
||||
|
||||
$(function () { |
||||
$('body').on('click.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) { |
||||
e.preventDefault() |
||||
$(this).tab('show') |
||||
}) |
||||
}) |
||||
|
||||
}(window.jQuery); |
@ -0,0 +1,275 @@
|
||||
/* =========================================================== |
||||
* bootstrap-tooltip.js v2.1.1 |
||||
* 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 |
||||
|
||||
this.type = type |
||||
this.$element = $(element) |
||||
this.options = this.getOptions(options) |
||||
this.enabled = true |
||||
|
||||
if (this.options.trigger == 'click') { |
||||
this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this)) |
||||
} else if (this.options.trigger != 'manual') { |
||||
eventIn = this.options.trigger == 'hover' ? 'mouseenter' : 'focus' |
||||
eventOut = this.options.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, options, this.$element.data()) |
||||
|
||||
if (options.delay && typeof options.delay == 'number') { |
||||
options.delay = { |
||||
show: options.delay |
||||
, hide: options.delay |
||||
} |
||||
} |
||||
|
||||
return options |
||||
} |
||||
|
||||
, enter: function (e) { |
||||
var self = $(e.currentTarget)[this.type](this._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 |
||||
, inside |
||||
, pos |
||||
, actualWidth |
||||
, actualHeight |
||||
, placement |
||||
, tp |
||||
|
||||
if (this.hasContent() && this.enabled) { |
||||
$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 |
||||
|
||||
inside = /in/.test(placement) |
||||
|
||||
$tip |
||||
.remove() |
||||
.css({ top: 0, left: 0, display: 'block' }) |
||||
.appendTo(inside ? this.$element : document.body) |
||||
|
||||
pos = this.getPosition(inside) |
||||
|
||||
actualWidth = $tip[0].offsetWidth |
||||
actualHeight = $tip[0].offsetHeight |
||||
|
||||
switch (inside ? placement.split(' ')[1] : 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 |
||||
} |
||||
|
||||
$tip |
||||
.css(tp) |
||||
.addClass(placement) |
||||
.addClass('in') |
||||
} |
||||
} |
||||
|
||||
, 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() |
||||
|
||||
$tip.removeClass('in') |
||||
|
||||
function removeWithAnimation() { |
||||
var timeout = setTimeout(function () { |
||||
$tip.off($.support.transition.end).remove() |
||||
}, 500) |
||||
|
||||
$tip.one($.support.transition.end, function () { |
||||
clearTimeout(timeout) |
||||
$tip.remove() |
||||
}) |
||||
} |
||||
|
||||
$.support.transition && this.$tip.hasClass('fade') ? |
||||
removeWithAnimation() : |
||||
$tip.remove() |
||||
|
||||
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') || '').removeAttr('title') |
||||
} |
||||
} |
||||
|
||||
, hasContent: function () { |
||||
return this.getTitle() |
||||
} |
||||
|
||||
, getPosition: function (inside) { |
||||
return $.extend({}, (inside ? {top: 0, left: 0} : this.$element.offset()), { |
||||
width: this.$element[0].offsetWidth |
||||
, height: this.$element[0].offsetHeight |
||||
}) |
||||
} |
||||
|
||||
, 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) |
||||
} |
||||
|
||||
, 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 () { |
||||
this[this.tip().hasClass('in') ? 'hide' : 'show']() |
||||
} |
||||
|
||||
, destroy: function () { |
||||
this.hide().$element.off('.' + this.type).removeData(this.type) |
||||
} |
||||
|
||||
} |
||||
|
||||
|
||||
/* TOOLTIP PLUGIN DEFINITION |
||||
* ========================= */ |
||||
|
||||
$.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' |
||||
, title: '' |
||||
, delay: 0 |
||||
, html: true |
||||
} |
||||
|
||||
}(window.jQuery); |
@ -0,0 +1,60 @@
|
||||
/* =================================================== |
||||
* bootstrap-transition.js v2.1.1 |
||||
* 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 ($) { |
||||
|
||||
$(function () { |
||||
|
||||
"use strict"; // jshint ;_;
|
||||
|
||||
|
||||
/* CSS TRANSITION SUPPORT (http://www.modernizr.com/) |
||||
* ======================================================= */ |
||||
|
||||
$.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); |
@ -0,0 +1,300 @@
|
||||
/* ============================================================= |
||||
* bootstrap-typeahead.js v2.1.1 |
||||
* 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.$menu = $(this.options.menu).appendTo('body') |
||||
this.source = this.options.source |
||||
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.offset(), { |
||||
height: this.$element[0].offsetHeight |
||||
}) |
||||
|
||||
this.$menu.css({ |
||||
top: pos.top + pos.height |
||||
, left: pos.left |
||||
}) |
||||
|
||||
this.$menu.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('blur', $.proxy(this.blur, this)) |
||||
.on('keypress', $.proxy(this.keypress, this)) |
||||
.on('keyup', $.proxy(this.keyup, this)) |
||||
|
||||
if ($.browser.chrome || $.browser.webkit || $.browser.msie) { |
||||
this.$element.on('keydown', $.proxy(this.keydown, this)) |
||||
} |
||||
|
||||
this.$menu |
||||
.on('click', $.proxy(this.click, this)) |
||||
.on('mouseenter', 'li', $.proxy(this.mouseenter, this)) |
||||
} |
||||
|
||||
, 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
|
||||
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() |
||||
} |
||||
|
||||
, blur: function (e) { |
||||
var that = this |
||||
setTimeout(function () { that.hide() }, 150) |
||||
} |
||||
|
||||
, click: function (e) { |
||||
e.stopPropagation() |
||||
e.preventDefault() |
||||
this.select() |
||||
} |
||||
|
||||
, mouseenter: function (e) { |
||||
this.$menu.find('.active').removeClass('active') |
||||
$(e.currentTarget).addClass('active') |
||||
} |
||||
|
||||
} |
||||
|
||||
|
||||
/* TYPEAHEAD PLUGIN DEFINITION |
||||
* =========================== */ |
||||
|
||||
$.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 DATA-API |
||||
* ================== */ |
||||
|
||||
$(function () { |
||||
$('body').on('focus.typeahead.data-api', '[data-provide="typeahead"]', function (e) { |
||||
var $this = $(this) |
||||
if ($this.data('typeahead')) return |
||||
e.preventDefault() |
||||
$this.typeahead($this.data()) |
||||
}) |
||||
}) |
||||
|
||||
}(window.jQuery); |
@ -0,0 +1,56 @@
|
||||
<!DOCTYPE HTML> |
||||
<html> |
||||
<head> |
||||
<title>Bootstrap Plugin Test Suite</title> |
||||
|
||||
<!-- jquery --> |
||||
<!--<script src="http://code.jquery.com/jquery-1.7.min.js"></script>--> |
||||
<script src="vendor/jquery.js"></script> |
||||
|
||||
<!-- qunit --> |
||||
<link rel="stylesheet" href="vendor/qunit.css" type="text/css" media="screen" /> |
||||
<script src="vendor/qunit.js"></script> |
||||
|
||||
<!-- phantomjs logging script--> |
||||
<script src="unit/bootstrap-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> |
||||
|
||||
<!-- 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> |
||||
</head> |
||||
<body> |
||||
<div> |
||||
<h1 id="qunit-header">Bootstrap Plugin Test Suite</h1> |
||||
<h2 id="qunit-banner"></h2> |
||||
<h2 id="qunit-userAgent"></h2> |
||||
<ol id="qunit-tests"></ol> |
||||
<div id="qunit-fixture"></div> |
||||
</div> |
||||
</body> |
||||
</html> |
@ -0,0 +1,63 @@
|
||||
// Simple phantom.js integration script
|
||||
// Adapted from Modernizr
|
||||
|
||||
function waitFor(testFx, onReady, timeOutMillis) { |
||||
var maxtimeOutMillis = timeOutMillis ? timeOutMillis : 5001 //< Default Max Timout is 5s
|
||||
, start = new Date().getTime() |
||||
, condition = false |
||||
, interval = setInterval(function () { |
||||
if ((new Date().getTime() - start < maxtimeOutMillis) && !condition) { |
||||
// If not time-out yet and condition not yet fulfilled
|
||||
condition = (typeof(testFx) === "string" ? eval(testFx) : testFx()) //< defensive code
|
||||
} else { |
||||
if (!condition) { |
||||
// If condition still not fulfilled (timeout but condition is 'false')
|
||||
console.log("'waitFor()' timeout") |
||||
phantom.exit(1) |
||||
} else { |
||||
// Condition fulfilled (timeout and/or condition is 'true')
|
||||
typeof(onReady) === "string" ? eval(onReady) : onReady() //< Do what it's supposed to do once the condition is fulfilled
|
||||
clearInterval(interval) //< Stop this interval
|
||||
} |
||||
} |
||||
}, 100) //< repeat check every 100ms
|
||||
} |
||||
|
||||
|
||||
if (phantom.args.length === 0 || phantom.args.length > 2) { |
||||
console.log('Usage: phantom.js URL') |
||||
phantom.exit() |
||||
} |
||||
|
||||
var page = new WebPage() |
||||
|
||||
// Route "console.log()" calls from within the Page context to the main Phantom context (i.e. current "this")
|
||||
page.onConsoleMessage = function(msg) { |
||||
console.log(msg) |
||||
}; |
||||
|
||||
page.open(phantom.args[0], function(status){ |
||||
if (status !== "success") { |
||||
console.log("Unable to access network") |
||||
phantom.exit() |
||||
} else { |
||||
waitFor(function(){ |
||||
return page.evaluate(function(){ |
||||
var el = document.getElementById('qunit-testresult') |
||||
if (el && el.innerText.match('completed')) { |
||||
return true |
||||
} |
||||
return false |
||||
}) |
||||
}, function(){ |
||||
var failedNum = page.evaluate(function(){ |
||||
var el = document.getElementById('qunit-testresult') |
||||
try { |
||||
return el.getElementsByClassName('failed')[0].innerHTML |
||||
} catch (e) { } |
||||
return 10000 |
||||
}); |
||||
phantom.exit((parseInt(failedNum, 10) > 0) ? 1 : 0) |
||||
}) |
||||
} |
||||
}) |
@ -0,0 +1,14 @@
|
||||
/* |
||||
* Simple connect server for phantom.js |
||||
* Adapted from Modernizr |
||||
*/ |
||||
|
||||
var connect = require('connect') |
||||
, http = require('http') |
||||
, fs = require('fs') |
||||
, app = connect() |
||||
.use(connect.static(__dirname + '/../../')); |
||||
|
||||
http.createServer(app).listen(3000); |
||||
|
||||
fs.writeFileSync(__dirname + '/pid.txt', process.pid, 'utf-8') |
@ -0,0 +1,19 @@
|
||||
$(function () { |
||||
|
||||
module("bootstrap-affix") |
||||
|
||||
test("should be defined on jquery object", function () { |
||||
ok($(document.body).affix, 'affix method is defined') |
||||
}) |
||||
|
||||
test("should return element", function () { |
||||
ok($(document.body).affix()[0] == document.body, 'document.body returned') |
||||
}) |
||||
|
||||
test("should exit early if element is not visible", function () { |
||||
var $affix = $('<div style="display: none"></div>').affix() |
||||
$affix.data('affix').checkPosition() |
||||
ok(!$affix.hasClass('affix'), 'affix class was not added') |
||||
}) |
||||
|
||||
}) |
@ -0,0 +1,56 @@
|
||||
$(function () { |
||||
|
||||
module("bootstrap-alerts") |
||||
|
||||
test("should be defined on jquery object", function () { |
||||
ok($(document.body).alert, 'alert method is defined') |
||||
}) |
||||
|
||||
test("should return element", function () { |
||||
ok($(document.body).alert()[0] == document.body, 'document.body returned') |
||||
}) |
||||
|
||||
test("should fade element out on clicking .close", function () { |
||||
var alertHTML = '<div class="alert-message warning fade in">' |
||||
+ '<a class="close" href="#" data-dismiss="alert">Ă—</a>' |
||||
+ '<p><strong>Holy guacamole!</strong> Best check yo self, you\'re not looking too good.</p>' |
||||
+ '</div>' |
||||
, alert = $(alertHTML).alert() |
||||
|
||||
alert.find('.close').click() |
||||
|
||||
ok(!alert.hasClass('in'), 'remove .in class on .close click') |
||||
}) |
||||
|
||||
test("should remove element when clicking .close", function () { |
||||
$.support.transition = false |
||||
|
||||
var alertHTML = '<div class="alert-message warning fade in">' |
||||
+ '<a class="close" href="#" data-dismiss="alert">Ă—</a>' |
||||
+ '<p><strong>Holy guacamole!</strong> Best check yo self, you\'re not looking too good.</p>' |
||||
+ '</div>' |
||||
, alert = $(alertHTML).appendTo('#qunit-fixture').alert() |
||||
|
||||
ok($('#qunit-fixture').find('.alert-message').length, 'element added to dom') |
||||
|
||||
alert.find('.close').click() |
||||
|
||||
ok(!$('#qunit-fixture').find('.alert-message').length, 'element removed from dom') |
||||
}) |
||||
|
||||
test("should not fire closed when close is prevented", function () { |
||||
$.support.transition = false |
||||
stop(); |
||||
$('<div class="alert"/>') |
||||
.bind('close', function (e) { |
||||
e.preventDefault(); |
||||
ok(true); |
||||
start(); |
||||
}) |
||||
.bind('closed', function () { |
||||
ok(false); |
||||
}) |
||||
.alert('close') |
||||
}) |
||||
|
||||
}) |
@ -0,0 +1,96 @@
|
||||
$(function () { |
||||
|
||||
module("bootstrap-buttons") |
||||
|
||||
test("should be defined on jquery object", function () { |
||||
ok($(document.body).button, 'button method is defined') |
||||
}) |
||||
|
||||
test("should return element", function () { |
||||
ok($(document.body).button()[0] == document.body, 'document.body returned') |
||||
}) |
||||
|
||||
test("should return set state to loading", function () { |
||||
var btn = $('<button class="btn" data-loading-text="fat">mdo</button>') |
||||
equals(btn.html(), 'mdo', 'btn text equals mdo') |
||||
btn.button('loading') |
||||
equals(btn.html(), 'fat', 'btn text equals fat') |
||||
stop() |
||||
setTimeout(function () { |
||||
ok(btn.attr('disabled'), 'btn is disabled') |
||||
ok(btn.hasClass('disabled'), 'btn has disabled class') |
||||
start() |
||||
}, 0) |
||||
}) |
||||
|
||||
test("should return reset state", function () { |
||||
var btn = $('<button class="btn" data-loading-text="fat">mdo</button>') |
||||
equals(btn.html(), 'mdo', 'btn text equals mdo') |
||||
btn.button('loading') |
||||
equals(btn.html(), 'fat', 'btn text equals fat') |
||||
stop() |
||||
setTimeout(function () { |
||||
ok(btn.attr('disabled'), 'btn is disabled') |
||||
ok(btn.hasClass('disabled'), 'btn has disabled class') |
||||
start() |
||||
stop() |
||||
}, 0) |
||||
btn.button('reset') |
||||
equals(btn.html(), 'mdo', 'btn text equals mdo') |
||||
setTimeout(function () { |
||||
ok(!btn.attr('disabled'), 'btn is not disabled') |
||||
ok(!btn.hasClass('disabled'), 'btn does not have disabled class') |
||||
start() |
||||
}, 0) |
||||
}) |
||||
|
||||
test("should toggle active", function () { |
||||
var btn = $('<button class="btn">mdo</button>') |
||||
ok(!btn.hasClass('active'), 'btn does not have active class') |
||||
btn.button('toggle') |
||||
ok(btn.hasClass('active'), 'btn has class active') |
||||
}) |
||||
|
||||
test("should toggle active when btn children are clicked", function () { |
||||
var btn = $('<button class="btn" data-toggle="button">mdo</button>') |
||||
, inner = $('<i></i>') |
||||
btn |
||||
.append(inner) |
||||
.appendTo($('#qunit-fixture')) |
||||
ok(!btn.hasClass('active'), 'btn does not have active class') |
||||
inner.click() |
||||
ok(btn.hasClass('active'), 'btn has class active') |
||||
}) |
||||
|
||||
test("should toggle active when btn children are clicked within btn-group", function () { |
||||
var btngroup = $('<div class="btn-group" data-toggle="buttons-checkbox"></div>') |
||||
, btn = $('<button class="btn">fat</button>') |
||||
, inner = $('<i></i>') |
||||
btngroup |
||||
.append(btn.append(inner)) |
||||
.appendTo($('#qunit-fixture')) |
||||
ok(!btn.hasClass('active'), 'btn does not have active class') |
||||
inner.click() |
||||
ok(btn.hasClass('active'), 'btn has class active') |
||||
}) |
||||
|
||||
test("should check for closest matching toggle", function () { |
||||
var group = $("<div data-toggle='buttons-radio'></div>") |
||||
, btn1 = $("<button class='btn active'></button>") |
||||
, btn2 = $("<button class='btn'></button>") |
||||
, wrap = $("<div></div>") |
||||
|
||||
wrap.append(btn1, btn2) |
||||
|
||||
group |
||||
.append(wrap) |
||||
.appendTo($('#qunit-fixture')) |
||||
|
||||
ok(btn1.hasClass('active'), 'btn1 has active class') |
||||
ok(!btn2.hasClass('active'), 'btn2 does not have active class') |
||||
btn2.click() |
||||
ok(!btn1.hasClass('active'), 'btn1 does not have active class') |
||||
ok(btn2.hasClass('active'), 'btn2 has active class') |
||||
}) |
||||
|
||||
}) |