Commit afdaa0e6 authored by Mark Otto's avatar Mark Otto
Browse files

Merge branch '3.0.0-wip' into bs3_homepage

parents afef74d0 2fa09759
No related merge requests found
Showing with 589 additions and 349 deletions
+589 -349
...@@ -33,6 +33,9 @@ nbproject ...@@ -33,6 +33,9 @@ nbproject
*.komodoproject *.komodoproject
.komodotools .komodotools
# grunt-html-validation
validation-staus.json
# Folders to ignore # Folders to ignore
.hg .hg
.svn .svn
......
...@@ -2,4 +2,10 @@ language: node_js ...@@ -2,4 +2,10 @@ language: node_js
node_js: node_js:
- 0.8 - 0.8
before_script: before_script:
- npm install -g grunt-cli - gem install jekyll
\ No newline at end of file - npm install -g grunt-cli
env:
global:
- secure: Besg41eyU+2mfxrywQ4ydOShMdc34ImaO0S0ENP+aCOBuyNBIgP59wy5tBMmyai2/8eInYeVps4Td96mWInMMxzTe3Bar7eTLG5tWVKRSr/wc4NBPZ/ppoPAmCEsz9Y+VptRH9/FO8n7hsL9EFZ+xBKbG+C0SccGoyBDpA5j7/w=
- secure: Ptiv7phCImFP3ALIz+sMQzrZg8k7C1gLZbFBhWxjnQr3g06wIfX3Ls5y9OHvxid+lOZZjISui3wzBVgpVHqwHUYf96+r0mo6/mJ+F4ffUmShZANVaIMD/JRTnXhUQJbvntGLvxn1EYWPdNM+2IHJrMipnjHxU9tkgAnlel4Zdew=
- TWBS_HAVE_OWN_BROWSERSTACK_KEY: ""
...@@ -48,7 +48,7 @@ We only accept issues that are bug reports or feature requests. Bugs must be iso ...@@ -48,7 +48,7 @@ We only accept issues that are bug reports or feature requests. Bugs must be iso
- Multiple-line approach (one property and value per line) - 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 - End all lines with a semi-colon
- For multiple, comma-separated selectors, place each selector on it's own line - 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). - 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).
### JS ### JS
......
/* jshint node: true */ /* jshint node: true */
module.exports = function(grunt) { module.exports = function(grunt) {
"use strict"; "use strict";
// Project configuration. // Project configuration.
grunt.initConfig({ grunt.initConfig({
// Metadata.
pkg: grunt.file.readJSON('package.json'), // Metadata.
banner: '/**\n' + pkg: grunt.file.readJSON('package.json'),
'* <%= pkg.name %>.js v<%= pkg.version %> by @fat and @mdo\n' + banner: '/**\n' +
'* Copyright <%= grunt.template.today("yyyy") %> <%= pkg.author %>\n' + '* <%= pkg.name %>.js v<%= pkg.version %> by @fat and @mdo\n' +
'* <%= _.pluck(pkg.licenses, "url").join(", ") %>\n' + '* Copyright <%= grunt.template.today("yyyy") %> <%= pkg.author %>\n' +
'*/\n', '* <%= _.pluck(pkg.licenses, "url").join(", ") %>\n' +
jqueryCheck: 'if (!jQuery) { throw new Error(\"Bootstrap requires jQuery\") }\n\n', '*/\n',
// Task configuration. jqueryCheck: 'if (!jQuery) { throw new Error(\"Bootstrap requires jQuery\") }\n\n',
clean: {
dist: ['dist'] // Task configuration.
}, clean: {
concat: { dist: ['dist']
options: { },
banner: '<%= banner %><%= jqueryCheck %>',
stripBanners: false jshint: {
}, options: {
bootstrap: { jshintrc: 'js/.jshintrc'
src: ['js/transition.js', 'js/alert.js', 'js/button.js', 'js/carousel.js', 'js/collapse.js', 'js/dropdown.js', 'js/modal.js', 'js/tooltip.js', 'js/popover.js', 'js/scrollspy.js', 'js/tab.js', 'js/affix.js'], },
dest: 'dist/js/<%= pkg.name %>.js' gruntfile: {
} src: 'Gruntfile.js'
}, },
jshint: { src: {
options: { src: ['js/*.js']
jshintrc: 'js/.jshintrc' },
}, test: {
gruntfile: { src: ['js/tests/unit/*.js']
src: 'Gruntfile.js' }
}, },
src: {
src: ['js/*.js'] concat: {
}, options: {
test: { banner: '<%= banner %><%= jqueryCheck %>',
src: ['js/tests/unit/*.js'] stripBanners: false
} },
}, bootstrap: {
recess: { src: [
options: { 'js/transition.js',
compile: true 'js/alert.js',
}, 'js/button.js',
bootstrap: { 'js/carousel.js',
files: { 'js/collapse.js',
'dist/css/bootstrap.css': ['less/bootstrap.less'] 'js/dropdown.js',
} 'js/modal.js',
}, 'js/tooltip.js',
min: { 'js/popover.js',
options: { 'js/scrollspy.js',
compress: true 'js/tab.js',
}, 'js/affix.js'
files: { ],
'dist/css/bootstrap.min.css': ['less/bootstrap.less'] dest: 'dist/js/<%= pkg.name %>.js'
} }
} },
},
uglify: { uglify: {
options: { options: {
banner: '<%= banner %>' banner: '<%= banner %>'
}, },
bootstrap: { bootstrap: {
files: { src: ['<%= concat.bootstrap.dest %>'],
'dist/js/<%= pkg.name %>.min.js': ['<%= concat.bootstrap.dest %>'] dest: 'dist/js/<%= pkg.name %>.min.js'
} }
} },
},
qunit: { recess: {
options: { options: {
inject: 'js/tests/unit/phantom.js' compile: true
}, },
files: ['js/tests/*.html'] bootstrap: {
}, src: ['less/bootstrap.less'],
connect: { dest: 'dist/css/<%= pkg.name %>.css'
server: { },
options: { min: {
port: 3000, options: {
base: '.' compress: true
}
}
}, },
watch: { src: ['less/bootstrap.less'],
src: { dest: 'dist/css/<%= pkg.name %>.min.css'
files: '<%= jshint.src.src %>', }
tasks: ['jshint:src', 'qunit'] },
},
test: { qunit: {
files: '<%= jshint.test.src %>', options: {
tasks: ['jshint:test', 'qunit'] inject: 'js/tests/unit/phantom.js'
}, },
recess: { files: ['js/tests/*.html']
files: 'less/*.less', },
tasks: ['recess']
} connect: {
server: {
options: {
port: 3000,
base: '.'
} }
}); }
},
jekyll: {
docs: {}
},
validation: {
options: {
reset: true,
},
files: {
src: ["_gh_pages/**/*.html"]
}
},
watch: {
src: {
files: '<%= jshint.src.src %>',
tasks: ['jshint:src', 'qunit']
},
test: {
files: '<%= jshint.test.src %>',
tasks: ['jshint:test', 'qunit']
},
recess: {
files: 'less/*.less',
tasks: ['recess']
}
}
});
// These plugins provide necessary tasks.
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-qunit');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-html-validation');
grunt.loadNpmTasks('grunt-jekyll');
grunt.loadNpmTasks('grunt-recess');
grunt.loadNpmTasks('browserstack-runner');
// Docs HTML validation task
grunt.registerTask('validate-docs', ['jekyll', 'validation']);
// Test task.
var testSubtasks = ['jshint', 'qunit', 'validate-docs'];
// Only run BrowserStack tests under Travis
if (process.env.TRAVIS) {
// Only run BrowserStack tests if this is a mainline commit in twbs/bootstrap, or you have your own BrowserStack key
if ((process.env.TRAVIS_REPO_SLUG === 'twbs/bootstrap' && process.env.TRAVIS_PULL_REQUEST === 'false') || process.env.TWBS_HAVE_OWN_BROWSERSTACK_KEY) {
testSubtasks.push('browserstack_runner');
}
}
grunt.registerTask('test', testSubtasks);
// These plugins provide necessary tasks. // JS distribution task.
grunt.loadNpmTasks('grunt-contrib-connect'); grunt.registerTask('dist-js', ['concat', 'uglify']);
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-qunit');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-recess');
// CSS distribution task.
grunt.registerTask('dist-css', ['recess']);
// Test task. // Full distribution task.
grunt.registerTask('test', ['jshint', 'qunit']); grunt.registerTask('dist', ['clean', 'dist-css', 'dist-js']);
// JS distribution task. // Default task.
grunt.registerTask('dist-js', ['concat', 'uglify']); grunt.registerTask('default', ['test', 'dist']);
// CSS distribution task. // task for building customizer
grunt.registerTask('dist-css', ['recess']); grunt.registerTask('build-customizer', 'Add scripts/less files to customizer.', function () {
var fs = require('fs')
// Full distribution task. function getFiles(type) {
grunt.registerTask('dist', ['clean', 'dist-css', 'dist-js']); var files = {}
fs.readdirSync(type)
.filter(function (path) {
return new RegExp('\\.' + type + '$').test(path)
})
.forEach(function (path) {
return files[path] = fs.readFileSync(type + '/' + path, 'utf8')
})
return 'var __' + type + ' = ' + JSON.stringify(files) + '\n'
}
// Default task. var customize = fs.readFileSync('customize.html', 'utf-8')
grunt.registerTask('default', ['test', 'dist']); var files = '<!-- generated -->\n<script id="files">\n' + getFiles('js') + getFiles('less') + '<\/script>\n<!-- /generated -->'
fs.writeFileSync('customize.html', customize.replace(/<!-- generated -->(.|[\n\r])*<!-- \/generated -->/, files))
});
}; };
...@@ -63,13 +63,13 @@ When completed, you'll be able to run the various Grunt commands provided from t ...@@ -63,13 +63,13 @@ When completed, you'll be able to run the various Grunt commands provided from t
### Available Grunt commands ### Available Grunt commands
#### Build - `grunt` #### Build - `grunt`
Run `grunt` to run tests locally and compile the CSS and JavaScript into `/dist`. **Requires recess and uglify-js.** Run `grunt` to run tests locally and compile the CSS and JavaScript into `/dist`. **Requires [recess](https://github.com/twitter/recess) and [uglify-js](https://github.com/mishoo/UglifyJS).**
#### Only compile CSS and JavaScript - `grunt dist` #### Only compile CSS and JavaScript - `grunt dist`
`grunt dist` creates the `/dist` directory with compiled files. **Requires recess and uglify-js.** `grunt dist` creates the `/dist` directory with compiled files. **Requires [recess](https://github.com/twitter/recess) and [uglify-js](https://github.com/mishoo/UglifyJS).**
#### Tests - `grunt test` #### Tests - `grunt test`
Runs jshint and qunit tests headlessly in [phantomjs](http://code.google.com/p/phantomjs/) (used for ci). **Requires phantomjs.** Runs jshint and qunit tests headlessly in [phantomjs](https://github.com/ariya/phantomjs/) (used for CI). **Requires [phantomjs](https://github.com/ariya/phantomjs/).**
#### Watch - `grunt watch` #### Watch - `grunt watch`
This is a convenience method for watching just Less files and automatically building them whenever you save. This is a convenience method for watching just Less files and automatically building them whenever you save.
......
...@@ -13,10 +13,7 @@ port: 9001 ...@@ -13,10 +13,7 @@ port: 9001
# Custom vars # Custom vars
repo: https://github.com/twbs/bootstrap repo: https://github.com/twbs/bootstrap
download: https://github.com/twbs/bootstrap/archive/3.0.0-wip.zip download: https://github.com/twbs/bootstrap/archive/3.0.0-wip.zip
download_dist: http://getbootstrap.com/bs-v3.0.0-rc1-dist.zip download_dist: http://getbootstrap.com/bs-v3.0.0-rc.2-dist.zip
examples: http://examples.getbootstrap.com
examples_repo: https://github.com/twbs/bootstrap-examples
glyphicons: http://glyphicons.getbootstrap.com glyphicons: http://glyphicons.getbootstrap.com
glyphicons_repo: https://github.com/twbs/bootstrap-glyphicons glyphicons_repo: https://github.com/twbs/bootstrap-glyphicons
...@@ -24,5 +21,5 @@ glyphicons_repo: https://github.com/twbs/bootstrap-glyphicons ...@@ -24,5 +21,5 @@ glyphicons_repo: https://github.com/twbs/bootstrap-glyphicons
blog: http://blog.getbootstrap.com blog: http://blog.getbootstrap.com
expo: http://expo.getbootstrap.com expo: http://expo.getbootstrap.com
cdn_css: //netdna.bootstrapcdn.com/bootstrap/3.0.0-rc1/css/bootstrap.min.css cdn_css: //netdna.bootstrapcdn.com/bootstrap/3.0.0-wip/css/bootstrap.min.css
cdn_js: //netdna.bootstrapcdn.com/bootstrap/3.0.0-rc1/js/bootstrap.min.js cdn_js: //netdna.bootstrapcdn.com/bootstrap/3.0.0-wip/js/bootstrap.min.js
<div id="carbonads-container"><div class="carbonad"><div id="azcarbon"></div><script type="text/javascript">var z = document.createElement("script"); z.type = "text/javascript"; z.async = true; z.src = "http://engine.carbonads.com/z/32341/azcarbon_2_1_0_HORIZ"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(z, s);</script></div></div> <div id="carbonads-container"><div class="carbonad"><div id="azcarbon"></div><script>var z = document.createElement("script"); z.async = true; z.src = "http://engine.carbonads.com/z/32341/azcarbon_2_1_0_HORIZ"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(z, s);</script></div></div>
\ No newline at end of file
...@@ -4,18 +4,25 @@ ...@@ -4,18 +4,25 @@
<script src="{{ page.base_url }}assets/js/jquery.js"></script> <script src="{{ page.base_url }}assets/js/jquery.js"></script>
<script src="{{ page.base_url }}dist/js/bootstrap.js"></script> <script src="{{ page.base_url }}dist/js/bootstrap.js"></script>
<script type="text/javascript" src="http://platform.twitter.com/widgets.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 }}assets/js/holder.js"></script>
<script src="{{ page.base_url }}assets/js/application.js"></script> <script src="{{ page.base_url }}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/jquery.bbq.min.js"></script>
<script src="{{ page.base_url }}assets/js/customizer.js"></script>
{% endif %}
<!-- Analytics <!-- Analytics
================================================== --> ================================================== -->
<script> <script>
var _gauges = _gauges || []; var _gauges = _gauges || [];
(function() { (function() {
var t = document.createElement('script'); var t = document.createElement('script');
t.type = 'text/javascript';
t.async = true; t.async = true;
t.id = 'gauges-tracker'; t.id = 'gauges-tracker';
t.setAttribute('data-site-id', '4f0dc9fef5a1f55508000013'); t.setAttribute('data-site-id', '4f0dc9fef5a1f55508000013');
......
...@@ -31,12 +31,12 @@ ...@@ -31,12 +31,12 @@
<link rel="apple-touch-icon-precomposed" href="{{ page.base_url }}assets/ico/apple-touch-icon-57-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="shortcut icon" href="{{ page.base_url }}assets/ico/favicon.png">
<script type="text/javascript"> <script>
var _gaq = _gaq || []; var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-146052-10']); _gaq.push(['_setAccount', 'UA-146052-10']);
_gaq.push(['_trackPageview']); _gaq.push(['_trackPageview']);
(function() { (function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; var ga = document.createElement('script'); ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; 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); var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})(); })();
......
...@@ -12,6 +12,8 @@ ...@@ -12,6 +12,8 @@
<ul class="nav"> <ul class="nav">
<li><a href="#btn-groups-single">Basic button group</a></li> <li><a href="#btn-groups-single">Basic button group</a></li>
<li><a href="#btn-groups-toolbar">Button toolbar</a></li> <li><a href="#btn-groups-toolbar">Button toolbar</a></li>
<li><a href="#btn-groups-sizing">Button group sizing</a></li>
<li><a href="#btn-groups-nested">Nested button groups</a></li>
<li><a href="#btn-groups-vertical">Vertical variation</a></li> <li><a href="#btn-groups-vertical">Vertical variation</a></li>
<li><a href="#btn-groups-justified">Justified link buttons</a></li> <li><a href="#btn-groups-justified">Justified link buttons</a></li>
</ul> </ul>
...@@ -50,9 +52,7 @@ ...@@ -50,9 +52,7 @@
<li> <li>
<a href="#navbar">Navbar</a> <a href="#navbar">Navbar</a>
<ul class="nav"> <ul class="nav">
<li><a href="#navbar-basic">Basic navbar</a></li> <li><a href="#navbar-default">Default navbar</a></li>
<li><a href="#navbar-nav">Nav links</a></li>
<li><a href="#navbar-forms">Forms in navbars</a></li>
<li><a href="#navbar-buttons">Buttons in navbars</a></li> <li><a href="#navbar-buttons">Buttons in navbars</a></li>
<li><a href="#navbar-text">Text in navbars</a></li> <li><a href="#navbar-text">Text in navbars</a></li>
<li><a href="#navbar-links">Links in navbars</a></li> <li><a href="#navbar-links">Links in navbars</a></li>
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
<li><a href="#navbar-fixed-top">Fixed top navbar</a></li> <li><a href="#navbar-fixed-top">Fixed top navbar</a></li>
<li><a href="#navbar-fixed-bottom">Fixed bottom navbar</a></li> <li><a href="#navbar-fixed-bottom">Fixed bottom navbar</a></li>
<li><a href="#navbar-static-top">Static top navbar</a></li> <li><a href="#navbar-static-top">Static top navbar</a></li>
<li><a href="#navbar-responsive">Responsive navbar</a></li> <li><a href="#navbar-inverted">Inverted navbar</a></li>
</ul> </ul>
</li> </li>
<li><a href="#breadcrumbs">Breadcrumbs</a></li> <li><a href="#breadcrumbs">Breadcrumbs</a></li>
...@@ -80,13 +80,19 @@ ...@@ -80,13 +80,19 @@
<li><a href="#type-components-page-header">Page header</a></li> <li><a href="#type-components-page-header">Page header</a></li>
</ul> </ul>
</li> </li>
<li><a href="#thumbnails">Thumbnails</a></li> <li>
<a href="#thumbnails">Thumbnails</a>
<ul class="nav">
<li><a href="#thumbnails-default">Default thumbnails</a></li>
<li><a href="#thumbnails-custom-content">Custom content</a></li>
</ul>
</li>
<li> <li>
<a href="#alerts">Alerts</a> <a href="#alerts">Alerts</a>
<ul class="nav"> <ul class="nav">
<li><a href="#alerts-default">Default alert</a></li> <li><a href="#alerts-default">Default alert</a></li>
<li><a href="#alerts-block">Block alerts</a></li>
<li><a href="#alerts-alternatives">Contextual alternatives</a></li> <li><a href="#alerts-alternatives">Contextual alternatives</a></li>
<li><a href="#alerts-dismissable">Dismissable alerts</a></li>
<li><a href="#alerts-links">Links in alerts</a></li> <li><a href="#alerts-links">Links in alerts</a></li>
</ul> </ul>
</li> </li>
...@@ -100,7 +106,13 @@ ...@@ -100,7 +106,13 @@
<li><a href="#progress-stacked">Stacked</a></li> <li><a href="#progress-stacked">Stacked</a></li>
</ul> </ul>
</li> </li>
<li><a href="#media">Media object</a></li> <li>
<a href="#media">Media object</a>
<ul class="nav">
<li><a href="#media-default">Default media</a></li>
<li><a href="#media-list">Media list</a></li>
</ul>
</li>
<li> <li>
<a href="#list-group">List group</a> <a href="#list-group">List group</a>
<ul class="nav"> <ul class="nav">
......
...@@ -15,10 +15,12 @@ ...@@ -15,10 +15,12 @@
<li> <li>
<a href="#grid">Grid system</a> <a href="#grid">Grid system</a>
<ul class="nav"> <ul class="nav">
<li><a href="#grid-media-queries">Media queries</a></li>
<li><a href="#grid-options">Available options</a></li> <li><a href="#grid-options">Available options</a></li>
<li><a href="#grid-example-basic">Ex: Stacked-to-horizonal</a></li> <li><a href="#grid-example-basic">Ex: Stacked-to-horizonal</a></li>
<li><a href="#grid-example-mixed">Ex: Mobile-desktop</a></li> <li><a href="#grid-example-mixed">Ex: Mobile-desktop</a></li>
<li><a href="#grid-example-mixed-complete">Ex: Mobile, tablet, desktop</a></li> <li><a href="#grid-example-mixed-complete">Ex: Mobile, tablet, desktop</a></li>
<li><a href="#grid-responsive-resets">Responsive column resets</a></li>
<li><a href="#grid-offsetting">Offset columns</a></li> <li><a href="#grid-offsetting">Offset columns</a></li>
<li><a href="#grid-nesting">Nested columns</a></li> <li><a href="#grid-nesting">Nested columns</a></li>
<li><a href="#grid-column-ordering">Column ordering</a></li> <li><a href="#grid-column-ordering">Column ordering</a></li>
...@@ -46,7 +48,7 @@ ...@@ -46,7 +48,7 @@
<li><a href="#tables-bordered">Bordered tables</a></li> <li><a href="#tables-bordered">Bordered tables</a></li>
<li><a href="#tables-hover-rows">Hover rows</a></li> <li><a href="#tables-hover-rows">Hover rows</a></li>
<li><a href="#tables-condensed">Condensed tables</a></li> <li><a href="#tables-condensed">Condensed tables</a></li>
<li><a href="#tables-row-classes">Contextual row classes</a></li> <li><a href="#tables-contextual-classes">Contextual classes</a></li>
</ul> </ul>
</li> </li>
<li> <li>
...@@ -56,6 +58,7 @@ ...@@ -56,6 +58,7 @@
<li><a href="#forms-inline">Inline variation</a></li> <li><a href="#forms-inline">Inline variation</a></li>
<li><a href="#forms-horizontal">Horizontal variation</a></li> <li><a href="#forms-horizontal">Horizontal variation</a></li>
<li><a href="#forms-controls">Supported controls</a></li> <li><a href="#forms-controls">Supported controls</a></li>
<li><a href="#forms-controls-static">Static form control</a></li>
<li><a href="#forms-control-states">Control states</a></li> <li><a href="#forms-control-states">Control states</a></li>
<li><a href="#forms-control-sizes">Control sizing</a></li> <li><a href="#forms-control-sizes">Control sizing</a></li>
<li><a href="#forms-help-text">Help text</a></li> <li><a href="#forms-help-text">Help text</a></li>
......
...@@ -11,12 +11,24 @@ ...@@ -11,12 +11,24 @@
<li> <li>
<a href="#template">Basic template</a> <a href="#template">Basic template</a>
</li> </li>
<li>
<a href="#examples">Examples</a>
</li>
<li>
<a href="#disable-responsive">Disabling responsiveness</a>
</li>
<li> <li>
<a href="#browsers">Browser support</a> <a href="#browsers">Browser support</a>
</li> </li>
<li>
<a href="#third-parties">Third party support</a>
</li>
<li>
<a href="#accessibility">Accessibility</a>
</li>
<li> <li>
<a href="#license-faqs">License FAQs</a> <a href="#license-faqs">License FAQs</a>
</li> </li>
<li> <li>
<a href="#customizing">Customizing Bootstrap</a> <a href="#customizing">Customizing Bootstrap</a>
</li> </li>
\ No newline at end of file
<div class="navbar navbar-inverse navbar-fixed-top bs-docs-nav"> <header class="navbar navbar-inverse navbar-fixed-top bs-docs-nav" role="banner">
<div class="container"> <div class="container">
<a href="{{ page.base_url }}" class="navbar-brand">Bootstrap 3 RC1</a> <div class="navbar-header">
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target=".bs-navbar-collapse"> <button class="navbar-toggle" type="button" data-toggle="collapse" data-target=".bs-navbar-collapse">
<span class="icon-bar"></span> <span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
</button> <span class="icon-bar"></span>
<div class="nav-collapse collapse bs-navbar-collapse"> </button>
<a href="{{ page.base_url }}" class="navbar-brand">Bootstrap 3 RC2</a>
</div>
<nav class="collapse navbar-collapse bs-navbar-collapse" role="navigation">
<ul class="nav navbar-nav"> <ul class="nav navbar-nav">
<li{% if page.slug == "getting-started" %} class="active"{% endif %}> <li{% if page.slug == "getting-started" %} class="active"{% endif %}>
<a href="{{ page.base_url }}getting-started">Getting started</a> <a href="{{ page.base_url }}getting-started">Getting started</a>
...@@ -24,6 +27,6 @@ ...@@ -24,6 +27,6 @@
<a href="{{ page.base_url }}customize">Customize</a> <a href="{{ page.base_url }}customize">Customize</a>
</li> </li>
</ul> </ul>
</div> </nav>
</div> </div>
</div> </header>
<div class="bs-social"> <div class="bs-social">
<ul class="bs-social-buttons"> <ul class="bs-social-buttons">
<li> <li>
<iframe class="github-btn" src="http://ghbtns.com/github-btn.html?user=twbs&repo=bootstrap&type=watch&count=true" allowtransparency="true" frameborder="0" scrolling="0" width="100px" height="20px"></iframe> <iframe class="github-btn" src="http://ghbtns.com/github-btn.html?user=twbs&amp;repo=bootstrap&amp;type=watch&amp;count=true" width="100" height="20" title="Star on GitHub"></iframe>
</li> </li>
<li> <li>
<iframe class="github-btn" src="http://ghbtns.com/github-btn.html?user=twbs&repo=bootstrap&type=fork&count=true" allowtransparency="true" frameborder="0" scrolling="0" width="102px" height="20px"></iframe> <iframe class="github-btn" src="http://ghbtns.com/github-btn.html?user=twbs&amp;repo=bootstrap&amp;type=fork&amp;count=true" width="102" height="20" title="Fork on GitHub"></iframe>
</li> </li>
<li class="follow-btn"> <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> <a href="https://twitter.com/twbootstrap" class="twitter-follow-button" data-link-color="#0069D6" data-show-count="true">Follow @twbootstrap</a>
</li> </li>
<li class="tweet-btn"> <li class="tweet-btn">
<a href="https://twitter.com/share" class="twitter-share-button" data-url="http://twbs.github.com/bootstrap/" data-count="horizontal" data-via="twbootstrap" data-related="mdo:Creator of Twitter Bootstrap">Tweet</a> <a href="https://twitter.com/share" class="twitter-share-button" data-url="http://getbootstrap.com/" data-count="horizontal" data-via="twbootstrap" data-related="mdo:Creator of Twitter Bootstrap">Tweet</a>
</li> </li>
</ul> </ul>
</div> </div>
...@@ -6,12 +6,13 @@ ...@@ -6,12 +6,13 @@
<!-- Place anything custom after this. --> <!-- Place anything custom after this. -->
</head> </head>
<body data-spy="scroll" data-target=".bs-sidebar"> <body data-spy="scroll" data-target=".bs-sidebar">
<a class="sr-only" href="#content">Skip navigation</a>
<!-- Docs master nav --> <!-- Docs master nav -->
{% include nav-main.html %} {% include nav-main.html %}
<!-- Docs page layout --> <!-- Docs page layout -->
<div class="bs-header"> <div class="bs-header" id="content" role="banner">
<div class="container"> <div class="container">
<h1>{{ page.title }}</h1> <h1>{{ page.title }}</h1>
<p>{{ page.lead }}</p> <p>{{ page.lead }}</p>
...@@ -22,9 +23,9 @@ ...@@ -22,9 +23,9 @@
<!-- Callout for the old docs link --> <!-- Callout for the old docs link -->
{% include old-bs-docs.html %} {% include old-bs-docs.html %}
<div class="bs-customize-placeholder"> <div class="container bs-docs-container">
<div class="container bs-docs-container"> <div class="col-lg-12">
<p class="lead">Until RC2, the Bootstrap 3 customizer will be disabled. In the mean time, snag the <a href="{{ site.repo }}/releases">compiled CSS and JavaScript</a>. Hang tight!</p> {{ content }}
</div> </div>
</div> </div>
......
...@@ -6,12 +6,13 @@ ...@@ -6,12 +6,13 @@
<!-- Place anything custom after this. --> <!-- Place anything custom after this. -->
</head> </head>
<body> <body>
<a class="sr-only" href="#content">Skip navigation</a>
<!-- Docs master nav --> <!-- Docs master nav -->
{% include nav-main.html %} {% include nav-main.html %}
<!-- Docs page layout --> <!-- Docs page layout -->
<div class="bs-header"> <div class="bs-header" id="content">
<div class="container"> <div class="container">
<h1>{{ page.title }}</h1> <h1>{{ page.title }}</h1>
<p>{{ page.lead }}</p> <p>{{ page.lead }}</p>
...@@ -24,8 +25,8 @@ ...@@ -24,8 +25,8 @@
<div class="container bs-docs-container"> <div class="container bs-docs-container">
<div class="row"> <div class="row">
<div class="col-lg-3"> <div class="col-md-3">
<div class="bs-sidebar"> <div class="bs-sidebar hidden-print" role="complementary">
<ul class="nav bs-sidenav"> <ul class="nav bs-sidenav">
{% if page.slug == "getting-started" %} {% if page.slug == "getting-started" %}
{% include nav-getting-started.html %} {% include nav-getting-started.html %}
...@@ -41,7 +42,7 @@ ...@@ -41,7 +42,7 @@
</ul> </ul>
</div> </div>
</div> </div>
<div class="col-lg-9"> <div class="col-md-9" role="main">
{{ content }} {{ content }}
</div> </div>
</div> </div>
...@@ -50,7 +51,7 @@ ...@@ -50,7 +51,7 @@
<!-- Footer <!-- Footer
================================================== --> ================================================== -->
<footer class="bs-footer"> <footer class="bs-footer" role="contentinfo">
{% include social-buttons.html %} {% include social-buttons.html %}
<p>Designed and built with all the love in the world by <a href="http://twitter.com/mdo" target="_blank">@mdo</a> and <a href="http://twitter.com/fat" target="_blank">@fat</a>.</p> <p>Designed and built with all the love in the world by <a href="http://twitter.com/mdo" target="_blank">@mdo</a> and <a href="http://twitter.com/fat" target="_blank">@fat</a>.</p>
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
<!-- Place anything custom after this. --> <!-- Place anything custom after this. -->
</head> </head>
<body class="bs-docs-home"> <body class="bs-docs-home">
<a class="sr-only" href="#content">Skip navigation</a>
<!-- Docs master nav --> <!-- Docs master nav -->
{% include nav-main.html %} {% include nav-main.html %}
...@@ -16,7 +17,7 @@ ...@@ -16,7 +17,7 @@
<!-- Callout for the old docs link --> <!-- Callout for the old docs link -->
{% include old-bs-docs.html %} {% include old-bs-docs.html %}
<div class="container"> <footer class="container" role="contentinfo">
{% include social-buttons.html %} {% include social-buttons.html %}
<ul class="bs-masthead-links"> <ul class="bs-masthead-links">
...@@ -24,7 +25,7 @@ ...@@ -24,7 +25,7 @@
<a href="{{ site.repo }}" onclick="_gaq.push(['_trackEvent', 'Jumbotron actions', 'Jumbotron links', 'GitHub project']);">GitHub project</a> <a href="{{ site.repo }}" onclick="_gaq.push(['_trackEvent', 'Jumbotron actions', 'Jumbotron links', 'GitHub project']);">GitHub project</a>
</li> </li>
<li> <li>
<a href="{{ site.examples }}" onclick="_gaq.push(['_trackEvent', 'Jumbotron actions', 'Jumbotron links', 'Examples']);">Examples</a> <a href="../getting-started#examples" onclick="_gaq.push(['_trackEvent', 'Jumbotron actions', 'Jumbotron links', 'Examples']);">Examples</a>
</li> </li>
<li> <li>
<a href="{{ site.glyphicons }}" onclick="_gaq.push(['_trackEvent', 'Jumbotron actions', 'Jumbotron links', 'Glyphicons']);">Glyphicons</a> <a href="{{ site.glyphicons }}" onclick="_gaq.push(['_trackEvent', 'Jumbotron actions', 'Jumbotron links', 'Glyphicons']);">Glyphicons</a>
...@@ -33,7 +34,7 @@ ...@@ -33,7 +34,7 @@
<a href="{{ site.expo }}" onclick="_gaq.push(['_trackEvent', 'Jumbotron actions', 'Jumbotron links', 'Expo']);">Bootstrap Expo</a> <a href="{{ site.expo }}" onclick="_gaq.push(['_trackEvent', 'Jumbotron actions', 'Jumbotron links', 'Expo']);">Bootstrap Expo</a>
</li> </li>
</ul> </ul>
</div> </footer>
<!-- JS and analytics only. --> <!-- JS and analytics only. -->
{% include footer.html %} {% include footer.html %}
......
...@@ -55,6 +55,10 @@ body { ...@@ -55,6 +55,10 @@ body {
.bs-docs-nav { .bs-docs-nav {
background-color: #563d7c; background-color: #563d7c;
border-color: #463265;
}
.bs-docs-nav .navbar-collapse {
border-color: #463265;
} }
.bs-docs-nav .navbar-brand { .bs-docs-nav .navbar-brand {
color: #fff; color: #fff;
...@@ -127,8 +131,8 @@ body { ...@@ -127,8 +131,8 @@ body {
/* Download button */ /* Download button */
.bs-masthead .btn-outline { .bs-masthead .btn-outline {
margin-top: 5px; margin-top: 20px;
margin-bottom: 5px; margin-bottom: 20px;
padding: 18px 24px; padding: 18px 24px;
font-size: 21px; font-size: 21px;
} }
...@@ -178,6 +182,7 @@ body { ...@@ -178,6 +182,7 @@ body {
margin-top: 15px; margin-top: 15px;
} }
.bs-customizer input[type="text"] { .bs-customizer input[type="text"] {
font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
background-color: #fafafa; background-color: #fafafa;
} }
.bs-customizer .help-block { .bs-customizer .help-block {
...@@ -188,6 +193,10 @@ body { ...@@ -188,6 +193,10 @@ body {
text-align: center; text-align: center;
} }
#less-section label {
font-weight: normal;
}
/* Docs pages and sections /* Docs pages and sections
...@@ -213,7 +222,7 @@ body { ...@@ -213,7 +222,7 @@ body {
} }
.bs-docs-section + .bs-docs-section { .bs-docs-section + .bs-docs-section {
margin-top: 80px; padding-top: 80px;
} }
/* Ads in page headers */ /* Ads in page headers */
...@@ -343,6 +352,17 @@ body { ...@@ -343,6 +352,17 @@ body {
} }
/* Examples grid
-------------------------------------------------- */
.bs-examples h4 {
margin-bottom: 5px;
}
.bs-examples p {
margin-bottom: 20px;
}
/* Special grid styles /* Special grid styles
-------------------------------------------------- */ -------------------------------------------------- */
...@@ -368,7 +388,7 @@ body { ...@@ -368,7 +388,7 @@ body {
.bs-example { .bs-example {
position: relative; position: relative;
padding: 45px 15px 15px; padding: 45px 15px 15px;
margin: 0 -15px -1px; margin: 0 -15px 15px;
background-color: #fafafa; background-color: #fafafa;
box-shadow: inset 0 3px 6px rgba(0,0,0,.05); box-shadow: inset 0 3px 6px rgba(0,0,0,.05);
border-color: #e5e5e5 #eee #eee; border-color: #e5e5e5 #eee #eee;
...@@ -389,11 +409,10 @@ body { ...@@ -389,11 +409,10 @@ body {
} }
/* Tweak display of the examples */ /* Tweak display of the examples */
.bs-example + .prettyprint,
.bs-example + .highlight { .bs-example + .highlight {
margin-top: 0; margin: -15px -15px 15px;
border-top-left-radius: 0; border-radius: 0;
border-top-right-radius: 0; border-width: 0 0 1px;
} }
/* Tweak content of examples for optimum awesome */ /* Tweak content of examples for optimum awesome */
...@@ -401,16 +420,15 @@ body { ...@@ -401,16 +420,15 @@ body {
.bs-example > ul:last-child, .bs-example > ul:last-child,
.bs-example > ol:last-child, .bs-example > ol:last-child,
.bs-example > blockquote:last-child, .bs-example > blockquote:last-child,
.bs-example > input:last-child, .bs-example > .form-control:last-child,
.bs-example > select:last-child,
.bs-example > textarea:last-child,
.bs-example > .table:last-child, .bs-example > .table:last-child,
.bs-example > .navbar:last-child .bs-example > .navbar:last-child
.bs-example > .jumbotron:last-child, .bs-example > .jumbotron:last-child,
.bs-example > .alert:last-child, .bs-example > .alert:last-child,
.bs-example > .panel:last-child, .bs-example > .panel:last-child,
.bs-example > .list-group:last-child, .bs-example > .list-group:last-child,
.bs-example > .well:last-child { .bs-example > .well:last-child,
.bs-example > .progress:last-child {
margin-bottom: 0; margin-bottom: 0;
} }
.bs-example > p > .close { .bs-example > p > .close {
...@@ -418,17 +436,15 @@ body { ...@@ -418,17 +436,15 @@ body {
} }
/* Typography */ /* Typography */
.bs-example-type .table td { .bs-example-type .table td:last-child {
color: #999; color: #999;
vertical-align: middle; vertical-align: middle;
} }
.bs-example-type .table td, .bs-example-type .table td {
.bs-example-type .table th {
padding: 15px 0; padding: 15px 0;
border-color: #eee; border-color: #eee;
} }
.bs-example-type .table tr:first-child td, .bs-example-type .table tr:first-child td {
.bs-example-type .table tr:first-child th {
border-top: 0; border-top: 0;
} }
.bs-example-type h1, .bs-example-type h1,
...@@ -440,12 +456,24 @@ body { ...@@ -440,12 +456,24 @@ body {
margin: 0; margin: 0;
} }
/* Forms */ /* Images */
.bs-example.form-inline select, .bs-example > .img-circle,
.bs-example.form-inline input[type="text"], .bs-example > .img-rounded,
.bs-example.form-inline input[type="password"] { .bs-example > .img-thumbnail {
width: 180px; margin: 5px;
}
/* Buttons */
.bs-example > .btn,
.bs-example > .btn-group {
margin-top: 5px;
margin-bottom: 5px;
}
.bs-example > .btn-toolbar + .btn-toolbar {
margin-top: 10px;
} }
/* Forms */
.bs-example-control-sizing select, .bs-example-control-sizing select,
.bs-example-control-sizing input[type="text"] + input[type="text"] { .bs-example-control-sizing input[type="text"] + input[type="text"] {
margin-top: 10px; margin-top: 10px;
...@@ -453,6 +481,9 @@ body { ...@@ -453,6 +481,9 @@ body {
.bs-example-form .input-group { .bs-example-form .input-group {
margin-bottom: 10px; margin-bottom: 10px;
} }
.bs-example > textarea.form-control {
resize: vertical;
}
/* List groups */ /* List groups */
.bs-example > .list-group { .bs-example > .list-group {
...@@ -467,7 +498,6 @@ body { ...@@ -467,7 +498,6 @@ body {
.bs-navbar-bottom-example { .bs-navbar-bottom-example {
z-index: 1; z-index: 1;
padding: 0; padding: 0;
min-height: 110px;
overflow: hidden; /* cut the drop shadows off */ overflow: hidden; /* cut the drop shadows off */
} }
.bs-navbar-top-example .navbar-fixed-top, .bs-navbar-top-example .navbar-fixed-top,
...@@ -476,33 +506,35 @@ body { ...@@ -476,33 +506,35 @@ body {
margin-left: 0; margin-left: 0;
margin-right: 0; margin-right: 0;
} }
.bs-navbar-top-example .navbar-fixed-top {
top: -1px;
}
.bs-navbar-bottom-example .navbar-fixed-bottom {
bottom: -1px;
}
.bs-navbar-top-example { .bs-navbar-top-example {
-webkit-border-radius: 0 0 4px 4px; padding-bottom: 45px;
-moz-border-radius: 0 0 4px 4px;
border-radius: 0 0 4px 4px;
} }
.bs-navbar-top-example:after { .bs-navbar-top-example:after {
top: auto; top: auto;
bottom: 15px; bottom: 15px;
-webkit-border-radius: 0 4px 0 4px; }
-moz-border-radius: 0 4px 0 4px; .bs-navbar-top-example .navbar-fixed-top {
border-radius: 0 4px 0 4px; top: -1px;
} }
.bs-navbar-bottom-example { .bs-navbar-bottom-example {
-webkit-border-radius: 4px 4px 0 0; padding-top: 45px;
-moz-border-radius: 4px 4px 0 0; }
border-radius: 4px 4px 0 0; .bs-navbar-bottom-example .navbar-fixed-bottom {
bottom: -1px;
} }
.bs-navbar-bottom-example .navbar { .bs-navbar-bottom-example .navbar {
margin-bottom: 0; margin-bottom: 0;
} }
@media (min-width: 768px) {
.bs-navbar-top-example {
border-radius: 0 0 4px 4px;
}
.bs-navbar-bottom-example {
border-radius: 4px 4px 0 0;
}
}
/* Example modals */ /* Example modals */
.bs-example-modal { .bs-example-modal {
background-color: #f5f5f5; background-color: #f5f5f5;
...@@ -523,19 +555,11 @@ body { ...@@ -523,19 +555,11 @@ body {
} }
/* Example dropdowns */ /* Example dropdowns */
.bs-example > .dropdown > .dropdown-menu, .bs-example > .dropdown > .dropdown-menu {
.bs-example-submenu > .pull-left > .dropup > .dropdown-menu,
.bs-example-submenu > .pull-left > .dropdown > .dropdown-menu {
position: static; position: static;
display: block; display: block;
margin-bottom: 5px; margin-bottom: 5px;
} }
.bs-example-submenu {
min-height: 230px;
}
.bs-example-submenu > .pull-left + .pull-left {
margin-left: 20px;
}
/* Example tabbable tabs */ /* Example tabbable tabs */
.bs-example-tabs .nav-tabs { .bs-example-tabs .nav-tabs {
...@@ -546,6 +570,10 @@ body { ...@@ -546,6 +570,10 @@ body {
.bs-example-tooltips { .bs-example-tooltips {
text-align: center; text-align: center;
} }
.bs-example-tooltips > .btn {
margin-top: 5px;
margin-bottom: 5px;
}
/* Popovers */ /* Popovers */
.bs-example-popover { .bs-example-popover {
...@@ -561,19 +589,6 @@ body { ...@@ -561,19 +589,6 @@ body {
} }
/* Example templates
-------------------------------------------------- */
.bs-examples h4 {
margin-bottom: 5px;
}
.bs-examples p {
margin-bottom: 20px;
}
/* Responsive docs /* Responsive docs
-------------------------------------------------- */ -------------------------------------------------- */
...@@ -607,6 +622,10 @@ body { ...@@ -607,6 +622,10 @@ body {
border-bottom: 0; border-bottom: 0;
} }
} }
.bs-table-scrollable .highlight pre {
white-space: normal;
}
/* Related: responsive utilities tables */ /* Related: responsive utilities tables */
.table code { .table code {
...@@ -641,17 +660,9 @@ body { ...@@ -641,17 +660,9 @@ body {
------------------------- */ ------------------------- */
.responsive-utilities-test { .responsive-utilities-test {
margin-top: 5px; margin-top: 5px;
padding-left: 0;
list-style: none;
overflow: hidden; /* clear floats */
} }
.responsive-utilities-test li { .responsive-utilities-test .col-xs-6 {
position: relative; margin-bottom: 10px;
float: left;
width: 25%;
}
.responsive-utilities-test li + li {
margin-left: 10px;
} }
.responsive-utilities-test span { .responsive-utilities-test span {
padding: 15px 10px; padding: 15px 10px;
...@@ -661,13 +672,25 @@ body { ...@@ -661,13 +672,25 @@ body {
text-align: center; text-align: center;
border-radius: 4px; border-radius: 4px;
} }
.responsive-utilities-test.visible-on [class*="hidden"], .visible-on .col-xs-6 .hidden-xs,
.responsive-utilities-test.hidden-on [class*="visible"] { .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 {
color: #999; color: #999;
border: 1px solid #ddd; border: 1px solid #ddd;
} }
.responsive-utilities-test.visible-on [class*="visible"], .visible-on .col-xs-6 .visible-xs,
.responsive-utilities-test.hidden-on [class*="hidden"] { .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 {
color: #468847; color: #468847;
background-color: #dff0d8; background-color: #dff0d8;
border: 1px solid #d6e9c6; border: 1px solid #d6e9c6;
...@@ -724,6 +747,11 @@ body { ...@@ -724,6 +747,11 @@ body {
.bs-social-buttons .twitter-share-button { .bs-social-buttons .twitter-share-button {
width: 98px !important; width: 98px !important;
} }
/* Style the GitHub buttons via CSS instead of inline attributes */
.github-btn {
border: 0;
overflow: hidden;
}
...@@ -731,7 +759,7 @@ body { ...@@ -731,7 +759,7 @@ body {
-------------------------------------------------- */ -------------------------------------------------- */
/* Pseudo :focus state for showing how it looks in the docs */ /* Pseudo :focus state for showing how it looks in the docs */
input.focused { #focusedInput {
border-color: rgba(82,168,236,.8); border-color: rgba(82,168,236,.8);
outline: 0; outline: 0;
outline: thin dotted \9; /* IE6-9 */ outline: thin dotted \9; /* IE6-9 */
...@@ -813,6 +841,15 @@ input.focused { ...@@ -813,6 +841,15 @@ input.focused {
border-radius: 4px 4px 0 0; border-radius: 4px 4px 0 0;
box-shadow: none; box-shadow: none;
} }
.bs-example + .prettyprint,
.bs-example + .highlight {
margin-top: -16px;
margin-left: 0;
margin-right: 0;
border-width: 1px;
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
}
.carbonad { .carbonad {
margin: 0 !important; margin: 0 !important;
...@@ -824,10 +861,6 @@ input.focused { ...@@ -824,10 +861,6 @@ input.focused {
.bs-sidebar { .bs-sidebar {
display: block; display: block;
} }
/* Show the hidden subnavs when space allows it */
.bs-sidebar .nav > .active > ul {
display: block;
}
/* Tweak display of docs jumbotrons */ /* Tweak display of docs jumbotrons */
.bs-masthead { .bs-masthead {
...@@ -837,7 +870,7 @@ input.focused { ...@@ -837,7 +870,7 @@ input.focused {
.bs-masthead h1 { .bs-masthead h1 {
font-size: 100px; font-size: 100px;
} }
.bs-masthead p { .bs-masthead .lead {
margin-left: 15%; margin-left: 15%;
margin-right: 15%; margin-right: 15%;
font-size: 30px; font-size: 30px;
...@@ -852,7 +885,23 @@ input.focused { ...@@ -852,7 +885,23 @@ input.focused {
/* Tablets/desktops and up */ /* Tablets/desktops and up */
@media screen and (min-width: 992px) { @media screen and (min-width: 992px) {
.bs-header h1,
.bs-header p {
margin-right: 380px;
}
.carbonad {
position: absolute;
top: 20px;
right: 0;
padding: 15px !important;
width: 330px !important;
min-height: 132px;
}
/* Show the hidden subnavs when space allows it */
.bs-sidebar .nav > .active > ul {
display: block;
}
/* Widen the fixed sidebar */ /* Widen the fixed sidebar */
.bs-sidebar.affix, .bs-sidebar.affix,
.bs-sidebar.affix-bottom { .bs-sidebar.affix-bottom {
...@@ -870,19 +919,6 @@ input.focused { ...@@ -870,19 +919,6 @@ input.focused {
margin-top: 0; margin-top: 0;
margin-bottom: 0; margin-bottom: 0;
} }
.bs-header h1,
.bs-header p {
margin-right: 380px;
}
.carbonad {
position: absolute;
top: 20px;
right: 0;
padding: 15px !important;
width: 330px !important;
min-height: 132px;
}
} }
/* Large desktops and up */ /* Large desktops and up */
...@@ -891,7 +927,7 @@ input.focused { ...@@ -891,7 +927,7 @@ input.focused {
/* Widen the fixed sidebar again */ /* Widen the fixed sidebar again */
.bs-sidebar.affix-bottom, .bs-sidebar.affix-bottom,
.bs-sidebar.affix { .bs-sidebar.affix {
width: 270px; width: 263px;
} }
} }
...@@ -16,16 +16,12 @@ ...@@ -16,16 +16,12 @@
offset: navHeight offset: navHeight
}) })
$('.bs-docs-container [href=#]').click(function (e) { $window.on('load', function () {
e.preventDefault() $body.scrollspy('refresh')
}) })
$body.on('click', '.bs-sidenav [href^=#]', function (e) { $('.bs-docs-container [href=#]').click(function (e) {
var $target = $(this.getAttribute('href')) e.preventDefault()
e.preventDefault() // prevent browser scroll
$window.scrollTop($target.offset().top - navHeight + 5)
}) })
// back to top // back to top
...@@ -54,7 +50,8 @@ ...@@ -54,7 +50,8 @@
// tooltip demo // tooltip demo
$('.tooltip-demo').tooltip({ $('.tooltip-demo').tooltip({
selector: "[data-toggle=tooltip]" selector: "[data-toggle=tooltip]",
container: "body"
}) })
$('.tooltip-test').tooltip() $('.tooltip-test').tooltip()
...@@ -81,88 +78,6 @@ ...@@ -81,88 +78,6 @@
// carousel demo // carousel demo
$('.bs-docs-carousel-example').carousel() $('.bs-docs-carousel-example').carousel()
// javascript build logic
var inputsComponent = $("#less input")
, inputsPlugin = $("#plugins input")
, inputsVariables = $("#less-variables input")
// toggle all plugin checkboxes
$('#less .toggle').on('click', function (e) {
e.preventDefault()
inputsComponent.prop('checked', !inputsComponent.is(':checked'))
})
$('#plugins .toggle').on('click', function (e) {
e.preventDefault()
inputsPlugin.prop('checked', !inputsPlugin.is(':checked'))
})
$('#less-variables .toggle').on('click', function (e) {
e.preventDefault()
inputsVariables.val('')
})
// request built javascript
$('.bs-customize-download .btn').on('click', function (e) {
e.preventDefault()
var css = $("#less input:checked")
.map(function () { return this.value })
.toArray()
, js = $("#plugins input:checked")
.map(function () { return this.value })
.toArray()
, vars = {}
$("#less-variables input")
.each(function () {
$(this).val() && (vars[ $(this).prev().text() ] = $(this).val())
})
$.ajax({
type: 'POST'
, url: /localhost/.test(window.location) ? 'http://localhost:9001' : 'http://bootstrap.herokuapp.com'
, dataType: 'jsonpi'
, params: {
js: js
, css: css
, vars: vars
}
})
})
})
// 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) }(window.jQuery)
window.onload = function () { // wait for load in a dumb way because B-0
var cw = '/*!\n * Bootstrap v3.0.0-rc.2\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'
function generateUrl() {
var vars = {}
$('#less-variables-section input')
.each(function () {
$(this).val() && (vars[ $(this).prev().text() ] = $(this).val())
})
var data = {
vars: vars,
css: $('#less-section input:not(:checked)').map(function () { return this.value }).toArray(),
js: $('#plugin-section input:not(:checked)').map(function () { return this.value }).toArray()
}
if ($.isEmptyObject(data.vars) && !data.css.length && !data.js.length) return
window.location = jQuery.param.querystring('/customize/', data)
}
function parseUrl() {
var data = jQuery.deparam.querystring()
if (data.js) {
for (var i = 0; i < data.js.length; i++) {
var input = $('input[value="'+data.js[i]+'"]')
input && input.prop('checked', false)
}
}
if (data.css) {
for (var i = 0; i < data.css.length; i++) {
var input = $('input[value="'+data.css[i]+'"]')
input && input.prop('checked', false)
}
}
if (data.vars) {
// todo (fat): vars
}
}
function generateZip(css, js, complete) {
if (!css && !js) return alert('you want to build nothing… o_O')
var zip = new JSZip()
if (css) {
var cssFolder = zip.folder('css')
for (var fileName in css) {
cssFolder.file(fileName, css[fileName])
}
}
if (js) {
var jsFolder = zip.folder('js')
for (var fileName in js) {
jsFolder.file(fileName, js[fileName])
}
}
var content = zip.generate()
location.href = 'data:application/zip;base64,' + content
complete()
}
function generateCustomCSS(vars) {
var result = ''
for (var key in vars) {
result += key + ': ' + vars[key] + ';\n'
}
return result + '\n\n'
}
function generateCSS() {
var $checked = $('#less-section input:checked')
if (!$checked.length) return false
var result = {}
var vars = {}
var css = ''
$('#less-variables-section input')
.each(function () {
$(this).val() && (vars[ $(this).prev().text() ] = $(this).val())
})
css += __less['variables.less']
if (vars) css += generateCustomCSS(vars)
css += __less['mixins.less']
css += $checked
.map(function () { return __less[this.value] })
.toArray()
.join('\n')
css = css.replace(/@import[^\n]*/gi, '') //strip any imports
try {
var parser = new less.Parser({
paths: ['variables.less', 'mixins.less']
, optimization: 0
, filename: 'bootstrap.css'
}).parse(css, function (err, tree) {
if (err) return alert(err)
result = {
'bootstrap.css' : cw + tree.toCSS(),
'bootstrap.min.css' : cw + tree.toCSS({ compress: true })
}
})
} catch (err) {
return alert(err)
}
return result
}
function generateJavascript() {
var $checked = $('#plugin-section input:checked')
if (!$checked.length) return false
var js = $checked
.map(function () { return __js[this.value] })
.toArray()
.join('\n')
return {
'bootstrap.js': js,
'bootstrap.min.js': cw + uglify(js)
}
}
var $downloadBtn = $('#btn-download').on('click', function (e) {
e.preventDefault()
$downloadBtn.addClass('loading')
generateZip(generateCSS(), generateJavascript(), function () {
$downloadBtn.removeClass('loading')
setTimeout(function () {
generateUrl()
}, 1)
})
})
var inputsComponent = $('#less-section input')
var inputsPlugin = $('#plugin-section input')
var inputsVariables = $('#less-variables-section input')
$('#less-section .toggle').on('click', function (e) {
e.preventDefault()
inputsComponent.prop('checked', !inputsComponent.is(':checked'))
})
$('#plugin-section .toggle').on('click', function (e) {
e.preventDefault()
inputsPlugin.prop('checked', !inputsPlugin.is(':checked'))
})
$('#less-variables-section .toggle').on('click', function (e) {
e.preventDefault()
inputsVariables.val('')
})
try {
parseUrl()
} catch (e) {
// maybe alert user that we can't parse their url
}
}
\ No newline at end of file
Supports Markdown
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