Merge branch 'v4-docs-streamlined' of https://github.com/twbs/bootstrap into v4-docs-streamlined

This commit is contained in:
Mark Otto 2017-05-30 08:46:33 -07:00
commit d4eb0d4e73
405 changed files with 24987 additions and 28567 deletions

View File

@ -3,8 +3,8 @@
[
"es2015",
{
"modules": false,
"loose": true
"loose": true,
"modules": false
}
]
],

View File

@ -25,13 +25,9 @@ restrictions:
respect the opinions of others.
* Please **do not** post comments consisting solely of "+1" or ":thumbsup:".
Use [GitHub's "reactions" feature](https://github.com/blog/2119-add-reactions-to-pull-requests-issues-and-comments)
Use [GitHub's "reactions" feature](https://github.com/blog/2119-add-reactions-to-pull-requests-issues-and-comments)
instead. We reserve the right to delete comments which violate this rule.
* Please **do not** open issues or pull requests regarding the code in
[`Normalize`](https://github.com/necolas/normalize.css) (open them in
its repository).
* Please **do not** open issues regarding the official themes offered on <https://themes.getbootstrap.com/>.
Instead, please email any questions or feedback regarding those themes to `themes AT getbootstrap DOT com`.
@ -46,7 +42,7 @@ Our bug tracker utilizes several labels to help organize and identify issues. He
- `docs` - Issues for improving or updating our documentation.
- `examples` - Issues involving the example templates included in our docs.
- `feature` - Issues asking for a new feature to be added, or an existing one to be extended or modified. New features require a minor version bump (e.g., `v3.0.0` to `v3.1.0`).
- `grunt` - Issues with our included JavaScript-based Gruntfile, which is used to run all our tests, concatenate and compile source files, and more.
- `grunt` - Issues with our build system, which is used to run all our tests, concatenate and compile source files, and more.
- `help wanted` - Issues we need or would love help from the community to resolve.
- `js` - Issues stemming from our compiled or source JavaScript files.
- `meta` - Issues with the project itself or our GitHub repository.
@ -245,7 +241,7 @@ includes code changes) and under the terms of the
### Checking coding style
Run `grunt test` before committing to ensure your changes follow our coding standards.
Run `npm run test` before committing to ensure your changes follow our coding standards.
## License

View File

@ -1,14 +1,12 @@
fail_on_violations: true
scss:
enabled: true
config_file: scss/.scss-lint.yml
config_file: .scss-lint.yml
javascript:
jshint:
enabled: false
eslint:
enabled: true
config_file: js/.eslintrc.json
ignore_file: .houndignore

View File

@ -1,11 +1,8 @@
# Default application configuration that all configurations inherit from.
scss_files:
- "**/*.scss"
- "scss/**/*.scss"
- "docs/assets/scss/**/*.scss"
exclude:
- "scss/_normalize.scss"
plugin_directories: ['.scss-linters']
# List of gem names to load custom linters from (make sure they are already
@ -28,8 +25,6 @@ linters:
BorderZero:
enabled: true
convention: zero # or `none`
exclude:
- _normalize.scss
ChainedClasses:
enabled: false
@ -43,8 +38,7 @@ linters:
Comment:
enabled: true
exclude:
- _normalize.scss
- bootstrap.scss
- scss/bootstrap.scss
style: silent
DebugStatement:
@ -108,8 +102,6 @@ linters:
LeadingZero:
enabled: true
style: exclude_zero # or 'include_zero'
exclude:
- _normalize.scss
MergeableSelector:
enabled: false
@ -138,8 +130,6 @@ linters:
ignore_unspecified: false
min_properties: 2
separate_groups: false
exclude:
- _normalize.scss
order:
- position
- top
@ -538,8 +528,6 @@ linters:
identifier_list: base
additional_identifiers: []
excluded_identifiers: []
exclude:
- _normalize.scss
ZeroUnit:
enabled: true

View File

@ -5,34 +5,31 @@ git:
depth: 3
node_js:
- "4"
- "6"
- "7"
before_install:
- if [[ `npm -v` != 3* ]]; then npm install -g npm@3; fi
- if [[ `npm -v` != 4* ]]; then npm install -g npm@4; fi
- "export TRAVIS_COMMIT_MSG=\"`git log --format=%B --no-merges -n 1`\""
- echo "$TRAVIS_COMMIT_MSG" | grep '\[skip validator\]'; export TWBS_DO_VALIDATOR=$?; true
- echo "$TRAVIS_COMMIT_MSG" | grep '\[skip sauce\]'; export TWBS_DO_SAUCE=$?; true
- if [ "$TRAVIS_REPO_SLUG" = twbs-savage/bootstrap ]; then export TWBS_DO_VALIDATOR=0; fi
- echo "$TRAVIS_COMMIT_MSG" | grep '\[skip browser\]'; export TWBS_DO_BROWSER=$?; true
install:
- bundle install --deployment --jobs=3 --retry=3
- cp grunt/npm-shrinkwrap.json ./
- cp build/npm-shrinkwrap.json ./
- npm install
script:
- npm test
- if [ "$TWBS_TEST" = browser -a "$SAUCE_ACCESS_KEY" ]; then npm run js-test-cloud; fi
after_success:
- if [ "$TWBS_TEST" = sauce-js-unit ]; then grunt/upload-preview.sh; fi
- if [ "$TRAVIS_REPO_SLUG" = twbs-savage/bootstrap ]; then npm run docs-upload-preview; fi
cache:
directories:
- node_modules
- vendor/bundle
- "$HOME/google-cloud-sdk"
env:
- TWBS_TEST=core
- TWBS_TEST=validate-html
- TWBS_TEST=sauce-js-unit
- TWBS_TEST=browser
matrix:
exclude:
- node_js: "4"
env: TWBS_TEST=validate-html
- node_js: "4"
env: TWBS_TEST=sauce-js-unit
env: TWBS_TEST=browser
notifications:
slack: heybb:iz4wwosL0N0EdaX1gvgkU0NH
webhooks:

View File

@ -1,5 +0,0 @@
Bootstrap uses [GitHub's Releases feature](https://github.com/blog/1547-release-your-software) for its changelogs.
See [the Releases section of our GitHub project](https://github.com/twbs/bootstrap/releases) for changelogs for each release version of Bootstrap.
Release announcement posts on [the official Bootstrap blog](https://blog.getbootstrap.com) contain summaries of the most noteworthy changes made in each release.

View File

@ -1,8 +1,9 @@
source 'https://rubygems.org'
group :development, :test do
gem 'jekyll', '~> 3.3.1'
gem 'jekyll-redirect-from', '~> 0.12.0'
gem 'jekyll-sitemap', '~> 0.12.0'
gem 'scss_lint', '~> 0.51.0'
gem 'jekyll', '~> 3.4.3'
gem 'jekyll-redirect-from', '~> 0.12.1'
gem 'jekyll-sitemap', '~> 1.1.1'
gem 'jekyll-toc', '~> 0.3.0.pre1'
gem 'scss_lint', '~> 0.53.0'
end

View File

@ -1,12 +1,12 @@
GEM
remote: https://rubygems.org/
specs:
addressable (2.5.0)
addressable (2.5.1)
public_suffix (~> 2.0, >= 2.0.2)
colorator (1.1.0)
ffi (1.9.14)
ffi (1.9.18)
forwardable-extended (2.6.0)
jekyll (3.3.1)
jekyll (3.4.3)
addressable (~> 2.4)
colorator (~> 1.0)
jekyll-sass-converter (~> 1.0)
@ -17,31 +17,36 @@ GEM
pathutil (~> 0.9)
rouge (~> 1.7)
safe_yaml (~> 1.0)
jekyll-redirect-from (0.12.0)
jekyll-redirect-from (0.12.1)
jekyll (~> 3.3)
jekyll-sass-converter (1.5.0)
sass (~> 3.4)
jekyll-sitemap (0.12.0)
jekyll-sitemap (1.1.1)
jekyll (~> 3.3)
jekyll-toc (0.3.0.pre1)
nokogiri (~> 1.6)
jekyll-watch (1.5.0)
listen (~> 3.0, < 3.1)
kramdown (1.13.1)
kramdown (1.13.2)
liquid (3.0.6)
listen (3.0.8)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
mercenary (0.3.6)
mini_portile2 (2.1.0)
nokogiri (1.7.2)
mini_portile2 (~> 2.1.0)
pathutil (0.14.0)
forwardable-extended (~> 2.6)
public_suffix (2.0.5)
rake (12.0.0)
rb-fsevent (0.9.8)
rb-inotify (0.9.7)
rb-inotify (0.9.8)
ffi (>= 0.5.0)
rouge (1.11.1)
safe_yaml (1.0.4)
sass (3.4.23)
scss_lint (0.51.0)
scss_lint (0.53.0)
rake (>= 0.9, < 13)
sass (~> 3.4.20)
@ -49,10 +54,11 @@ PLATFORMS
ruby
DEPENDENCIES
jekyll (~> 3.3.1)
jekyll-redirect-from (~> 0.12.0)
jekyll-sitemap (~> 0.12.0)
scss_lint (~> 0.51.0)
jekyll (~> 3.4.3)
jekyll-redirect-from (~> 0.12.1)
jekyll-sitemap (~> 1.1.1)
jekyll-toc (~> 0.3.0.pre1)
scss_lint (~> 0.53.0)
BUNDLED WITH
1.13.6
1.14.6

View File

@ -9,194 +9,8 @@
module.exports = function (grunt) {
'use strict'
// Force use of Unix newlines
grunt.util.linefeed = '\n'
RegExp.quote = function (string) {
return string.replace(/[-\\^$*+?.()|[\]{}]/g, '\\$&')
}
var path = require('path')
var isTravis = require('is-travis')
var configBridge = grunt.file.readJSON('./grunt/configBridge.json', { encoding: 'utf8' })
Object.keys(configBridge.paths).forEach(function (key) {
configBridge.paths[key].forEach(function (val, i, arr) {
arr[i] = path.join('./docs', val)
})
})
// Project configuration.
grunt.initConfig({
// Metadata.
pkg: grunt.file.readJSON('package.json'),
banner: '/*!\n' +
' * Bootstrap v<%= pkg.version %> (<%= pkg.homepage %>)\n' +
' * Copyright 2011-<%= grunt.template.today("yyyy") %> <%= pkg.author %>\n' +
' * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n' +
' */\n',
jqueryCheck: 'if (typeof jQuery === \'undefined\') {\n' +
' throw new Error(\'Bootstrap\\\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\\\'s JavaScript.\')\n' +
'}\n',
jqueryVersionCheck: '+function ($) {\n' +
' var version = $.fn.jquery.split(\' \')[0].split(\'.\')\n' +
' if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] >= 4)) {\n' +
' throw new Error(\'Bootstrap\\\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0\')\n' +
' }\n' +
'}(jQuery);\n\n',
// Task configuration.
clean: {
dist: 'dist',
docs: 'docs/dist'
},
// JS build configuration
babel: {
dev: {
options: {
sourceMap: true
},
files: {
'js/dist/util.js' : 'js/src/util.js',
'js/dist/alert.js' : 'js/src/alert.js',
'js/dist/button.js' : 'js/src/button.js',
'js/dist/carousel.js' : 'js/src/carousel.js',
'js/dist/collapse.js' : 'js/src/collapse.js',
'js/dist/dropdown.js' : 'js/src/dropdown.js',
'js/dist/modal.js' : 'js/src/modal.js',
'js/dist/scrollspy.js' : 'js/src/scrollspy.js',
'js/dist/tab.js' : 'js/src/tab.js',
'js/dist/tooltip.js' : 'js/src/tooltip.js',
'js/dist/popover.js' : 'js/src/popover.js'
}
},
dist: {
options: {
extends: '../../js/.babelrc'
},
files: {
'<%= concat.bootstrap.dest %>' : '<%= concat.bootstrap.dest %>'
}
}
},
stamp: {
options: {
banner: '<%= banner %>\n<%= jqueryCheck %>\n<%= jqueryVersionCheck %>\n+function () {\n',
footer: '\n}();'
},
bootstrap: {
files: {
src: '<%= concat.bootstrap.dest %>'
}
}
},
concat: {
options: {
// Custom function to remove all export and import statements
process: function (src) {
return src.replace(/^(export|import).*/gm, '')
}
},
bootstrap: {
src: [
'js/src/util.js',
'js/src/alert.js',
'js/src/button.js',
'js/src/carousel.js',
'js/src/collapse.js',
'js/src/dropdown.js',
'js/src/modal.js',
'js/src/scrollspy.js',
'js/src/tab.js',
'js/src/tooltip.js',
'js/src/popover.js'
],
dest: 'dist/js/<%= pkg.name %>.js'
}
},
qunit: {
options: {
inject: 'js/tests/unit/phantom.js'
},
files: 'js/tests/index.html'
},
// CSS build configuration
copy: {
docs: {
expand: true,
cwd: 'dist/',
src: [
'**/*'
],
dest: 'docs/dist/'
}
},
connect: {
server: {
options: {
port: 3000,
base: '.'
}
}
},
jekyll: {
options: {
bundleExec: true,
config: '_config.yml',
incremental: false
},
docs: {},
github: {
options: {
raw: 'github: true'
}
}
},
htmllint: {
options: {
ignore: [
'Attribute “autocomplete” is only allowed when the input type is “color”, “date”, “datetime”, “datetime-local”, “email”, “hidden”, “month”, “number”, “password”, “range”, “search”, “tel”, “text”, “time”, “url”, or “week”.',
'Attribute “autocomplete” not allowed on element “button” at this point.',
'Consider using the “h1” element as a top-level heading only (all “h1” elements are treated as top-level headings by many screen readers and other tools).',
'Element “div” not allowed as child of element “progress” in this context. (Suppressing further errors from this subtree.)',
'Element “img” is missing required attribute “src”.',
'The “color” input type is not supported in all browsers. Please be sure to test, and consider using a polyfill.',
'The “date” input type is not supported in all browsers. Please be sure to test, and consider using a polyfill.',
'The “datetime” input type is not supported in all browsers. Please be sure to test, and consider using a polyfill.',
'The “datetime-local” input type is not supported in all browsers. Please be sure to test, and consider using a polyfill.',
'The “month” input type is not supported in all browsers. Please be sure to test, and consider using a polyfill.',
'The “time” input type is not supported in all browsers. Please be sure to test, and consider using a polyfill.',
'The “week” input type is not supported in all browsers. Please be sure to test, and consider using a polyfill.'
]
},
src: ['_gh_pages/**/*.html', 'js/tests/visual/*.html']
},
watch: {
src: {
files: '<%= concat.bootstrap.src %>',
tasks: ['babel:dev']
},
sass: {
files: 'scss/**/*.scss',
tasks: ['dist-css', 'docs']
},
docs: {
files: 'docs/assets/scss/**/*.scss',
tasks: ['dist-css', 'docs']
}
},
'saucelabs-qunit': {
all: {
options: {
@ -205,151 +19,11 @@ module.exports = function (grunt) {
maxRetries: 3,
maxPollRetries: 4,
urls: ['http://127.0.0.1:3000/js/tests/index.html?hidepassed'],
browsers: grunt.file.readYAML('grunt/sauce_browsers.yml')
browsers: grunt.file.readYAML('build/sauce_browsers.yml')
}
}
},
exec: {
'clean-css': {
command: 'npm run clean-css'
},
'clean-css-docs': {
command: 'npm run clean-css-docs'
},
postcss: {
command: 'npm run postcss'
},
'postcss-docs': {
command: 'npm run postcss-docs'
},
htmlhint: {
command: 'npm run htmlhint'
},
sass: {
command: 'npm run sass'
},
'sass-docs': {
command: 'npm run sass-docs'
},
'scss-lint': {
command: 'npm run scss-lint'
},
'scss-lint-docs': {
command: 'npm run scss-lint-docs'
},
uglify: {
command: 'npm run uglify'
},
'uglify-docs': {
command: 'npm run uglify-docs'
}
},
buildcontrol: {
options: {
dir: '_gh_pages',
commit: true,
push: true,
message: 'Built %sourceName% from commit %sourceCommit% on branch %sourceBranch%'
},
pages: {
options: {
remote: 'git@github.com:twbs/derpstrap.git',
branch: 'gh-pages'
}
}
},
compress: {
main: {
options: {
archive: 'bootstrap-<%= pkg.version %>-dist.zip',
mode: 'zip',
level: 9,
pretty: true
},
files: [
{
expand: true,
cwd: 'dist/',
src: ['**'],
dest: 'bootstrap-<%= pkg.version %>-dist'
}
]
}
}
})
// These plugins provide necessary tasks.
require('load-grunt-tasks')(grunt)
require('time-grunt')(grunt)
// Docs HTML validation task
grunt.registerTask('validate-html', ['jekyll:docs', 'htmllint', 'exec:htmlhint'])
var runSubset = function (subset) {
return !process.env.TWBS_TEST || process.env.TWBS_TEST === subset
}
var isUndefOrNonZero = function (val) {
return val === undefined || val !== '0'
}
// Test task.
var testSubtasks = []
// Skip core tests if running a different subset of the test suite
if (runSubset('core') &&
// Skip core tests if this is a Savage build
process.env.TRAVIS_REPO_SLUG !== 'twbs-savage/bootstrap') {
testSubtasks = testSubtasks.concat(['dist-css', 'dist-js', 'test-scss', 'qunit', 'docs'])
}
// Skip HTML validation if running a different subset of the test suite
if (runSubset('validate-html') &&
isTravis &&
// Skip HTML5 validator when [skip validator] is in the commit message
isUndefOrNonZero(process.env.TWBS_DO_VALIDATOR)) {
testSubtasks.push('validate-html')
}
// Only run Sauce Labs tests if there's a Sauce access key
if (typeof process.env.SAUCE_ACCESS_KEY !== 'undefined' &&
// Skip Sauce if running a different subset of the test suite
runSubset('sauce-js-unit')) {
testSubtasks = testSubtasks.concat(['dist', 'docs-css', 'docs-js', 'clean:docs', 'copy:docs'])
// Skip Sauce on Travis when [skip sauce] is in the commit message
if (isUndefOrNonZero(process.env.TWBS_DO_SAUCE)) {
testSubtasks.push('connect')
testSubtasks.push('saucelabs-qunit')
}
}
grunt.registerTask('test', testSubtasks)
// JS distribution task.
grunt.registerTask('dist-js', ['babel:dev', 'concat', 'babel:dist', 'stamp', 'exec:uglify'])
grunt.registerTask('test-scss', ['exec:scss-lint'])
// CSS distribution task.
grunt.registerTask('sass-compile', ['exec:sass', 'exec:sass-docs'])
grunt.registerTask('dist-css', ['sass-compile', 'exec:postcss', 'exec:clean-css', 'exec:clean-css-docs'])
// Full distribution task.
grunt.registerTask('dist', ['clean:dist', 'dist-css', 'dist-js'])
// Default task.
grunt.registerTask('default', ['clean:dist', 'test'])
// Docs task.
grunt.registerTask('docs-css', ['exec:clean-css-docs', 'exec:postcss-docs'])
grunt.registerTask('lint-docs-css', ['exec:scss-lint-docs'])
grunt.registerTask('docs-js', ['exec:uglify-docs'])
grunt.registerTask('docs', ['lint-docs-css', 'docs-css', 'docs-js', 'clean:docs', 'copy:docs'])
grunt.registerTask('docs-github', ['jekyll:github'])
grunt.registerTask('prep-release', ['dist', 'docs', 'docs-github', 'compress'])
// Publish to GitHub
grunt.registerTask('publish', ['buildcontrol:pages'])
grunt.loadNpmTasks('grunt-saucelabs')
}

View File

@ -1,24 +1,24 @@
# [Bootstrap](https://getbootstrap.com)
<p align="center">
<a href="https://v4-alpha.getbootstrap.com">
<img src="http://v4-alpha.getbootstrap.com/assets/brand/bootstrap-solid.svg" width=72 height=72>
</a>
[![Slack](https://bootstrap-slack.herokuapp.com/badge.svg)](https://bootstrap-slack.herokuapp.com)
![Bower version](https://img.shields.io/bower/v/bootstrap.svg)
[![npm version](https://img.shields.io/npm/v/bootstrap.svg)](https://www.npmjs.com/package/bootstrap)
[![Gem version](https://img.shields.io/gem/v/bootstrap.svg)](https://rubygems.org/gems/bootstrap)
[![Build Status](https://img.shields.io/travis/twbs/bootstrap/master.svg)](https://travis-ci.org/twbs/bootstrap)
[![devDependency Status](https://img.shields.io/david/dev/twbs/bootstrap.svg)](https://david-dm.org/twbs/bootstrap?type=dev)
[![Meteor Atmosphere](https://img.shields.io/badge/meteor-twbs%3Abootstrap-blue.svg)](https://atmospherejs.com/twbs/bootstrap)
[![Packagist Prerelease](https://img.shields.io/packagist/vpre/twbs/bootstrap.svg)](https://packagist.org/packages/twbs/bootstrap)
[![NuGet](https://img.shields.io/nuget/vpre/bootstrap.svg)](https://www.nuget.org/packages/bootstrap/4.0.0-alpha5)
<h3 align="center">Bootstrap</h3>
[![Selenium Test Status](https://saucelabs.com/browser-matrix/bootstrap.svg)](https://saucelabs.com/u/bootstrap)
<p align="center">
Sleek, intuitive, and powerful front-end framework for faster and easier web development.
<br>
<a href="https://v4-alpha.getbootstrap.com"><strong>Visit Bootstrap &raquo;</strong></a>
</p>
</p>
Bootstrap is a sleek, intuitive, and powerful front-end framework for faster and easier web development, created by [Mark Otto](https://twitter.com/mdo) and [Jacob Thornton](https://twitter.com/fat), and maintained by the [core team](https://github.com/orgs/twbs/people) with the massive support and involvement of the community.
To get started, check out <https://getbootstrap.com>!
<br>
## Table of contents
- [Quick start](#quick-start)
- [Status](#status)
- [What's included](#whats-included)
- [Bugs and feature requests](#bugs-and-feature-requests)
- [Documentation](#documentation)
- [Contributing](#contributing)
@ -31,17 +31,31 @@ To get started, check out <https://getbootstrap.com>!
Several quick start options are available:
- [Download the latest release.](https://github.com/twbs/bootstrap/archive/v4.0.0-alpha.5.zip)
- [Download the latest release.](https://github.com/twbs/bootstrap/archive/v4.0.0-alpha.6.zip)
- Clone the repo: `git clone https://github.com/twbs/bootstrap.git`
- Install with [npm](https://www.npmjs.com): `npm install bootstrap@4.0.0-alpha.5`
- Install with [yarn](https://github.com/yarnpkg/yarn): `yarn add bootstrap@4.0.0-alpha.5`
- Install with [Composer](https://getcomposer.org): `composer require twbs/bootstrap:4.0.0-alpha.5`
- Install with [Bower](https://bower.io): `bower install bootstrap#v4.0.0-alpha.5`
- Install with [npm](https://www.npmjs.com): `npm install bootstrap@4.0.0-alpha.6`
- Install with [yarn](https://github.com/yarnpkg/yarn): `yarn add bootstrap@4.0.0-alpha.6`
- Install with [Composer](https://getcomposer.org): `composer require twbs/bootstrap:4.0.0-alpha.6`
- Install with [Bower](https://bower.io): `bower install bootstrap#v4.0.0-alpha.6`
- Install with [NuGet](https://www.nuget.org): CSS: `Install-Package bootstrap -Pre` Sass: `Install-Package bootstrap.sass -Pre` (`-Pre` is only required until Bootstrap v4 has a stable release).
Read the [Getting started page](https://getbootstrap.com/getting-started/) for information on the framework contents, templates and examples, and more.
### What's included
## Status
[![Slack](https://bootstrap-slack.herokuapp.com/badge.svg)](https://bootstrap-slack.herokuapp.com)
[![Bower](https://img.shields.io/bower/v/bootstrap.svg)](https://bower.io/search/?q=bootstrap)
[![npm version](https://img.shields.io/npm/v/bootstrap.svg)](https://www.npmjs.com/package/bootstrap)
[![Gem version](https://img.shields.io/gem/v/bootstrap.svg)](https://rubygems.org/gems/bootstrap)
[![Build Status](https://img.shields.io/travis/twbs/bootstrap/v4-dev.svg)](https://travis-ci.org/twbs/bootstrap)
[![devDependency Status](https://img.shields.io/david/dev/twbs/bootstrap.svg)](https://david-dm.org/twbs/bootstrap?type=dev)
[![Meteor Atmosphere](https://img.shields.io/badge/meteor-twbs%3Abootstrap-blue.svg)](https://atmospherejs.com/twbs/bootstrap)
[![Packagist Prerelease](https://img.shields.io/packagist/vpre/twbs/bootstrap.svg)](https://packagist.org/packages/twbs/bootstrap)
[![NuGet](https://img.shields.io/nuget/vpre/bootstrap.svg)](https://www.nuget.org/packages/bootstrap/absoluteLatest)
[![Selenium Test Status](https://saucelabs.com/browser-matrix/bootstrap.svg)](https://saucelabs.com/u/bootstrap)
## 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:
@ -57,7 +71,7 @@ bootstrap/
└── bootstrap.min.js
```
We provide compiled CSS and JS (`bootstrap.*`), as well as compiled and minified CSS and JS (`bootstrap.min.*`). CSS [source maps](https://developer.chrome.com/devtools/docs/css-preprocessors) (`bootstrap.*.map`) are available for use with certain browsers' developer tools.
We provide compiled CSS and JS (`bootstrap.*`), as well as compiled and minified CSS and JS (`bootstrap.min.*`). CSS [source maps](https://developers.google.com/web/tools/chrome-devtools/debug/readability/source-maps) (`bootstrap.*.map`) are available for use with certain browsers' developer tools.
## Bugs and feature requests
@ -72,7 +86,7 @@ Bootstrap's documentation, included in this repo in the root directory, is built
### Running documentation locally
1. Run through the [tooling setup](https://github.com/twbs/bootstrap/blob/v4-dev/docs/getting-started/build-tools.md#tooling-setup) to install Jekyll (the site builder) and other Ruby dependencies with `bundle install`.
2. Run `grunt` (or a specific set of Grunt tasks) to rebuild distributed CSS and JavaScript files, as well as our docs assets.
2. Run `npm run test` (or a specific NPM script) to rebuild distributed CSS and JavaScript files, as well as our docs assets.
3. From the root `/bootstrap` directory, run `bundle exec jekyll serve` in the command line.
4. Open <http://localhost:9001> in your browser, and voilà.

View File

@ -9,18 +9,18 @@ kramdown:
permalink: pretty
# Server
source: docs
destination: _gh_pages
host: 0.0.0.0
source: .
destination: ./_gh_pages
port: 9001
baseurl: ""
url: https://v4-alpha.getbootstrap.com
url: https://getbootstrap.com
encoding: UTF-8
exclude: [assets/scss/]
exclude: [.git, .github, assets/scss/, build, js, node_modules, nuget, scss, vendor, bower.json, composer.json, Gemfile, Gemfile.lock, Gruntfile.js, package.js, package.json, sache.json]
gems:
- jekyll-redirect-from
- jekyll-sitemap
- jekyll-toc
# Social
title: Bootstrap
@ -31,25 +31,27 @@ social_logo_path: /assets/brand/bootstrap-social-logo.png
social_image_path: /assets/brand/bootstrap-social.png
# Custom vars
current_version: 4.0.0-alpha.5
current_version: 4.0.0-alpha.6
docs_version: 4.0
repo: https://github.com/twbs/bootstrap
slack: https://bootstrap-slack.herokuapp.com
download:
source: https://github.com/twbs/bootstrap/archive/v4.0.0-alpha.5.zip
dist: https://github.com/twbs/bootstrap/releases/download/v4.0.0-alpha.5/bootstrap-4.0.0-alpha.5-dist.zip
source: https://github.com/twbs/bootstrap/archive/v4.0.0-alpha.6.zip
dist: https://github.com/twbs/bootstrap/releases/download/v4.0.0-alpha.6/bootstrap-4.0.0-alpha.6-dist.zip
blog: https://blog.getbootstrap.com
expo: https://expo.getbootstrap.com
themes: https://themes.getbootstrap.com
jobs: https://jobs.getbootstrap.com
cdn:
# See https://www.srihash.org for info on how to generate the hashes
css: https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.5/css/bootstrap.min.css
css_hash: "sha384-AysaV+vQoT3kOAXZkl02PThvDr8HYKPZhNT5h/CXfBThSRXQ6jW5DO2ekP5ViFdi"
js: https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.5/js/bootstrap.min.js
js_hash: "sha384-BLiI7JTZm+JWlgKa0M0kGRpJbF2J8q+qreVrKBC47e3K6BW78kGLrCkeRX6I9RoK"
jquery: https://code.jquery.com/jquery-3.1.1.slim.min.js
jquery_hash: "sha384-A7FZj7v+d/sdmMqp/nOQwliLvUsJfDHW+k9Omg/a/EheAdgtzNs3hpfag6Ed950n"
tether: https://cdnjs.cloudflare.com/ajax/libs/tether/1.4.0/js/tether.min.js
tether_hash: "sha384-DztdAPBWPRXSA/3eYEEUWrWCy7G5KFbe8fFjk5JAIxUYHKkDx6Qin1DkWx51bBrb"
css: https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css
css_hash: "sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ"
js: https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/js/bootstrap.min.js
js_hash: "sha384-vBWWzlZJ8ea9aCX4pEW3rVHjgjt7zpkNpZk+02D9phzyeVkE+jo0ieGizqPLForn"
jquery: https://code.jquery.com/jquery-3.2.1.slim.min.js
jquery_hash: "sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN"
popper: https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.9.9/umd/popper.min.js
popper_hash: "sha256-c477vRLKQv1jt9o7w6TTBzFyFznTaZjoMLTDFi7Hlxc="

View File

@ -33,3 +33,7 @@
- name: Gleb Mazovetskiy
user: glebm
gravatar: 729f685b8e8d7e9feed18c177c82e59b
- name: Johann-S
user: johann-s
gravatar: d90d49733a4fe1aa461e45cb4a4fd9e3

View File

@ -8,6 +8,7 @@
- title: Options
- title: Build tools
- title: Best practices
- title: Webpack
- title: Accessibility
- title: Layout
@ -15,7 +16,7 @@
- title: Overview
- title: Grid
- title: Media object
- title: Responsive utilities
- title: Utilities for layout
- title: Content
pages:
@ -56,10 +57,9 @@
- title: Clearfix
- title: Close icon
- title: Colors
- title: Display
- title: Flexbox
- title: Display property
- title: Image replacement
- title: Invisible content
- title: Position
- title: Responsive helpers
- title: Screenreaders
@ -67,18 +67,19 @@
- title: Spacing
- title: Typography
- title: Vertical align
- title: Visibility
# - title: Extend
# pages:
# - title: Approach
# - title: Icon fonts
- title: About
- title: Extend
pages:
- title: History
- title: Team
- title: Brand
- title: License
- title: Translations
# - title: Approach
- title: Icons
# - title: About
# pages:
# - title: History
# - title: Team
# - title: Brand
# - title: License
# - title: Translations
- title: Migration

View File

@ -1,12 +1,12 @@
- name: Chinese
code: zh
description: Bootstrap 中文文档
url: http://v4.bootcss.com/
url: https://v4.bootcss.com/
- name: Chinese
code: zh
description: Bootstrap 4 中文文档教程
url: http://boot4.com/
url: http://wiki.jikexueyuan.com/project/bootstrap4/
- name: Japanese
code: ja

View File

@ -0,0 +1,7 @@
{% callout danger %}
#### Asynchronous methods and transitions
All API methods are **asynchronous** and start a **transition**. They returns to the caller as soon as the transition is started but **before it ends**. In addition, a method call on a **transitioning component will be ignored**.
[See our Javascript documentation for more informations.]({{ site.baseurl }}/getting-started/javascript/#content)
{% endcallout %}

12
_includes/footer.html Normal file
View File

@ -0,0 +1,12 @@
<footer class="bd-footer text-muted">
<div class="container">
<ul class="bd-footer-links">
<li><a href="{{ site.repo }}">GitHub</a></li>
<li><a href="https://twitter.com/getbootstrap">Twitter</a></li>
<li><a href="{{ site.baseurl }}/examples/">Examples</a></li>
<li><a href="{{ site.baseurl }}/about/history/">About</a></li>
</ul>
<p>Designed and built with all the love in the world by <a href="https://twitter.com/mdo" target="_blank">@mdo</a> and <a href="https://twitter.com/fat" target="_blank">@fat</a>. Maintained by the <a href="https://github.com/orgs/twbs/people">core team</a> with the help of <a href="https://github.com/twbs/bootstrap/graphs/contributors">our contributors</a>.</p>
<p>Currently v{{ site.current_version }}. Code licensed <a rel="license" href="https://github.com/twbs/bootstrap/blob/master/LICENSE" target="_blank">MIT</a>, docs <a rel="license" href="https://creativecommons.org/licenses/by/3.0/" target="_blank">CC BY 3.0</a>.</p>
</div>
</footer>

View File

@ -19,6 +19,9 @@
{% endif %}
<!-- Documentation extras -->
{% if page.layout == "docs" %}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/2/docsearch.min.css" />
{% endif %}
<link href="{{ site.baseurl }}/assets/css/docs.min.css" rel="stylesheet">
<!-- Favicons -->

View File

@ -0,0 +1 @@
<svg{% if include.class %} class="{{ include.class }}"{% endif %} xmlns="http://www.w3.org/2000/svg" viewbox="0 0 612 612"{% if include.width %} width="{{ include.width }}"{% endif %}{% if include.height %} height="{{ include.height }}"{% endif %}><path fill="currentColor" d="M510 5c53.5.2 96.8 43.5 97 97v408c-.2 53.5-43.5 96.8-97 97H102c-53.5-.2-96.8-43.5-97-97V102c.2-53.5 43.5-96.8 97-97h408m0-5H102C45.9 0 0 45.9 0 102v408c0 56.1 45.9 102 102 102h408c56.1 0 102-45.9 102-102V102C612 45.9 566.1 0 510 0z"/><path fill="currentColor" d="M202.8 471.5V154.4H327c54.3 0 91 31.6 91 79.1 0 33-24.2 63.7-54.7 69.2v1.8c43.1 5.5 70.8 35.8 70.8 78 0 55.8-40 89-107.5 89H202.8zm39.5-180.4h63.3c46.8 0 72.3-18.7 72.3-53 0-31.4-21.5-48.8-60-48.8h-75.6v101.8zm78.2 145.5c47.7 0 72.7-19.3 72.7-56s-25.9-55.4-76.5-55.4h-74.5v111.4h78.3z"/></svg>

After

Width:  |  Height:  |  Size: 834 B

View File

@ -0,0 +1 @@
<svg{% if include.class %} class="{{ include.class }}"{% endif %} xmlns="http://www.w3.org/2000/svg" viewbox="0 0 512 499.36"{% if include.width %} width="{{ include.width }}"{% endif %}{% if include.height %} height="{{ include.height }}"{% endif %}><title>GitHub</title><path d="M256 0C114.64 0 0 114.61 0 256c0 113.09 73.34 209 175.08 242.9 12.8 2.35 17.47-5.56 17.47-12.34 0-6.08-.22-22.18-.35-43.54-71.2 15.49-86.2-34.34-86.2-34.34-11.64-29.57-28.42-37.45-28.42-37.45-23.27-15.84 1.73-15.55 1.73-15.55 25.69 1.81 39.21 26.38 39.21 26.38 22.84 39.12 59.92 27.82 74.5 21.27 2.33-16.54 8.94-27.82 16.25-34.22-56.84-6.43-116.6-28.43-116.6-126.49 0-27.95 10-50.8 26.35-68.69-2.63-6.48-11.42-32.5 2.51-67.75 0 0 21.49-6.88 70.4 26.24a242.65 242.65 0 0 1 128.18 0c48.87-33.13 70.33-26.24 70.33-26.24 14 35.25 5.18 61.27 2.55 67.75 16.41 17.9 26.31 40.75 26.31 68.69 0 98.35-59.85 120-116.88 126.32 9.19 7.9 17.38 23.53 17.38 47.41 0 34.22-.31 61.83-.31 70.23 0 6.85 4.61 14.81 17.6 12.31C438.72 464.97 512 369.08 512 256.02 512 114.62 397.37 0 256 0z" fill="currentColor" fill-rule="evenodd"/></svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

1
_includes/icons/menu.svg Normal file
View File

@ -0,0 +1 @@
<svg{% if include.class %} class="{{ include.class }}"{% endif %} xmlns="http://www.w3.org/2000/svg" viewbox="0 0 30 30"{% if include.width %} width="{{ include.width }}"{% endif %}{% if include.height %} height="{{ include.height }}"{% endif %}><path stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-miterlimit="10" d="M4 7h22M4 15h22M4 23h22"/></svg>

After

Width:  |  Height:  |  Size: 373 B

View File

@ -0,0 +1 @@
<svg{% if include.class %} class="{{ include.class }}"{% endif %} xmlns="http://www.w3.org/2000/svg" viewbox="0 0 512 512"{% if include.width %} width="{{ include.width }}"{% endif %}{% if include.height %} height="{{ include.height }}"{% endif %}><title>Slack</title><path fill="currentColor" d="M210.787 234.832l68.31-22.883 22.1 65.977-68.309 22.882z"/><path d="M490.54 185.6C437.7 9.59 361.6-31.34 185.6 21.46S-31.3 150.4 21.46 326.4 150.4 543.3 326.4 490.54 543.34 361.6 490.54 185.6zM401.7 299.8l-33.15 11.05 11.46 34.38c4.5 13.92-2.87 29.06-16.78 33.56-2.87.82-6.14 1.64-9 1.23a27.32 27.32 0 0 1-24.56-18l-11.46-34.38-68.36 22.92 11.46 34.38c4.5 13.92-2.87 29.06-16.78 33.56-2.87.82-6.14 1.64-9 1.23a27.32 27.32 0 0 1-24.56-18l-11.46-34.43-33.15 11.05c-2.87.82-6.14 1.64-9 1.23a27.32 27.32 0 0 1-24.56-18c-4.5-13.92 2.87-29.06 16.78-33.56l33.12-11.03-22.1-65.9-33.15 11.05c-2.87.82-6.14 1.64-9 1.23a27.32 27.32 0 0 1-24.56-18c-4.48-13.93 2.89-29.07 16.81-33.58l33.15-11.05-11.46-34.38c-4.5-13.92 2.87-29.06 16.78-33.56s29.06 2.87 33.56 16.78l11.46 34.38 68.36-22.92-11.46-34.38c-4.5-13.92 2.87-29.06 16.78-33.56s29.06 2.87 33.56 16.78l11.47 34.42 33.15-11.05c13.92-4.5 29.06 2.87 33.56 16.78s-2.87 29.06-16.78 33.56L329.7 194.6l22.1 65.9 33.15-11.05c13.92-4.5 29.06 2.87 33.56 16.78s-2.88 29.07-16.81 33.57z" fill="currentColor"/></svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -0,0 +1 @@
<svg{% if include.class %} class="{{ include.class }}"{% endif %} xmlns="http://www.w3.org/2000/svg" viewbox="0 0 512 416.32"{% if include.width %} width="{{ include.width }}"{% endif %}{% if include.height %} height="{{ include.height }}"{% endif %}><title>Twitter</title><path d="M160.83 416.32c193.2 0 298.92-160.22 298.92-298.92 0-4.51 0-9-.2-13.52A214 214 0 0 0 512 49.38a212.93 212.93 0 0 1-60.44 16.6 105.7 105.7 0 0 0 46.3-58.19 209 209 0 0 1-66.79 25.37 105.09 105.09 0 0 0-181.73 71.91 116.12 116.12 0 0 0 2.66 24c-87.28-4.3-164.73-46.3-216.56-109.82A105.48 105.48 0 0 0 68 159.6a106.27 106.27 0 0 1-47.53-13.11v1.43a105.28 105.28 0 0 0 84.21 103.06 105.67 105.67 0 0 1-47.33 1.84 105.06 105.06 0 0 0 98.14 72.94A210.72 210.72 0 0 1 25 370.84a202.17 202.17 0 0 1-25-1.43 298.85 298.85 0 0 0 160.83 46.92" fill="currentColor"/></svg>

After

Width:  |  Height:  |  Size: 843 B

View File

@ -1,4 +1,11 @@
<nav class="bd-links" id="docsNavbarContent">
<form class="bd-search d-flex align-items-center">
<input type="search" class="form-control" id="search-input" placeholder="Search..." aria-label="Search for..." autocomplete="off">
<button class="btn-link bd-search-docs-toggle d-md-none p-0 ml-3" type="button" data-toggle="collapse" data-target="#bd-docs-nav" aria-controls="bd-docs-nav" aria-expanded="false" aria-label="Toggle docs avigation">
{% include icons/menu.svg class="" width="30" height="30" %}
</button>
</form>
<nav class="collapse bd-links" id="bd-docs-nav">
{% assign page_slug = page.url | split: '/' | last %}
{% for group in site.data.nav %}
{% assign link = group.pages | first %}
@ -11,7 +18,7 @@
{% endif %}
<div class="bd-toc-item {{ active }}">
<a class="bd-toc-link" href="{{ site.baseurl }}/{{ group_slug }}/{{ link_slug }}{% if link_slug %}/{% endif %}">
<a class="bd-toc-link" href="{{ site.baseurl }}/docs/{{ site.docs_version }}/{{ group_slug }}/{{ link_slug }}{% if link_slug %}/{% endif %}">
{{ group.title }}
</a>
@ -25,7 +32,7 @@
{% endif %}
<li class="{{ active }}">
<a href="{{ site.baseurl }}/{{ group_slug }}/{{ doc_slug }}/">
<a href="{{ site.baseurl }}/docs/{{ site.docs_version }}/{{ group_slug }}/{{ doc_slug }}/">
{{ doc.title }}
</a>

65
_includes/nav-home.html Normal file
View File

@ -0,0 +1,65 @@
<header class="navbar navbar-inverse navbar-expand-md flex-column flex-md-row bd-navbar">
<a class="navbar-brand mr-0 mr-md-2" href="{{ site.baseurl }}/">
{% include icons/bootstrap.svg width="38" height="38" class="d-block" %}
</a>
<div class="navbar-nav-scroll">
<ul class="navbar-nav bd-navbar-nav flex-row">
<li class="nav-item">
<a class="nav-link {% if page.layout == "home" %}active{% endif %}" href="{{ site.baseurl }}/" onclick="ga('send', 'event', 'Navbar', 'Community links', 'Bootstrap');">Home</a>
</li>
<li class="nav-item">
<a class="nav-link {% if page.layout == "docs" %}active{% endif %}" href="{{ site.baseurl }}/docs/{{ site.docs_version }}/" onclick="ga('send', 'event', 'Navbar', 'Community links', 'Docs');">Documentation</a>
</li>
<li class="nav-item">
<a class="nav-link {% if page.title == "Examples" %}active{% endif %}" href="{{ site.baseurl }}/docs/{{ site.docs_version }}/examples/" onclick="ga('send', 'event', 'Navbar', 'Community links', 'Examples');">Examples</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{{ site.themes }}" onclick="ga('send', 'event', 'Navbar', 'Community links', 'Themes');">Themes</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{{ site.jobs }}" onclick="ga('send', 'event', 'Navbar', 'Community links', 'Jobs');">Jobs</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{{ site.expo }}" onclick="ga('send', 'event', 'Navbar', 'Community links', 'Expo');">Expo</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{{ site.blog }}" onclick="ga('send', 'event', 'Navbar', 'Community links', 'Blog');">Blog</a>
</li>
</ul>
</div>
<ul class="navbar-nav flex-row ml-md-auto d-none d-md-flex">
{% comment %}
<li class="nav-item dropdown">
<a class="nav-item nav-link dropdown-toggle mr-md-2" href="#" id="bd-versions" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
v{{ site.current_version }}
</a>
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="bd-versions">
<a class="dropdown-item" href="{{ site.baseurl }}/v4">Bootstrap 4</a>
<a class="dropdown-item" href="{{ site.baseurl }}/3.3.7/">Bootstrap v3.3.7</a>
<a class="dropdown-item" href="{{ site.baseurl }}/2.3.2/">Bootstrap v2.3.2</a>
<a class="dropdown-item" href="{{ site.baseurl }}/releases/">All versions...</a>
</div>
</li>
{% endcomment %}
<li class="nav-item">
<a class="nav-link p-2" href="{{ site.repo }}">
{% include icons/github.svg class="navbar-nav-svg" %}
</a>
</li>
<li class="nav-item">
<a class="nav-link p-2" href="https://twitter.com/{{ site.twitter }}">
{% include icons/twitter.svg class="navbar-nav-svg" %}
</a>
</li>
<li class="nav-item">
<a class="nav-link p-2" href="{{ site.slack }}">
{% include icons/slack.svg class="navbar-nav-svg" %}
</a>
</li>
</ul>
<a class="btn btn-outline-secondary d-none d-md-inline-block mb-3 mb-md-0 ml-md-3" href="{{ site.download.source }}">Download</a>
</header>

50
_includes/scripts.html Normal file
View File

@ -0,0 +1,50 @@
<script src="{{ site.cdn.jquery }}" integrity="{{ site.cdn.jquery_hash }}" crossorigin="anonymous"></script>
<script>window.jQuery || document.write('<script src="{{ site.baseurl }}/assets/js/vendor/jquery-slim.min.js"><\/script>')</script>
<script src="{{ site.baseurl }}/assets/js/vendor/popper.min.js"></script>
{% if site.github %}
<script src="{{ site.baseurl }}/dist/js/bootstrap.min.js"></script>
{% else %}
<script src="{{ site.baseurl }}/dist/js/bootstrap.js"></script>
{% endif %}
{% if site.github %}
<script src="{{ site.baseurl }}/assets/js/docs.min.js"></script>
{% else %}
<script src="{{ site.baseurl }}/assets/js/vendor/anchor.min.js"></script>
<script src="{{ site.baseurl }}/assets/js/vendor/clipboard.min.js"></script>
<script src="{{ site.baseurl }}/assets/js/vendor/holder.min.js"></script>
<script src="{{ site.baseurl }}/assets/js/src/application.js"></script>
{% endif %}
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="{{ site.baseurl }}/assets/js/ie10-viewport-bug-workaround.js"></script>
<script src="{{ site.baseurl }}/assets/js/ie-emulation-modes-warning.js"></script>
{% if page.layout == "docs" %}
<script type="text/javascript" src="https://cdn.jsdelivr.net/docsearch.js/2/docsearch.min.js"></script>
<script type="text/javascript">
var docsearch = docsearch({
apiKey: '48cb48b22351bc71ea5f12f4d1ede198',
indexName: 'bootstrap-v4',
inputSelector: '#search-input',
transformData: function (hits) {
return hits.map(function (hit) {
hit.url = hit.url.replace('https://v4-alpha.getbootstrap.com', 'http://localhost:9001/docs/4.0');
return hit;
});
},
debug: false // Set debug to true if you want to inspect the dropdown
});
</script>
{% endif %}
<script>
Holder.addTheme('gray', {
bg: '#777',
fg: 'rgba(255,255,255,.75)',
font: 'Helvetica',
fontweight: 'normal'
})
</script>

View File

@ -12,10 +12,11 @@
{% include nav-home.html %}
<div id="content">
<main id="content" role="main">
{{ content }}
</div>
</main>
{% include footer.html %}
{% include scripts.html %}
</body>
</html>

View File

@ -12,18 +12,26 @@
{% include nav-home.html %}
<div class="container mt-4">
<div class="row">
<div class="col-12 col-md-3 bd-sidebar">
<div class="container-fluid">
<div class="row flex-xl-nowrap">
<div class="col-12 col-md-3 col-xl-2 bd-sidebar">
{% include nav-docs.html %}
</div>
<div class="col-12 col-md-9 bd-content">
<main class="col-12 col-md-9 col-xl-8 py-md-3 pl-md-5 bd-content" role="main">
<h1 class="bd-title" id="content">{{ page.title }}</h1>
<p class="bd-lead">{{ page.description }}</p>
{% include ads.html %}
{{ content }}
</div>
</main>
{% if page.toc %}
<div class="d-none d-xl-block col-xl-2 bd-toc">
{{ content | toc_only }}
</div>
{% endif %}
</div>
</div>
{% include footer.html %}
{% include scripts.html %}
</body>
</html>

View File

@ -15,5 +15,6 @@
{{ content }}
{% include footer.html %}
{% include scripts.html %}
</body>
</html>

View File

@ -3,6 +3,7 @@ layout: docs
title: Brand guidelines
description: Documentation and examples for Bootstrap's logo and brand usage guidelines.
group: about
toc: true
---
Have a need for Bootstrap's brand resources? Great! We have only a few guidelines we follow, and in turn ask you to follow as well. These guidelines were inspired by MailChimp's [Brand Assets](https://mailchimp.com/about/brand-assets/).
@ -14,14 +15,14 @@ Have a need for Bootstrap's brand resources? Great! We have only a few guideline
## Mark and logo
Use either the Bootstrap mark (a capital **B**) or the standard logo (just **Bootstrap**). It should always appear in Helvetica Neue Bold. **Do not use the Twitter bird** in association with Bootstrap.
Use either the Bootstrap mark (a capital **B**) or the standard logo (just **Bootstrap**). It should always appear in San Francisco Display Semibold. **Do not use the Twitter bird** in association with Bootstrap.
<div class="bd-brand-logos">
<div class="bd-brand-item">
<div class="bd-booticon bd-booticon-lg">B</div>
<img class="svg" src="{{ site.baseurl }}/assets/brand/bootstrap-solid.svg" alt="Bootstrap" width="144" height="144">
</div>
<div class="bd-brand-item inverse">
<div class="bd-booticon bd-booticon-lg bd-booticon-inverse">B</div>
<img class="svg" src="{{ site.baseurl }}/assets/brand/bootstrap-outline.svg" alt="Bootstrap" width="144" height="144">
</div>
</div>
<div class="bd-brand-logos">

View File

Before

Width:  |  Height:  |  Size: 6.0 KiB

After

Width:  |  Height:  |  Size: 6.0 KiB

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 45 KiB

View File

Before

Width:  |  Height:  |  Size: 330 KiB

After

Width:  |  Height:  |  Size: 330 KiB

View File

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

7
assets/css/docs.min.css vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

Before

Width:  |  Height:  |  Size: 174 KiB

After

Width:  |  Height:  |  Size: 174 KiB

View File

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

Before

Width:  |  Height:  |  Size: 156 KiB

After

Width:  |  Height:  |  Size: 156 KiB

View File

Before

Width:  |  Height:  |  Size: 197 KiB

After

Width:  |  Height:  |  Size: 197 KiB

View File

Before

Width:  |  Height:  |  Size: 158 KiB

After

Width:  |  Height:  |  Size: 158 KiB

View File

Before

Width:  |  Height:  |  Size: 194 KiB

After

Width:  |  Height:  |  Size: 194 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

19
assets/js/docs.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -55,9 +55,16 @@
// Insert copy to clipboard button before .highlight
$('.highlight').each(function () {
var btnHtml = '<div class="bd-clipboard"><span class="btn-clipboard" title="Copy to clipboard">Copy</span></div>'
var btnHtml = '<div class="bd-clipboard"><button class="btn-clipboard" title="Copy to clipboard">Copy</button></div>'
$(this).before(btnHtml)
$('.btn-clipboard').tooltip()
$('.btn-clipboard')
.tooltip()
.on('mouseleave', function () {
// explicitly hide tooltip, since after clicking it remains
// focused (as it's a button), so tooltip would otherwise
// remain visible until focus is moved away
$(this).tooltip('hide')
})
})
var clipboard = new Clipboard('.btn-clipboard', {
@ -96,6 +103,8 @@
;(function () {
'use strict'
anchors.options.placement = 'left'
anchors.add('.bd-content > h1, .bd-content > h2, .bd-content > h3, .bd-content > h4, .bd-content > h5')
anchors.options = {
icon: '#'
}
anchors.add('.bd-content > h2, .bd-content > h3, .bd-content > h4, .bd-content > h5')
}())

7
assets/js/vendor/clipboard.min.js vendored Normal file

File diff suppressed because one or more lines are too long

8160
assets/js/vendor/jquery-slim.min.js vendored Normal file

File diff suppressed because it is too large Load Diff

3
assets/js/vendor/popper.min.js vendored Normal file

File diff suppressed because one or more lines are too long

114
assets/scss/_algolia.scss Normal file
View File

@ -0,0 +1,114 @@
// Docsearch overrides
//
// `!important` indicates overridden properties.
.algolia-autocomplete {
display: block !important;
flex: 1;
// Menu container
.ds-dropdown-menu {
width: 100%;
min-width: 0 !important;
max-width: none !important;
padding: 8px 0 !important;
background-color: #fff;
background-clip: padding-box;
border: 1px solid rgba(0,0,0,.1);
box-shadow: 0 .5rem 1rem rgba(0,0,0,.175);
// Caret
&::before {
display: none !important;
}
[class^=ds-dataset-] {
padding: 0 !important;
overflow: visible !important;
background-color: transparent !important;
border: 0 !important;
}
.ds-suggestions {
margin-top: 0 !important;
}
}
.algolia-docsearch-suggestion {
padding: 0 !important;
overflow: visible !important;
}
.algolia-docsearch-suggestion--category-header {
padding: .125rem 15px !important;
margin-top: 0 !important;
font-size: .75rem !important;
font-weight: 500 !important;
color: #767676 !important;
border-bottom: 0 !important;
}
.algolia-docsearch-suggestion--wrapper {
padding-top: 0 !important;
}
// Section header
.algolia-docsearch-suggestion--subcategory-column {
float: none !important;
width: auto !important;
padding: 0 !important;
text-align: left !important;
}
.algolia-docsearch-suggestion--content {
float: none !important;
width: auto !important;
padding: 0 !important;
// Vertical divider between column header and content
&::before {
display: none !important;
}
}
.ds-suggestion {
&:not(:first-child) {
.algolia-docsearch-suggestion--category-header {
margin-top: .5rem !important;
}
}
.algolia-docsearch-suggestion--subcategory-column {
display: none !important;
}
}
.algolia-docsearch-suggestion--title {
display: block;
padding: 0 15px !important;
font-size: .875rem !important;
font-weight: 400 !important;
}
.algolia-docsearch-footer {
display: none !important;
}
.algolia-docsearch-suggestion--text {
padding-top: .5rem;
padding-bottom: .5rem;
font-weight: normal;
}
.algolia-docsearch-suggestion--highlight {
color: #5f2dab;
background-color: rgba(154, 132, 187, .12);
}
.algolia-docsearch-suggestion--text .algolia-docsearch-suggestion--highlight {
box-shadow: inset 0 -2px 0 0 rgba(95, 45, 171, .8) !important;
}
.ds-suggestion.ds-cursor .algolia-docsearch-suggestion--content {
background-color: rgba(208, 189, 236, .12) !important;
}
}

12
assets/scss/_anchor.scss Normal file
View File

@ -0,0 +1,12 @@
// scss-lint:disable ImportantRule
.anchorjs-link {
font-weight: normal;
color: rgba($link-color, .5);
transition: color .16s linear;
&:hover {
color: $link-color;
text-decoration: none;
}
}

View File

@ -23,6 +23,7 @@
color: #818a91;
cursor: pointer;
background-color: transparent;
border: 0;
border-radius: .25rem;
&:hover {

View File

@ -37,6 +37,40 @@
border: 1px solid rgba($bd-purple, .15);
}
// Grid mixins
.example-container {
width: 800px;
@include make-container();
}
.example-row {
@include make-row();
}
.example-content-main {
@include make-col-ready();
@include media-breakpoint-up(sm) {
@include make-col(6);
}
@include media-breakpoint-up(lg) {
@include make-col(8);
}
}
.example-content-secondary {
@include make-col-ready();
@include media-breakpoint-up(sm) {
@include make-col(6);
}
@include media-breakpoint-up(lg) {
@include make-col(4);
}
}
//
// Container illustrations
@ -83,7 +117,7 @@
.bd-example {
position: relative;
padding: 1rem;
margin: 1rem -1rem;
margin: 1rem (-$grid-gutter-width-base / 2);
border: solid #f7f7f9;
border-width: .2rem 0 0;
@include clearfix();
@ -264,6 +298,18 @@
margin-top: .25rem;
margin-bottom: .25rem;
}
.bs-tooltip-top-docs,
.bs-tooltip-bottom-docs {
.arrow {
left: 50%;
}
}
.bs-tooltip-right-docs,
.bs-tooltip-left-docs {
.arrow {
top: 50%;
}
}
// Popovers
.bd-example-popover-static {
@ -277,6 +323,18 @@
width: 260px;
margin: 1.25rem;
}
.bs-popover-top-docs,
.bs-popover-bottom-docs {
.arrow {
left: 50%;
}
}
.bs-popover-right-docs,
.bs-popover-left-docs {
.arrow {
top: 50%;
}
}
// Tooltips
.tooltip-demo a {
@ -298,6 +356,12 @@
overflow: auto;
}
.scrollspy-example-2 {
position: relative;
height: 350px;
overflow: auto;
}
// Helpers
.bd-example > {
.bg-primary,

View File

@ -1,16 +1,34 @@
// scss-lint:disable IdSelector, NestingDepth, SelectorDepth
// scss-lint:disable IdSelector, NestingDepth, SelectorDepth, QualifyingElement
//
// Automatically style Markdown-based tables like a Bootstrap `.table`.
//
.bd-content {
// Hack the sticky header
h2[id],
h3[id] {
&::before {
position: relative;
z-index: -1;
display: block;
height: 6rem;
margin-top: -6rem;
visibility: hidden;
content: "";
}
}
> table {
display: block;
width: 100%;
max-width: 100%;
margin-bottom: $spacer;
overflow-y: auto;
margin-bottom: 1rem;
@include media-breakpoint-down(md) {
display: block;
overflow-x: auto;
-ms-overflow-style: -ms-autohiding-scrollbar; // See https://github.com/twbs/bootstrap/pull/10057
}
// Cells
> thead,
@ -55,7 +73,7 @@
margin-bottom: .25rem;
}
@include media-breakpoint-up(sm) {
@include media-breakpoint-up(lg) {
> ul,
> ol,
> p {
@ -66,35 +84,21 @@
.bd-title {
margin-top: 1rem;
margin-bottom: 1rem;
margin-bottom: .5rem;
font-weight: 300;
@include media-breakpoint-up(sm) {
font-size: 3rem;
+ p {
max-width: 80%;
margin-bottom: 2rem;
font-size: 1.5rem;
font-weight: 300;
}
}
}
.bd-lead {
font-size: 1.125rem;
font-weight: 300;
//
// Markdown generated ToC
//
#markdown-toc {
// Hide the first child li because it's always going to be "Contents".
> li:first-child {
display: none;
}
ul {
padding-left: 2rem;
margin-top: .25rem;
margin-bottom: .25rem;
@include media-breakpoint-up(sm) {
max-width: 80%;
margin-bottom: 1rem;
font-size: 1.5rem;
}
}

View File

@ -13,7 +13,8 @@
font-weight: 500;
color: $gray;
&:hover {
&:hover,
&:focus {
color: $link-color;
}
}

View File

@ -39,7 +39,8 @@
color: $bd-yellow;
border-color: $bd-yellow;
&:hover {
&:hover,
&:focus {
color: $bd-graphite;
background-color: $bd-yellow;
border-color: $bd-yellow;

64
assets/scss/_nav.scss Normal file
View File

@ -0,0 +1,64 @@
// scss-lint:disable VendorPrefix
//
// Main navbar
//
.bd-navbar {
min-height: 4rem;
background-color: $bd-purple;
box-shadow: 0 .5rem 1rem rgba(0,0,0,.05), inset 0 -1px 0 rgba(0,0,0,.1);
@include media-breakpoint-down(md) {
.navbar-nav-scroll {
max-width: 100%;
height: 2.5rem;
margin-top: .25rem;
overflow-x: hidden;
font-size: .875rem;
.navbar-nav {
padding-bottom: 2rem;
overflow-x: auto;
white-space: nowrap;
-webkit-overflow-scrolling: touch;
}
}
}
@include media-breakpoint-up(md) {
position: -webkit-sticky;
position: sticky;
top: 0;
z-index: 1030; // over everything in bootstrap
}
.navbar-nav {
.nav-link {
padding-right: .5rem;
padding-left: .5rem;
color: $bd-purple-light;
&.active,
&:hover {
color: #fff;
background-color: transparent;
}
&.active {
font-weight: 500;
}
}
}
.navbar-nav-svg {
display: inline-block;
width: 1rem;
height: 1rem;
vertical-align: text-top;
}
.dropdown-menu {
font-size: .875rem;
}
}

View File

@ -0,0 +1,17 @@
// scss-lint:disable ImportantRule
//
// Responsive tests
//
// Responsive (scrollable) doc tables
.table-responsive .highlight pre {
white-space: normal;
}
// Utility classes table
.bd-table th small {
display: block;
font-weight: normal;
color: #999;
}

151
assets/scss/_sidebar.scss Normal file
View File

@ -0,0 +1,151 @@
// scss-lint:disable VendorPrefix
//
// Side navigation
//
.bd-toc {
@supports (position: sticky) {
position: sticky;
top: 4rem;
max-height: calc(100vh - 4rem);
}
padding-top: 1.5rem;
padding-bottom: 1.5rem;
overflow-y: auto;
font-size: .875rem;
}
.section-nav {
padding-left: 0;
border-left: 1px solid #eee;
ul {
padding-left: 1rem;
ul {
display: none;
}
}
}
.toc-entry {
display: block;
a {
display: block;
padding: .25rem 1.5rem;
color: #99979c;
&:hover {
color: $brand-primary;
text-decoration: none;
}
}
}
.bd-sidebar {
background-color: #f5f2f9;
border-bottom: 1px solid rgba(0,0,0,.1);
@include media-breakpoint-up(md) {
@supports (position: sticky) {
position: sticky;
top: 4rem;
max-height: calc(100vh - 4rem);
}
overflow-y: auto;
border-right: 1px solid rgba(0,0,0,.1);
}
@include media-breakpoint-up(xl) {
max-width: 320px;
}
}
.bd-links {
margin-right: -15px;
margin-left: -15px;
// Override collapse behaviors
@include media-breakpoint-up(md) {
display: block !important;
}
}
.bd-search {
position: relative; // To contain the Algolia search
padding-top: 1rem;
padding-bottom: 1rem;
.form-control:focus {
border-color: $bd-purple-bright;
box-shadow: 0 0 0 3px rgba($bd-purple-bright, .25);
}
}
.bd-search-docs-toggle {
line-height: 1;
color: $gray-dark;
}
.bd-sidenav {
display: none;
}
.bd-toc-link {
display: block;
padding: .75rem 1.5rem;
font-weight: 500;
color: $gray;
&:hover {
color: $brand-primary;
text-decoration: none;
background-color: rgba(0,0,0,.01);
}
}
.bd-toc-item {
border-bottom: 1px solid rgba(0,0,0,.05);
&:first-child {
border-top: 1px solid rgba(0,0,0,.05);
}
&.active {
> .bd-toc-link {
color: $gray-dark;
&:hover {
background-color: transparent;
}
}
> .bd-sidenav {
display: block;
padding-bottom: .75rem;
}
}
}
// All levels of nav
.bd-sidebar .nav > li > a {
display: block;
padding: .25rem 1.5rem;
font-size: 90%;
color: rgba(0,0,0,.65);
}
.bd-sidebar .nav > li > a:hover {
color: $brand-primary;
text-decoration: none;
background-color: transparent;
}
.bd-sidebar .nav > .active > a,
.bd-sidebar .nav > .active:hover > a {
font-weight: 500;
color: $gray-dark;
background-color: transparent;
}

View File

@ -6,8 +6,12 @@
color: #555;
}
.team-member:hover {
.team-member:hover,
.team-member:focus {
color: #333;
}
.team-member:hover {
text-decoration: none;
}

View File

@ -0,0 +1,11 @@
// Local docs variables
$bd-purple: #563d7c;
$bd-purple-bright: lighten(saturate($bd-purple, 5%), 15%);
$bd-purple-light: #cdbfe3;
$bd-purple-lightest: #f5f2f9;
$bd-graphite: #2a2730;
$bd-graphite-light: lighten($bd-graphite, 40%);
$bd-yellow: #ffe484;
$bd-danger: #d9534f;
$bd-warning: #f0ad4e;
$bd-info: #5bc0de;

View File

@ -24,22 +24,11 @@
// Happy Bootstrapping!
// Load Bootstrap variables and mixins
@import "../../../scss/variables";
@import "../../../scss/mixins";
// Local docs variables
$bd-purple: #563d7c;
$bd-purple-bright: lighten(saturate($bd-purple, 5%), 15%);
$bd-purple-light: #cdbfe3;
$bd-graphite: #2a2730;
$bd-graphite-light: lighten($bd-graphite, 40%);
$bd-yellow: #ffe484;
$bd-danger: #d9534f;
$bd-warning: #f0ad4e;
$bd-info: #5bc0de;
@import "../../scss/variables";
@import "../../scss/mixins";
// Load docs components
@import "booticon";
@import "variables";
@import "nav";
@import "masthead";
@import "featurettes";
@ -63,3 +52,4 @@ $bd-info: #5bc0de;
// Load docs dependencies
@import "syntax";
@import "anchor";
@import "algolia";

View File

@ -20,16 +20,18 @@
],
"ignore": [
"/.*",
"_config.yml",
"CNAME",
"composer.json",
"CONTRIBUTING.md",
"/_*",
"about",
"assets",
"docs",
"js/tests",
"test-infra"
"nuget",
"CNAME",
"composer.json",
"Gruntfile.js"
],
"dependencies": {
"jquery": ">=1.9.1",
"tether": "^1.4.0"
"popper.js": "^1.9.9"
}
}

19
build/.htmllintrc Normal file
View File

@ -0,0 +1,19 @@
{
"attr-bans": ["align", "background", "bgcolor", "border", "frameborder", "longdesc", "marginwidth", "marginheight", "scrolling"],
"attr-name-style": "dash",
"attr-no-unsafe-char": false,
"class-style": "dash",
"doctype-first": true,
"doctype-html5": true,
"fig-req-figcaption": false,
"html-valid-content-model": false,
"id-class-ignore-regex": "(onclick|content|[a-z]+([A-Z][a-z])+)",
"id-class-style": "dash",
"img-req-src": false,
"img-req-alt": false,
"indent-style": "spaces",
"indent-width": 2,
"spec-char-escape": false,
"tag-bans": ["b", "i"],
"title-max-len": false
}

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