Commit 2eec3f91 authored by Mark Otto's avatar Mark Otto

Merge branch 'master' into pr/10656

Conflicts:
	dist/css/bootstrap.min.css
parents ab3d0a27 6585c589
# Ignore compiled docs
# Ignore docs files
_gh_pages
_site
.ruby-version
# Numerous always-ignore extensions
*.diff
......@@ -13,8 +14,6 @@ _site
*.zip
*.vi
*~
*.sass-cache
*.ruby-version
# OS or Editor folders
.DS_Store
......@@ -28,6 +27,7 @@ Thumbs.db
nbproject
*.sublime-project
*.sublime-workspace
.idea
# Komodo
*.komodoproject
......@@ -38,8 +38,4 @@ validation-status.json
validation-report.json
# Folders to ignore
.hg
.svn
.CVS
.idea
node_modules
......@@ -33,12 +33,13 @@ We only accept issues that are bug reports or feature requests. Bugs must be iso
- Double quotes only, never single quotes
- Always use proper indentation
- Use tags and elements appropriate for an HTML5 doctype (e.g., self-closing tags)
- Use CDNs and HTTPS for third-party JS when possible. We don't use protocol-relative URLs in this case because they break when viewing the page locally via `file://`.
### CSS
- Adhere to the [Recess CSS property order](http://markdotto.com/2011/11/29/css-property-order/)
- Adhere to the [RECESS CSS property order](http://markdotto.com/2011/11/29/css-property-order/)
- Multiple-line approach (one property and value per line)
- Always a space after a property's colon (.e.g, `display: block;` and not `display:block;`)
- Always a space after a property's colon (e.g., `display: block;` and not `display:block;`)
- End all lines with a semi-colon
- For multiple, comma-separated selectors, place each selector on its own line
- Attribute selectors, like `input[type="text"]` should always wrap the attribute's value in double quotes, for consistency and safety (see this [blog post on unquoted attribute values](http://mathiasbynens.be/notes/unquoted-attribute-values) that can lead to XSS attacks).
......@@ -55,4 +56,6 @@ We only accept issues that are bug reports or feature requests. Bugs must be iso
## License
By contributing your code, you agree to license your contribution under the terms of the APLv2: https://github.com/twbs/bootstrap/blob/master/LICENSE
With v3.1, we're moving from the Apache 2 to the MIT license for the Bootstrap code (not the docs). We're in the process of collecting permissions from all Bootstrap contributors with code still part of the project to make this happen. For details, please see [#2054](https://github.com/twbs/bootstrap/issues/2054).
By contributing your code, you agree to dual-license your contribution under the [Apache 2](https://github.com/twbs/bootstrap/blob/master/LICENSE) and [MIT](https://github.com/twbs/bootstrap/blob/master/MIT) licenses.
This diff is collapsed.
......@@ -3,19 +3,20 @@
module.exports = function(grunt) {
"use strict";
var btoa = require('btoa')
// Project configuration.
grunt.initConfig({
// Metadata.
pkg: grunt.file.readJSON('package.json'),
banner: '/**\n' +
'* Bootstrap v<%= pkg.version %> by @fat and @mdo\n' +
'* Copyright <%= grunt.template.today("yyyy") %> <%= pkg.author %>\n' +
'* Licensed under <%= _.pluck(pkg.licenses, "url").join(", ") %>.\n' +
'*\n' +
'* Designed and built with all the love in the world by @mdo and @fat.\n' +
'*/\n',
jqueryCheck: 'if (!jQuery) { throw new Error(\"Bootstrap requires jQuery\") }\n\n',
banner: '/*!\n' +
' * Bootstrap v<%= pkg.version %> by @fat and @mdo\n' +
' * Copyright <%= grunt.template.today("yyyy") %> <%= pkg.author %>\n' +
' * Licensed under <%= _.pluck(pkg.licenses, "url").join(", ") %>\n' +
' *\n' +
' * Designed and built with all the love in the world by @mdo and @fat.\n' +
' */\n',
jqueryCheck: 'if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery") }\n\n',
// Task configuration.
clean: {
......@@ -63,7 +64,8 @@ module.exports = function(grunt) {
uglify: {
options: {
banner: '<%= banner %>'
banner: '<%= banner %>',
report: 'min'
},
bootstrap: {
src: ['<%= concat.bootstrap.dest %>'],
......@@ -73,7 +75,8 @@ module.exports = function(grunt) {
recess: {
options: {
compile: true
compile: true,
banner: '<%= banner %>'
},
bootstrap: {
src: ['less/bootstrap.less'],
......@@ -154,6 +157,7 @@ module.exports = function(grunt) {
// These plugins provide necessary tasks.
grunt.loadNpmTasks('browserstack-runner');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-connect');
......@@ -165,7 +169,6 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-html-validation');
grunt.loadNpmTasks('grunt-jekyll');
grunt.loadNpmTasks('grunt-recess');
grunt.loadNpmTasks('browserstack-runner');
// Docs HTML validation task
grunt.registerTask('validate-html', ['jekyll', 'validation']);
......@@ -207,13 +210,13 @@ module.exports = function(grunt) {
return type == 'fonts' ? true : new RegExp('\\.' + type + '$').test(path)
})
.forEach(function (path) {
return files[path] = fs.readFileSync(type + '/' + path, 'utf8')
var fullPath = type + '/' + path
return files[path] = (type == 'fonts' ? btoa(fs.readFileSync(fullPath)) : fs.readFileSync(fullPath, 'utf8'))
})
return 'var __' + type + ' = ' + JSON.stringify(files) + '\n'
}
var customize = fs.readFileSync('customize.html', 'utf-8')
var files = getFiles('js') + getFiles('less') + getFiles('fonts')
fs.writeFileSync('assets/js/raw-files.js', files)
fs.writeFileSync('docs-assets/js/raw-files.js', files)
});
};
\ No newline at end of file
};
The MIT License (MIT)
Copyright (c) 2013 Twitter, Inc
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
......@@ -2,7 +2,7 @@
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).
To get started, check out [http://getbootstrap.com](http://getbootstrap.com)!
To get started, check out <http://getbootstrap.com>!
......@@ -11,11 +11,34 @@ To get started, check out [http://getbootstrap.com](http://getbootstrap.com)!
Three quick start options are available:
* [Download the latest release](https://github.com/twbs/bootstrap/releases/tag/v3.0.0).
* Clone the repo: `git clone git://github.com/twbs/bootstrap.git`.
* Clone the repo: `git clone https://github.com/twbs/bootstrap.git`.
* Install with [Bower](http://bower.io): `bower install bootstrap`.
Read the [Getting Started page](http://getbootstrap.com/getting-started/) for information on the framework contents, templates and examples, and more.
### What's included
Within the download you'll find the following directories and files, logically grouping common assets and providing both compiled and minified variations. You'll see something like this:
```
bootstrap/
├── css/
│ ├── bootstrap.css
│ ├── bootstrap.min.css
│ ├── bootstrap-theme.css
│ └── bootstrap-theme.min.css
├── js/
│ ├── bootstrap.js
│ └── bootstrap.min.js
└── fonts/
├── glyphicons-halflings-regular.eot
├── glyphicons-halflings-regular.svg
├── glyphicons-halflings-regular.ttf
└── glyphicons-halflings-regular.woff
```
We provide compiled CSS and JS (`bootstrap.*`), as well as compiled and minified CSS and JS (`bootstrap.min.*`). Fonts from Glyphicons are included, as is the optional Bootstrap theme.
## Bugs and feature requests
......@@ -28,20 +51,20 @@ You may use [this JS Bin](http://jsbin.com/aKiCIDO/1/edit) as a template for you
## Documentation
Bootstrap's documentation, included in this repo in the root directory, is built with [Jekyll](http://jekyllrb.com) and publicly hosted on GitHub Pages at [http://getbootstrap.com](http://getbootstrap.com). The docs may also be run locally.
Bootstrap's documentation, included in this repo in the root directory, is built with [Jekyll](http://jekyllrb.com) and publicly hosted on GitHub Pages at <http://getbootstrap.com>. The docs may also be run locally.
### Running documentation locally
1. If necessary, [install Jekyll](http://jekyllrb.com/docs/installation) (requires v1.x).
2. From the root `/bootstrap` directory, run `jekyll serve` in the command line.
- **Windows users:** run `chcp 65001` first to change the command prompt's character encoding ([code page](http://en.wikipedia.org/wiki/Windows_code_page)) to UTF-8 so Jekyll runs without errors.
3. Open [http://localhost:9001](http://localhost:9001) in your browser, and voilà.
3. Open <http://localhost:9001> in your browser, and voilà.
Learn more about using Jekyll by reading their [documentation](http://jekyllrb.com/docs/home/).
Learn more about using Jekyll by reading its [documentation](http://jekyllrb.com/docs/home/).
### Documentation for previous releases
Documentation for v2.3.2 has been made available for the time being at [http://getbootstrap.com/2.3.2/](http://getbootstrap.com/2.3.2/) while folks transition to Bootstrap 3.
Documentation for v2.3.2 has been made available for the time being at <http://getbootstrap.com/2.3.2/> while folks transition to Bootstrap 3.
[Previous releases](https://github.com/twbs/bootstrap/releases) and their documentation are also available for download.
......@@ -56,7 +79,7 @@ Bootstrap uses [Grunt](http://gruntjs.com/) with convenient methods for working
From the command line:
1. Install `grunt-cli` globally with `npm install -g grunt-cli`.
2. From the root `/bootstrap` directory, install the [necessary local dependencies](package.json) via `npm install`.
2. Navigate to the root `/bootstrap` directory, then run `npm install`. npm will look at [package.json](package.json) and automatically install the necessary local dependencies listed there.
When completed, you'll be able to run the various Grunt commands provided from the command line.
......@@ -88,8 +111,9 @@ Please read through our [contributing guidelines](https://github.com/twbs/bootst
More over, if your pull request contains JavaScript patches or features, you must include relevant unit tests. All HTML and CSS should conform to the [Code Guide](http://github.com/mdo/code-guide), maintained by [Mark Otto](http://github.com/mdo).
Editor preferences are available in the [editor config](.editorconfig) for easy use in common text editors. Read more and download plugins at [http://editorconfig.org](http://editorconfig.org).
Editor preferences are available in the [editor config](.editorconfig) for easy use in common text editors. Read more and download plugins at <http://editorconfig.org>.
With v3.1, we're moving from the Apache 2 to the MIT license for the Bootstrap code (not the docs). Please see the [contributing guidelines](https://github.com/twbs/bootstrap/blob/master/CONTRIBUTING.md) for more information.
## Community
......@@ -97,7 +121,7 @@ Editor preferences are available in the [editor config](.editorconfig) for easy
Keep track of development and community news.
* Follow [@twbootstrap on Twitter](http://twitter.com/twbootstrap).
* Read and subscribe to the [The Official Bootstrap Blog](http://blog.getbootstrap.com).
* Read and subscribe to [The Official Bootstrap Blog](http://blog.getbootstrap.com).
* Have a question that's not a feature request or bug report? [Ask on the mailing list.](http://groups.google.com/group/twitter-bootstrap)
* Chat with fellow Bootstrappers in IRC. On the `irc.freenode.net` server, in the `##twitter-bootstrap` channel.
......@@ -118,7 +142,7 @@ And constructed with the following guidelines:
* 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/](http://semver.org/).
For more information on SemVer, please visit <http://semver.org/>.
......@@ -126,13 +150,13 @@ For more information on SemVer, please visit [http://semver.org/](http://semver.
**Mark Otto**
+ [http://twitter.com/mdo](http://twitter.com/mdo)
+ [http://github.com/mdo](http://github.com/mdo)
+ <http://twitter.com/mdo>
+ <http://github.com/mdo>
**Jacob Thornton**
+ [http://twitter.com/fat](http://twitter.com/fat)
+ [http://github.com/fat](http://github.com/fat)
+ <http://twitter.com/fat>
+ <http://github.com/fat>
......
......@@ -7,7 +7,7 @@ permalink: pretty
# Server
destination: ./_gh_pages
exclude: [".editorconfig", ".gitignore", ".ruby-version", "bower.json", "composer.json", "CONTRIBUTING.md", "CNAME", "LICENSE", "Gruntfile.js", "package.json", "node_modules", "README.md", "less"]
exclude: [".editorconfig", ".gitignore", "bower.json", "composer.json", "CONTRIBUTING.md", "CNAME", "LICENSE", "Gruntfile.js", "package.json", "node_modules", "README.md", "less"]
port: 9001
# Custom vars
......
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="{{ page.base_url }}assets/js/jquery.js"></script>
<script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>
<script src="{{ page.base_url }}dist/js/bootstrap.js"></script>
<script src="http://platform.twitter.com/widgets.js"></script>
<script src="{{ page.base_url }}assets/js/holder.js"></script>
<script src="{{ page.base_url }}docs-assets/js/holder.js"></script>
<script src="{{ page.base_url }}assets/js/application.js"></script>
<script src="{{ page.base_url }}docs-assets/js/application.js"></script>
{% if page.slug == "customize" %}
<script src="{{ page.base_url }}assets/js/less.js"></script>
<script src="{{ page.base_url }}assets/js/jszip.js"></script>
<script src="{{ page.base_url }}assets/js/uglify.js"></script>
<script src="{{ page.base_url }}assets/js/filesaver.js"></script>
<script src="{{ page.base_url }}assets/js/raw-files.js"></script>
<script src="{{ page.base_url }}assets/js/customizer.js"></script>
<script src="{{ page.base_url }}docs-assets/js/less.js"></script>
<script src="{{ page.base_url }}docs-assets/js/jszip.js"></script>
<script src="{{ page.base_url }}docs-assets/js/uglify.js"></script>
<script src="{{ page.base_url }}docs-assets/js/filesaver.js"></script>
<script src="{{ page.base_url }}docs-assets/js/raw-files.js"></script>
<script src="{{ page.base_url }}docs-assets/js/customizer.js"></script>
{% endif %}
<!-- Analytics
......
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
......@@ -12,24 +13,22 @@
</title>
<!-- Bootstrap core CSS -->
<link href="{{ page.base_url }}dist/css/bootstrap.css" rel="stylesheet">
<link href="{{ page.base_url }}dist/css/bootstrap.min.css" rel="stylesheet">
<!-- Documentation extras -->
<link href="{{ page.base_url }}assets/css/docs.css" rel="stylesheet">
<link href="{{ page.base_url }}assets/css/pygments-manni.css" rel="stylesheet">
<link href="{{ page.base_url }}docs-assets/css/docs.css" rel="stylesheet">
<link href="{{ page.base_url }}docs-assets/css/pygments-manni.css" rel="stylesheet">
<!--[if lt IE 9]><script src="{{ page.base_url }}docs-assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="{{ page.base_url }}assets/js/html5shiv.js"></script>
<script src="{{ page.base_url }}assets/js/respond.min.js"></script>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->
<!-- Favicons -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="{{ page.base_url }}assets/ico/apple-touch-icon-144-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="{{ page.base_url }}assets/ico/apple-touch-icon-114-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="{{ page.base_url }}assets/ico/apple-touch-icon-72-precomposed.png">
<link rel="apple-touch-icon-precomposed" href="{{ page.base_url }}assets/ico/apple-touch-icon-57-precomposed.png">
<link rel="shortcut icon" href="{{ page.base_url }}assets/ico/favicon.png">
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="{{ page.base_url }}docs-assets/ico/apple-touch-icon-144-precomposed.png">
<link rel="shortcut icon" href="{{ page.base_url }}docs-assets/ico/favicon.png">
<script>
var _gaq = _gaq || [];
......
<li>
<a href="#history">History</a>
</li>
<li>
<a href="#team">Core team</a>
</li>
<li>
<a href="#community">Community</a>
</li>
<li>
<a href="#translations">Translations</a>
</li>
......@@ -12,6 +12,7 @@
<li>
<a href="#grid">Grid system</a>
<ul class="nav">
<li><a href="#grid-intro">Introduction</a></li>
<li><a href="#grid-media-queries">Media queries</a></li>
<li><a href="#grid-options">Grid options</a></li>
<li><a href="#grid-example-basic">Ex: Stacked-to-horizonal</a></li>
......@@ -79,6 +80,7 @@
<a href="#helper-classes">Helper classes</a>
<ul class="nav">
<li><a href="#helper-classes-close">Close icon</a></li>
<li><a href="#helper-classes-carets">Carets</a></li>
<li><a href="#helper-classes-floats">Quick floats</a></li>
<li><a href="#helper-classes-center">Center content blocks</a></li>
<li><a href="#helper-classes-clearfix">Clearfix</a></li>
......
......@@ -27,6 +27,11 @@
<a href="{{ page.base_url }}customize">Customize</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li{% if page.slug == "about" %} class="active"{% endif %}>
<a href="{{ page.base_url }}about">About</a>
</li>
</ul>
</nav>
</div>
</header>
......@@ -3,10 +3,9 @@
<head>
<!-- Meta, title, CSS, favicons, etc. -->
{% include header.html %}
<!-- Place anything custom after this. -->
</head>
<body>
<a class="sr-only" href="#content">Skip navigation</a>
<a class="sr-only" href="#content">Skip to main content</a>
<!-- Docs master nav -->
{% include nav-main.html %}
......@@ -38,6 +37,8 @@
{% include nav-javascript.html %}
{% elsif page.slug == "customize" %}
{% include nav-customize.html %}
{% elsif page.slug == "about" %}
{% include nav-about.html %}
{% endif %}
</ul>
</div>
......
......@@ -3,10 +3,9 @@
<head>
<!-- Meta, title, CSS, favicons, etc. -->
{% include header.html %}
<!-- Place anything custom after this. -->
</head>
<body class="bs-docs-home">
<a class="sr-only" href="#content">Skip navigation</a>
<a class="sr-only" href="#content">Skip to main content</a>
<!-- Docs master nav -->
{% include nav-main.html %}
......@@ -15,6 +14,8 @@
{{ content }}
<footer class="container" role="contentinfo">
{% include ads.html %}
{% include social-buttons.html %}
<ul class="bs-masthead-links">
......@@ -30,9 +31,6 @@
<li>
<a href="{{ page.base_url }}getting-started/#examples" onclick="_gaq.push(['_trackEvent', 'Jumbotron actions', 'Jumbotron links', 'Examples']);">Examples</a>
</li>
<li>
<a href="{{ page.base_url }}components/#glyphicons" onclick="_gaq.push(['_trackEvent', 'Jumbotron actions', 'Jumbotron links', 'Glyphicons']);">Glyphicons</a>
</li>
<li>
<a href="{{ site.expo }}" onclick="_gaq.push(['_trackEvent', 'Jumbotron actions', 'Jumbotron links', 'Expo']);">Expo</a>
</li>
......
---
layout: default
title: About
slug: about
lead: "Learn about the history of Bootstrap, meet the core team, and check out the ever-growing community resources."
base_url: "../"
---
<!-- History
================================================== -->
<div class="bs-docs-section">
<div class="page-header">
<h1 id="history">History</h1>
</div>
<p class="lead">Originally created by a designer and a developer at Twitter, Bootstrap has become one of the most popular front-end frameworks and open source projects in the world.</p>
<p>Bootstrap was created at Twitter in mid-2010 by <a href="https://twitter.com/mdo">@mdo</a> and <a href="https://twitter.com/fat">@fat</a>. Prior to being an open-sourced framework, Bootstrap was known as <em>Twitter Blueprint</em>. A few months into development, Twitter held its <a href="https://blog.twitter.com/2010/hack-week">first Hack Week</a> and the project exploded as developers of all skill levels jumped in without any external guidance. It served as the style guide for internal tools development at the company for over a year before its public release, and continues to do so today.</p>
<p>Originally <a href="https://dev.twitter.com/blog/bootstrap-twitter">released</a> on <a href="https://twitter.com/mdo/statuses/104620039650557952"><time datetime="2011-08-19 11:25">Friday, August 19, 2011</time></a>, we've since had over <a href="https://github.com/twbs/bootstrap/releases">twenty releases</a>, including two major rewrites with v2 and v3. With Bootstrap 2, we added responsive functionality to the entire framework as an optional stylesheet. Building on that with Bootstrap 3, we rewrote the library once more to make it responsive by default with a mobile first approach.</p>
</div>
<!-- Team
================================================== -->
<div class="bs-docs-section">
<div class="page-header">
<h1 id="team">Core team</h1>
</div>
<p class="lead">Bootstrap is maintained by the founding team and a small group of invaluable core contributors, with the massive support and involvement of our community.</p>
<div class="list-group bs-team">
<div class="list-group-item">
<iframe class="github-btn" src="http://ghbtns.com/github-btn.html?user=mdo&amp;type=follow"></iframe>
<a class="team-member" href="https://github.com/mdo">
<img src="http://www.gravatar.com/avatar/bc4ab438f7a4ce1c406aadc688427f2c" alt="@mdo">
<strong>Mark Otto</strong> <small>@mdo</small>
</a>
</div>
<div class="list-group-item">
<iframe class="github-btn" src="http://ghbtns.com/github-btn.html?user=fat&amp;type=follow"></iframe>
<a class="team-member" href="https://github.com/fat">
<img src="http://www.gravatar.com/avatar/a98244cbdacaf1c0b55499466002f7a8" alt="@fat">
<strong>Jacob Thornton</strong> <small>@fat</small>
</a>
</div>
<div class="list-group-item">
<iframe class="github-btn" src="http://ghbtns.com/github-btn.html?user=cvrebert&amp;type=follow"></iframe>
<a class="team-member" href="https://github.com/cvrebert">
<img src="http://www.gravatar.com/avatar/edec428c425453955f770095a7d26c50" alt="@cvrebert">
<strong>Chris Rebert</strong> <small>@cvrebert</small>
</a>
</div>
<div class="list-group-item">
<iframe class="github-btn" src="http://ghbtns.com/github-btn.html?user=juthilo&amp;type=follow"></iframe>
<a class="team-member" href="https://github.com/juthilo">
<img src="http://www.gravatar.com/avatar/0f7dd3ce58a416be5685ea6194f82b11" alt="@juthilo">
<strong>Julian Thilo</strong> <small>@juthilo</small>
</a>
</div>
</div>
<p>Get involved with Bootstrap development by <a href="https://github.com/twbs/bootstrap/issues/new">opening an issue</a> or submitting a pull request. Read our <a href="https://github.com/twbs/bootstrap/blob/master/CONTRIBUTING.md">contributing guidelines</a> for information on how we develop.</p>
</div>
<!-- Community
================================================== -->
<div class="bs-docs-section">
<div class="page-header">
<h1 id="community">Community</h1>
</div>
<p class="lead">Stay up to date on the development of Bootstrap and reach out to the community with these helpful resources.</p>
<ul>
<li>Read and subscribe to <a href="http://blog.getbootstrap.com/">The Official Bootstrap Blog</a>.</li>
<li>Have a question that's not a feature request or bug report? <a href="http://groups.google.com/group/twitter-bootstrap">Ask on the mailing list.</a></li>
<li>Chat with fellow Bootstrappers using IRC in the <code>irc.freenode.net</code> server, in the <a href="irc://irc.freenode.net/#twitter-bootstrap">##twitter-bootstrap channel</a>.</li>
<li>Find inspiring examples of people building with Bootstrap at the <a href="http://expo.getbootstrap.com">Bootstrap Expo</a>.</li>
</ul>
<p>You can also follow <a href="https://twitter.com/twbootstrap">@twbootstrap on Twitter</a> for the latest gossip and awesome music videos.</p>
</div>
<!-- Translations
================================================== -->
<div class="bs-docs-section">
<div class="page-header">
<h1 id="translations">Translations</h1>
</div>
<p class="lead">Community members have translated Bootstrap's documentation into various langauges. None are officially supported and may not always be up to date.</p>
<ul>
<li><a href="http://v3.bootcss.com/">Bootstrap 中文文档 (Chinese)</a></li>
<li><a href="http://www.oneskyapp.com/docs/bootstrap/ru">Bootstrap по-русски (Russian)</a></li>
<li><a href="http://www.oneskyapp.com/docs/bootstrap/es">Bootstrap en Español (Spanish)</a></li>
</ul>
<p>Have another language to add, or perhaps a different or better translation? Let us know by <a href="https://github.com/twbs/bootstrap/issues/new">opening an issue</a>.</p>
</div>
/*
HTML5 Shiv v3.6.2 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
*/
(function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag();
a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/\w+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsByTagName("head")[0]||d.documentElement;c.innerHTML="x<style>article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}</style>";
c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;(function(){try{var a=f.createElement("a");a.innerHTML="<xyz></xyz>";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode||
"undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}})();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup main mark meter nav output progress section summary time video",version:"3.6.2",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f);if(g)return a.createDocumentFragment();
for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d<h;d++)c.createElement(e[d]);return c}};l.html5=e;q(f)})(this,document);
This diff is collapsed.
This diff is collapsed.
/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license */
/*! NOTE: If you're already including a window.matchMedia polyfill via Modernizr or otherwise, you don't need this part */
window.matchMedia=window.matchMedia||function(a){"use strict";var c,d=a.documentElement,e=d.firstElementChild||d.firstChild,f=a.createElement("body"),g=a.createElement("div");return g.id="mq-test-1",g.style.cssText="position:absolute;top:-100em",f.style.background="none",f.appendChild(g),function(a){return g.innerHTML='&shy;<style media="'+a+'"> #mq-test-1 { width: 42px; }</style>',d.insertBefore(f,e),c=42===g.offsetWidth,d.removeChild(f),{matches:c,media:a}}}(document);
/*! Respond.js v1.3.0: min/max-width media query polyfill. (c) Scott Jehl. MIT/GPLv2 Lic. j.mp/respondjs */
(function(a){"use strict";function x(){u(!0)}var b={};if(a.respond=b,b.update=function(){},b.mediaQueriesSupported=a.matchMedia&&a.matchMedia("only all").matches,!b.mediaQueriesSupported){var q,r,t,c=a.document,d=c.documentElement,e=[],f=[],g=[],h={},i=30,j=c.getElementsByTagName("head")[0]||d,k=c.getElementsByTagName("base")[0],l=j.getElementsByTagName("link"),m=[],n=function(){for(var b=0;l.length>b;b++){var c=l[b],d=c.href,e=c.media,f=c.rel&&"stylesheet"===c.rel.toLowerCase();d&&f&&!h[d]&&(c.styleSheet&&c.styleSheet.rawCssText?(p(c.styleSheet.rawCssText,d,e),h[d]=!0):(!/^([a-zA-Z:]*\/\/)/.test(d)&&!k||d.replace(RegExp.$1,"").split("/")[0]===a.location.host)&&m.push({href:d,media:e}))}o()},o=function(){if(m.length){var b=m.shift();v(b.href,function(c){p(c,b.href,b.media),h[b.href]=!0,a.setTimeout(function(){o()},0)})}},p=function(a,b,c){var d=a.match(/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi),g=d&&d.length||0;b=b.substring(0,b.lastIndexOf("/"));var h=function(a){return a.replace(/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,"$1"+b+"$2$3")},i=!g&&c;b.length&&(b+="/"),i&&(g=1);for(var j=0;g>j;j++){var k,l,m,n;i?(k=c,f.push(h(a))):(k=d[j].match(/@media *([^\{]+)\{([\S\s]+?)$/)&&RegExp.$1,f.push(RegExp.$2&&h(RegExp.$2))),m=k.split(","),n=m.length;for(var o=0;n>o;o++)l=m[o],e.push({media:l.split("(")[0].match(/(only\s+)?([a-zA-Z]+)\s?/)&&RegExp.$2||"all",rules:f.length-1,hasquery:l.indexOf("(")>-1,minw:l.match(/\(\s*min\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:l.match(/\(\s*max\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}u()},s=function(){var a,b=c.createElement("div"),e=c.body,f=!1;return b.style.cssText="position:absolute;font-size:1em;width:1em",e||(e=f=c.createElement("body"),e.style.background="none"),e.appendChild(b),d.insertBefore(e,d.firstChild),a=b.offsetWidth,f?d.removeChild(e):e.removeChild(b),a=t=parseFloat(a)},u=function(b){var h="clientWidth",k=d[h],m="CSS1Compat"===c.compatMode&&k||c.body[h]||k,n={},o=l[l.length-1],p=(new Date).getTime();if(b&&q&&i>p-q)return a.clearTimeout(r),r=a.setTimeout(u,i),void 0;q=p;for(var v in e)if(e.hasOwnProperty(v)){var w=e[v],x=w.minw,y=w.maxw,z=null===x,A=null===y,B="em";x&&(x=parseFloat(x)*(x.indexOf(B)>-1?t||s():1)),y&&(y=parseFloat(y)*(y.indexOf(B)>-1?t||s():1)),w.hasquery&&(z&&A||!(z||m>=x)||!(A||y>=m))||(n[w.media]||(n[w.media]=[]),n[w.media].push(f[w.rules]))}for(var C in g)g.hasOwnProperty(C)&&g[C]&&g[C].parentNode===j&&j.removeChild(g[C]);for(var D in n)if(n.hasOwnProperty(D)){var E=c.createElement("style"),F=n[D].join("\n");E.type="text/css",E.media=D,j.insertBefore(E,o.nextSibling),E.styleSheet?E.styleSheet.cssText=F:E.appendChild(c.createTextNode(F)),g.push(E)}},v=function(a,b){var c=w();c&&(c.open("GET",a,!0),c.onreadystatechange=function(){4!==c.readyState||200!==c.status&&304!==c.status||b(c.responseText)},4!==c.readyState&&c.send(null))},w=function(){var b=!1;try{b=new a.XMLHttpRequest}catch(c){b=new a.ActiveXObject("Microsoft.XMLHTTP")}return function(){return b}}();n(),b.update=n,a.addEventListener?a.addEventListener("resize",x,!1):a.attachEvent&&a.attachEvent("onresize",x)}})(this);
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/*!
* Bootstrap v3.0.0 by @fat and @mdo
* Copyright 2013 Twitter, Inc.
* Licensed under http://www.apache.org/licenses/LICENSE-2.0
*
* Designed and built with all the love in the world by @mdo and @fat.
*/
.btn-default,
.btn-primary,
.btn-success,
......@@ -40,6 +47,7 @@
border-color: #dbdbdb;
border-color: #ccc;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
}
.btn-default:hover,
......@@ -62,6 +70,7 @@
background-repeat: repeat-x;
border-color: #2b669a;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff2d6ca2', GradientType=0);
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
}
.btn-primary:hover,
......@@ -84,6 +93,7 @@
background-repeat: repeat-x;
border-color: #3e8f3e;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
}
.btn-success:hover,
......@@ -106,6 +116,7 @@
background-repeat: repeat-x;
border-color: #e38d13;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
}
.btn-warning:hover,
......@@ -128,6 +139,7 @@
background-repeat: repeat-x;
border-color: #b92c28;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
}
.btn-danger:hover,
......@@ -150,6 +162,7 @@
background-repeat: repeat-x;
border-color: #28a4c9;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
}
.btn-info:hover,
......@@ -201,6 +214,7 @@
background-repeat: repeat-x;
border-radius: 4px;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 5px rgba(0, 0, 0, 0.075);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 5px rgba(0, 0, 0, 0.075);
}
......@@ -228,6 +242,7 @@
background-image: linear-gradient(to bottom, #3c3c3c 0%, #222222 100%);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
}
.navbar-inverse .navbar-nav > .active > a {
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
/**
* Bootstrap v3.0.0 by @fat and @mdo
* Copyright 2013 Twitter Inc.
* Licensed under http://www.apache.org/licenses/LICENSE-2.0.
*
* Designed and built with all the love in the world by @mdo and @fat.
*/
if (!jQuery) { throw new Error("Bootstrap requires jQuery") }
/*!
* Bootstrap v3.0.0 by @fat and @mdo
* Copyright 2013 Twitter, Inc.
* Licensed under http://www.apache.org/licenses/LICENSE-2.0
*
* Designed and built with all the love in the world by @mdo and @fat.
*/
if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery") }
/* ========================================================================
* Bootstrap: transition.js v3.0.0
......@@ -1769,7 +1769,7 @@ if (!jQuery) { throw new Error("Bootstrap requires jQuery") }
Tab.prototype.show = function () {
var $this = this.element
var $ul = $this.closest('ul:not(.dropdown-menu)')
var selector = $this.attr('data-target')
var selector = $this.data('target')
if (!selector) {
selector = $this.attr('href')
......
This diff is collapsed.
/*!
* Copyright 2013 Twitter, Inc.
*
* Licensed under the Creative Commons Attribution 3.0 Unported License. For
* details, see http://creativecommons.org/licenses/by/3.0/.
*/
/*
* Bootstrap Documentation
* Special styles for presenting Bootstrap's documentation and code examples.
......@@ -180,7 +188,7 @@ body {
overflow: hidden;
}
@media screen and (min-width: 768px) {
@media (min-width: 768px) {
.bs-social {
text-align: left;
}
......@@ -244,7 +252,7 @@ body {
color: #fff;
}
@media screen and (min-width: 768px) {
@media (min-width: 768px) {
.bs-masthead {
text-align: left;
padding-top: 140px;
......@@ -295,7 +303,7 @@ body {
position: relative;
}
@media screen and (min-width: 768px) {
@media (min-width: 768px) {
.bs-header {
font-size: 21px;
text-align: left;
......@@ -306,7 +314,7 @@ body {
}
}
@media screen and (min-width: 992px) {
@media (min-width: 992px) {
.bs-header h1,
.bs-header p {
margin-right: 380px;
......@@ -361,7 +369,7 @@ body {
display: none; /* hide what I assume are tracking images */
}
@media screen and (min-width: 768px) {
@media (min-width: 768px) {
.carbonad {
margin: 0 !important;
border-radius: 4px;
......@@ -369,16 +377,55 @@ body {
}
}
@media screen and (min-width: 992px) {
@media (min-width: 992px) {
.carbonad {
position: absolute;
top: 20px;
right: 0;
right: 15px; /* 15px instead of 0 since box-sizing */
padding: 15px !important;
width: 330px !important;
}
}
/* Homepage variations */
.bs-docs-home .carbonad {
margin: 0 -15px 40px !important;
}
@media (min-width: 480px) {
.bs-docs-home .carbonad {
width: 330px !important;
margin: 0 auto 40px !important;
border-radius: 4px;
}
}
@media (min-width: 768px) {
.bs-docs-home .carbonad {
float: left;
width: 330px !important;
margin: 0 0 30px !important;
}
.bs-docs-home .bs-social,
.bs-docs-home .bs-masthead-links {
margin-left: 350px;
}
.bs-docs-home .bs-social {
margin-bottom: 10px;
}
.bs-docs-home .bs-masthead-links {
margin-top: 10px;
}
}
@media (min-width: 992px) {
.bs-docs-home .carbonad {
position: static;
}
}
@media (min-width: 1170px) {
.bs-docs-home .carbonad {
margin-top: -25px !important;
}
}
/*
* Callout for 2.3.2 docs
......@@ -456,7 +503,7 @@ body {
}
/* Show and affix the side nav when space allows it */
@media screen and (min-width: 992px) {
@media (min-width: 992px) {
.bs-sidebar .nav > .active > ul {
display: block;
}
......@@ -478,7 +525,7 @@ body {
margin-bottom: 0;
}
}
@media screen and (min-width: 1200px) {
@media (min-width: 1200px) {
/* Widen the fixed sidebar again */
.bs-sidebar.affix-bottom,
.bs-sidebar.affix {
......@@ -515,32 +562,66 @@ h1[id] {
/* Common styles for all types */
.bs-callout {
margin: 20px 0;
padding: 15px 30px 15px 15px;
border-left: 5px solid #eee;
padding: 20px;
border-left: 3px solid #eee;
}
.bs-callout h4 {
margin-top: 0;
margin-bottom: 5px;
}
.bs-callout p:last-child {
margin-bottom: 0;
}
.bs-callout code,
.bs-callout .highlight {
background-color: #fff;
}
/* Variations */
.bs-callout-danger {
background-color: #fcf2f2;
border-color: #dFb5b4;
background-color: #fdf7f7;
border-color: #eed3d7;
}
.bs-callout-danger h4 {
color: #b94a48;
}
.bs-callout-warning {
background-color: #fefbed;
border-color: #f1e7bc;
background-color: #faf8f0;
border-color: #faebcc;
}
.bs-callout-warning h4 {
color: #c09853;
}
.bs-callout-info {
background-color: #f0f7fd;
border-color: #d0e3f0;
background-color: #f4f8fa;
border-color: #bce8f1;
}
.bs-callout-info h4 {
color: #3a87ad;
}
/*
* Team members
*
* Avatars, names, and usernames for core team.
*/
.bs-team .team-member {
color: #555;
line-height: 32px;
}
.bs-team .team-member:hover {
color: #333;
text-decoration: none;
}
.bs-team .github-btn {
float: right;
margin-top: 6px;
width: 120px;
height: 20px;
}
.bs-team img {
float: left;
width: 32px;
margin-right: 10px;
border-radius: 4px;
}
......@@ -602,7 +683,7 @@ h1[id] {
}
/* Make the examples and snippets not full-width */
@media screen and (min-width: 768px) {
@media (min-width: 768px) {
.bs-example {
margin-left: 0;
margin-right: 0;
......@@ -676,6 +757,11 @@ h1[id] {
margin: 5px;
}
/* Tables */
.bs-example > .table-responsive > .table {
background-color: #fff;
}
/* Buttons */
.bs-example > .btn,
.bs-example > .btn-group {
......@@ -864,7 +950,7 @@ h1[id] {
}
/* Show code snippets when we have the space */
@media screen and (min-width: 481px) {
@media (min-width: 481px) {
.highlight {
display: block;
}
......@@ -923,10 +1009,10 @@ h1[id] {
.visible-on .col-xs-6 .hidden-sm,
.visible-on .col-xs-6 .hidden-md,
.visible-on .col-xs-6 .hidden-lg,
.hidden-on .col-xs-6 .visible-xs,
.hidden-on .col-xs-6 .visible-sm,
.hidden-on .col-xs-6 .visible-md,
.hidden-on .col-xs-6 .visible-lg {
.hidden-on .col-xs-6 .hidden-xs,
.hidden-on .col-xs-6 .hidden-sm,
.hidden-on .col-xs-6 .hidden-md,
.hidden-on .col-xs-6 .hidden-lg {
color: #999;
border: 1px solid #ddd;
}
......@@ -934,10 +1020,10 @@ h1[id] {
.visible-on .col-xs-6 .visible-sm,
.visible-on .col-xs-6 .visible-md,
.visible-on .col-xs-6 .visible-lg,
.hidden-on .col-xs-6 .hidden-xs,
.hidden-on .col-xs-6 .hidden-sm,
.hidden-on .col-xs-6 .hidden-md,
.hidden-on .col-xs-6 .hidden-lg {
.hidden-on .col-xs-6 .visible-xs,
.hidden-on .col-xs-6 .visible-sm,
.hidden-on .col-xs-6 .visible-md,
.hidden-on .col-xs-6 .visible-lg {
color: #468847;
background-color: #dff0d8;
border: 1px solid #d6e9c6;
......@@ -969,10 +1055,14 @@ h1[id] {
border: 1px solid #ddd;
}
.bs-glyphicons .glyphicon {
display: block;
margin: 5px auto 10px;
margin-top: 5px;
margin-bottom: 10px;
font-size: 24px;
}
.bs-glyphicons .glyphicon-class {
display: block;
text-align: center;
}
.bs-glyphicons li:hover {
background-color: rgba(86,61,124,.1);
}
......@@ -1001,15 +1091,23 @@ h1[id] {
.bs-customizer label {
margin-top: 10px;
font-weight: 500;
color: #444;
color: #555;
}
.bs-customizer h2 {
margin-top: 0;
margin-bottom: 5px;
padding-top: 30px;
}
.bs-customizer h3 {
margin-bottom: 0;
}
.bs-customizer h4 {
margin-top: 15px;
margin-bottom: 0;
}
.bs-customizer .bs-callout h4 {
margin-top: 0; /* lame, but due to specificity we have to duplicate */
margin-bottom: 5px;
}
.bs-customizer input[type="text"] {
font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
......@@ -1017,6 +1115,7 @@ h1[id] {
}
.bs-customizer .help-block {
font-size: 12px;
margin-bottom: 5px;
}
/* For the variables, use regular weight */
......@@ -1067,6 +1166,11 @@ h1[id] {
* Odds and ends for optimum docs display.
*/
/* About page */
.bs-about {
font-size: 16px;
}
/* Examples gallery: space out content better */
.bs-examples h4 {
margin-bottom: 5px;
......
......@@ -2,10 +2,33 @@
// IT'S ALL JUST JUNK FOR OUR DOCS!
// ++++++++++++++++++++++++++++++++++++++++++
/*!
* Copyright 2013 Twitter, Inc.
*
* Licensed under the Creative Commons Attribution 3.0 Unported License. For
* details, see http://creativecommons.org/licenses/by/3.0/.
*/
!function ($) {
$(function(){
// IE10 viewport hack for Surface/desktop Windows 8 bug
//
// See Getting Started docs for more information
if (navigator.userAgent.match(/IEMobile\/10\.0/)) {
var msViewportStyle = document.createElement("style");
msViewportStyle.appendChild(
document.createTextNode(
"@-ms-viewport{width:auto!important}"
)
);
document.getElementsByTagName("head")[0].
appendChild(msViewportStyle);
}
var $window = $(window)
var $body = $(document.body)
......@@ -75,9 +98,6 @@
btn.button('reset')
}, 3000)
})
// carousel demo
$('.bs-docs-carousel-example').carousel()
})
}(window.jQuery)
/*!
* Copyright 2013 Twitter, Inc.
*
* Licensed under the Creative Commons Attribution 3.0 Unported License. For
* details, see http://creativecommons.org/licenses/by/3.0/.
*/
window.onload = function () { // wait for load in a dumb way because B-0
var cw = '/*!\n * Bootstrap v3.0.0\n *\n * Copyright 2013 Twitter, Inc\n * Licensed under the Apache License v2.0\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Designed and built with all the love in the world @twitter by @mdo and @fat.\n */\n\n'
......@@ -31,13 +39,13 @@ window.onload = function () { // wait for load in a dumb way because B-0
return match && decodeURIComponent(match[1].replace(/\+/g, " "));
}
function createGist(configData) {
function createGist(configJson) {
var data = {
"description": "Bootstrap Customizer Config",
"public": true,
"files": {
"config.json": {
"content": JSON.stringify(configData, null, 2)
"content": configJson
}
}
}
......@@ -107,7 +115,7 @@ window.onload = function () { // wait for load in a dumb way because B-0
})
}
function generateZip(css, js, fonts, complete) {
function generateZip(css, js, fonts, config, complete) {
if (!css && !js) return showError('<strong>Ruh roh!</strong> No Bootstrap files selected.', new Error('no Bootstrap'))
var zip = new JSZip()
......@@ -129,10 +137,14 @@ window.onload = function () { // wait for load in a dumb way because B-0
if (fonts) {
var fontsFolder = zip.folder('fonts')
for (var fileName in fonts) {
fontsFolder.file(fileName, fonts[fileName])
fontsFolder.file(fileName, fonts[fileName], {base64: true})
}
}
if (config) {
zip.file('config.json', config)
}
var content = zip.generate({type:"blob"})
complete(content)
......@@ -155,10 +167,32 @@ window.onload = function () { // wait for load in a dumb way because B-0
}
}
// Returns an Array of @import'd filenames from 'bootstrap.less' in the order
// in which they appear in the file.
function bootstrapLessFilenames() {
var IMPORT_REGEX = /^@import \"(.*?)\";$/
var bootstrapLessLines = __less['bootstrap.less'].split('\n')
for (var i = 0, imports = []; i < bootstrapLessLines.length; i++) {
var match = IMPORT_REGEX.exec(bootstrapLessLines[i])
if (match) imports.push(match[1])
}
return imports
}
function generateCSS() {
var $checked = $('#less-section input:checked')
var oneChecked = false
var lessFileIncludes = {}
$('#less-section input').each(function() {
var $this = $(this)
var checked = $this.is(':checked')
lessFileIncludes[$this.val()] = checked
oneChecked = oneChecked || checked
})
if (!$checked.length) return false
if (!oneChecked) return false
var result = {}
var vars = {}
......@@ -169,15 +203,19 @@ window.onload = function () { // wait for load in a dumb way because B-0
$(this).val() && (vars[ $(this).prev().text() ] = $(this).val())
})
css += __less['variables.less']
if (vars) css += generateCustomCSS(vars)
css += __less['mixins.less']
css += __less['normalize.less']
css += __less['scaffolding.less']
css += $checked
.map(function () { return __less[this.value] })
.toArray()
.join('\n')
$.each(bootstrapLessFilenames(), function(index, filename) {
var fileInclude = lessFileIncludes[filename]
// Files not explicitly unchecked are compiled into the final stylesheet.
// Core stylesheets like 'normalize.less' are not included in the form
// since disabling them would wreck everything, and so their 'fileInclude'
// will be 'undefined'.
if (fileInclude || (fileInclude == null)) css += __less[filename]
// Custom variables are added after Bootstrap variables so the custom
// ones take precedence.
if (('variables.less' === filename) && vars) css += generateCustomCSS(vars)
})
css = css.replace(/@import[^\n]*/gi, '') //strip any imports
......@@ -262,14 +300,17 @@ window.onload = function () { // wait for load in a dumb way because B-0
var $downloadBtn = $('#btn-download')
$compileBtn.on('click', function (e) {
var configData = getCustomizerData()
var configJson = JSON.stringify(configData, null, 2)
e.preventDefault()
$compileBtn.attr('disabled', 'disabled')
generateZip(generateCSS(), generateJavascript(), generateFonts(), function (blob) {
generateZip(generateCSS(), generateJavascript(), generateFonts(), configJson, function (blob) {
$compileBtn.removeAttr('disabled')
saveAs(blob, "bootstrap.zip")
createGist(getCustomizerData())
createGist(configJson)
})
})
......
This diff is collapsed.
// NOTICE!! DO NOT USE ANY OF THIS JAVASCRIPT
// IT'S JUST JUNK FOR OUR DOCS!
// ++++++++++++++++++++++++++++++++++++++++++
/*!
* Copyright 2013 Twitter, Inc.
*
* Licensed under the Creative Commons Attribution 3.0 Unported License. For
* details, see http://creativecommons.org/licenses/by/3.0/.
*/
// Intended to prevent false-positive bug reports about responsive styling supposedly not working in IE8.
if (window.location.protocol == 'file:')
alert("ERROR: Bootstrap's responsive CSS is disabled!\nSee getbootstrap.com/getting-started/#respond-file-proto for details.")
......@@ -58,8 +58,62 @@ JSZip.defaults = {
compression: null
};
/*
* List features that require a modern browser, and if the current browser support them.
*/
JSZip.support = {
// contains true if JSZip can read/generate ArrayBuffer, false otherwise.
arraybuffer : (function(){
return typeof ArrayBuffer !== "undefined" && typeof Uint8Array !== "undefined";
})(),
// contains true if JSZip can read/generate nodejs Buffer, false otherwise.
nodebuffer : (function(){
return typeof Buffer !== "undefined";
})(),
// contains true if JSZip can read/generate Uint8Array, false otherwise.
uint8array : (function(){
return typeof Uint8Array !== "undefined";
})(),
// contains true if JSZip can read/generate Blob, false otherwise.
blob : (function(){
// the spec started with BlobBuilder then replaced it with a construtor for Blob.
// Result : we have browsers that :
// * know the BlobBuilder (but with prefix)
// * know the Blob constructor
// * know about Blob but not about how to build them
// About the "=== 0" test : if given the wrong type, it may be converted to a string.
// Instead of an empty content, we will get "[object Uint8Array]" for example.
if (typeof ArrayBuffer === "undefined") {
return false;
}
var buffer = new ArrayBuffer(0);
try {
return new Blob([buffer], { type: "application/zip" }).size === 0;
}
catch(e) {}
try {
var builder = new (window.BlobBuilder || window.WebKitBlobBuilder ||
window.MozBlobBuilder || window.MSBlobBuilder)();
builder.append(buffer);
return builder.getBlob('application/zip').size === 0;
}
catch(e) {}
return false;
})()
};
JSZip.prototype = (function () {
var textEncoder, textDecoder;
if (
JSZip.support.uint8array &&
typeof TextEncoder === "function" &&
typeof TextDecoder === "function"
) {
textEncoder = new TextEncoder("utf-8");
textDecoder = new TextDecoder("utf-8");
}
/**
* Returns the raw data of a ZipObject, decompress the content if necessary.
......@@ -97,8 +151,8 @@ JSZip.prototype = (function () {
if (!file.options.binary) {
// unicode text !
// unicode string => binary string is a painful process, check if we can avoid it.
if (JSZip.support.uint8array && typeof TextEncoder === "function") {
return TextEncoder("utf-8").encode(result);
if (textEncoder) {
return textEncoder.encode(result);
}
if (JSZip.support.nodebuffer) {
return new Buffer(result, "utf-8");
......@@ -557,7 +611,7 @@ JSZip.prototype = (function () {
*/
file : function(name, data, o) {
if (arguments.length === 1) {
if (name instanceof RegExp) {
if (JSZip.utils.isRegExp(name)) {
var regexp = name;
return this.filter(function(relativePath, file) {
return !file.options.dir && regexp.test(relativePath);
......@@ -584,7 +638,7 @@ JSZip.prototype = (function () {
return this;
}
if (arg instanceof RegExp) {
if (JSZip.utils.isRegExp(arg)) {
return this.filter(function(relativePath, file) {
return file.options.dir && arg.test(relativePath);
});
......@@ -659,7 +713,7 @@ JSZip.prototype = (function () {
if ( !this.files.hasOwnProperty(name) ) { continue; }
var file = this.files[name];
var compressionName = file.compression || options.compression.toUpperCase();
var compressionName = file.options.compression || options.compression.toUpperCase();
var compression = JSZip.compressions[compressionName];
if (!compression) {
throw new Error(compressionName + " is not a valid compression method !");
......@@ -854,8 +908,8 @@ JSZip.prototype = (function () {
// TextEncoder + Uint8Array to binary string is faster than checking every bytes on long strings.
// http://jsperf.com/utf8encode-vs-textencoder
// On short strings (file names for example), the TextEncoder API is (currently) slower.
if (JSZip.support.uint8array && typeof TextEncoder === "function") {
var u8 = TextEncoder("utf-8").encode(string);
if (textEncoder) {
var u8 = textEncoder.encode(string);
return JSZip.utils.transformTo("string", u8);
}
if (JSZip.support.nodebuffer) {
......@@ -898,8 +952,8 @@ JSZip.prototype = (function () {
// check if we can use the TextDecoder API
// see http://encoding.spec.whatwg.org/#api
if (JSZip.support.uint8array && typeof TextDecoder === "function") {
return TextDecoder("utf-8").decode(
if (textDecoder) {
return textDecoder.decode(
JSZip.utils.transformTo("uint8array", input)
);
}
......@@ -960,52 +1014,6 @@ JSZip.compressions = {
}
};
/*
* List features that require a modern browser, and if the current browser support them.
*/
JSZip.support = {
// contains true if JSZip can read/generate ArrayBuffer, false otherwise.
arraybuffer : (function(){
return typeof ArrayBuffer !== "undefined" && typeof Uint8Array !== "undefined";
})(),
// contains true if JSZip can read/generate nodejs Buffer, false otherwise.
nodebuffer : (function(){
return typeof Buffer !== "undefined";
})(),
// contains true if JSZip can read/generate Uint8Array, false otherwise.
uint8array : (function(){
return typeof Uint8Array !== "undefined";
})(),
// contains true if JSZip can read/generate Blob, false otherwise.
blob : (function(){
// the spec started with BlobBuilder then replaced it with a construtor for Blob.
// Result : we have browsers that :
// * know the BlobBuilder (but with prefix)
// * know the Blob constructor
// * know about Blob but not about how to build them
// About the "=== 0" test : if given the wrong type, it may be converted to a string.
// Instead of an empty content, we will get "[object Uint8Array]" for example.
if (typeof ArrayBuffer === "undefined") {
return false;
}
var buffer = new ArrayBuffer(0);
try {
return new Blob([buffer], { type: "application/zip" }).size === 0;
}
catch(e) {}
try {
var builder = new (window.BlobBuilder || window.WebKitBlobBuilder ||
window.MozBlobBuilder || window.MSBlobBuilder)();
builder.append(buffer);
return builder.getBlob('application/zip').size === 0;
}
catch(e) {}
return false;
})()
};
(function () {
JSZip.utils = {
/**
......@@ -1120,12 +1128,36 @@ JSZip.support = {
var chunk = 65536;
var result = [], len = array.length, type = JSZip.utils.getTypeOf(array), k = 0;
var canUseApply = true;
try {
switch(type) {
case "uint8array":
String.fromCharCode.apply(null, new Uint8Array(0));
break;
case "nodebuffer":
String.fromCharCode.apply(null, new Buffer(0));
break;
}
} catch(e) {
canUseApply = false;
}
// no apply : slow and painful algorithm
// default browser on android 4.*
if (!canUseApply) {
var resultStr = "";
for(var i = 0; i < array.length;i++) {
resultStr += String.fromCharCode(array[i]);
}
return resultStr;
}
while (k < len && chunk > 1) {
try {
if (type === "array" || type === "nodebuffer") {
result.push(String.fromCharCode.apply(null, array.slice(k, Math.max(k + chunk, len))));
result.push(String.fromCharCode.apply(null, array.slice(k, Math.min(k + chunk, len))));
} else {
result.push(String.fromCharCode.apply(null, array.subarray(k, k + chunk)));
result.push(String.fromCharCode.apply(null, array.subarray(k, Math.min(k + chunk, len))));
}
k += chunk;
} catch (e) {
......@@ -1263,7 +1295,7 @@ JSZip.support = {
if (typeof input === "string") {
return "string";
}
if (input instanceof Array) {
if (Object.prototype.toString.call(input) === "[object Array]") {
return "array";
}
if (JSZip.support.nodebuffer && Buffer.isBuffer(input)) {
......@@ -1277,6 +1309,16 @@ JSZip.support = {
}
};
/**
* Cross-window, cross-Node-context regular expression detection
* @param {Object} object Anything
* @return {Boolean} true if the object is a regular expression,
* false otherwise
*/
JSZip.utils.isRegExp = function (object) {
return Object.prototype.toString.call(object) === "[object RegExp]";
};
/**
* Throw an exception if the type is not supported.
* @param {String} type the type to check.
......@@ -1422,4 +1464,4 @@ JSZip.base64 = (function() {
}());
// enforcing Stuk's coding style
// vim: set shiftwidth=3 softtabstop=3:
\ No newline at end of file
// vim: set shiftwidth=3 softtabstop=3:
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment