Switch to Hugo.
No more Ruby dependency and most important more than 10 times less build time (at least on Windows)!
2
.github/CONTRIBUTING.md
vendored
@ -140,7 +140,7 @@ and/or [`/bootstrap/js/src/`](https://github.com/twbs/bootstrap/tree/master/js/s
|
||||
|
||||
Similarly, when contributing to Bootstrap's documentation, you should edit the
|
||||
documentation source files in
|
||||
[the `/bootstrap/site/docs/` directory of the `master` branch](https://github.com/twbs/bootstrap/tree/master/site/docs).
|
||||
[the `/bootstrap/site/content/docs/` directory of the `master` branch](https://github.com/twbs/bootstrap/tree/master/site/content/docs).
|
||||
**Do not edit the `gh-pages` branch.** That branch is generated from the
|
||||
documentation source files and is managed separately by the Bootstrap Core Team.
|
||||
|
||||
|
9
.gitignore
vendored
@ -1,12 +1,7 @@
|
||||
# Ignore docs files
|
||||
/_gh_pages/
|
||||
/site/.jekyll-metadata
|
||||
/site/docs/**/dist/
|
||||
|
||||
# Ignore ruby/bundler files
|
||||
/.bundle/
|
||||
/vendor/
|
||||
/.ruby-version
|
||||
/site/static/**/dist/
|
||||
/resources/
|
||||
|
||||
# Numerous always-ignore extensions
|
||||
*.diff
|
||||
|
@ -6,9 +6,6 @@ git:
|
||||
node_js:
|
||||
- "8"
|
||||
- "10"
|
||||
install:
|
||||
- bundle install --deployment --jobs=3 --retry=3 --clean
|
||||
- npm ci
|
||||
before_script:
|
||||
- google-chrome-stable --product-version
|
||||
script:
|
||||
@ -20,6 +17,5 @@ after_success:
|
||||
cache:
|
||||
directories:
|
||||
- "$HOME/.npm"
|
||||
- vendor/bundle
|
||||
notifications:
|
||||
email: false
|
||||
|
9
Gemfile
@ -1,9 +0,0 @@
|
||||
source 'https://rubygems.org'
|
||||
|
||||
group :development, :test do
|
||||
gem 'jekyll', '~> 3.8.5'
|
||||
gem 'jekyll-redirect-from', '~> 0.14.0'
|
||||
gem 'jekyll-sitemap', '~> 1.2.0'
|
||||
gem 'jekyll-toc', '~> 0.9.1'
|
||||
gem 'wdm', '~> 0.1.1', :install_if => Gem.win_platform?
|
||||
end
|
82
Gemfile.lock
@ -1,82 +0,0 @@
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
addressable (2.6.0)
|
||||
public_suffix (>= 2.0.2, < 4.0)
|
||||
colorator (1.1.0)
|
||||
concurrent-ruby (1.1.4)
|
||||
em-websocket (0.5.1)
|
||||
eventmachine (>= 0.12.9)
|
||||
http_parser.rb (~> 0.6.0)
|
||||
eventmachine (1.2.7)
|
||||
eventmachine (1.2.7-x64-mingw32)
|
||||
ffi (1.10.0)
|
||||
ffi (1.10.0-x64-mingw32)
|
||||
forwardable-extended (2.6.0)
|
||||
http_parser.rb (0.6.0)
|
||||
i18n (0.9.5)
|
||||
concurrent-ruby (~> 1.0)
|
||||
jekyll (3.8.5)
|
||||
addressable (~> 2.4)
|
||||
colorator (~> 1.0)
|
||||
em-websocket (~> 0.5)
|
||||
i18n (~> 0.7)
|
||||
jekyll-sass-converter (~> 1.0)
|
||||
jekyll-watch (~> 2.0)
|
||||
kramdown (~> 1.14)
|
||||
liquid (~> 4.0)
|
||||
mercenary (~> 0.3.3)
|
||||
pathutil (~> 0.9)
|
||||
rouge (>= 1.7, < 4)
|
||||
safe_yaml (~> 1.0)
|
||||
jekyll-redirect-from (0.14.0)
|
||||
jekyll (~> 3.3)
|
||||
jekyll-sass-converter (1.5.2)
|
||||
sass (~> 3.4)
|
||||
jekyll-sitemap (1.2.0)
|
||||
jekyll (~> 3.3)
|
||||
jekyll-toc (0.9.1)
|
||||
nokogiri (~> 1.8)
|
||||
jekyll-watch (2.1.2)
|
||||
listen (~> 3.0)
|
||||
kramdown (1.17.0)
|
||||
liquid (4.0.1)
|
||||
listen (3.1.5)
|
||||
rb-fsevent (~> 0.9, >= 0.9.4)
|
||||
rb-inotify (~> 0.9, >= 0.9.7)
|
||||
ruby_dep (~> 1.2)
|
||||
mercenary (0.3.6)
|
||||
mini_portile2 (2.4.0)
|
||||
nokogiri (1.10.1)
|
||||
mini_portile2 (~> 2.4.0)
|
||||
nokogiri (1.10.1-x64-mingw32)
|
||||
mini_portile2 (~> 2.4.0)
|
||||
pathutil (0.16.2)
|
||||
forwardable-extended (~> 2.6)
|
||||
public_suffix (3.0.3)
|
||||
rb-fsevent (0.10.3)
|
||||
rb-inotify (0.10.0)
|
||||
ffi (~> 1.0)
|
||||
rouge (3.3.0)
|
||||
ruby_dep (1.5.0)
|
||||
safe_yaml (1.0.5)
|
||||
sass (3.7.3)
|
||||
sass-listen (~> 4.0.0)
|
||||
sass-listen (4.0.0)
|
||||
rb-fsevent (~> 0.9, >= 0.9.4)
|
||||
rb-inotify (~> 0.9, >= 0.9.7)
|
||||
wdm (0.1.1)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
x64-mingw32
|
||||
|
||||
DEPENDENCIES
|
||||
jekyll (~> 3.8.5)
|
||||
jekyll-redirect-from (~> 0.14.0)
|
||||
jekyll-sitemap (~> 1.2.0)
|
||||
jekyll-toc (~> 0.9.1)
|
||||
wdm (~> 0.1.1)
|
||||
|
||||
BUNDLED WITH
|
||||
1.17.3
|
14
README.md
@ -111,18 +111,18 @@ Have a bug or a feature request? Please first read the [issue guidelines](https:
|
||||
|
||||
## Documentation
|
||||
|
||||
Bootstrap's documentation, included in this repo in the root directory, is built with [Jekyll](https://jekyllrb.com/) and publicly hosted on GitHub Pages at <https://getbootstrap.com/>. The docs may also be run locally.
|
||||
Bootstrap's documentation, included in this repo in the root directory, is built with [Hugo](https://gohugo.io/) and publicly hosted on GitHub Pages at <https://getbootstrap.com/>. The docs may also be run locally.
|
||||
|
||||
Documentation search is powered by [Algolia's DocSearch](https://community.algolia.com/docsearch/). Working on our search? Be sure to set `debug: true` in `site/docs/4.3/assets/js/src/search.js` file.
|
||||
Documentation search is powered by [Algolia's DocSearch](https://community.algolia.com/docsearch/). Working on our search? Be sure to set `debug: true` in `site/static/docs/4.3/assets/js/src/search.js` file.
|
||||
|
||||
### Running documentation locally
|
||||
|
||||
1. Run through the [tooling setup](https://getbootstrap.com/docs/4.3/getting-started/build-tools/#tooling-setup) to install Jekyll (the site builder) and other Ruby dependencies with `bundle install`.
|
||||
2. Run `npm install` to install Node.js dependencies.
|
||||
3. Run `npm start` to compile CSS and JavaScript files, generate our docs, and watch for changes.
|
||||
4. Open `http://localhost:9001` in your browser, and voilà.
|
||||
1. Run `npm install` to install the Node.js dependencies, including Hugo (the site builder).
|
||||
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 `npm run docs-serve` in the command line.
|
||||
4. Open `http://localhost:9001/` in your browser, and voilà.
|
||||
|
||||
Learn more about using Jekyll by reading its [documentation](https://jekyllrb.com/docs/).
|
||||
Learn more about using Hugo by reading its [documentation](https://gohugo.io/documentation/).
|
||||
|
||||
### Documentation for previous releases
|
||||
|
||||
|
66
_config.yml
@ -1,66 +0,0 @@
|
||||
# Dependencies
|
||||
markdown: kramdown
|
||||
highlighter: rouge
|
||||
|
||||
kramdown:
|
||||
auto_ids: true
|
||||
|
||||
# Permalinks
|
||||
permalink: pretty
|
||||
|
||||
# Server
|
||||
source: "site"
|
||||
destination: ./_gh_pages
|
||||
host: "localhost"
|
||||
port: 9001
|
||||
baseurl: ""
|
||||
url: "https://getbootstrap.com"
|
||||
encoding: UTF-8
|
||||
exclude:
|
||||
- docs/4.3/assets/scss/
|
||||
|
||||
plugins:
|
||||
- jekyll-redirect-from
|
||||
- jekyll-sitemap
|
||||
- jekyll-toc
|
||||
|
||||
# Social
|
||||
title: Bootstrap
|
||||
description: "The most popular HTML, CSS, and JS library in the world."
|
||||
twitter: getbootstrap
|
||||
authors: "Mark Otto, Jacob Thornton, and Bootstrap contributors"
|
||||
social_image_path: /docs/4.3/assets/brand/bootstrap-social.png
|
||||
social_logo_path: /docs/4.3/assets/brand/bootstrap-social-logo.png
|
||||
|
||||
# Custom variables
|
||||
current_version: 4.3.1
|
||||
current_ruby_version: 4.3.1
|
||||
docs_version: 4.3
|
||||
repo: "https://github.com/twbs/bootstrap"
|
||||
slack: "https://bootstrap-slack.herokuapp.com"
|
||||
opencollective: "https://opencollective.com/bootstrap"
|
||||
blog: "https://blog.getbootstrap.com"
|
||||
expo: "https://expo.getbootstrap.com"
|
||||
themes: "https://themes.getbootstrap.com"
|
||||
|
||||
download:
|
||||
source: "https://github.com/twbs/bootstrap/archive/v4.3.1.zip"
|
||||
dist: "https://github.com/twbs/bootstrap/releases/download/v4.3.1/bootstrap-4.3.1-dist.zip"
|
||||
|
||||
cdn:
|
||||
# See https://www.srihash.org for info on how to generate the hashes
|
||||
css: "https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
|
||||
css_hash: "sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T"
|
||||
js: "https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"
|
||||
js_hash: "sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM"
|
||||
js_bundle: "https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.bundle.min.js"
|
||||
js_bundle_hash: "sha384-xrRywqdh3PHs8keKZN+8zzc5TX0GRTLCcmivcbNJWm2rs5C8PRhcEn3czEjhAO9o"
|
||||
popper: "https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
|
||||
popper_hash: "sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1"
|
||||
|
||||
toc:
|
||||
min_level: 2
|
||||
max_level: 4
|
||||
no_toc_section_class:
|
||||
- "bd-callout"
|
||||
- "bd-example"
|
@ -19,11 +19,11 @@ const sh = require('shelljs')
|
||||
|
||||
sh.config.fatal = true
|
||||
|
||||
const configFile = path.join(__dirname, '../_config.yml')
|
||||
const configFile = path.join(__dirname, '../config.yml')
|
||||
|
||||
// Array of objects which holds the files to generate SRI hashes for.
|
||||
// `file` is the path from the root folder
|
||||
// `configPropertyName` is the _config.yml variable's name of the file
|
||||
// `configPropertyName` is the config.yml variable's name of the file
|
||||
const files = [
|
||||
{
|
||||
file: 'dist/css/bootstrap.min.css',
|
||||
|
55
config.yml
Normal file
@ -0,0 +1,55 @@
|
||||
languageCode: "en"
|
||||
title: "Bootstrap"
|
||||
baseURL: "https://getbootstrap.com"
|
||||
enableInlineShortcodes: true
|
||||
|
||||
pygmentsUseClasses: true
|
||||
# you can use ```lang if you want too
|
||||
pygmentsCodeFences: true
|
||||
|
||||
buildDrafts: true
|
||||
buildFuture: true
|
||||
|
||||
enableRobotsTXT: true
|
||||
metaDataFormat: "yaml"
|
||||
disableKinds: ["404", "taxonomy", "taxonomyTerm", "RSS"]
|
||||
|
||||
publishDir: "_gh_pages"
|
||||
archetypeDir: "site/archetypes"
|
||||
assetDir: "site/assets"
|
||||
contentDir: "site/content"
|
||||
dataDir: "site/data"
|
||||
layoutDir: "site/layouts"
|
||||
staticDir: "site/static"
|
||||
themesDir: "site/themes"
|
||||
|
||||
params:
|
||||
description: "The most popular HTML, CSS, and JS library in the world."
|
||||
authors: "Mark Otto, Jacob Thornton, and Bootstrap contributors"
|
||||
social_image_path: /docs/4.3/assets/brand/bootstrap-social.png
|
||||
social_logo_path: /docs/4.3/assets/brand/bootstrap-social-logo.png
|
||||
|
||||
current_version: "4.3.1"
|
||||
current_ruby_version: "4.3.1"
|
||||
docs_version: "4.3"
|
||||
repo: "https://github.com/twbs/bootstrap"
|
||||
twitter: "getbootstrap"
|
||||
slack: "https://bootstrap-slack.herokuapp.com"
|
||||
blog: "https://blog.getbootstrap.com"
|
||||
expo: "https://expo.getbootstrap.com"
|
||||
themes: "https://themes.getbootstrap.com"
|
||||
|
||||
download:
|
||||
source: "https://github.com/twbs/bootstrap/archive/v4.3.1.zip"
|
||||
dist: "https://github.com/twbs/bootstrap/releases/download/v4.3.1/bootstrap-4.3.1-dist.zip"
|
||||
|
||||
cdn:
|
||||
# See https://www.srihash.org for info on how to generate the hashes
|
||||
css: "https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
|
||||
css_hash: "sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T"
|
||||
js: "https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"
|
||||
js_hash: "sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM"
|
||||
js_bundle: "https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.bundle.min.js"
|
||||
js_bundle_hash: "sha384-xrRywqdh3PHs8keKZN+8zzc5TX0GRTLCcmivcbNJWm2rs5C8PRhcEn3czEjhAO9o"
|
||||
popper: "https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
|
||||
popper_hash: "sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1"
|
1005
package-lock.json
generated
@ -792,6 +792,12 @@
|
||||
"integrity": "sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==",
|
||||
"dev": true
|
||||
},
|
||||
"@sindresorhus/is": {
|
||||
"version": "0.7.0",
|
||||
"resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.7.0.tgz",
|
||||
"integrity": "sha512-ONhaKPIufzzrlNbqtWFFd+jlnemX6lJAgq9ZeiZtS7I1PIf/la7CW4m83rTXRnVnsMbW2k56pGYu7AUFJD9Pow==",
|
||||
"dev": true
|
||||
},
|
||||
"@sinonjs/commons": {
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.3.1.tgz",
|
||||
@ -1003,6 +1009,29 @@
|
||||
"integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==",
|
||||
"dev": true
|
||||
},
|
||||
"arch": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/arch/-/arch-2.1.1.tgz",
|
||||
"integrity": "sha512-BLM56aPo9vLLFVa8+/+pJLnrZ7QGGTVHWsCwieAWT9o9K8UeGaQbzZbGoabWLOo2ksBCztoXdqBZBplqLDDCSg==",
|
||||
"dev": true
|
||||
},
|
||||
"archive-type": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/archive-type/-/archive-type-4.0.0.tgz",
|
||||
"integrity": "sha1-+S5yIzBW38aWlHJ0nCZ72wRrHXA=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"file-type": "^4.2.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"file-type": {
|
||||
"version": "4.4.0",
|
||||
"resolved": "https://registry.npmjs.org/file-type/-/file-type-4.4.0.tgz",
|
||||
"integrity": "sha1-G2AOX8ofvcboDApwxxyNul95BsU=",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"are-we-there-yet": {
|
||||
"version": "1.1.5",
|
||||
"resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz",
|
||||
@ -1338,6 +1367,12 @@
|
||||
"integrity": "sha1-c5JncZI7Whl0etZmqlzUv5xunOg=",
|
||||
"dev": true
|
||||
},
|
||||
"base64-js": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz",
|
||||
"integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==",
|
||||
"dev": true
|
||||
},
|
||||
"base64id": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/base64id/-/base64id-1.0.0.tgz",
|
||||
@ -1368,6 +1403,91 @@
|
||||
"integrity": "sha512-3UQFKcRMx+5Z+IK5vYTMYK2jzLRJkt+XqyDdacgWgtMjjuifKpKTFneJLEgeBElOE2/lXZ1LcMcb5s8pwG2U8Q==",
|
||||
"dev": true
|
||||
},
|
||||
"bin-check": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/bin-check/-/bin-check-4.1.0.tgz",
|
||||
"integrity": "sha512-b6weQyEUKsDGFlACWSIOfveEnImkJyK/FGW6FAG42loyoquvjdtOIqO6yBFzHyqyVVhNgNkQxxx09SFLK28YnA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"execa": "^0.7.0",
|
||||
"executable": "^4.1.0"
|
||||
}
|
||||
},
|
||||
"bin-version": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/bin-version/-/bin-version-3.0.0.tgz",
|
||||
"integrity": "sha512-Ekhwm6AUiMbZ1LgVCNMkgjovpMR30FyQN74laAW9gs0NPjZR5gdY0ARNB0YsQG8GOme3CsHbxmeyq/7Ofq6QYQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"execa": "^1.0.0",
|
||||
"find-versions": "^3.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"execa": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz",
|
||||
"integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"cross-spawn": "^6.0.0",
|
||||
"get-stream": "^4.0.0",
|
||||
"is-stream": "^1.1.0",
|
||||
"npm-run-path": "^2.0.0",
|
||||
"p-finally": "^1.0.0",
|
||||
"signal-exit": "^3.0.0",
|
||||
"strip-eof": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"get-stream": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz",
|
||||
"integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"pump": "^3.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"bin-version-check": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/bin-version-check/-/bin-version-check-4.0.0.tgz",
|
||||
"integrity": "sha512-sR631OrhC+1f8Cvs8WyVWOA33Y8tgwjETNPyyD/myRBXLkfS/vl74FmH/lFcRl9KY3zwGh7jFhvyk9vV3/3ilQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"bin-version": "^3.0.0",
|
||||
"semver": "^5.6.0",
|
||||
"semver-truncate": "^1.1.2"
|
||||
}
|
||||
},
|
||||
"bin-wrapper": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/bin-wrapper/-/bin-wrapper-4.1.0.tgz",
|
||||
"integrity": "sha512-hfRmo7hWIXPkbpi0ZltboCMVrU+0ClXR/JgbCKKjlDjQf6igXa7OwdqNcFWQZPZTgiY7ZpzE3+LjjkLiTN2T7Q==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"bin-check": "^4.1.0",
|
||||
"bin-version-check": "^4.0.0",
|
||||
"download": "^7.1.0",
|
||||
"import-lazy": "^3.1.0",
|
||||
"os-filter-obj": "^2.0.0",
|
||||
"pify": "^4.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"import-lazy": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-3.1.0.tgz",
|
||||
"integrity": "sha512-8/gvXvX2JMn0F+CDlSC4l6kOmVaLOO3XLkksI7CI3Ud95KDYJuYur2b9P/PUt/i/pDAMd/DulQsNbbbmRRsDIQ==",
|
||||
"dev": true
|
||||
},
|
||||
"pify": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz",
|
||||
"integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"binary": {
|
||||
"version": "0.3.0",
|
||||
"resolved": "https://registry.npmjs.org/binary/-/binary-0.3.0.tgz",
|
||||
@ -1384,6 +1504,16 @@
|
||||
"integrity": "sha512-EgmjVLMn22z7eGGv3kcnHwSnJXmFHjISTY9E/S5lIcTD3Oxw05QTcBLNkJFzcb3cNueUdF/IN4U+d78V0zO8Hw==",
|
||||
"dev": true
|
||||
},
|
||||
"bl": {
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/bl/-/bl-1.2.2.tgz",
|
||||
"integrity": "sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"readable-stream": "^2.3.5",
|
||||
"safe-buffer": "^5.1.1"
|
||||
}
|
||||
},
|
||||
"blob": {
|
||||
"version": "0.0.5",
|
||||
"resolved": "https://registry.npmjs.org/blob/-/blob-0.0.5.tgz",
|
||||
@ -1530,6 +1660,16 @@
|
||||
"unzipper": "^0.9.3"
|
||||
}
|
||||
},
|
||||
"buffer": {
|
||||
"version": "5.2.1",
|
||||
"resolved": "https://registry.npmjs.org/buffer/-/buffer-5.2.1.tgz",
|
||||
"integrity": "sha512-c+Ko0loDaFfuPWiL02ls9Xd3GO3cPVmUobQ6t3rXNUk304u6hGq+8N/kFi+QEIKhzK3uwolVhLzszmfLmMLnqg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"base64-js": "^1.0.2",
|
||||
"ieee754": "^1.1.4"
|
||||
}
|
||||
},
|
||||
"buffer-alloc": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz",
|
||||
@ -1546,6 +1686,12 @@
|
||||
"integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==",
|
||||
"dev": true
|
||||
},
|
||||
"buffer-crc32": {
|
||||
"version": "0.2.13",
|
||||
"resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz",
|
||||
"integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=",
|
||||
"dev": true
|
||||
},
|
||||
"buffer-fill": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz",
|
||||
@ -1719,6 +1865,29 @@
|
||||
"unset-value": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"cacheable-request": {
|
||||
"version": "2.1.4",
|
||||
"resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-2.1.4.tgz",
|
||||
"integrity": "sha1-DYCIAbY0KtM8kd+dC0TcCbkeXD0=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"clone-response": "1.0.2",
|
||||
"get-stream": "3.0.0",
|
||||
"http-cache-semantics": "3.8.1",
|
||||
"keyv": "3.0.0",
|
||||
"lowercase-keys": "1.0.0",
|
||||
"normalize-url": "2.0.1",
|
||||
"responselike": "1.0.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"lowercase-keys": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.0.tgz",
|
||||
"integrity": "sha1-TjNms55/VFfjXxMkvfb4jQv8cwY=",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"call-me-maybe": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz",
|
||||
@ -1798,6 +1967,18 @@
|
||||
"integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=",
|
||||
"dev": true
|
||||
},
|
||||
"caw": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/caw/-/caw-2.0.1.tgz",
|
||||
"integrity": "sha512-Cg8/ZSBEa8ZVY9HspcGUYaK63d/bN7rqS3CYCzEGUxuYv6UlmcjzDUz2fCFFHyTvUW5Pk0I+3hkA3iXlIj6guA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"get-proxy": "^2.0.0",
|
||||
"isurl": "^1.0.0-alpha5",
|
||||
"tunnel-agent": "^0.6.0",
|
||||
"url-to-options": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"ccount": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/ccount/-/ccount-1.0.3.tgz",
|
||||
@ -2036,6 +2217,15 @@
|
||||
"is-supported-regexp-flag": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"clone-response": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz",
|
||||
"integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"mimic-response": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"code-point-at": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
|
||||
@ -2124,6 +2314,16 @@
|
||||
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
|
||||
"dev": true
|
||||
},
|
||||
"config-chain": {
|
||||
"version": "1.1.12",
|
||||
"resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.12.tgz",
|
||||
"integrity": "sha512-a1eOIcu8+7lUInge4Rpf/n4Krkf3Dd9lqhljRzII1/Zno/kRtUWnznPO3jOKBmTEktkt3fkxisUcivoj0ebzoA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ini": "^1.3.4",
|
||||
"proto-list": "~1.2.1"
|
||||
}
|
||||
},
|
||||
"configstore": {
|
||||
"version": "3.1.2",
|
||||
"resolved": "https://registry.npmjs.org/configstore/-/configstore-3.1.2.tgz",
|
||||
@ -2162,6 +2362,15 @@
|
||||
"integrity": "sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=",
|
||||
"dev": true
|
||||
},
|
||||
"content-disposition": {
|
||||
"version": "0.5.3",
|
||||
"resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz",
|
||||
"integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"safe-buffer": "5.1.2"
|
||||
}
|
||||
},
|
||||
"content-type": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz",
|
||||
@ -2201,6 +2410,12 @@
|
||||
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
|
||||
"dev": true
|
||||
},
|
||||
"corser": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/corser/-/corser-2.0.1.tgz",
|
||||
"integrity": "sha1-jtolLsqrWEDc2XXOuQ2TcMgZ/4c=",
|
||||
"dev": true
|
||||
},
|
||||
"cosmiconfig": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-4.0.0.tgz",
|
||||
@ -2366,6 +2581,134 @@
|
||||
"integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=",
|
||||
"dev": true
|
||||
},
|
||||
"decompress": {
|
||||
"version": "4.2.0",
|
||||
"resolved": "https://registry.npmjs.org/decompress/-/decompress-4.2.0.tgz",
|
||||
"integrity": "sha1-eu3YVCflqS2s/lVnSnxQXpbQH50=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"decompress-tar": "^4.0.0",
|
||||
"decompress-tarbz2": "^4.0.0",
|
||||
"decompress-targz": "^4.0.0",
|
||||
"decompress-unzip": "^4.0.1",
|
||||
"graceful-fs": "^4.1.10",
|
||||
"make-dir": "^1.0.0",
|
||||
"pify": "^2.3.0",
|
||||
"strip-dirs": "^2.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"pify": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
|
||||
"integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"decompress-response": {
|
||||
"version": "3.3.0",
|
||||
"resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz",
|
||||
"integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"mimic-response": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"decompress-tar": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/decompress-tar/-/decompress-tar-4.1.1.tgz",
|
||||
"integrity": "sha512-JdJMaCrGpB5fESVyxwpCx4Jdj2AagLmv3y58Qy4GE6HMVjWz1FeVQk1Ct4Kye7PftcdOo/7U7UKzYBJgqnGeUQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"file-type": "^5.2.0",
|
||||
"is-stream": "^1.1.0",
|
||||
"tar-stream": "^1.5.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"file-type": {
|
||||
"version": "5.2.0",
|
||||
"resolved": "https://registry.npmjs.org/file-type/-/file-type-5.2.0.tgz",
|
||||
"integrity": "sha1-LdvqfHP/42No365J3DOMBYwritY=",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"decompress-tarbz2": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/decompress-tarbz2/-/decompress-tarbz2-4.1.1.tgz",
|
||||
"integrity": "sha512-s88xLzf1r81ICXLAVQVzaN6ZmX4A6U4z2nMbOwobxkLoIIfjVMBg7TeguTUXkKeXni795B6y5rnvDw7rxhAq9A==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"decompress-tar": "^4.1.0",
|
||||
"file-type": "^6.1.0",
|
||||
"is-stream": "^1.1.0",
|
||||
"seek-bzip": "^1.0.5",
|
||||
"unbzip2-stream": "^1.0.9"
|
||||
},
|
||||
"dependencies": {
|
||||
"file-type": {
|
||||
"version": "6.2.0",
|
||||
"resolved": "https://registry.npmjs.org/file-type/-/file-type-6.2.0.tgz",
|
||||
"integrity": "sha512-YPcTBDV+2Tm0VqjybVd32MHdlEGAtuxS3VAYsumFokDSMG+ROT5wawGlnHDoz7bfMcMDt9hxuXvXwoKUx2fkOg==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"decompress-targz": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/decompress-targz/-/decompress-targz-4.1.1.tgz",
|
||||
"integrity": "sha512-4z81Znfr6chWnRDNfFNqLwPvm4db3WuZkqV+UgXQzSngG3CEKdBkw5jrv3axjjL96glyiiKjsxJG3X6WBZwX3w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"decompress-tar": "^4.1.1",
|
||||
"file-type": "^5.2.0",
|
||||
"is-stream": "^1.1.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"file-type": {
|
||||
"version": "5.2.0",
|
||||
"resolved": "https://registry.npmjs.org/file-type/-/file-type-5.2.0.tgz",
|
||||
"integrity": "sha1-LdvqfHP/42No365J3DOMBYwritY=",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"decompress-unzip": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/decompress-unzip/-/decompress-unzip-4.0.1.tgz",
|
||||
"integrity": "sha1-3qrM39FK6vhVePczroIQ+bSEj2k=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"file-type": "^3.8.0",
|
||||
"get-stream": "^2.2.0",
|
||||
"pify": "^2.3.0",
|
||||
"yauzl": "^2.4.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"file-type": {
|
||||
"version": "3.9.0",
|
||||
"resolved": "https://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz",
|
||||
"integrity": "sha1-JXoHg4TR24CHvESdEH1SpSZyuek=",
|
||||
"dev": true
|
||||
},
|
||||
"get-stream": {
|
||||
"version": "2.3.1",
|
||||
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-2.3.1.tgz",
|
||||
"integrity": "sha1-Xzj5PzRgCWZu4BUKBUFn+Rvdld4=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"object-assign": "^4.0.1",
|
||||
"pinkie-promise": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"pify": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
|
||||
"integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"deep-extend": {
|
||||
"version": "0.6.0",
|
||||
"resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz",
|
||||
@ -2556,6 +2899,68 @@
|
||||
"is-obj": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"download": {
|
||||
"version": "7.1.0",
|
||||
"resolved": "https://registry.npmjs.org/download/-/download-7.1.0.tgz",
|
||||
"integrity": "sha512-xqnBTVd/E+GxJVrX5/eUJiLYjCGPwMpdL+jGhGU57BvtcA7wwhtHVbXBeUk51kOpW3S7Jn3BQbN9Q1R1Km2qDQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"archive-type": "^4.0.0",
|
||||
"caw": "^2.0.1",
|
||||
"content-disposition": "^0.5.2",
|
||||
"decompress": "^4.2.0",
|
||||
"ext-name": "^5.0.0",
|
||||
"file-type": "^8.1.0",
|
||||
"filenamify": "^2.0.0",
|
||||
"get-stream": "^3.0.0",
|
||||
"got": "^8.3.1",
|
||||
"make-dir": "^1.2.0",
|
||||
"p-event": "^2.1.0",
|
||||
"pify": "^3.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"got": {
|
||||
"version": "8.3.2",
|
||||
"resolved": "https://registry.npmjs.org/got/-/got-8.3.2.tgz",
|
||||
"integrity": "sha512-qjUJ5U/hawxosMryILofZCkm3C84PLJS/0grRIpjAwu+Lkxxj5cxeCU25BG0/3mDSpXKTyZr8oh8wIgLaH0QCw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@sindresorhus/is": "^0.7.0",
|
||||
"cacheable-request": "^2.1.1",
|
||||
"decompress-response": "^3.3.0",
|
||||
"duplexer3": "^0.1.4",
|
||||
"get-stream": "^3.0.0",
|
||||
"into-stream": "^3.1.0",
|
||||
"is-retry-allowed": "^1.1.0",
|
||||
"isurl": "^1.0.0-alpha5",
|
||||
"lowercase-keys": "^1.0.0",
|
||||
"mimic-response": "^1.0.0",
|
||||
"p-cancelable": "^0.4.0",
|
||||
"p-timeout": "^2.0.1",
|
||||
"pify": "^3.0.0",
|
||||
"safe-buffer": "^5.1.1",
|
||||
"timed-out": "^4.0.1",
|
||||
"url-parse-lax": "^3.0.0",
|
||||
"url-to-options": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"prepend-http": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz",
|
||||
"integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=",
|
||||
"dev": true
|
||||
},
|
||||
"url-parse-lax": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz",
|
||||
"integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"prepend-http": "^2.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"duplexer": {
|
||||
"version": "0.1.1",
|
||||
"resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz",
|
||||
@ -3268,6 +3673,23 @@
|
||||
"clone-regexp": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"executable": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/executable/-/executable-4.1.1.tgz",
|
||||
"integrity": "sha512-8iA79xD3uAch729dUG8xaaBBFGaEa0wdD2VkYLFHwlqosEj/jT66AzcreRDSgV7ehnNLBW2WR5jIXwGKjVdTLg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"pify": "^2.2.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"pify": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
|
||||
"integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"expand-brackets": {
|
||||
"version": "2.1.4",
|
||||
"resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz",
|
||||
@ -3303,6 +3725,25 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"ext-list": {
|
||||
"version": "2.2.2",
|
||||
"resolved": "https://registry.npmjs.org/ext-list/-/ext-list-2.2.2.tgz",
|
||||
"integrity": "sha512-u+SQgsubraE6zItfVA0tBuCBhfU9ogSRnsvygI7wht9TS510oLkBRXBsqopeUG/GBOIQyKZO9wjTqIu/sf5zFA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"mime-db": "^1.28.0"
|
||||
}
|
||||
},
|
||||
"ext-name": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/ext-name/-/ext-name-5.0.0.tgz",
|
||||
"integrity": "sha512-yblEwXAbGv1VQDmow7s38W77hzAgJAO50ztBLMcUyUBfxv1HC+LGwtiEN+Co6LtlqT/5uwVOxsD4TNIilWhwdQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ext-list": "^2.0.0",
|
||||
"sort-keys-length": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"extend": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
|
||||
@ -3444,6 +3885,15 @@
|
||||
"integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=",
|
||||
"dev": true
|
||||
},
|
||||
"fd-slicer": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz",
|
||||
"integrity": "sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"pend": "~1.2.0"
|
||||
}
|
||||
},
|
||||
"figures": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz",
|
||||
@ -3462,6 +3912,29 @@
|
||||
"flat-cache": "^2.0.1"
|
||||
}
|
||||
},
|
||||
"file-type": {
|
||||
"version": "8.1.0",
|
||||
"resolved": "https://registry.npmjs.org/file-type/-/file-type-8.1.0.tgz",
|
||||
"integrity": "sha512-qyQ0pzAy78gVoJsmYeNgl8uH8yKhr1lVhW7JbzJmnlRi0I4R2eEDEJZVKG8agpDnLpacwNbDhLNG/LMdxHD2YQ==",
|
||||
"dev": true
|
||||
},
|
||||
"filename-reserved-regex": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/filename-reserved-regex/-/filename-reserved-regex-2.0.0.tgz",
|
||||
"integrity": "sha1-q/c9+rc10EVECr/qLZHzieu/oik=",
|
||||
"dev": true
|
||||
},
|
||||
"filenamify": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/filenamify/-/filenamify-2.1.0.tgz",
|
||||
"integrity": "sha512-ICw7NTT6RsDp2rnYKVd8Fu4cr6ITzGy3+u4vUujPkabyaz+03F24NWEX7fs5fp+kBonlaqPH8fAO2NM+SXt/JA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"filename-reserved-regex": "^2.0.0",
|
||||
"strip-outer": "^1.0.0",
|
||||
"trim-repeated": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"fileset": {
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/fileset/-/fileset-2.0.3.tgz",
|
||||
@ -3540,6 +4013,24 @@
|
||||
"locate-path": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"find-versions": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/find-versions/-/find-versions-3.0.0.tgz",
|
||||
"integrity": "sha512-IUvtItVFNmTtKoB0PRfbkR0zR9XMG5rWNO3qI1S8L0zdv+v2gqzM0pAunloxqbqAfT8w7bg8n/5gHzTXte8H5A==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"array-uniq": "^2.0.0",
|
||||
"semver-regex": "^2.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"array-uniq": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-2.0.0.tgz",
|
||||
"integrity": "sha512-O3QZEr+3wDj7otzF7PjNGs6CA3qmYMLvt5xGkjY/V0VxS+ovvqVo/5wKM/OVOAyuX4DTh9H31zE/yKtO66hTkg==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"flat-cache": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz",
|
||||
@ -3615,6 +4106,16 @@
|
||||
"map-cache": "^0.2.2"
|
||||
}
|
||||
},
|
||||
"from2": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz",
|
||||
"integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"inherits": "^2.0.1",
|
||||
"readable-stream": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"fs-access": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/fs-access/-/fs-access-1.0.1.tgz",
|
||||
@ -3624,6 +4125,12 @@
|
||||
"null-check": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"fs-constants": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz",
|
||||
"integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==",
|
||||
"dev": true
|
||||
},
|
||||
"fs-extra": {
|
||||
"version": "7.0.1",
|
||||
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz",
|
||||
@ -3710,8 +4217,7 @@
|
||||
"code-point-at": {
|
||||
"version": "1.1.0",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true
|
||||
"dev": true
|
||||
},
|
||||
"concat-map": {
|
||||
"version": "0.0.1",
|
||||
@ -3722,8 +4228,7 @@
|
||||
"console-control-strings": {
|
||||
"version": "1.1.0",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true
|
||||
"dev": true
|
||||
},
|
||||
"core-util-is": {
|
||||
"version": "1.0.2",
|
||||
@ -3840,8 +4345,7 @@
|
||||
"inherits": {
|
||||
"version": "2.0.3",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true
|
||||
"dev": true
|
||||
},
|
||||
"ini": {
|
||||
"version": "1.3.5",
|
||||
@ -3853,7 +4357,6 @@
|
||||
"version": "1.0.0",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"number-is-nan": "^1.0.0"
|
||||
}
|
||||
@ -3980,8 +4483,7 @@
|
||||
"number-is-nan": {
|
||||
"version": "1.0.1",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true
|
||||
"dev": true
|
||||
},
|
||||
"object-assign": {
|
||||
"version": "4.1.1",
|
||||
@ -3993,7 +4495,6 @@
|
||||
"version": "1.4.0",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"wrappy": "1"
|
||||
}
|
||||
@ -4115,7 +4616,6 @@
|
||||
"version": "1.0.2",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"code-point-at": "^1.0.0",
|
||||
"is-fullwidth-code-point": "^1.0.0",
|
||||
@ -4284,6 +4784,15 @@
|
||||
"integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==",
|
||||
"dev": true
|
||||
},
|
||||
"get-proxy": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/get-proxy/-/get-proxy-2.1.0.tgz",
|
||||
"integrity": "sha512-zmZIaQTWnNQb4R4fJUEp/FC51eZsc6EkErspy3xtIYStaq8EB/hDIWipxsal+E8rz0qD7f2sL/NA9Xee4RInJw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"npm-conf": "^1.1.0"
|
||||
}
|
||||
},
|
||||
"get-stdin": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz",
|
||||
@ -4498,6 +5007,12 @@
|
||||
"integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==",
|
||||
"dev": true
|
||||
},
|
||||
"graceful-readlink": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz",
|
||||
"integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=",
|
||||
"dev": true
|
||||
},
|
||||
"growl": {
|
||||
"version": "1.10.5",
|
||||
"resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz",
|
||||
@ -4603,12 +5118,27 @@
|
||||
"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
|
||||
"dev": true
|
||||
},
|
||||
"has-symbol-support-x": {
|
||||
"version": "1.4.2",
|
||||
"resolved": "https://registry.npmjs.org/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz",
|
||||
"integrity": "sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw==",
|
||||
"dev": true
|
||||
},
|
||||
"has-symbols": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz",
|
||||
"integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=",
|
||||
"dev": true
|
||||
},
|
||||
"has-to-string-tag-x": {
|
||||
"version": "1.4.1",
|
||||
"resolved": "https://registry.npmjs.org/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz",
|
||||
"integrity": "sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"has-symbol-support-x": "^1.4.1"
|
||||
}
|
||||
},
|
||||
"has-unicode": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",
|
||||
@ -4692,6 +5222,12 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"http-cache-semantics": {
|
||||
"version": "3.8.1",
|
||||
"resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz",
|
||||
"integrity": "sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w==",
|
||||
"dev": true
|
||||
},
|
||||
"http-errors": {
|
||||
"version": "1.6.3",
|
||||
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz",
|
||||
@ -4715,6 +5251,30 @@
|
||||
"requires-port": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"http-server": {
|
||||
"version": "0.11.1",
|
||||
"resolved": "https://registry.npmjs.org/http-server/-/http-server-0.11.1.tgz",
|
||||
"integrity": "sha512-6JeGDGoujJLmhjiRGlt8yK8Z9Kl0vnl/dQoQZlc4oeqaUoAKQg94NILLfrY3oWzSyFaQCVNTcKE5PZ3cH8VP9w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"colors": "1.0.3",
|
||||
"corser": "~2.0.0",
|
||||
"ecstatic": "^3.0.0",
|
||||
"http-proxy": "^1.8.1",
|
||||
"opener": "~1.4.0",
|
||||
"optimist": "0.6.x",
|
||||
"portfinder": "^1.0.13",
|
||||
"union": "~0.4.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"colors": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz",
|
||||
"integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"http-signature": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz",
|
||||
@ -4753,6 +5313,18 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"hugo-bin": {
|
||||
"version": "0.42.0",
|
||||
"resolved": "https://registry.npmjs.org/hugo-bin/-/hugo-bin-0.42.0.tgz",
|
||||
"integrity": "sha512-GlPU2cmRLMPFJ6tkHIbsCDS3myWEA803pSV39/71476dUKkVoaKAqPoXI+OFB92TBc+k4Svc037VhODdITpBdQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"bin-wrapper": "^4.1.0",
|
||||
"pkg-conf": "^2.1.0",
|
||||
"rimraf": "^2.6.3",
|
||||
"signale": "^1.3.0"
|
||||
}
|
||||
},
|
||||
"iconv-lite": {
|
||||
"version": "0.4.24",
|
||||
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
|
||||
@ -4762,6 +5334,12 @@
|
||||
"safer-buffer": ">= 2.1.2 < 3"
|
||||
}
|
||||
},
|
||||
"ieee754": {
|
||||
"version": "1.1.12",
|
||||
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.12.tgz",
|
||||
"integrity": "sha512-GguP+DRY+pJ3soyIiGPTvdiVXjZ+DbXOxGpXn3eMvNW4x4irjqXm4wHKscC+TfxSJ0yw/S1F24tqdMNsMZTiLA==",
|
||||
"dev": true
|
||||
},
|
||||
"ignore": {
|
||||
"version": "4.0.6",
|
||||
"resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz",
|
||||
@ -4928,6 +5506,24 @@
|
||||
"integrity": "sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==",
|
||||
"dev": true
|
||||
},
|
||||
"into-stream": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/into-stream/-/into-stream-3.1.0.tgz",
|
||||
"integrity": "sha1-lvsKk2wSur1v8XUqF9BWFqvQlMY=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"from2": "^2.1.1",
|
||||
"p-is-promise": "^1.1.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"p-is-promise": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-1.1.0.tgz",
|
||||
"integrity": "sha1-nJRWmJ6fZYgBewQ01WCXZ1w9oF4=",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"invariant": {
|
||||
"version": "2.2.4",
|
||||
"resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz",
|
||||
@ -5142,6 +5738,12 @@
|
||||
"integrity": "sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=",
|
||||
"dev": true
|
||||
},
|
||||
"is-natural-number": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/is-natural-number/-/is-natural-number-4.0.1.tgz",
|
||||
"integrity": "sha1-q5124dtM7VHjXeDHLr7PCfc0zeg=",
|
||||
"dev": true
|
||||
},
|
||||
"is-npm": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-npm/-/is-npm-1.0.0.tgz",
|
||||
@ -5174,6 +5776,12 @@
|
||||
"integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=",
|
||||
"dev": true
|
||||
},
|
||||
"is-object": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.1.tgz",
|
||||
"integrity": "sha1-iVJojF7C/9awPsyF52ngKQMINHA=",
|
||||
"dev": true
|
||||
},
|
||||
"is-path-inside": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz",
|
||||
@ -5433,6 +6041,16 @@
|
||||
"handlebars": "^4.1.0"
|
||||
}
|
||||
},
|
||||
"isurl": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/isurl/-/isurl-1.0.0.tgz",
|
||||
"integrity": "sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"has-to-string-tag-x": "^1.2.0",
|
||||
"is-object": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"jquery": {
|
||||
"version": "3.3.1",
|
||||
"resolved": "https://registry.npmjs.org/jquery/-/jquery-3.3.1.tgz",
|
||||
@ -5485,6 +6103,12 @@
|
||||
"integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==",
|
||||
"dev": true
|
||||
},
|
||||
"json-buffer": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz",
|
||||
"integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=",
|
||||
"dev": true
|
||||
},
|
||||
"json-parse-better-errors": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz",
|
||||
@ -5666,6 +6290,15 @@
|
||||
"integrity": "sha1-TjRD8oMP3s/2JNN0cWPxIX2qKpo=",
|
||||
"dev": true
|
||||
},
|
||||
"keyv": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/keyv/-/keyv-3.0.0.tgz",
|
||||
"integrity": "sha512-eguHnq22OE3uVoSYG0LVWNP+4ppamWr9+zWBe1bsNcovIMy6huUJFPgy4mGwCd/rnl3vOLGW1MTlu4c57CT1xA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"json-buffer": "3.0.0"
|
||||
}
|
||||
},
|
||||
"kind-of": {
|
||||
"version": "6.0.2",
|
||||
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz",
|
||||
@ -6128,6 +6761,12 @@
|
||||
"integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==",
|
||||
"dev": true
|
||||
},
|
||||
"mimic-response": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz",
|
||||
"integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==",
|
||||
"dev": true
|
||||
},
|
||||
"minimatch": {
|
||||
"version": "3.0.4",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
|
||||
@ -6618,6 +7257,44 @@
|
||||
"integrity": "sha1-0LFF62kRicY6eNIB3E/bEpPvDAM=",
|
||||
"dev": true
|
||||
},
|
||||
"normalize-url": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-2.0.1.tgz",
|
||||
"integrity": "sha512-D6MUW4K/VzoJ4rJ01JFKxDrtY1v9wrgzCX5f2qj/lzH1m/lW6MhUZFKerVsnyjOhOsYzI9Kqqak+10l4LvLpMw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"prepend-http": "^2.0.0",
|
||||
"query-string": "^5.0.1",
|
||||
"sort-keys": "^2.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"prepend-http": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz",
|
||||
"integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=",
|
||||
"dev": true
|
||||
},
|
||||
"sort-keys": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-2.0.0.tgz",
|
||||
"integrity": "sha1-ZYU1WEhh7JfXMNbPQYIuH1ZoQSg=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"is-plain-obj": "^1.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"npm-conf": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/npm-conf/-/npm-conf-1.1.3.tgz",
|
||||
"integrity": "sha512-Yic4bZHJOt9RCFbRP3GgpqhScOY4HH3V2P8yBj6CeYq118Qr+BLXqT2JvpJ00mryLESpgOxf5XlFv4ZjXxLScw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"config-chain": "^1.1.11",
|
||||
"pify": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"npm-run-all": {
|
||||
"version": "4.1.5",
|
||||
"resolved": "https://registry.npmjs.org/npm-run-all/-/npm-run-all-4.1.5.tgz",
|
||||
@ -6830,6 +7507,12 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"opener": {
|
||||
"version": "1.4.3",
|
||||
"resolved": "https://registry.npmjs.org/opener/-/opener-1.4.3.tgz",
|
||||
"integrity": "sha1-XG2ixdflgx6P+jlklQ+NZnSskLg=",
|
||||
"dev": true
|
||||
},
|
||||
"opn": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/opn/-/opn-4.0.2.tgz",
|
||||
@ -6903,6 +7586,15 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"os-filter-obj": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/os-filter-obj/-/os-filter-obj-2.0.0.tgz",
|
||||
"integrity": "sha512-uksVLsqG3pVdzzPvmAHpBK0wKxYItuzZr7SziusRPoz67tGV8rL1szZ6IdeUrbqLjGDwApBtN29eEE3IqGHOjg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"arch": "^2.1.0"
|
||||
}
|
||||
},
|
||||
"os-homedir": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
|
||||
@ -6945,12 +7637,27 @@
|
||||
"mkdirp": "^0.5.1"
|
||||
}
|
||||
},
|
||||
"p-cancelable": {
|
||||
"version": "0.4.1",
|
||||
"resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.4.1.tgz",
|
||||
"integrity": "sha512-HNa1A8LvB1kie7cERyy21VNeHb2CWJJYqyyC2o3klWFfMGlFmWv2Z7sFgZH8ZiaYL95ydToKTFVXgMV/Os0bBQ==",
|
||||
"dev": true
|
||||
},
|
||||
"p-defer": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz",
|
||||
"integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=",
|
||||
"dev": true
|
||||
},
|
||||
"p-event": {
|
||||
"version": "2.3.1",
|
||||
"resolved": "https://registry.npmjs.org/p-event/-/p-event-2.3.1.tgz",
|
||||
"integrity": "sha512-NQCqOFhbpVTMX4qMe8PF8lbGtzZ+LCiN7pcNrb/413Na7+TRoe1xkKUzuWa/YEJdGQ0FvKtj35EEbDoVPO2kbA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"p-timeout": "^2.0.1"
|
||||
}
|
||||
},
|
||||
"p-finally": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz",
|
||||
@ -6981,6 +7688,15 @@
|
||||
"p-limit": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"p-timeout": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-2.0.1.tgz",
|
||||
"integrity": "sha512-88em58dDVB/KzPEx1X0N3LwFfYZPyDc4B6eF38M1rk9VTZMbxXXgjugz8mmwpS9Ox4BDZ+t6t3QP5+/gazweIA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"p-finally": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"p-try": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/p-try/-/p-try-2.0.0.tgz",
|
||||
@ -7133,6 +7849,12 @@
|
||||
"pify": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"pend": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz",
|
||||
"integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=",
|
||||
"dev": true
|
||||
},
|
||||
"performance-now": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
|
||||
@ -7166,6 +7888,61 @@
|
||||
"pinkie": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"pkg-conf": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-2.1.0.tgz",
|
||||
"integrity": "sha1-ISZRTKbyq/69FoWW3xi6V4Z/AFg=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"find-up": "^2.0.0",
|
||||
"load-json-file": "^4.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"find-up": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz",
|
||||
"integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"locate-path": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"locate-path": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz",
|
||||
"integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"p-locate": "^2.0.0",
|
||||
"path-exists": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"p-limit": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz",
|
||||
"integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"p-try": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"p-locate": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz",
|
||||
"integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"p-limit": "^1.1.0"
|
||||
}
|
||||
},
|
||||
"p-try": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz",
|
||||
"integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"pkg-dir": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz",
|
||||
@ -7226,6 +8003,25 @@
|
||||
"integrity": "sha512-4q1hNvoUre/8srWsH7hnoSJ5xVmIL4qgz+s4qf2TnJIMyZFUFMGH+9vE7mXynAlHSZ/NdTmmow86muD0myUkVQ==",
|
||||
"dev": true
|
||||
},
|
||||
"portfinder": {
|
||||
"version": "1.0.20",
|
||||
"resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.20.tgz",
|
||||
"integrity": "sha512-Yxe4mTyDzTd59PZJY4ojZR8F+E5e97iq2ZOHPz3HDgSvYC5siNad2tLooQ5y5QHyQhc3xVqvyk/eNA3wuoa7Sw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"async": "^1.5.2",
|
||||
"debug": "^2.2.0",
|
||||
"mkdirp": "0.5.x"
|
||||
},
|
||||
"dependencies": {
|
||||
"async": {
|
||||
"version": "1.5.2",
|
||||
"resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz",
|
||||
"integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"posix-character-classes": {
|
||||
"version": "0.1.1",
|
||||
"resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz",
|
||||
@ -7611,6 +8407,12 @@
|
||||
"integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==",
|
||||
"dev": true
|
||||
},
|
||||
"proto-list": {
|
||||
"version": "1.2.4",
|
||||
"resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz",
|
||||
"integrity": "sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk=",
|
||||
"dev": true
|
||||
},
|
||||
"pseudomap": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz",
|
||||
@ -7663,6 +8465,17 @@
|
||||
"integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==",
|
||||
"dev": true
|
||||
},
|
||||
"query-string": {
|
||||
"version": "5.1.1",
|
||||
"resolved": "https://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz",
|
||||
"integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"decode-uri-component": "^0.2.0",
|
||||
"object-assign": "^4.1.0",
|
||||
"strict-uri-encode": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"quick-lru": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-1.1.0.tgz",
|
||||
@ -8107,6 +8920,15 @@
|
||||
"integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=",
|
||||
"dev": true
|
||||
},
|
||||
"responselike": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz",
|
||||
"integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"lowercase-keys": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"restore-cursor": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz",
|
||||
@ -8258,6 +9080,26 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"seek-bzip": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/seek-bzip/-/seek-bzip-1.0.5.tgz",
|
||||
"integrity": "sha1-z+kXyz0nS8/6x5J1ivUxc+sfq9w=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"commander": "~2.8.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"commander": {
|
||||
"version": "2.8.1",
|
||||
"resolved": "https://registry.npmjs.org/commander/-/commander-2.8.1.tgz",
|
||||
"integrity": "sha1-Br42f+v9oMMwqh4qBy09yXYkJdQ=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"graceful-readlink": ">= 1.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"semver": {
|
||||
"version": "5.6.0",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz",
|
||||
@ -8273,6 +9115,21 @@
|
||||
"semver": "^5.0.3"
|
||||
}
|
||||
},
|
||||
"semver-regex": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/semver-regex/-/semver-regex-2.0.0.tgz",
|
||||
"integrity": "sha512-mUdIBBvdn0PLOeP3TEkMH7HHeUP3GjsXCwKarjv/kGmUFOYg1VqEemKhoQpWMu6X2I8kHeuVdGibLGkVK+/5Qw==",
|
||||
"dev": true
|
||||
},
|
||||
"semver-truncate": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/semver-truncate/-/semver-truncate-1.1.2.tgz",
|
||||
"integrity": "sha1-V/Qd5pcHpicJp+AQS6IRcQnqR+g=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"semver": "^5.3.0"
|
||||
}
|
||||
},
|
||||
"server-destroy": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/server-destroy/-/server-destroy-1.0.1.tgz",
|
||||
@ -8383,6 +9240,17 @@
|
||||
"integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=",
|
||||
"dev": true
|
||||
},
|
||||
"signale": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/signale/-/signale-1.4.0.tgz",
|
||||
"integrity": "sha512-iuh+gPf28RkltuJC7W5MRi6XAjTDCAPC/prJUpQoG4vIP3MJZ+GTydVnodXA7pwvTKb2cA0m9OFZW/cdWy/I/w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"chalk": "^2.3.2",
|
||||
"figures": "^2.0.0",
|
||||
"pkg-conf": "^2.1.0"
|
||||
}
|
||||
},
|
||||
"sinon": {
|
||||
"version": "7.2.5",
|
||||
"resolved": "https://registry.npmjs.org/sinon/-/sinon-7.2.5.tgz",
|
||||
@ -8614,6 +9482,24 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"sort-keys": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-1.1.2.tgz",
|
||||
"integrity": "sha1-RBttTTRnmPG05J6JIK37oOVD+a0=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"is-plain-obj": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"sort-keys-length": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/sort-keys-length/-/sort-keys-length-1.0.1.tgz",
|
||||
"integrity": "sha1-nLb09OnkgVWmqgZx7dM2/xR5oYg=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"sort-keys": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"source-map": {
|
||||
"version": "0.5.7",
|
||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
|
||||
@ -8799,6 +9685,12 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"strict-uri-encode": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz",
|
||||
"integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=",
|
||||
"dev": true
|
||||
},
|
||||
"string-width": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
|
||||
@ -8873,6 +9765,15 @@
|
||||
"integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=",
|
||||
"dev": true
|
||||
},
|
||||
"strip-dirs": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/strip-dirs/-/strip-dirs-2.1.0.tgz",
|
||||
"integrity": "sha512-JOCxOeKLm2CAS73y/U4ZeZPTkE+gNVCzKt7Eox84Iej1LT/2pTWYpZKJuxwQpvX1LiZb1xokNR7RLfuBAa7T3g==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"is-natural-number": "^4.0.1"
|
||||
}
|
||||
},
|
||||
"strip-eof": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz",
|
||||
@ -8891,6 +9792,15 @@
|
||||
"integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=",
|
||||
"dev": true
|
||||
},
|
||||
"strip-outer": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/strip-outer/-/strip-outer-1.0.1.tgz",
|
||||
"integrity": "sha512-k55yxKHwaXnpYGsOzg4Vl8+tDrWylxDEpknGjhTiZB8dFRU5rTo9CAzeycivxV3s+zlTKwrs6WxMxR95n26kwg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"escape-string-regexp": "^1.0.2"
|
||||
}
|
||||
},
|
||||
"style-search": {
|
||||
"version": "0.1.0",
|
||||
"resolved": "https://registry.npmjs.org/style-search/-/style-search-0.1.0.tgz",
|
||||
@ -9207,6 +10117,21 @@
|
||||
"inherits": "2"
|
||||
}
|
||||
},
|
||||
"tar-stream": {
|
||||
"version": "1.6.2",
|
||||
"resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.2.tgz",
|
||||
"integrity": "sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"bl": "^1.0.0",
|
||||
"buffer-alloc": "^1.2.0",
|
||||
"end-of-stream": "^1.0.0",
|
||||
"fs-constants": "^1.0.0",
|
||||
"readable-stream": "^2.3.0",
|
||||
"to-buffer": "^1.1.1",
|
||||
"xtend": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"term-size": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/term-size/-/term-size-1.2.0.tgz",
|
||||
@ -9286,6 +10211,12 @@
|
||||
"integrity": "sha1-F+bBH3PdTz10zaek/zI46a2b+JA=",
|
||||
"dev": true
|
||||
},
|
||||
"to-buffer": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz",
|
||||
"integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==",
|
||||
"dev": true
|
||||
},
|
||||
"to-fast-properties": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz",
|
||||
@ -9390,6 +10321,15 @@
|
||||
"integrity": "sha1-tAPQuRvlDDMd/EuC7s6yLD3hbSA=",
|
||||
"dev": true
|
||||
},
|
||||
"trim-repeated": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/trim-repeated/-/trim-repeated-1.0.0.tgz",
|
||||
"integrity": "sha1-42RqLqTokTEr9+rObPsFOAvAHCE=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"escape-string-regexp": "^1.0.2"
|
||||
}
|
||||
},
|
||||
"trim-right": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz",
|
||||
@ -9496,6 +10436,16 @@
|
||||
"integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==",
|
||||
"dev": true
|
||||
},
|
||||
"unbzip2-stream": {
|
||||
"version": "1.3.3",
|
||||
"resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.3.3.tgz",
|
||||
"integrity": "sha512-fUlAF7U9Ah1Q6EieQ4x4zLNejrRvDWUYmxXUpN3uziFYCHapjWFaCAnreY9bGgxzaMCFAPPpYNng57CypwJVhg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"buffer": "^5.2.1",
|
||||
"through": "^2.3.8"
|
||||
}
|
||||
},
|
||||
"undefsafe": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.2.tgz",
|
||||
@ -9559,6 +10509,23 @@
|
||||
"x-is-string": "^0.1.0"
|
||||
}
|
||||
},
|
||||
"union": {
|
||||
"version": "0.4.6",
|
||||
"resolved": "https://registry.npmjs.org/union/-/union-0.4.6.tgz",
|
||||
"integrity": "sha1-GY+9rrolTniLDvy2MLwR8kopWeA=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"qs": "~2.3.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"qs": {
|
||||
"version": "2.3.3",
|
||||
"resolved": "https://registry.npmjs.org/qs/-/qs-2.3.3.tgz",
|
||||
"integrity": "sha1-6eha2+ddoLvkyOBHaghikPhjtAQ=",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"union-value": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz",
|
||||
@ -9794,6 +10761,12 @@
|
||||
"prepend-http": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"url-to-options": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/url-to-options/-/url-to-options-1.0.1.tgz",
|
||||
"integrity": "sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k=",
|
||||
"dev": true
|
||||
},
|
||||
"use": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz",
|
||||
@ -10204,6 +11177,16 @@
|
||||
"camelcase": "^4.1.0"
|
||||
}
|
||||
},
|
||||
"yauzl": {
|
||||
"version": "2.10.0",
|
||||
"resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz",
|
||||
"integrity": "sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"buffer-crc32": "~0.2.3",
|
||||
"fd-slicer": "~1.1.0"
|
||||
}
|
||||
},
|
||||
"yeast": {
|
||||
"version": "0.1.2",
|
||||
"resolved": "https://registry.npmjs.org/yeast/-/yeast-0.1.2.tgz",
|
||||
|
35
package.json
@ -22,24 +22,25 @@
|
||||
"linkinator": "linkinator _gh_pages --recurse --skip \"^(?!http://localhost)\"",
|
||||
"bundlesize": "bundlesize",
|
||||
"css": "npm-run-all css-compile css-prefix css-minify css-copy",
|
||||
"css-copy": "cross-env-shell shx mkdir -p site/docs/$npm_package_version_short/dist/ && cross-env-shell shx cp -r dist/css/ site/docs/$npm_package_version_short/dist/",
|
||||
"css-copy": "cross-env-shell shx mkdir -p site/static/docs/$npm_package_version_short/dist/ && cross-env-shell shx cp -r dist/css/ site/static/docs/$npm_package_version_short/dist/",
|
||||
"css-main": "npm-run-all css-lint css-compile-main css-prefix-main css-minify-main css-copy",
|
||||
"css-docs": "npm-run-all css-compile-docs css-prefix-docs css-minify-docs",
|
||||
"css-docs": "npm-run-all css-compile-docs css-prefix-docs css-prefix-examples css-minify-docs",
|
||||
"css-compile": "npm-run-all --parallel css-compile-*",
|
||||
"css-compile-main": "node-sass --output-style expanded --source-map true --source-map-contents true --precision 6 scss/bootstrap.scss dist/css/bootstrap.css && node-sass --output-style expanded --source-map true --source-map-contents true --precision 6 scss/bootstrap-grid.scss dist/css/bootstrap-grid.css && node-sass --output-style expanded --source-map true --source-map-contents true --precision 6 scss/bootstrap-reboot.scss dist/css/bootstrap-reboot.css && npm run css-copy",
|
||||
"css-compile-docs": "cross-env-shell node-sass --output-style expanded --source-map true --source-map-contents true --precision 6 site/docs/$npm_package_version_short/assets/scss/docs.scss site/docs/$npm_package_version_short/assets/css/docs.min.css",
|
||||
"css-compile-docs": "cross-env-shell node-sass --output-style expanded --source-map true --source-map-contents true --precision 6 site/static/docs/$npm_package_version_short/assets/scss/docs.scss site/static/docs/$npm_package_version_short/assets/css/docs.min.css",
|
||||
"css-lint": "npm-run-all --parallel css-lint-*",
|
||||
"css-lint-main": "stylelint \"scss/**/*.scss\" --cache --cache-location .cache/.stylelintcache",
|
||||
"css-lint-docs": "stylelint \"site/docs/**/assets/scss/*.scss\" \"site/docs/**/*.css\" --cache --cache-location .cache/.stylelintcache",
|
||||
"css-lint-vars": "fusv scss/ site/docs/",
|
||||
"css-lint-docs": "stylelint \"site/static/**/assets/scss/*.scss\" \"site/content/**/*.css\" --cache --cache-location .cache/.stylelintcache",
|
||||
"css-lint-vars": "fusv scss/ site/static/",
|
||||
"css-minify": "npm-run-all --parallel css-minify-*",
|
||||
"css-minify-main": "cleancss --level 1 --format breaksWith=lf --source-map --source-map-inline-sources --output dist/css/bootstrap.min.css dist/css/bootstrap.css && cleancss --level 1 --format breaksWith=lf --source-map --source-map-inline-sources --output dist/css/bootstrap-grid.min.css dist/css/bootstrap-grid.css && cleancss --level 1 --format breaksWith=lf --source-map --source-map-inline-sources --output dist/css/bootstrap-reboot.min.css dist/css/bootstrap-reboot.css",
|
||||
"css-minify-docs": "cross-env-shell cleancss --level 1 --format breaksWith=lf --source-map --source-map-inline-sources --output site/docs/$npm_package_version_short/assets/css/docs.min.css site/docs/$npm_package_version_short/assets/css/docs.min.css",
|
||||
"css-minify-docs": "cross-env-shell cleancss --level 1 --format breaksWith=lf --source-map --source-map-inline-sources --output site/static/docs/$npm_package_version_short/assets/css/docs.min.css site/static/docs/$npm_package_version_short/assets/css/docs.min.css",
|
||||
"css-prefix": "npm-run-all --parallel css-prefix-*",
|
||||
"css-prefix-main": "postcss --config build/postcss.config.js --replace \"dist/css/*.css\" \"!dist/css/*.min.css\"",
|
||||
"css-prefix-docs": "postcss --config build/postcss.config.js --replace \"site/docs/**/*.css\" \"site/docs/**/*.css\"",
|
||||
"css-prefix-docs": "postcss --config build/postcss.config.js --replace \"site/static/**/*.css\" \"site/static/**/*.css\"",
|
||||
"css-prefix-examples": "postcss --config build/postcss.config.js --replace \"site/content/**/*.css\" \"site/content/**/*.css\"",
|
||||
"js": "npm-run-all js-compile js-minify js-copy",
|
||||
"js-copy": "cross-env-shell shx mkdir -p site/docs/$npm_package_version_short/dist/ && cross-env-shell shx cp -r dist/js/ site/docs/$npm_package_version_short/dist/",
|
||||
"js-copy": "cross-env-shell shx mkdir -p site/static/docs/$npm_package_version_short/dist/ && cross-env-shell shx cp -r dist/js/ site/static/docs/$npm_package_version_short/dist/",
|
||||
"js-main": "npm-run-all js-lint js-compile js-minify-main",
|
||||
"js-docs": "npm-run-all js-lint-docs js-minify-docs",
|
||||
"js-compile": "npm-run-all --parallel js-compile-* --sequential js-copy",
|
||||
@ -56,7 +57,7 @@
|
||||
"js-minify-standalone": "terser --compress --mangle --comments \"/^!/\" --source-map \"content=dist/js/bootstrap.js.map,includeSources,url=bootstrap.min.js.map\" --output dist/js/bootstrap.min.js dist/js/bootstrap.js",
|
||||
"js-minify-standalone-esm": "terser --compress --mangle --comments \"/^!/\" --source-map \"content=dist/js/bootstrap.esm.js.map,includeSources,url=bootstrap.esm.min.js.map\" --output dist/js/bootstrap.esm.min.js dist/js/bootstrap.esm.js",
|
||||
"js-minify-bundle": "terser --compress --mangle --comments \"/^!/\" --source-map \"content=dist/js/bootstrap.bundle.js.map,includeSources,url=bootstrap.bundle.min.js.map\" --output dist/js/bootstrap.bundle.min.js dist/js/bootstrap.bundle.js",
|
||||
"js-minify-docs": "cross-env-shell terser --mangle --comments \\\"/^!/\\\" --output site/docs/$npm_package_version_short/assets/js/docs.min.js site/docs/$npm_package_version_short/assets/js/vendor/anchor.min.js site/docs/$npm_package_version_short/assets/js/vendor/clipboard.min.js site/docs/$npm_package_version_short/assets/js/vendor/bs-custom-file-input.min.js \"site/docs/$npm_package_version_short/assets/js/src/*.js\"",
|
||||
"js-minify-docs": "cross-env-shell terser --mangle --comments \\\"/^!/\\\" --output site/static/docs/$npm_package_version_short/assets/js/docs.min.js site/static/docs/$npm_package_version_short/assets/js/vendor/anchor.min.js site/static/docs/$npm_package_version_short/assets/js/vendor/clipboard.min.js site/static/docs/$npm_package_version_short/assets/js/vendor/bs-custom-file-input.min.js \"site/static/docs/$npm_package_version_short/assets/js/src/*.js\"",
|
||||
"js-test": "npm-run-all js-test-karma* js-test-integration",
|
||||
"js-debug": "cross-env DEBUG=true karma start js/tests/karma.conf.js",
|
||||
"js-test-karma": "karma start js/tests/karma.conf.js",
|
||||
@ -66,12 +67,12 @@
|
||||
"lint": "npm-run-all --parallel js-lint css-lint",
|
||||
"coveralls": "shx cat js/coverage/lcov.info | coveralls",
|
||||
"docs": "npm-run-all css-docs js-docs docs-compile docs-lint",
|
||||
"docs-compile": "bundle exec jekyll build",
|
||||
"docs-production": "cross-env JEKYLL_ENV=production npm run docs-compile",
|
||||
"docs-compile": "hugo --cleanDestinationDir",
|
||||
"docs-production": "cross-env HUGO_ENV=production npm run docs-compile",
|
||||
"docs-lint": "node build/vnu-jar.js",
|
||||
"docs-serve": "bundle exec jekyll serve",
|
||||
"docs-serve-only": "npm run docs-serve -- --skip-initial-build --no-watch",
|
||||
"update-deps": "ncu -a -x jquery -x bundlesize && npm update && bundle update && cross-env-shell echo Manually update \\\"site/docs/$npm_package_version_short/assets/js/vendor/\\\"",
|
||||
"docs-serve": "hugo server --port 9001 --disableFastRender --renderToDisk",
|
||||
"docs-serve-only": "http-server _gh_pages -p 9001 -a localhost",
|
||||
"update-deps": "ncu -a -x jquery -x bundlesize && npm update && cross-env-shell echo Manually update \\\"site/static/docs/$npm_package_version_short/assets/js/vendor/\\\"",
|
||||
"release": "npm-run-all dist release-sri release-zip docs-production",
|
||||
"release-sri": "node build/generate-sri.js",
|
||||
"release-version": "node build/change-version.js",
|
||||
@ -80,9 +81,9 @@
|
||||
"test": "npm-run-all lint dist js-test docs-compile docs-lint bundlesize",
|
||||
"watch": "npm-run-all --parallel watch-*",
|
||||
"watch-css-main": "nodemon --watch scss/ --ext scss --exec \"npm run css-main\"",
|
||||
"watch-css-docs": "nodemon --watch \"site/docs/**/assets/scss/\" --ext scss --exec \"npm run css-docs\"",
|
||||
"watch-css-docs": "nodemon --watch \"site/static/**/assets/scss/\" --ext scss --exec \"npm run css-docs\"",
|
||||
"watch-js-main": "nodemon --watch js/src/ --ext js --exec \"npm run js-compile\"",
|
||||
"watch-js-docs": "nodemon --watch \"site/docs/**/assets/js/src/\" --ext js --exec \"npm run js-docs\""
|
||||
"watch-js-docs": "nodemon --watch \"site/static/**/assets/js/src/\" --ext js --exec \"npm run js-docs\""
|
||||
},
|
||||
"style": "dist/css/bootstrap.css",
|
||||
"sass": "scss/bootstrap.scss",
|
||||
@ -119,6 +120,8 @@
|
||||
"find-unused-sass-variables": "^0.3.2",
|
||||
"glob": "^7.1.3",
|
||||
"hammer-simulator": "0.0.1",
|
||||
"http-server": "^0.11.1",
|
||||
"hugo-bin": "^0.42.0",
|
||||
"ip": "^1.1.5",
|
||||
"jquery": "^3.3.1",
|
||||
"karma": "^4.0.1",
|
||||
|
@ -1,44 +0,0 @@
|
||||
- group: v1.x
|
||||
baseurl: https://getbootstrap.com
|
||||
description: Every minor and patch release from v1 is listed below.
|
||||
versions:
|
||||
- v: 1.0.0
|
||||
- v: 1.1.0
|
||||
- v: 1.1.1
|
||||
- v: 1.2.0
|
||||
- v: 1.3.0
|
||||
- v: 1.4.0
|
||||
|
||||
- group: v2.x
|
||||
baseurl: https://getbootstrap.com
|
||||
description: Every minor and patch release from v2 is listed below.
|
||||
versions:
|
||||
- v: 2.0.0
|
||||
- v: 2.0.1
|
||||
- v: 2.0.2
|
||||
- v: 2.0.3
|
||||
- v: 2.0.4
|
||||
- v: 2.1.0
|
||||
- v: 2.1.1
|
||||
- v: 2.2.0
|
||||
- v: 2.2.1
|
||||
- v: 2.2.2
|
||||
- v: 2.3.0
|
||||
- v: 2.3.1
|
||||
- v: 2.3.2
|
||||
|
||||
- group: v3.x
|
||||
baseurl: https://getbootstrap.com/docs
|
||||
description: Our previous major release and its minor versions. Last update was v3.4.1.
|
||||
versions:
|
||||
- v: 3.3
|
||||
- v: 3.4
|
||||
|
||||
- group: v4.x
|
||||
baseurl: https://getbootstrap.com/docs
|
||||
description: Current major release with two minor releases. Last update was v4.3.1.
|
||||
versions:
|
||||
- v: 4.0
|
||||
- v: 4.1
|
||||
- v: 4.2
|
||||
- v: 4.3
|
@ -1,42 +0,0 @@
|
||||
{%- comment -%}
|
||||
Usage: include bugify.html content=text,
|
||||
where content is a string that contains a bug reference name and id.
|
||||
e.g. Bootstrap#19984
|
||||
{%- endcomment -%}
|
||||
|
||||
{%- assign words = include.content | split: " " -%}
|
||||
|
||||
{%- for word in words -%}
|
||||
{% if word contains "#" %}
|
||||
{% if word contains "," %}{% assign separator = true %}{% else %}{% assign separator = false %}{% endif %}
|
||||
{%- assign data = word | split: "#" -%}
|
||||
{%- assign bug_cat = data[0] | strip_newlines -%}
|
||||
{%- assign bug_id = data[1] | strip_newlines | remove: "," -%}
|
||||
|
||||
{%- case bug_cat -%}
|
||||
{%- when "Bootstrap" -%}
|
||||
<a href="https://github.com/twbs/bootstrap/issues/{{ bug_id }}">#{{ bug_id }}</a>
|
||||
{%- when "Edge" -%}
|
||||
<a href="https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/{{ bug_id }}/">Edge issue #{{ bug_id }}</a>
|
||||
{%- when "A11yUserVoice" -%}
|
||||
<a href="https://microsoftaccessibility.uservoice.com/forums/307429-microsoft-accessibility-feedback/suggestions/{{ bug_id }}">Microsoft A11y UserVoice idea #{{ bug_id }}</a>
|
||||
{%- when "UserVoice" -%}
|
||||
<a href="https://wpdev.uservoice.com/forums/257854-microsoft-edge-developer/suggestions/{{ bug_id }}">Edge UserVoice idea #{{ bug_id }}</a>
|
||||
{%- when "Mozilla" -%}
|
||||
<a href="https://bugzilla.mozilla.org/show_bug.cgi?id={{ bug_id }}">Mozilla bug #{{ bug_id }}</a>
|
||||
{%- when "Chromium" -%}
|
||||
<a href="https://bugs.chromium.org/p/chromium/issues/detail?id={{ bug_id }}">Chromium issue #{{ bug_id }}</a>
|
||||
{%- when "WebKit" -%}
|
||||
<a href="https://bugs.webkit.org/show_bug.cgi?id={{ bug_id }}">WebKit bug #{{ bug_id }}</a>
|
||||
{%- when "Safari" -%}
|
||||
<a href="https://openradar.appspot.com/{{ bug_id }}">Apple Safari Radar #{{ bug_id }}</a>
|
||||
{%- when "Normalize" -%}
|
||||
<a href="https://github.com/necolas/normalize.css/issues/{{ bug_id }}">Normalize #{{ bug_id }}</a>
|
||||
{%- else -%}
|
||||
<strong>parse error</strong>
|
||||
{%- endcase -%}{% if separator %}, {% endif %}
|
||||
|
||||
{% else %}
|
||||
{{ word }}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
@ -1,4 +0,0 @@
|
||||
{% capture callout %}
|
||||
The animation effect of this component is dependent on the `prefers-reduced-motion` media query. See the [reduced motion section of our accessibility documentation]({{ site.baseurl }}/docs/{{ site.docs_version }}/getting-started/accessibility/#reduced-motion).
|
||||
{% endcapture %}
|
||||
{% include callout.html content=callout type="info" %}
|
@ -1,9 +0,0 @@
|
||||
{%- comment -%}
|
||||
Usage: include callout.html content=callout type="type",
|
||||
where content is a capture with the content
|
||||
and type is one of: info (default), danger, warning
|
||||
{%- endcomment -%}
|
||||
{%- assign css_class = include.type | default: "info" -%}
|
||||
<div class="bd-callout bd-callout-{{ css_class }}">
|
||||
{{- include.content | markdownify -}}
|
||||
</div>
|
@ -1,71 +0,0 @@
|
||||
<header class="navbar navbar-expand navbar-dark flex-column flex-md-row bd-navbar">
|
||||
<a class="navbar-brand mr-0 mr-md-2" href="{{ site.baseurl }}/" aria-label="Bootstrap">
|
||||
{%- include icons/bootstrap.svg width="36" height="36" 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 }}/getting-started/introduction/" 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');" target="_blank" rel="noopener">Themes</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{{ site.expo }}/" onclick="ga('send', 'event', 'Navbar', 'Community links', 'Expo');" target="_blank" rel="noopener">Expo</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{{ site.blog }}/" onclick="ga('send', 'event', 'Navbar', 'Community links', 'Blog');" target="_blank" rel="noopener">Blog</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<ul class="navbar-nav flex-row ml-md-auto d-none d-md-flex">
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-item nav-link dropdown-toggle mr-md-2" href="#" id="bd-versions" data-toggle="dropdown" aria-expanded="false">
|
||||
v{{ site.docs_version }}
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="bd-versions">
|
||||
<a class="dropdown-item active" href="{{ site.baseurl }}/docs/{{ site.docs_version }}/">Latest (4.3.x)</a>
|
||||
<a class="dropdown-item" href="https://getbootstrap.com/docs/4.2/">v4.2.1</a>
|
||||
<a class="dropdown-item" href="https://getbootstrap.com/docs/4.0/">v4.0.0</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item" href="https://v4-alpha.getbootstrap.com/">v4 Alpha 6</a>
|
||||
<a class="dropdown-item" href="https://getbootstrap.com/docs/3.4/">v3.4.1</a>
|
||||
<a class="dropdown-item" href="https://getbootstrap.com/docs/3.3/">v3.3.7</a>
|
||||
<a class="dropdown-item" href="https://getbootstrap.com/2.3.2/">v2.3.2</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item" href="{{ site.baseurl }}/docs/versions/">All versions</a>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link p-2" href="{{ site.repo }}" target="_blank" rel="noopener" aria-label="GitHub">
|
||||
{%- 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 }}" target="_blank" rel="noopener" aria-label="Twitter">
|
||||
{%- include icons/twitter.svg class="navbar-nav-svg" -%}
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link p-2" href="{{ site.slack }}/" target="_blank" rel="noopener" aria-label="Slack">
|
||||
{%- include icons/slack.svg class="navbar-nav-svg" -%}
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link p-2" href="{{ site.opencollective }}/" target="_blank" rel="noopener" aria-label="Open Collective">
|
||||
{%- include icons/opencollective.svg class="navbar-nav-svg" -%}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<a class="btn btn-bd-download d-none d-lg-inline-block mb-3 mb-md-0 ml-md-3" href="{{ site.baseurl }}/docs/{{ site.docs_version }}/getting-started/download/">Download</a>
|
||||
</header>
|
@ -1,43 +0,0 @@
|
||||
<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" data-docs-version="{{ site.docs_version }}">
|
||||
<button class="btn 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 navigation">
|
||||
{%- include icons/menu.svg width="30" height="30" -%}
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<nav class="collapse bd-links" id="bd-docs-nav" aria-label="Main navigation">
|
||||
{%- assign page_slug = page.url | split: '/' | last -%}
|
||||
{%- for group in site.data.nav -%}
|
||||
{%- assign link = group.pages | first -%}
|
||||
{%- assign link_slug = link.title | slugify -%}
|
||||
{%- assign group_slug = group.title | slugify -%}
|
||||
{%- assign active = nil -%}
|
||||
|
||||
{%- if page.group == group_slug -%}
|
||||
{%- assign active = 'active' -%}
|
||||
{%- endif -%}
|
||||
|
||||
<div class="bd-toc-item{% unless active == nil %} {{ active }}{% endunless %}">
|
||||
<a class="bd-toc-link" href="{{ site.baseurl }}/docs/{{ site.docs_version }}/{{ group_slug }}/{{ link_slug }}{% if link_slug %}/{% endif %}">
|
||||
{{ group.title }}
|
||||
</a>
|
||||
|
||||
<ul class="nav bd-sidenav">
|
||||
{%- for doc in group.pages -%}
|
||||
{%- assign doc_slug = doc.title | slugify -%}
|
||||
{%- assign active = nil -%}
|
||||
|
||||
{%- if page.group == group_slug and page_slug == doc_slug -%}
|
||||
{%- assign active = 'active bd-sidenav-active' -%}
|
||||
{%- endif -%}
|
||||
|
||||
<li{% unless active == nil %} class="{{ active }}"{% endunless %}>
|
||||
<a href="{{ site.baseurl }}/docs/{{ site.docs_version }}/{{ group_slug }}/{{ doc_slug }}/">
|
||||
{{ doc.title }}
|
||||
</a>
|
||||
</li>
|
||||
{%- endfor -%}
|
||||
</ul>
|
||||
</div>
|
||||
{%- endfor -%}
|
||||
</nav>
|
@ -1,51 +0,0 @@
|
||||
{%- comment -%}
|
||||
Usage: include example.html content=markup [args],
|
||||
where content is a capture with the HTML content
|
||||
|
||||
args can be one of the following:
|
||||
id - null (default)
|
||||
class - "bd-example" (default)
|
||||
optional: hide_preview - disabled (default)
|
||||
optional: hide_markup - disabled (default)
|
||||
{%- endcomment -%}
|
||||
|
||||
{%- assign id = include.id -%}
|
||||
{%- assign class = include.class -%}
|
||||
|
||||
{%- if include.hide_preview == null -%}
|
||||
<div{% if id %} id="{{ id }}"{% endif %} class="bd-example{% if class %} {{ class }}{% endif %}">
|
||||
{{- include.content -}}
|
||||
</div>
|
||||
{%- endif -%}
|
||||
|
||||
{%- if include.hide_markup == null -%}
|
||||
{%- highlight html -%}
|
||||
{%- if include.content contains '<svg class="bd-placeholder-img' -%}
|
||||
{%- assign modified_content = include.content
|
||||
| replace: '<svg class="bd-placeholder-img', '✂️<svg class="bd-placeholder-img'
|
||||
| replace: '</svg>', '</svg>✂️'
|
||||
| split: '✂️' -%}
|
||||
|
||||
{%- if include.content contains 'bd-placeholder-img ' -%}
|
||||
{%- assign image_class = include.content
|
||||
| replace_first: 'bd-placeholder-img', 'bd-placeholder-img ✂️'
|
||||
| replace: '" width="', '✂️" width="'
|
||||
| split: '✂️' -%}
|
||||
{%- assign image_class = image_class[1] | replace: 'bd-placeholder-img-lg', '' | strip -%}
|
||||
{%- endif -%}
|
||||
|
||||
{%- for content_chunk in modified_content -%}
|
||||
{%- if content_chunk contains '<svg class="bd-placeholder-img' -%}
|
||||
{%- capture img_placeholder -%}
|
||||
<img src="..." {% if image_class %}class="{{ image_class }}" {% endif %}alt="...">
|
||||
{%- endcapture -%}
|
||||
{{- img_placeholder -}}
|
||||
{%- else -%}
|
||||
{{- content_chunk -}}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{%- else -%}
|
||||
{{- include.content -}}
|
||||
{%- endif -%}
|
||||
{%- endhighlight -%}
|
||||
{%- endif -%}
|
@ -1,9 +0,0 @@
|
||||
<!-- Favicons -->
|
||||
<link rel="apple-touch-icon" href="{{ site.baseurl }}/docs/{{ site.docs_version }}/assets/img/favicons/apple-touch-icon.png" sizes="180x180">
|
||||
<link rel="icon" href="{{ site.baseurl }}/docs/{{ site.docs_version }}/assets/img/favicons/favicon-32x32.png" sizes="32x32" type="image/png">
|
||||
<link rel="icon" href="{{ site.baseurl }}/docs/{{ site.docs_version }}/assets/img/favicons/favicon-16x16.png" sizes="16x16" type="image/png">
|
||||
<link rel="manifest" href="{{ site.baseurl }}/docs/{{ site.docs_version }}/assets/img/favicons/manifest.json">
|
||||
<link rel="mask-icon" href="{{ site.baseurl }}/docs/{{ site.docs_version }}/assets/img/favicons/safari-pinned-tab.svg" color="#563d7c">
|
||||
<link rel="icon" href="{{ site.baseurl }}/favicon.ico">
|
||||
<meta name="msapplication-config" content="{{ site.baseurl }}/docs/{{ site.docs_version }}/assets/img/favicons/browserconfig.xml">
|
||||
<meta name="theme-color" content="#563d7c">
|
@ -1,12 +0,0 @@
|
||||
<footer class="bd-footer text-muted">
|
||||
<div class="container-fluid p-3 p-md-5">
|
||||
<ul class="bd-footer-links">
|
||||
<li><a href="{{ site.repo }}">GitHub</a></li>
|
||||
<li><a href="https://twitter.com/{{ site.twitter }}">Twitter</a></li>
|
||||
<li><a href="{{ site.baseurl }}/docs/{{ site.docs_version }}/examples/">Examples</a></li>
|
||||
<li><a href="{{ site.baseurl }}/docs/{{ site.docs_version }}/about/overview/">About</a></li>
|
||||
</ul>
|
||||
<p>Designed and built with all the love in the world by the <a href="{{ site.baseurl }}/docs/{{ site.docs_version }}/about/team/">Bootstrap team</a> with the help of <a href="{{ site.repo }}/graphs/contributors">our contributors</a>.</p>
|
||||
<p>Currently v{{ site.current_version }}. Code licensed <a href="{{ site.repo }}/blob/master/LICENSE" target="_blank" rel="license noopener">MIT</a>, docs <a href="https://creativecommons.org/licenses/by/3.0/" target="_blank" rel="license noopener">CC BY 3.0</a>.</p>
|
||||
</div>
|
||||
</footer>
|
@ -1,23 +0,0 @@
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="description" content="{{ page.description | default: site.description | smartify }}">
|
||||
<meta name="author" content="{{ site.authors }}">
|
||||
<meta name="generator" content="Jekyll v{{ jekyll.version }}">
|
||||
|
||||
<meta name="docsearch:language" content="en">
|
||||
<meta name="docsearch:version" content="{{ site.docs_version }}">
|
||||
|
||||
<title>
|
||||
{%- if page.title -%}
|
||||
{{ page.title | smartify }} · {{ site.title | smartify }}
|
||||
{%- else -%}
|
||||
{{ site.title | smartify }} · {{ site.description | smartify }}
|
||||
{%- endif -%}
|
||||
</title>
|
||||
|
||||
<link rel="canonical" href="{{ site.url | append: page.url }}">
|
||||
|
||||
{% include stylesheet.html %}
|
||||
{% include favicons.html %}
|
||||
{% include social.html %}
|
||||
{% include analytics.html %}
|
@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"{% if include.width %} width="{{ include.width }}"{% endif %}{% if include.height %} height="{{ include.height }}"{% endif %}{% if include.class %} class="{{ include.class }}"{% endif %} role="img" viewBox="0 0 1024 860"><title>Bootstrap</title><defs><linearGradient id="c" x1="50%" x2="50%" y1="0%" y2="100%"><stop offset="0%" stop-color="#5C24AE"/><stop offset="100%" stop-color="#30135A"/></linearGradient><path id="b" d="M355.967 242.807l-322 216.395c-44.275 29.754-44.275 78.443 0 108.197l322 216.395c44.275 29.754 116.725 29.754 161 0l322-216.395c44.275-29.754 44.275-78.443 0-108.197l-322-216.395c-44.275-29.754-116.725-29.754-161 0z"/><filter id="a" width="108%" height="112%" x="-4%" y="-4.3%" filterUnits="objectBoundingBox"><feOffset dy="10" in="SourceAlpha" result="shadowOffsetOuter1"/><feGaussianBlur in="shadowOffsetOuter1" result="shadowBlurOuter1" stdDeviation="10"/><feColorMatrix in="shadowBlurOuter1" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/></filter><linearGradient id="f" x1="50%" x2="50%" y1="-17.303%" y2="100%"><stop offset="0%" stop-color="#7331D4"/><stop offset="100%" stop-color="#461B84"/></linearGradient><path id="e" d="M355.967 132.807l-322 216.395c-44.275 29.754-44.275 78.443 0 108.197l322 216.395c44.275 29.754 116.725 29.754 161 0l322-216.395c44.275-29.754 44.275-78.443 0-108.197l-322-216.395c-44.275-29.754-116.725-29.754-161 0z"/><filter id="d" width="108%" height="112%" x="-4%" y="-4.3%" filterUnits="objectBoundingBox"><feOffset dy="10" in="SourceAlpha" result="shadowOffsetOuter1"/><feGaussianBlur in="shadowOffsetOuter1" result="shadowBlurOuter1" stdDeviation="10"/><feColorMatrix in="shadowBlurOuter1" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/></filter><linearGradient id="i" x1="50%" x2="50%" y1="0%" y2="100%"><stop offset="0%" stop-color="#905BDD"/><stop offset="100%" stop-color="#5521A0"/></linearGradient><path id="h" d="M355.967 22.807l-322 216.395c-44.275 29.754-44.275 78.443 0 108.197l322 216.395c44.275 29.754 116.725 29.754 161 0l322-216.395c44.275-29.754 44.275-78.443 0-108.197l-322-216.395c-44.275-29.754-116.725-29.754-161 0z"/><filter id="g" width="108%" height="112%" x="-4%" y="-4.3%" filterUnits="objectBoundingBox"><feOffset dy="10" in="SourceAlpha" result="shadowOffsetOuter1"/><feGaussianBlur in="shadowOffsetOuter1" result="shadowBlurOuter1" stdDeviation="10"/><feColorMatrix in="shadowBlurOuter1" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/></filter></defs><g fill="none"><g transform="translate(75 23)"><use fill="#000" filter="url(#a)" xlink:href="#b"/><use fill="url(#c)" xlink:href="#b"/></g><g transform="translate(75 23)"><use fill="#000" filter="url(#d)" xlink:href="#e"/><use fill="url(#f)" xlink:href="#e"/></g><g transform="translate(75 23)"><use fill="#000" filter="url(#g)" xlink:href="#h"/><use fill="url(#i)" xlink:href="#h"/></g><path fill="#FFF" d="M558.273 447.667L308.036 279.5l97.982-65.847c42.83-28.784 96.789-31.483 134.245-6.311 26.044 17.502 31.214 46.615 11.444 65.724l1.389.934c38.324-19.932 84.107-18.527 117.396 3.845 44.046 29.6 38.671 68.419-14.561 104.193l-97.658 65.629zM447.112 331.01l49.942-33.562c36.935-24.822 42.31-48.249 15.224-66.451-24.798-16.665-55.49-14.453-85.851 5.95l-59.641 40.081 80.326 53.982zm176.532 35.663c37.63-25.289 42.136-48.832 13.203-68.276-28.932-19.444-64.163-15.614-104.042 11.186l-58.789 39.508 87.92 59.084 61.708-41.502z"/></g></svg>
|
Before Width: | Height: | Size: 3.4 KiB |
@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg"{% if include.width %} width="{{ include.width }}"{% endif %}{% if include.height %} height="{{ include.height }}"{% endif %}{% if include.class %} class="{{ include.class }}"{% endif %} viewBox="0 0 612 612" role="img"><title>Bootstrap</title><path fill="currentColor" d="M510 8a94.3 94.3 0 0 1 94 94v408a94.3 94.3 0 0 1-94 94H102a94.3 94.3 0 0 1-94-94V102a94.3 94.3 0 0 1 94-94h408m0-8H102C45.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="M196.77 471.5V154.43h124.15c54.27 0 91 31.64 91 79.1 0 33-24.17 63.72-54.71 69.21v1.76c43.07 5.49 70.75 35.82 70.75 78 0 55.81-40 89-107.45 89zm39.55-180.4h63.28c46.8 0 72.29-18.68 72.29-53 0-31.42-21.53-48.78-60-48.78h-75.57zm78.22 145.46c47.68 0 72.73-19.34 72.73-56s-25.93-55.37-76.46-55.37h-74.49v111.4z"/></svg>
|
Before Width: | Height: | Size: 882 B |
@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg"{% if include.width %} width="{{ include.width }}"{% endif %}{% if include.height %} height="{{ include.height }}"{% endif %} fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" aria-hidden="true"{% if include.class %} class="{{ include.class }}"{% endif %} viewBox="0 0 32 32"><title>Download</title><path d="M9 22c-9 1-8-10 0-9C6 2 23 2 22 10c10-3 10 13 1 12m-12 4l5 4 5-4m-5-10v14"/></svg>
|
Before Width: | Height: | Size: 477 B |
@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg"{% if include.width %} width="{{ include.width }}"{% endif %}{% if include.height %} height="{{ include.height }}"{% endif %}{% if include.class %} class="{{ include.class }}"{% endif %} viewBox="0 0 512 499.36" role="img"><title>GitHub</title><path fill="currentColor" fill-rule="evenodd" 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"/></svg>
|
Before Width: | Height: | Size: 1.1 KiB |
@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg"{% if include.width %} width="{{ include.width }}"{% endif %}{% if include.height %} height="{{ include.height }}"{% endif %} fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" aria-hidden="true"{% if include.class %} class="{{ include.class }}"{% endif %} viewBox="0 0 32 32"><title>Import</title><path d="M28 22v8H4v-8M16 4v20m-8-8l8 8 8-8"/></svg>
|
Before Width: | Height: | Size: 436 B |
@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg"{% if include.width %} width="{{ include.width }}"{% endif %}{% if include.height %} height="{{ include.height }}"{% endif %} fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" aria-hidden="true"{% if include.class %} class="{{ include.class }}"{% endif %} viewBox="0 0 32 32"><title>Lightning</title><path d="M18 13l8-11L8 13l6 6-8 11 18-11z"/></svg>
|
Before Width: | Height: | Size: 437 B |
@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg"{% if include.width %} width="{{ include.width }}"{% endif %}{% if include.height %} height="{{ include.height }}"{% endif %}{% if include.class %} class="{{ include.class }}"{% endif %} viewBox="0 0 30 30" role="img"><title>Menu</title><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"/></svg>
|
Before Width: | Height: | Size: 402 B |
@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg"{% if include.width %} width="{{ include.width }}"{% endif %}{% if include.height %} height="{{ include.height }}"{% endif %} fill="currentColor" fill-rule="evenodd"{% if include.class %} class="{{ include.class }}"{% endif %} viewBox="0 0 40 41" role="img"><title>Open Collective</title><path fill-opacity=".4" d="M32.8 21c0 2.4-.8 4.9-2 6.9l5.1 5.1c2.5-3.4 4.1-7.6 4.1-12 0-4.6-1.6-8.8-4-12.2L30.7 14c1.2 2 2 4.3 2 7z"/><path d="M20 33.7a12.8 12.8 0 0 1 0-25.6c2.6 0 5 .7 7 2.1L32 5a20 20 0 1 0 .1 31.9l-5-5.2a13 13 0 0 1-7 2z"/></svg>
|
Before Width: | Height: | Size: 576 B |
@ -1,35 +0,0 @@
|
||||
{%- comment -%}
|
||||
Usage: include icons/placeholder.svg args
|
||||
|
||||
args can be one of the following:
|
||||
title: Used in the SVG `title` tag
|
||||
text: The text to show in the image - default: 'width x height'
|
||||
class: default: 'bd-placeholder-img'
|
||||
color: The text color (foreground) - default: '#dee2e6'
|
||||
background: The background color - default: '#868e96'
|
||||
width: default: 100%
|
||||
height: default: 180px
|
||||
{%- endcomment -%}
|
||||
|
||||
{%- assign title = include.title | default: 'Placeholder' -%}
|
||||
{%- assign class = include.class | default: '' -%}
|
||||
{%- assign color = include.color | default: site.data.grays[2].hex -%}
|
||||
{%- assign background = include.background | default: site.data.grays[5].hex -%}
|
||||
{%- assign width = include.width | default: '100%' -%}
|
||||
{%- assign height = include.height | default: '180' -%}
|
||||
|
||||
{%- if include.text -%}
|
||||
{%- assign text = include.text -%}
|
||||
{%- else -%}
|
||||
{%- assign text = width | append: 'x' | append: height -%}
|
||||
{%- endif -%}
|
||||
|
||||
{%- capture svg -%}
|
||||
<svg class="bd-placeholder-img{% if class != '' %} {{ class }}{% endif %}" width="{{ width }}" height="{{ height }}" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid slice" role="img"{% if title != ' ' or text != ' ' %} aria-label="{% if title != ' ' %}{{ title }}{% if text != ' ' %}: {% endif %}{% endif %}{% if text != ' ' %}{{ text }}{% endif %}"{% endif %}>
|
||||
{% if title != ' ' %}<title>{{ title }}</title>{% endif %}
|
||||
<rect width="100%" height="100%" fill="{{ background }}"/>
|
||||
{% if text != ' ' %}<text x="50%" y="50%" fill="{{ color }}" dy=".3em">{{ text }}</text>{% endif %}
|
||||
</svg>
|
||||
{%- endcapture -%}
|
||||
|
||||
{{- svg | replace: ' ', '' | strip_newlines -}}
|
@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg"{% if include.width %} width="{{ include.width }}"{% endif %}{% if include.height %} height="{{ include.height }}"{% endif %}{% if include.class %} class="{{ include.class }}"{% endif %} viewBox="0 0 512 512" role="img"><title>Slack</title><path fill="currentColor" d="M210.787 234.832l68.31-22.883 22.1 65.977-68.309 22.882z"/><path fill="currentColor" 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"/></svg>
|
Before Width: | Height: | Size: 1.3 KiB |
@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg"{% if include.width %} width="{{ include.width }}"{% endif %}{% if include.height %} height="{{ include.height }}"{% endif %}{% if include.class %} class="{{ include.class }}"{% endif %} viewBox="0 0 512 416.32" role="img"><title>Twitter</title><path fill="currentColor" 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"/></svg>
|
Before Width: | Height: | Size: 853 B |
@ -1,19 +0,0 @@
|
||||
{%- if jekyll.environment == "production" -%}
|
||||
<script src="{{ site.baseurl }}/docs/{{ site.docs_version }}/dist/js/bootstrap.bundle.min.js" integrity="{{ site.cdn.js_bundle_hash }}" crossorigin="anonymous"></script>
|
||||
{%- else -%}
|
||||
<script src="{{ site.baseurl }}/docs/{{ site.docs_version }}/dist/js/bootstrap.bundle.js"></script>
|
||||
{%- endif -%}
|
||||
|
||||
{%- if page.layout == "docs" -%}
|
||||
<script src="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js"></script>
|
||||
{%- endif -%}
|
||||
|
||||
{%- if jekyll.environment == "production" -%}
|
||||
<script src="{{ site.baseurl }}/docs/{{ site.docs_version }}/assets/js/docs.min.js"></script>
|
||||
{%- else -%}
|
||||
<script src="{{ site.baseurl }}/docs/{{ site.docs_version }}/assets/js/vendor/anchor.min.js"></script>
|
||||
<script src="{{ site.baseurl }}/docs/{{ site.docs_version }}/assets/js/vendor/clipboard.min.js"></script>
|
||||
<script src="{{ site.baseurl }}/docs/{{ site.docs_version }}/assets/js/vendor/bs-custom-file-input.min.js"></script>
|
||||
<script src="{{ site.baseurl }}/docs/{{ site.docs_version }}/assets/js/src/application.js"></script>
|
||||
<script src="{{ site.baseurl }}/docs/{{ site.docs_version }}/assets/js/src/search.js"></script>
|
||||
{%- endif -%}
|
@ -1,18 +0,0 @@
|
||||
<!-- Twitter -->
|
||||
<meta name="twitter:card" content="{% if page.title %}summary{% else %}summary_large_image{% endif %}">
|
||||
<meta name="twitter:site" content="@{{ site.twitter }}">
|
||||
<meta name="twitter:creator" content="@{{ site.twitter }}">
|
||||
<meta name="twitter:title" content="{{ page.title | default: site.title | smartify }}">
|
||||
<meta name="twitter:description" content="{{ page.description | default: site.description | smartify }}">
|
||||
<meta name="twitter:image" content="{% if page.title %}{{ site.url | append: site.social_logo_path }}{% else %}{{ site.url | append: site.social_image_path }}{% endif %}">
|
||||
|
||||
<!-- Facebook -->
|
||||
<meta property="og:url" content="{{ site.url | append: page.url }}">
|
||||
<meta property="og:title" content="{{ page.title | default: site.title | smartify }}">
|
||||
<meta property="og:description" content="{{ page.description | default: site.description | smartify }}">
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:image" content="{{ site.url | replace: 'https://', 'http://' | append: site.social_image_path }}">
|
||||
<meta property="og:image:secure_url" content="{{ site.url | append: site.social_image_path }}">
|
||||
<meta property="og:image:type" content="image/png">
|
||||
<meta property="og:image:width" content="1200">
|
||||
<meta property="og:image:height" content="630">
|
@ -1,16 +0,0 @@
|
||||
<!-- Bootstrap core CSS -->
|
||||
{%- if jekyll.environment == "production" %}
|
||||
<link href="{{ site.baseurl }}/docs/{{ site.docs_version }}/dist/css/bootstrap.min.css" rel="stylesheet" integrity="{{ site.cdn.css_hash }}" crossorigin="anonymous">
|
||||
{% else %}
|
||||
<link href="{{ site.baseurl }}/docs/{{ site.docs_version }}/dist/css/bootstrap.css" rel="stylesheet">
|
||||
{% endif -%}
|
||||
|
||||
{%- if page.layout == "docs" or page.layout != "examples" -%}
|
||||
<!-- Documentation extras -->
|
||||
{% if page.layout == "docs" %}
|
||||
<link href="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css" rel="stylesheet">
|
||||
{% endif %}
|
||||
{% if page.layout != "examples" %}
|
||||
<link href="{{ site.baseurl }}/docs/{{ site.docs_version }}/assets/css/docs.min.css" rel="stylesheet">
|
||||
{% endif %}
|
||||
{%- endif -%}
|
@ -1,22 +0,0 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
{% include header.html %}
|
||||
</head>
|
||||
<body>
|
||||
{% include skippy.html %}
|
||||
|
||||
{% include docs-navbar.html %}
|
||||
|
||||
{% if page.layout == "simple" %}
|
||||
{{ content }}
|
||||
{% else %}
|
||||
<main id="content" role="main">
|
||||
{{ content }}
|
||||
</main>
|
||||
{% endif %}
|
||||
|
||||
{% include footer.html %}
|
||||
{% include scripts.html %}
|
||||
</body>
|
||||
</html>
|
@ -1,34 +0,0 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
{% include header.html %}
|
||||
</head>
|
||||
<body>
|
||||
{% include skippy.html %}
|
||||
|
||||
{% include docs-navbar.html %}
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row flex-xl-nowrap">
|
||||
<div class="col-12 col-md-3 col-xl-2 bd-sidebar">
|
||||
{% include docs-sidebar.html %}
|
||||
</div>
|
||||
|
||||
{% if page.toc %}
|
||||
<nav class="d-none d-xl-block col-xl-2 bd-toc" aria-label="Secondary navigation">
|
||||
{{ content | toc_only }}
|
||||
</nav>
|
||||
{% endif %}
|
||||
|
||||
<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 | smartify }}</h1>
|
||||
<p class="bd-lead">{{ page.description | smartify }}</p>
|
||||
{% include ads.html %}
|
||||
{{ content }}
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% include scripts.html %}
|
||||
</body>
|
||||
</html>
|
@ -1,52 +0,0 @@
|
||||
<!doctype html>
|
||||
<html lang="en"{% if page.html_class %} class="{{ page.html_class }}"{% endif %}>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="{{ site.authors }}">
|
||||
<meta name="generator" content="Jekyll v{{ jekyll.version }}">
|
||||
<title>{{ page.title | smartify }} · {{ site.title | smartify }}</title>
|
||||
|
||||
<link rel="canonical" href="{{ site.url | append: page.url }}">
|
||||
|
||||
{% include stylesheet.html %}
|
||||
|
||||
<style>
|
||||
.bd-placeholder-img {
|
||||
font-size: 1.125rem;
|
||||
text-anchor: middle;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.bd-placeholder-img-lg {
|
||||
font-size: 3.5rem;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
{%- for css in page.extra_css %}
|
||||
<!-- Custom styles for this template -->
|
||||
<link href="{{ css }}" rel="stylesheet">
|
||||
{%- endfor %}
|
||||
</head>
|
||||
<body{% if page.body_class %} class="{{ page.body_class }}"{% endif %}>
|
||||
{{ content }}
|
||||
|
||||
{%- if page.include_js != false -%}
|
||||
{%- if jekyll.environment == "production" -%}
|
||||
<script src="{{ site.baseurl }}/docs/{{ site.docs_version }}/dist/js/bootstrap.bundle.min.js" integrity="{{ site.cdn.js_bundle_hash }}" crossorigin="anonymous"></script>
|
||||
{%- else -%}
|
||||
<script src="{{ site.baseurl }}/docs/{{ site.docs_version }}/dist/js/bootstrap.bundle.js"></script>
|
||||
{%- endif -%}
|
||||
|
||||
{%- for js in page.extra_js %}
|
||||
<script src="{{ js }}"></script>
|
||||
{%- endfor %}
|
||||
{%- endif -%}
|
||||
</body>
|
||||
</html>
|
@ -1,16 +0,0 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
{% include header.html %}
|
||||
</head>
|
||||
<body>
|
||||
{% include skippy.html %}
|
||||
|
||||
{% include docs-navbar.html %}
|
||||
|
||||
{{ content }}
|
||||
|
||||
{% include footer.html %}
|
||||
{% include scripts.html %}
|
||||
</body>
|
||||
</html>
|
@ -1,18 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
---
|
||||
|
||||
<header class="d-flex flex-column flex-md-row align-items-md-center p-5 bg-light">
|
||||
<div class="pt-md-3 pb-md-4">
|
||||
<h1 class="bd-title mt-0">{{ page.title | smartify }}</h1>
|
||||
<p class="bd-lead">{{ page.description | smartify }}</p>
|
||||
{%- if page.title == "Examples" -%}
|
||||
<a href="{{ site.download.source }}" class="btn btn-lg btn-bd-primary" onclick="ga('send', 'event', 'Examples', 'Hero', 'Download');">Download source code</a>
|
||||
{%- endif -%}
|
||||
</div>
|
||||
{% include ads.html %}
|
||||
</header>
|
||||
|
||||
<main class="bd-content p-5" id="content" role="main">
|
||||
{{ content }}
|
||||
</main>
|
@ -14,10 +14,10 @@ Use either the Bootstrap mark (a capital **B**) or the standard logo (just **Boo
|
||||
|
||||
<div class="bd-brand-logos">
|
||||
<div class="bd-brand-item">
|
||||
<img class="svg" src="{{ site.baseurl }}/docs/{{ site.docs_version }}/assets/brand/bootstrap-solid.svg" alt="Bootstrap" width="144" height="144">
|
||||
<img class="svg" src="/docs/{{< param docs_version >}}/assets/brand/bootstrap-solid.svg" alt="Bootstrap" width="144" height="144">
|
||||
</div>
|
||||
<div class="bd-brand-item inverse">
|
||||
<img class="svg" src="{{ site.baseurl }}/docs/{{ site.docs_version }}/assets/brand/bootstrap-outline.svg" alt="Bootstrap" width="144" height="144">
|
||||
<img class="svg" src="/docs/{{< param docs_version >}}/assets/brand/bootstrap-outline.svg" alt="Bootstrap" width="144" height="144">
|
||||
</div>
|
||||
</div>
|
||||
<div class="bd-brand-logos">
|
||||
@ -35,13 +35,13 @@ Download the Bootstrap mark in one of three styles, each available as an SVG fil
|
||||
|
||||
<div class="bd-brand-logos">
|
||||
<div class="bd-brand-item">
|
||||
<img class="svg" src="{{ site.baseurl }}/docs/{{ site.docs_version }}/assets/brand/bootstrap-solid.svg" alt="Bootstrap" width="144" height="144">
|
||||
<img class="svg" src="/docs/{{< param docs_version >}}/assets/brand/bootstrap-solid.svg" alt="Bootstrap" width="144" height="144">
|
||||
</div>
|
||||
<div class="bd-brand-item inverse">
|
||||
<img class="svg" src="{{ site.baseurl }}/docs/{{ site.docs_version }}/assets/brand/bootstrap-outline.svg" alt="Bootstrap" width="144" height="144">
|
||||
<img class="svg" src="/docs/{{< param docs_version >}}/assets/brand/bootstrap-outline.svg" alt="Bootstrap" width="144" height="144">
|
||||
</div>
|
||||
<div class="bd-brand-item inverse">
|
||||
<img class="svg" src="{{ site.baseurl }}/docs/{{ site.docs_version }}/assets/brand/bootstrap-punchout.svg" alt="Bootstrap" width="144" height="144">
|
||||
<img class="svg" src="/docs/{{< param docs_version >}}/assets/brand/bootstrap-punchout.svg" alt="Bootstrap" width="144" height="144">
|
||||
</div>
|
||||
</div>
|
||||
|
@ -5,7 +5,7 @@ description: Commonly asked questions about Bootstrap's open source license.
|
||||
group: about
|
||||
---
|
||||
|
||||
Bootstrap is released under the MIT license and is copyright {{ site.time | date: "%Y" }} Twitter. Boiled down to smaller chunks, it can be described with the following conditions.
|
||||
Bootstrap is released under the MIT license and is copyright {{< year >}} Twitter. Boiled down to smaller chunks, it can be described with the following conditions.
|
||||
|
||||
#### It requires you to:
|
||||
|
||||
@ -31,4 +31,4 @@ Bootstrap is released under the MIT license and is copyright {{ site.time | date
|
||||
- Include the source of Bootstrap itself, or of any modifications you may have made to it, in any redistribution you may assemble that includes it
|
||||
- Submit changes that you make to Bootstrap back to the Bootstrap project (though such feedback is encouraged)
|
||||
|
||||
The full Bootstrap license is located [in the project repository]({{ site.repo }}/blob/v{{ site.current_version }}/LICENSE) for more information.
|
||||
The full Bootstrap license is located [in the project repository]({{< param repo >}}/blob/v{{< param current_version >}}/LICENSE) for more information.
|
@ -3,7 +3,7 @@ layout: docs
|
||||
title: About
|
||||
description: Learn more about the team maintaining Bootstrap, how and why the project started, and how to get involved.
|
||||
group: about
|
||||
redirect_from:
|
||||
aliases:
|
||||
- "/about/"
|
||||
- "/docs/4.3/about/"
|
||||
---
|
||||
@ -18,10 +18,10 @@ Originally created by a designer and a developer at Twitter, Bootstrap has becom
|
||||
|
||||
Bootstrap was created at Twitter in mid-2010 by [@mdo](https://twitter.com/mdo) and [@fat](https://twitter.com/fat). Prior to being an open-sourced framework, Bootstrap was known as _Twitter Blueprint_. A few months into development, Twitter held its [first Hack Week](https://blog.twitter.com/engineering/en_us/a/2010/hack-week.html) and the project exploded as developers of all skill levels jumped in without any external guidance. It served as the style guide for internal tools development at the company for over a year before its public release, and continues to do so today.
|
||||
|
||||
Originally [released](https://blog.twitter.com/developer/en_us/a/2011/bootstrap-twitter.html) on <time datetime="2011-08-19 11:25">Friday, August 19, 2011</time>, we've since had over [twenty releases]({{ site.repo }}/releases), including two major rewrites with v2 and v3. With Bootstrap 2, we added responsive functionality to the entire framework as an optional stylesheet. Building on that with Bootstrap 3, we rewrote the library once more to make it responsive by default with a mobile first approach.
|
||||
Originally [released](https://blog.twitter.com/developer/en_us/a/2011/bootstrap-twitter.html) on <time datetime="2011-08-19 11:25">Friday, August 19, 2011</time>, we've since had over [twenty releases]({{< param repo >}}/releases), including two major rewrites with v2 and v3. With Bootstrap 2, we added responsive functionality to the entire framework as an optional stylesheet. Building on that with Bootstrap 3, we rewrote the library once more to make it responsive by default with a mobile first approach.
|
||||
|
||||
With Bootstrap 4, we once again rewrote the project to account for two key architectural changes: a migration to Sass and the move to CSS's flexbox. Our intention is to help in a small way to move the web development community forward by pushing for newer CSS properties, fewer dependencies, and new technologies across more modern browsers.
|
||||
|
||||
## Get involved
|
||||
|
||||
Get involved with Bootstrap development by [opening an issue]({{ site.repo }}/issues/new) or submitting a pull request. Read our [contributing guidelines]({{ site.repo }}/blob/v{{ site.current_version }}/.github/CONTRIBUTING.md) for information on how we develop.
|
||||
Get involved with Bootstrap development by [opening an issue]({{< param repo >}}/issues/new) or submitting a pull request. Read our [contributing guidelines]({{< param repo >}}/blob/v{{< param current_version >}}/.github/CONTRIBUTING.md) for information on how we develop.
|
23
site/content/docs/4.3/about/team.md
Normal file
@ -0,0 +1,23 @@
|
||||
---
|
||||
layout: docs
|
||||
title: Team
|
||||
description: An overview of the founding team and core contributors to Bootstrap.
|
||||
group: about
|
||||
---
|
||||
|
||||
Bootstrap is maintained by the founding team and a small group of invaluable core contributors, with the massive support and involvement of our community.
|
||||
|
||||
{{< team.inline >}}
|
||||
<div class="list-group mb-3">
|
||||
{{- range (index $.Site.Data "core-team") }}
|
||||
<a class="list-group-item list-group-item-action d-flex align-items-center" href="https://github.com/{{ .user }}">
|
||||
<img src="https://github.com/{{ .user }}.png" alt="@{{ .user }}" width="32" height="32" class="rounded mr-2">
|
||||
<span>
|
||||
<strong>{{ .name }}</strong> @{{ .user }}
|
||||
</span>
|
||||
</a>
|
||||
{{ end -}}
|
||||
</div>
|
||||
{{< /team.inline >}}
|
||||
|
||||
Get involved with Bootstrap development by [opening an issue]({{< param repo >}}/issues/new) or submitting a pull request. Read our [contributing guidelines]({{< param repo >}}/blob/v{{< param current_version >}}/.github/CONTRIBUTING.md) for information on how we develop.
|
@ -7,11 +7,13 @@ group: about
|
||||
|
||||
Community members have translated Bootstrap's documentation into various languages. None are officially supported and they may not always be up to date.
|
||||
|
||||
{{< translations.inline >}}
|
||||
<ul>
|
||||
{% for language in site.data.translations %}
|
||||
<li><a href="{{ language.url }}" hreflang="{{ language.code }}">{{ language.description }} ({{ language.name }})</a></li>
|
||||
{% endfor %}
|
||||
{{ range .Site.Data.translations -}}
|
||||
<li><a href="{{ .url }}" hreflang="{{ .code }}">{{ .description }} ({{ .name }})</a></li>
|
||||
{{ end -}}
|
||||
</ul>
|
||||
{{< /translations.inline >}}
|
||||
|
||||
**We don't help organize or host translations, we just link to them.**
|
||||
|
@ -2,12 +2,12 @@
|
||||
layout: docs
|
||||
title: Wall of browser bugs
|
||||
group: browser-bugs
|
||||
redirect_from: "/browser-bugs/"
|
||||
aliases: "/browser-bugs/"
|
||||
---
|
||||
|
||||
Bootstrap currently works around several outstanding browser bugs in major browsers to deliver the best cross-browser experience possible. Some bugs, like those listed below, cannot be solved by us.
|
||||
|
||||
We publicly list browser bugs that are impacting us here, in the hopes of expediting the process of fixing them. For information on Bootstrap's browser compatibility, [see our browser compatibility docs]({{ site.baseurl }}/docs/{{ site.docs_version }}/getting-started/browsers-devices/#supported-browsers).
|
||||
We publicly list browser bugs that are impacting us here, in the hopes of expediting the process of fixing them. For information on Bootstrap's browser compatibility, [see our browser compatibility docs](/docs/{{< param docs_version >}}/getting-started/browsers-devices/#supported-browsers).
|
||||
|
||||
See also:
|
||||
|
||||
@ -25,14 +25,16 @@ See also:
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for bug in site.data.browser-bugs %}
|
||||
{{< bug.inline >}}
|
||||
{{- range (index $.Site.Data $data) }}
|
||||
<tr>
|
||||
<td>{{ bug.browser }}</td>
|
||||
<td>{{ bug.summary | markdownify }}</td>
|
||||
<td>{{ .browser | chomp }}</td>
|
||||
<td>{{ .summary | markdownify }}</td>
|
||||
<td>{% include bugify.html content=bug.upstream_bug %}</td>
|
||||
<td>{% include bugify.html content=bug.origin %}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{{- end }}
|
||||
{{< /bug.inline >}}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@ -52,13 +54,15 @@ We publicly list these "most wanted" feature requests here, in the hopes of expe
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for feat in site.data.browser-features %}
|
||||
{{< feat.inline >}}
|
||||
{{ range (index $.Site.Data "browser-features") }}
|
||||
<tr>
|
||||
<td>{{ feat.browser }}</td>
|
||||
<td>{{ feat.summary | markdownify }}</td>
|
||||
<td>{{ .browser }}</td>
|
||||
<td>{{ .summary | markdownify }}</td>
|
||||
<td>{% include bugify.html content=feat.upstream_bug %}</td>
|
||||
<td>{% include bugify.html content=feat.origin %}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{{ end }}
|
||||
{{< /feat.inline >}}
|
||||
</tbody>
|
||||
</table>
|
@ -3,7 +3,7 @@ layout: docs
|
||||
title: Alerts
|
||||
description: Provide contextual feedback messages for typical user actions with the handful of available and flexible alert messages.
|
||||
group: components
|
||||
redirect_from:
|
||||
aliases:
|
||||
- "/components/"
|
||||
- "/docs/4.3/components/"
|
||||
toc: true
|
||||
@ -13,41 +13,44 @@ toc: true
|
||||
|
||||
Alerts are available for any length of text, as well as an optional dismiss button. For proper styling, use one of the eight **required** contextual classes (e.g., `.alert-success`). For inline dismissal, use the [alerts JavaScript plugin](#dismissing).
|
||||
|
||||
{% capture example %}
|
||||
{% for color in site.data.theme-colors %}
|
||||
<div class="alert alert-{{ color.name }}" role="alert">
|
||||
A simple {{ color.name }} alert—check it out!
|
||||
</div>{% endfor %}
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< example >}}
|
||||
{{< alerts.inline >}}
|
||||
{{- range (index $.Site.Data "theme-colors") }}
|
||||
<div class="alert alert-{{ .name }}" role="alert">
|
||||
A simple {{ .name }} alert—check it out!
|
||||
</div>{{- end -}}
|
||||
{{< /alerts.inline >}}
|
||||
{{< /example >}}
|
||||
|
||||
{% include callout-warning-color-assistive-technologies.md %}
|
||||
{{< callout info >}}
|
||||
{{< partial "callout-warning-color-assistive-technologies.md" >}}
|
||||
{{< /callout >}}
|
||||
|
||||
### Link color
|
||||
|
||||
Use the `.alert-link` utility class to quickly provide matching colored links within any alert.
|
||||
|
||||
{% capture example %}
|
||||
{% for color in site.data.theme-colors %}
|
||||
<div class="alert alert-{{ color.name }}" role="alert">
|
||||
A simple {{ color.name }} alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
|
||||
</div>{% endfor %}
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< example >}}
|
||||
{{< alerts.inline >}}
|
||||
{{- range (index $.Site.Data "theme-colors") }}
|
||||
<div class="alert alert-{{ .name }}" role="alert">
|
||||
A simple {{ .name }} alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
|
||||
</div>{{ end -}}
|
||||
{{< /alerts.inline >}}
|
||||
{{< /example >}}
|
||||
|
||||
### Additional content
|
||||
|
||||
Alerts can also contain additional HTML elements like headings, paragraphs and dividers.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="alert alert-success" role="alert">
|
||||
<h4 class="alert-heading">Well done!</h4>
|
||||
<p>Aww yeah, you successfully read this important alert message. This example text is going to run a bit longer so that you can see how spacing within an alert works with this kind of content.</p>
|
||||
<hr>
|
||||
<p class="mb-0">Whenever you need to, be sure to use margin utilities to keep things nice and tidy.</p>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
|
||||
### Dismissing
|
||||
@ -55,22 +58,21 @@ Alerts can also contain additional HTML elements like headings, paragraphs and d
|
||||
Using the alert JavaScript plugin, it's possible to dismiss any alert inline. Here's how:
|
||||
|
||||
- Be sure you've loaded the alert plugin, or the compiled Bootstrap JavaScript.
|
||||
- If you're building our JavaScript from source, it [requires `util.js`]({{ site.baseurl }}/docs/{{ site.docs_version }}/getting-started/javascript/#util). The compiled version includes this.
|
||||
- If you're building our JavaScript from source, it [requires `util.js`](/docs/{{< param docs_version >}}/getting-started/javascript/#util). The compiled version includes this.
|
||||
- Add a dismiss button and the `.alert-dismissible` class, which adds extra padding to the right of the alert and positions the `.close` button.
|
||||
- On the dismiss button, add the `data-dismiss="alert"` attribute, which triggers the JavaScript functionality. Be sure to use the `<button>` element with it for proper behavior across all devices.
|
||||
- To animate alerts when dismissing them, be sure to add the `.fade` and `.show` classes.
|
||||
|
||||
You can see this in action with a live demo:
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="alert alert-warning alert-dismissible fade show" role="alert">
|
||||
<strong>Holy guacamole!</strong> You should check in on some of those fields below.
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## JavaScript behavior
|
||||
|
||||
@ -78,20 +80,20 @@ You can see this in action with a live demo:
|
||||
|
||||
Enable dismissal of an alert via JavaScript:
|
||||
|
||||
{% highlight js %}
|
||||
{{< highlight js >}}
|
||||
var alertList = document.querySelectorAll('.alert')
|
||||
alertList.forEach(function (alert) {
|
||||
new bootstrap.Alert(alert)
|
||||
})
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
Or with `data` attributes on a button **within the alert**, as demonstrated above:
|
||||
|
||||
{% highlight html %}
|
||||
{{< highlight html >}}
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
Note that closing an alert will remove it from the DOM.
|
||||
|
||||
@ -99,10 +101,10 @@ Note that closing an alert will remove it from the DOM.
|
||||
|
||||
You can create an alert instance with the alert constructor, for example:
|
||||
|
||||
{% highlight js %}
|
||||
{{< highlight js >}}
|
||||
var myAlert = document.getElementById('myAlert')
|
||||
var bsAlert = new bootstrap.Alert(myAlert)
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
This makes an alert listen for click events on descendant elements which have the `data-dismiss="alert"` attribute. (Not necessary when using the data-api's auto-initialization.)
|
||||
|
||||
@ -112,11 +114,11 @@ This makes an alert listen for click events on descendant elements which have th
|
||||
| `dispose` | Destroys an element's alert. |
|
||||
| `_getInstance` | *Static* method which allows you to get the alert instance associated to a DOM element, you can use it like this: `bootstrap.Alert._getInstance(alert)` |
|
||||
|
||||
{% highlight js %}
|
||||
{{< highlight js >}}
|
||||
var alertNode = document.querySelector('.alert')
|
||||
var alert = bootstrap.Alert._getInstance(alertNode)
|
||||
alert.close()
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
### Events
|
||||
|
||||
@ -127,9 +129,9 @@ Bootstrap's alert plugin exposes a few events for hooking into alert functionali
|
||||
| `close.bs.alert` | This event fires immediately when the <code>close</code> instance method is called. |
|
||||
| `closed.bs.alert` | This event is fired when the alert has been closed (will wait for CSS transitions to complete). |
|
||||
|
||||
{% highlight js %}
|
||||
{{< highlight js >}}
|
||||
var myAlert = document.getElementById('myAlert')
|
||||
myAlert.addEventListener('closed.bs.alert', function () {
|
||||
// do something…
|
||||
})
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
@ -10,65 +10,67 @@ toc: true
|
||||
|
||||
Badges scale to match the size of the immediate parent element by using relative font sizing and `em` units.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<h1>Example heading <span class="badge badge-secondary">New</span></h1>
|
||||
<h2>Example heading <span class="badge badge-secondary">New</span></h2>
|
||||
<h3>Example heading <span class="badge badge-secondary">New</span></h3>
|
||||
<h4>Example heading <span class="badge badge-secondary">New</span></h4>
|
||||
<h5>Example heading <span class="badge badge-secondary">New</span></h5>
|
||||
<h6>Example heading <span class="badge badge-secondary">New</span></h6>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
Badges can be used as part of links or buttons to provide a counter.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<button type="button" class="btn btn-primary">
|
||||
Notifications <span class="badge badge-light">4</span>
|
||||
</button>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
Note that depending on how they are used, badges may be confusing for users of screen readers and similar assistive technologies. While the styling of badges provides a visual cue as to their purpose, these users will simply be presented with the content of the badge. Depending on the specific situation, these badges may seem like random additional words or numbers at the end of a sentence, link, or button.
|
||||
|
||||
Unless the context is clear (as with the "Notifications" example, where it is understood that the "4" is the number of notifications), consider including additional context with a visually hidden piece of additional text.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<button type="button" class="btn btn-primary">
|
||||
Profile <span class="badge badge-light">9</span>
|
||||
<span class="sr-only">unread messages</span>
|
||||
</button>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Contextual variations
|
||||
|
||||
Add any of the below mentioned modifier classes to change the appearance of a badge.
|
||||
|
||||
{% capture example %}
|
||||
{% for color in site.data.theme-colors %}
|
||||
<span class="badge badge-{{ color.name }}">{{ color.name | capitalize }}</span>{% endfor %}
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< example >}}
|
||||
{{< badge.inline >}}
|
||||
{{- range (index $.Site.Data "theme-colors") }}
|
||||
<span class="badge badge-{{ .name }}">{{ .name | title }}</span>{{- end -}}
|
||||
{{< /badge.inline >}}
|
||||
{{< /example >}}
|
||||
|
||||
{% include callout-warning-color-assistive-technologies.md %}
|
||||
{{< callout info >}}
|
||||
{{< partial "callout-warning-color-assistive-technologies.md" >}}
|
||||
{{< /callout >}}
|
||||
|
||||
## Pill badges
|
||||
|
||||
Use the `.badge-pill` modifier class to make badges more rounded (with a larger `border-radius` and additional horizontal `padding`). Useful if you miss the badges from v3.
|
||||
|
||||
{% capture example %}
|
||||
{% for color in site.data.theme-colors %}
|
||||
<span class="badge badge-pill badge-{{ color.name }}">{{ color.name | capitalize }}</span>{% endfor %}
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< example >}}
|
||||
{{< badge.inline >}}
|
||||
{{- range (index $.Site.Data "theme-colors") }}
|
||||
<span class="badge badge-pill badge-{{ .name }}">{{ .name | title }}</span>{{- end -}}
|
||||
{{< /badge.inline >}}
|
||||
{{< /example >}}
|
||||
|
||||
## Links
|
||||
|
||||
Using the contextual `.badge-*` classes on an `<a>` element quickly provide _actionable_ badges with hover and focus states.
|
||||
|
||||
{% capture example %}
|
||||
{% for color in site.data.theme-colors %}
|
||||
<a href="#" class="badge badge-{{ color.name }}">{{ color.name | capitalize }}</a>{% endfor %}
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< example >}}
|
||||
{{< badge.inline >}}
|
||||
{{- range (index $.Site.Data "theme-colors") }}
|
||||
<a href="#" class="badge badge-{{ .name }}">{{ .name | title }}</a>{{- end -}}
|
||||
{{< /badge.inline >}}
|
||||
{{< /example >}}
|
@ -7,7 +7,7 @@ group: components
|
||||
|
||||
## Example
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<nav aria-label="breadcrumb">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item active" aria-current="page">Home</li>
|
||||
@ -28,8 +28,7 @@ group: components
|
||||
<li class="breadcrumb-item active" aria-current="page">Data</li>
|
||||
</ol>
|
||||
</nav>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Changing the separator
|
||||
|
@ -8,31 +8,29 @@ toc: true
|
||||
|
||||
## Basic example
|
||||
|
||||
Wrap a series of buttons with `.btn` in `.btn-group`. Add on optional JavaScript radio and checkbox style behavior with [our buttons plugin]({{ site.baseurl }}/docs/{{ site.docs_version }}/components/buttons/#button-plugin).
|
||||
Wrap a series of buttons with `.btn` in `.btn-group`. Add on optional JavaScript radio and checkbox style behavior with [our buttons plugin](/docs/{{< param docs_version >}}/components/buttons/#button-plugin).
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="btn-group" role="group" aria-label="Basic example">
|
||||
<button type="button" class="btn btn-secondary">Left</button>
|
||||
<button type="button" class="btn btn-secondary">Middle</button>
|
||||
<button type="button" class="btn btn-secondary">Right</button>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
{% capture callout %}
|
||||
{{< callout warning >}}
|
||||
##### Ensure correct `role` and provide a label
|
||||
|
||||
In order for assistive technologies (such as screen readers) to convey that a series of buttons is grouped, an appropriate `role` attribute needs to be provided. For button groups, this would be `role="group"`, while toolbars should have a `role="toolbar"`.
|
||||
|
||||
In addition, groups and toolbars should be given an explicit label, as most assistive technologies will otherwise not announce them, despite the presence of the correct role attribute. In the examples provided here, we use `aria-label`, but alternatives such as `aria-labelledby` can also be used.
|
||||
{% endcapture %}
|
||||
{% include callout.html content=callout type="warning" %}
|
||||
{{< /callout >}}
|
||||
|
||||
## Button toolbar
|
||||
|
||||
Combine sets of button groups into button toolbars for more complex components. Use utility classes as needed to space out groups, buttons, and more.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="btn-toolbar" role="toolbar" aria-label="Toolbar with button groups">
|
||||
<div class="btn-group mr-2" role="group" aria-label="First group">
|
||||
<button type="button" class="btn btn-secondary">1</button>
|
||||
@ -49,12 +47,11 @@ Combine sets of button groups into button toolbars for more complex components.
|
||||
<button type="button" class="btn btn-secondary">8</button>
|
||||
</div>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
Feel free to mix input groups with button groups in your toolbars. Similar to the example above, you'll likely need some utilities though to space things properly.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="btn-toolbar mb-3" role="toolbar" aria-label="Toolbar with button groups">
|
||||
<div class="btn-group mr-2" role="group" aria-label="First group">
|
||||
<button type="button" class="btn btn-secondary">1</button>
|
||||
@ -84,8 +81,7 @@ Feel free to mix input groups with button groups in your toolbars. Similar to th
|
||||
<input type="text" class="form-control" placeholder="Input group example" aria-label="Input group example" aria-describedby="btnGroupAddon2">
|
||||
</div>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Sizing
|
||||
|
||||
@ -111,17 +107,17 @@ Instead of applying button sizing classes to every button in a group, just add `
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% highlight html %}
|
||||
{{< highlight html >}}
|
||||
<div class="btn-group btn-group-lg" role="group" aria-label="...">...</div>
|
||||
<div class="btn-group" role="group" aria-label="...">...</div>
|
||||
<div class="btn-group btn-group-sm" role="group" aria-label="...">...</div>
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
## Nesting
|
||||
|
||||
Place a `.btn-group` within another `.btn-group` when you want dropdown menus mixed with a series of buttons.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="btn-group" role="group" aria-label="Button group with nested dropdown">
|
||||
<button type="button" class="btn btn-secondary">1</button>
|
||||
<button type="button" class="btn btn-secondary">2</button>
|
||||
@ -136,8 +132,7 @@ Place a `.btn-group` within another `.btn-group` when you want dropdown menus mi
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Vertical variation
|
||||
|
||||
@ -200,8 +195,8 @@ Make a set of buttons appear vertically stacked rather than horizontally. **Spli
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% highlight html %}
|
||||
{{< highlight html >}}
|
||||
<div class="btn-group-vertical">
|
||||
...
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
@ -10,15 +10,19 @@ toc: true
|
||||
|
||||
Bootstrap includes several predefined button styles, each serving its own semantic purpose, with a few extras thrown in for more control.
|
||||
|
||||
{% capture example %}
|
||||
{% for color in site.data.theme-colors %}
|
||||
<button type="button" class="btn btn-{{ color.name }}">{{ color.name | capitalize }}</button>{% endfor %}
|
||||
{{< example >}}
|
||||
{{< buttons.inline >}}
|
||||
{{- range (index $.Site.Data "theme-colors") }}
|
||||
<button type="button" class="btn btn-{{ .name }}">{{ .name | title }}</button>
|
||||
{{- end -}}
|
||||
{{< /buttons.inline >}}
|
||||
|
||||
<button type="button" class="btn btn-link">Link</button>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
{% include callout-warning-color-assistive-technologies.md %}
|
||||
{{< callout info >}}
|
||||
{{< partial "callout-warning-color-assistive-technologies.md" >}}
|
||||
{{< /callout >}}
|
||||
|
||||
## Button tags
|
||||
|
||||
@ -26,68 +30,64 @@ The `.btn` classes are designed to be used with the `<button>` element. However,
|
||||
|
||||
When using button classes on `<a>` elements that are used to trigger in-page functionality (like collapsing content), rather than linking to new pages or sections within the current page, these links should be given a `role="button"` to appropriately convey their purpose to assistive technologies such as screen readers.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<a class="btn btn-primary" href="#" role="button">Link</a>
|
||||
<button class="btn btn-primary" type="submit">Button</button>
|
||||
<input class="btn btn-primary" type="button" value="Input">
|
||||
<input class="btn btn-primary" type="submit" value="Submit">
|
||||
<input class="btn btn-primary" type="reset" value="Reset">
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Outline buttons
|
||||
|
||||
In need of a button, but not the hefty background colors they bring? Replace the default modifier classes with the `.btn-outline-*` ones to remove all background images and colors on any button.
|
||||
|
||||
{% capture example %}
|
||||
{% for color in site.data.theme-colors %}
|
||||
<button type="button" class="btn btn-outline-{{ color.name }}">{{ color.name | capitalize }}</button>{% endfor %}
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< example >}}
|
||||
{{< buttons.inline >}}
|
||||
{{- range (index $.Site.Data "theme-colors") }}
|
||||
<button type="button" class="btn btn-outline-{{ .name }}">{{ .name | title }}</button>
|
||||
{{- end -}}
|
||||
{{< /buttons.inline >}}
|
||||
{{< /example >}}
|
||||
|
||||
## Sizes
|
||||
|
||||
Fancy larger or smaller buttons? Add `.btn-lg` or `.btn-sm` for additional sizes.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<button type="button" class="btn btn-primary btn-lg">Large button</button>
|
||||
<button type="button" class="btn btn-secondary btn-lg">Large button</button>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<button type="button" class="btn btn-primary btn-sm">Small button</button>
|
||||
<button type="button" class="btn btn-secondary btn-sm">Small button</button>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
Create block level buttons—those that span the full width of a parent—by adding `.btn-block`.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<button type="button" class="btn btn-primary btn-lg btn-block">Block level button</button>
|
||||
<button type="button" class="btn btn-secondary btn-lg btn-block">Block level button</button>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Active state
|
||||
|
||||
Buttons will appear pressed (with a darker background, darker border, and inset shadow) when active. **There's no need to add a class to `<button>`s as they use a pseudo-class**. However, you can still force the same active appearance with `.active` (and include the <code>aria-pressed="true"</code> attribute) should you need to replicate the state programmatically.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<a href="#" class="btn btn-primary btn-lg active" role="button" aria-pressed="true">Primary link</a>
|
||||
<a href="#" class="btn btn-secondary btn-lg active" role="button" aria-pressed="true">Link</a>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Disabled state
|
||||
|
||||
Make buttons look inactive by adding the `disabled` boolean attribute to any `<button>` element.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<button type="button" class="btn btn-lg btn-primary" disabled>Primary button</button>
|
||||
<button type="button" class="btn btn-secondary btn-lg" disabled>Button</button>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
Disabled buttons using the `<a>` element behave a bit different:
|
||||
|
||||
@ -95,18 +95,16 @@ Disabled buttons using the `<a>` element behave a bit different:
|
||||
- Some future-friendly styles are included to disable all `pointer-events` on anchor buttons. In browsers which support that property, you won't see the disabled cursor at all.
|
||||
- Disabled buttons should include the `aria-disabled="true"` attribute to indicate the state of the element to assistive technologies.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<a href="#" class="btn btn-primary btn-lg disabled" tabindex="-1" role="button" aria-disabled="true">Primary link</a>
|
||||
<a href="#" class="btn btn-secondary btn-lg disabled" tabindex="-1" role="button" aria-disabled="true">Link</a>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
{% capture callout %}
|
||||
{{< callout warning >}}
|
||||
##### Link functionality caveat
|
||||
|
||||
The `.disabled` class uses `pointer-events: none` to try to disable the link functionality of `<a>`s, but that CSS property is not yet standardized. In addition, even in browsers that do support `pointer-events: none`, keyboard navigation remains unaffected, meaning that sighted keyboard users and users of assistive technologies will still be able to activate these links. So to be safe, add a `tabindex="-1"` attribute on these links (to prevent them from receiving keyboard focus) and use custom JavaScript to disable their functionality.
|
||||
{% endcapture %}
|
||||
{% include callout.html content=callout type="warning" %}
|
||||
{{< /callout >}}
|
||||
|
||||
## Button plugin
|
||||
|
||||
@ -116,12 +114,11 @@ Do more with buttons. Control button states or create groups of buttons for more
|
||||
|
||||
Add `data-toggle="button"` to toggle a button's `active` state. If you're pre-toggling a button, you must manually add the `.active` class **and** `aria-pressed="true"` to the `<button>`.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<button type="button" class="btn btn-primary" data-toggle="button" aria-pressed="false" autocomplete="off">
|
||||
Single toggle
|
||||
</button>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
### Checkbox and radio buttons
|
||||
|
||||
@ -131,16 +128,15 @@ The checked state for these buttons is **only updated via `click` event** on the
|
||||
|
||||
Note that pre-checked buttons require you to manually add the `.active` class to the input's `<label>`.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="btn-group-toggle" data-toggle="buttons">
|
||||
<label class="btn btn-secondary active">
|
||||
<input type="checkbox" checked autocomplete="off"> Checked
|
||||
</label>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="btn-group btn-group-toggle" data-toggle="buttons">
|
||||
<label class="btn btn-secondary active">
|
||||
<input type="radio" name="options" id="option1" autocomplete="off" checked> Active
|
||||
@ -152,17 +148,16 @@ Note that pre-checked buttons require you to manually add the `.active` class to
|
||||
<input type="radio" name="options" id="option3" autocomplete="off"> Radio
|
||||
</label>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
### Methods
|
||||
|
||||
You can create a button instance with the button constructor, for example:
|
||||
|
||||
{% highlight js %}
|
||||
{{< highlight js >}}
|
||||
var button = document.getElementById('myButton')
|
||||
var bsButton = new bootstrap.Button(button)
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
| Method | Description |
|
||||
| --------- | ------------------------------------------------------------------------------- |
|
||||
@ -171,10 +166,10 @@ var bsButton = new bootstrap.Button(button)
|
||||
|
||||
For example, to toggle all buttons
|
||||
|
||||
{% highlight js %}
|
||||
{{< highlight js >}}
|
||||
var buttons = document.querySelectorAll('.btn')
|
||||
buttons.forEach(function (button) {
|
||||
var button = new bootstrap.Button(button)
|
||||
button.toggle()
|
||||
})
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
@ -12,21 +12,20 @@ A **card** is a flexible and extensible content container. It includes options f
|
||||
|
||||
## Example
|
||||
|
||||
Cards are built with as little markup and styles as possible, but still manage to deliver a ton of control and customization. Built with flexbox, they offer easy alignment and mix well with other Bootstrap components. They have no `margin` by default, so use [spacing utilities]({{ site.baseurl }}/docs/{{ site.docs_version }}/utilities/spacing/) as needed.
|
||||
Cards are built with as little markup and styles as possible, but still manage to deliver a ton of control and customization. Built with flexbox, they offer easy alignment and mix well with other Bootstrap components. They have no `margin` by default, so use [spacing utilities](/docs/{{< param docs_version >}}/utilities/spacing/) as needed.
|
||||
|
||||
Below is an example of a basic card with mixed content and a fixed width. Cards have no fixed width to start, so they'll naturally fill the full width of its parent element. This is easily customized with our various [sizing options](#sizing).
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="card" style="width: 18rem;">
|
||||
{% include icons/placeholder.svg width="100%" height="180" class="card-img-top" text="Image cap" %}
|
||||
{{< placeholder width="100%" height="180" class="card-img-top" text="Image cap" >}}
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">Card title</h5>
|
||||
<p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
|
||||
<a href="#" class="btn btn-primary">Go somewhere</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Content types
|
||||
|
||||
@ -36,14 +35,13 @@ Cards support a wide variety of content, including images, text, list groups, li
|
||||
|
||||
The building block of a card is the `.card-body`. Use it whenever you need a padded section within a card.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
This is some text within a card body.
|
||||
</div>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
### Titles, text, and links
|
||||
|
||||
@ -51,7 +49,7 @@ Card titles are used by adding `.card-title` to a `<h*>` tag. In the same way, l
|
||||
|
||||
Subtitles are used by adding a `.card-subtitle` to a `<h*>` tag. If the `.card-title` and the `.card-subtitle` items are placed in a `.card-body` item, the card title and subtitle are aligned nicely.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="card" style="width: 18rem;">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">Card title</h5>
|
||||
@ -61,28 +59,26 @@ Subtitles are used by adding a `.card-subtitle` to a `<h*>` tag. If the `.card-t
|
||||
<a href="#" class="card-link">Another link</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
### Images
|
||||
|
||||
`.card-img-top` places an image to the top of the card. With `.card-text`, text can be added to the card. Text within `.card-text` can also be styled with the standard HTML tags.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="card" style="width: 18rem;">
|
||||
{% include icons/placeholder.svg width="100%" height="180" class="card-img-top" text="Image cap" %}
|
||||
{{< placeholder width="100%" height="180" class="card-img-top" text="Image cap" >}}
|
||||
<div class="card-body">
|
||||
<p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
|
||||
</div>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
### List groups
|
||||
|
||||
Create lists of content in a card with a flush list group.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="card" style="width: 18rem;">
|
||||
<ul class="list-group list-group-flush">
|
||||
<li class="list-group-item">Cras justo odio</li>
|
||||
@ -90,10 +86,9 @@ Create lists of content in a card with a flush list group.
|
||||
<li class="list-group-item">Vestibulum at eros</li>
|
||||
</ul>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="card" style="width: 18rem;">
|
||||
<div class="card-header">
|
||||
Featured
|
||||
@ -104,16 +99,15 @@ Create lists of content in a card with a flush list group.
|
||||
<li class="list-group-item">Vestibulum at eros</li>
|
||||
</ul>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
### Kitchen sink
|
||||
|
||||
Mix and match multiple content types to create the card you need, or throw everything in there. Shown below are image styles, blocks, text styles, and a list group—all wrapped in a fixed-width card.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="card" style="width: 18rem;">
|
||||
{% include icons/placeholder.svg width="100%" height="180" class="card-img-top" text="Image cap" %}
|
||||
{{< placeholder width="100%" height="180" class="card-img-top" text="Image cap" >}}
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">Card title</h5>
|
||||
<p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
|
||||
@ -128,14 +122,13 @@ Mix and match multiple content types to create the card you need, or throw every
|
||||
<a href="#" class="card-link">Another link</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
### Header and footer
|
||||
|
||||
Add an optional header and/or footer within a card.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
Featured
|
||||
@ -146,12 +139,11 @@ Add an optional header and/or footer within a card.
|
||||
<a href="#" class="btn btn-primary">Go somewhere</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
Card headers can be styled by adding `.card-header` to `<h*>` elements.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="card">
|
||||
<h5 class="card-header">Featured</h5>
|
||||
<div class="card-body">
|
||||
@ -160,10 +152,9 @@ Card headers can be styled by adding `.card-header` to `<h*>` elements.
|
||||
<a href="#" class="btn btn-primary">Go somewhere</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
Quote
|
||||
@ -175,10 +166,9 @@ Card headers can be styled by adding `.card-header` to `<h*>` elements.
|
||||
</blockquote>
|
||||
</div>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="card text-center">
|
||||
<div class="card-header">
|
||||
Featured
|
||||
@ -192,8 +182,7 @@ Card headers can be styled by adding `.card-header` to `<h*>` elements.
|
||||
2 days ago
|
||||
</div>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Sizing
|
||||
|
||||
@ -203,7 +192,7 @@ Cards assume no specific `width` to start, so they'll be 100% wide unless otherw
|
||||
|
||||
Using the grid, wrap cards in columns and rows as needed.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="card">
|
||||
@ -224,14 +213,13 @@ Using the grid, wrap cards in columns and rows as needed.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
### Using utilities
|
||||
|
||||
Use our handful of [available sizing utilities]({{ site.baseurl }}/docs/{{ site.docs_version }}/utilities/sizing/) to quickly set a card's width.
|
||||
Use our handful of [available sizing utilities](/docs/{{< param docs_version >}}/utilities/sizing/) to quickly set a card's width.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="card w-75">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">Card title</h5>
|
||||
@ -247,14 +235,13 @@ Use our handful of [available sizing utilities]({{ site.baseurl }}/docs/{{ site.
|
||||
<a href="#" class="btn btn-primary">Button</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
### Using custom CSS
|
||||
|
||||
Use custom CSS in your stylesheets or as inline styles to set a width.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="card" style="width: 18rem;">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">Special title treatment</h5>
|
||||
@ -262,14 +249,13 @@ Use custom CSS in your stylesheets or as inline styles to set a width.
|
||||
<a href="#" class="btn btn-primary">Go somewhere</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Text alignment
|
||||
|
||||
You can quickly change the text alignment of any card—in its entirety or specific parts—with our [text align classes]({{ site.baseurl }}/docs/{{ site.docs_version }}/utilities/text/#text-alignment).
|
||||
You can quickly change the text alignment of any card—in its entirety or specific parts—with our [text align classes](/docs/{{< param docs_version >}}/utilities/text/#text-alignment).
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="card" style="width: 18rem;">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">Special title treatment</h5>
|
||||
@ -293,14 +279,13 @@ You can quickly change the text alignment of any card—in its entirety or speci
|
||||
<a href="#" class="btn btn-primary">Go somewhere</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Navigation
|
||||
|
||||
Add some navigation to a card's header (or block) with Bootstrap's [nav components]({{ site.baseurl }}/docs/{{ site.docs_version }}/components/navs/).
|
||||
Add some navigation to a card's header (or block) with Bootstrap's [nav components](/docs/{{< param docs_version >}}/components/navs/).
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="card text-center">
|
||||
<div class="card-header">
|
||||
<ul class="nav nav-tabs card-header-tabs">
|
||||
@ -321,10 +306,9 @@ Add some navigation to a card's header (or block) with Bootstrap's [nav componen
|
||||
<a href="#" class="btn btn-primary">Go somewhere</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="card text-center">
|
||||
<div class="card-header">
|
||||
<ul class="nav nav-pills card-header-pills">
|
||||
@ -345,8 +329,7 @@ Add some navigation to a card's header (or block) with Bootstrap's [nav componen
|
||||
<a href="#" class="btn btn-primary">Go somewhere</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Images
|
||||
|
||||
@ -356,9 +339,9 @@ Cards include a few options for working with images. Choose from appending "imag
|
||||
|
||||
Similar to headers and footers, cards can include top and bottom "image caps"—images at the top or bottom of a card.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="card mb-3">
|
||||
{% include icons/placeholder.svg width="100%" height="180" class="card-img-top" text="Image cap" %}
|
||||
{{< placeholder width="100%" height="180" class="card-img-top" text="Image cap" >}}
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">Card title</h5>
|
||||
<p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
|
||||
@ -371,41 +354,38 @@ Similar to headers and footers, cards can include top and bottom "image caps"—
|
||||
<p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
|
||||
<p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p>
|
||||
</div>
|
||||
{% include icons/placeholder.svg width="100%" height="180" class="card-img-bottom" text="Image cap" %}
|
||||
{{< placeholder width="100%" height="180" class="card-img-bottom" text="Image cap" >}}
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
### Image overlays
|
||||
|
||||
Turn an image into a card background and overlay your card's text. Depending on the image, you may or may not need additional styles or utilities.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="card bg-dark text-white">
|
||||
{% include icons/placeholder.svg width="100%" height="270" class="bd-placeholder-img-lg card-img" text="Card image" %}
|
||||
{{< placeholder width="100%" height="270" class="bd-placeholder-img-lg card-img" text="Card image" >}}
|
||||
<div class="card-img-overlay">
|
||||
<h5 class="card-title">Card title</h5>
|
||||
<p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
|
||||
<p class="card-text">Last updated 3 mins ago</p>
|
||||
</div>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
{% capture callout %}
|
||||
{{< callout info >}}
|
||||
Note that content should not be larger than the height of the image. If content is larger than the image the content will be displayed outside the image.
|
||||
{% endcapture %}
|
||||
{% include callout.html content=callout type="info" %}
|
||||
{{< /callout >}}
|
||||
|
||||
## Horizontal
|
||||
|
||||
Using a combination of grid and utility classes, cards can be made horizontal in a mobile-friendly and responsive way. In the example below, we remove the grid gutters with `.no-gutters` and use `.col-md-*` classes to make the card horizontal at the `md` breakpoint. Further adjustments may be needed depending on your card content.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="card mb-3" style="max-width: 540px;">
|
||||
<div class="row no-gutters">
|
||||
<div class="col-md-4">
|
||||
{% include icons/placeholder.svg width="100%" height="250" class="" text="Image" %}
|
||||
{{< placeholder width="100%" height="250" class="" text="Image" >}}
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<div class="card-body">
|
||||
@ -416,8 +396,7 @@ Using a combination of grid and utility classes, cards can be made horizontal in
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Card styles
|
||||
|
||||
@ -425,43 +404,49 @@ Cards include various options for customizing their backgrounds, borders, and co
|
||||
|
||||
### Background and color
|
||||
|
||||
Use [text and background utilities]({{ site.baseurl }}/docs/{{ site.docs_version }}/utilities/colors/) to change the appearance of a card.
|
||||
Use [text and background utilities](/docs/{{< param docs_version >}}/utilities/colors/) to change the appearance of a card.
|
||||
|
||||
{% capture example %}
|
||||
{% for color in site.data.theme-colors %}
|
||||
<div class="card{% unless color.name == "light" %} text-white{% endunless %} bg-{{ color.name }} mb-3" style="max-width: 18rem;">
|
||||
{{< example >}}
|
||||
{{< card.inline >}}
|
||||
{{- range (index $.Site.Data "theme-colors") }}
|
||||
<div class="card{{ if not (eq .name "light") }} text-white{{ end }} bg-{{ .name }} mb-3" style="max-width: 18rem;">
|
||||
<div class="card-header">Header</div>
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">{{ color.name | capitalize }} card title</h5>
|
||||
<h5 class="card-title">{{ .name | title }} card title</h5>
|
||||
<p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
|
||||
</div>
|
||||
</div>{% endfor %}
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
</div>
|
||||
{{- end -}}
|
||||
{{< /card.inline >}}
|
||||
{{< /example >}}
|
||||
|
||||
{% include callout-warning-color-assistive-technologies.md %}
|
||||
{{< callout info >}}
|
||||
{{< partial "callout-warning-color-assistive-technologies.md" >}}
|
||||
{{< /callout >}}
|
||||
|
||||
### Border
|
||||
|
||||
Use [border utilities]({{ site.baseurl }}/docs/{{ site.docs_version }}/utilities/borders/) to change just the `border-color` of a card. Note that you can put `.text-{color}` classes on the parent `.card` or a subset of the card's contents as shown below.
|
||||
Use [border utilities](/docs/{{< param docs_version >}}/utilities/borders/) to change just the `border-color` of a card. Note that you can put `.text-{color}` classes on the parent `.card` or a subset of the card's contents as shown below.
|
||||
|
||||
{% capture example %}
|
||||
{% for color in site.data.theme-colors %}
|
||||
<div class="card border-{{ color.name }} mb-3" style="max-width: 18rem;">
|
||||
{{< example >}}
|
||||
{{< card.inline >}}
|
||||
{{- range (index $.Site.Data "theme-colors") }}
|
||||
<div class="card border-{{ .name }} mb-3" style="max-width: 18rem;">
|
||||
<div class="card-header">Header</div>
|
||||
<div class="card-body{% unless color.name == "light" %} text-{{ color.name }}{% endunless %}">
|
||||
<h5 class="card-title">{{ color.name | capitalize }} card title</h5>
|
||||
<div class="card-body{{ if not (eq .name "light") }} text-{{ .name }}{{ end }}">
|
||||
<h5 class="card-title">{{ .name | title }} card title</h5>
|
||||
<p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
|
||||
</div>
|
||||
</div>{% endfor %}
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
</div>
|
||||
{{- end -}}
|
||||
{{< /card.inline >}}
|
||||
{{< /example >}}
|
||||
|
||||
### Mixins utilities
|
||||
|
||||
You can also change the borders on the card header and footer as needed, and even remove their `background-color` with `.bg-transparent`.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="card border-success mb-3" style="max-width: 18rem;">
|
||||
<div class="card-header bg-transparent border-success">Header</div>
|
||||
<div class="card-body text-success">
|
||||
@ -470,8 +455,7 @@ You can also change the borders on the card header and footer as needed, and eve
|
||||
</div>
|
||||
<div class="card-footer bg-transparent border-success">Footer</div>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Card layout
|
||||
|
||||
@ -481,10 +465,10 @@ In addition to styling the content within cards, Bootstrap includes a few option
|
||||
|
||||
Use card groups to render cards as a single, attached element with equal width and height columns. Card groups use `display: flex;` to achieve their uniform sizing.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="card-group">
|
||||
<div class="card">
|
||||
{% include icons/placeholder.svg width="100%" height="180" class="card-img-top" text="Image cap" %}
|
||||
{{< placeholder width="100%" height="180" class="card-img-top" text="Image cap" >}}
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">Card title</h5>
|
||||
<p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
|
||||
@ -492,7 +476,7 @@ Use card groups to render cards as a single, attached element with equal width a
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
{% include icons/placeholder.svg width="100%" height="180" class="card-img-top" text="Image cap" %}
|
||||
{{< placeholder width="100%" height="180" class="card-img-top" text="Image cap" >}}
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">Card title</h5>
|
||||
<p class="card-text">This card has supporting text below as a natural lead-in to additional content.</p>
|
||||
@ -500,7 +484,7 @@ Use card groups to render cards as a single, attached element with equal width a
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
{% include icons/placeholder.svg width="100%" height="180" class="card-img-top" text="Image cap" %}
|
||||
{{< placeholder width="100%" height="180" class="card-img-top" text="Image cap" >}}
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">Card title</h5>
|
||||
<p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This card has even longer content than the first to show that equal height action.</p>
|
||||
@ -508,15 +492,14 @@ Use card groups to render cards as a single, attached element with equal width a
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
When using card groups with footers, their content will automatically line up.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="card-group">
|
||||
<div class="card">
|
||||
{% include icons/placeholder.svg width="100%" height="180" class="card-img-top" text="Image cap" %}
|
||||
{{< placeholder width="100%" height="180" class="card-img-top" text="Image cap" >}}
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">Card title</h5>
|
||||
<p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
|
||||
@ -526,7 +509,7 @@ When using card groups with footers, their content will automatically line up.
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
{% include icons/placeholder.svg width="100%" height="180" class="card-img-top" text="Image cap" %}
|
||||
{{< placeholder width="100%" height="180" class="card-img-top" text="Image cap" >}}
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">Card title</h5>
|
||||
<p class="card-text">This card has supporting text below as a natural lead-in to additional content.</p>
|
||||
@ -536,7 +519,7 @@ When using card groups with footers, their content will automatically line up.
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
{% include icons/placeholder.svg width="100%" height="180" class="card-img-top" text="Image cap" %}
|
||||
{{< placeholder width="100%" height="180" class="card-img-top" text="Image cap" >}}
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">Card title</h5>
|
||||
<p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This card has even longer content than the first to show that equal height action.</p>
|
||||
@ -546,17 +529,16 @@ When using card groups with footers, their content will automatically line up.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
### Card decks
|
||||
|
||||
Need a set of equal width and height cards that aren't attached to one another? Use card decks.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="card-deck">
|
||||
<div class="card">
|
||||
{% include icons/placeholder.svg width="100%" height="200" class="card-img-top" text="Image cap" %}
|
||||
{{< placeholder width="100%" height="200" class="card-img-top" text="Image cap" >}}
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">Card title</h5>
|
||||
<p class="card-text">This is a longer card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
|
||||
@ -564,7 +546,7 @@ Need a set of equal width and height cards that aren't attached to one another?
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
{% include icons/placeholder.svg width="100%" height="200" class="card-img-top" text="Image cap" %}
|
||||
{{< placeholder width="100%" height="200" class="card-img-top" text="Image cap" >}}
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">Card title</h5>
|
||||
<p class="card-text">This card has supporting text below as a natural lead-in to additional content.</p>
|
||||
@ -572,7 +554,7 @@ Need a set of equal width and height cards that aren't attached to one another?
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
{% include icons/placeholder.svg width="100%" height="200" class="card-img-top" text="Image cap" %}
|
||||
{{< placeholder width="100%" height="200" class="card-img-top" text="Image cap" >}}
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">Card title</h5>
|
||||
<p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This card has even longer content than the first to show that equal height action.</p>
|
||||
@ -580,15 +562,14 @@ Need a set of equal width and height cards that aren't attached to one another?
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
Just like with card groups, card footers in decks will automatically line up.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="card-deck">
|
||||
<div class="card">
|
||||
{% include icons/placeholder.svg width="100%" height="180" class="card-img-top" text="Image cap" %}
|
||||
{{< placeholder width="100%" height="180" class="card-img-top" text="Image cap" >}}
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">Card title</h5>
|
||||
<p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
|
||||
@ -598,7 +579,7 @@ Just like with card groups, card footers in decks will automatically line up.
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
{% include icons/placeholder.svg width="100%" height="180" class="card-img-top" text="Image cap" %}
|
||||
{{< placeholder width="100%" height="180" class="card-img-top" text="Image cap" >}}
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">Card title</h5>
|
||||
<p class="card-text">This card has supporting text below as a natural lead-in to additional content.</p>
|
||||
@ -608,7 +589,7 @@ Just like with card groups, card footers in decks will automatically line up.
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
{% include icons/placeholder.svg width="100%" height="180" class="card-img-top" text="Image cap" %}
|
||||
{{< placeholder width="100%" height="180" class="card-img-top" text="Image cap" >}}
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">Card title</h5>
|
||||
<p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This card has even longer content than the first to show that equal height action.</p>
|
||||
@ -618,8 +599,7 @@ Just like with card groups, card footers in decks will automatically line up.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
### Card columns
|
||||
|
||||
@ -627,10 +607,10 @@ Cards can be organized into [Masonry](https://masonry.desandro.com/)-like column
|
||||
|
||||
**Heads up!** Your mileage with card columns may vary. To prevent cards breaking across columns, we must set them to `display: inline-block` as `column-break-inside: avoid` isn't a bulletproof solution yet.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="card-columns">
|
||||
<div class="card">
|
||||
{% include icons/placeholder.svg width="100%" height="160" class="card-img-top" text="Image cap" %}
|
||||
{{< placeholder width="100%" height="160" class="card-img-top" text="Image cap" >}}
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">Card title that wraps to a new line</h5>
|
||||
<p class="card-text">This is a longer card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
|
||||
@ -647,7 +627,7 @@ Cards can be organized into [Masonry](https://masonry.desandro.com/)-like column
|
||||
</blockquote>
|
||||
</div>
|
||||
<div class="card">
|
||||
{% include icons/placeholder.svg width="100%" height="160" class="card-img-top" text="Image cap" %}
|
||||
{{< placeholder width="100%" height="160" class="card-img-top" text="Image cap" >}}
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">Card title</h5>
|
||||
<p class="card-text">This card has supporting text below as a natural lead-in to additional content.</p>
|
||||
@ -672,7 +652,7 @@ Cards can be organized into [Masonry](https://masonry.desandro.com/)-like column
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
{% include icons/placeholder.svg width="100%" height="260" class="card-img" text="Card image" %}
|
||||
{{< placeholder width="100%" height="260" class="card-img" text="Card image" >}}
|
||||
</div>
|
||||
<div class="card p-3 text-right">
|
||||
<blockquote class="blockquote mb-0">
|
||||
@ -692,12 +672,11 @@ Cards can be organized into [Masonry](https://masonry.desandro.com/)-like column
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
Card columns can also be extended and customized with some additional code. Shown below is an extension of the `.card-columns` class using the same CSS we use—CSS columns— to generate a set of responsive tiers for changing the number of columns.
|
||||
|
||||
{% highlight scss %}
|
||||
{{< highlight scss >}}
|
||||
.card-columns {
|
||||
@include media-breakpoint-only(lg) {
|
||||
column-count: 4;
|
||||
@ -706,4 +685,4 @@ Card columns can also be extended and customized with some additional code. Show
|
||||
column-count: 5;
|
||||
}
|
||||
}
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
@ -12,11 +12,13 @@ The carousel is a slideshow for cycling through a series of content, built with
|
||||
|
||||
In browsers where the [Page Visibility API](https://www.w3.org/TR/page-visibility/) is supported, the carousel will avoid sliding when the webpage is not visible to the user (such as when the browser tab is inactive, the browser window is minimized, etc.).
|
||||
|
||||
{% include callout-info-prefersreducedmotion.md %}
|
||||
{{< callout info >}}
|
||||
{{< partial "callout-info-prefersreducedmotion.md" >}}
|
||||
{{< /callout >}}
|
||||
|
||||
Please be aware that nested carousels are not supported, and carousels are generally not compliant with accessibility standards.
|
||||
|
||||
Lastly, if you're building our JavaScript from source, it [requires `util.js`]({{ site.baseurl }}/docs/{{ site.docs_version }}/getting-started/javascript/#util).
|
||||
Lastly, if you're building our JavaScript from source, it [requires `util.js`](/docs/{{< param docs_version >}}/getting-started/javascript/#util).
|
||||
|
||||
## Example
|
||||
|
||||
@ -28,38 +30,37 @@ Carousels don't automatically normalize slide dimensions. As such, you may need
|
||||
|
||||
Here's a carousel with slides only. Note the presence of the `.d-block` and `.w-100` on carousel images to prevent browser default image alignment.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div id="carouselExampleSlidesOnly" class="carousel slide" data-ride="carousel">
|
||||
<div class="carousel-inner">
|
||||
<div class="carousel-item active">
|
||||
{% include icons/placeholder.svg width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#555" background="#777" text="First slide" %}
|
||||
{{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#555" background="#777" text="First slide" >}}
|
||||
</div>
|
||||
<div class="carousel-item">
|
||||
{% include icons/placeholder.svg width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#444" background="#666" text="Second slide" %}
|
||||
{{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#444" background="#666" text="Second slide" >}}
|
||||
</div>
|
||||
<div class="carousel-item">
|
||||
{% include icons/placeholder.svg width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#333" background="#555" text="Third slide" %}
|
||||
{{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#333" background="#555" text="Third slide" >}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
### With controls
|
||||
|
||||
Adding in the previous and next controls:
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div id="carouselExampleControls" class="carousel slide" data-ride="carousel">
|
||||
<div class="carousel-inner">
|
||||
<div class="carousel-item active">
|
||||
{% include icons/placeholder.svg width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#555" background="#777" text="First slide" %}
|
||||
{{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#555" background="#777" text="First slide" >}}
|
||||
</div>
|
||||
<div class="carousel-item">
|
||||
{% include icons/placeholder.svg width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#444" background="#666" text="Second slide" %}
|
||||
{{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#444" background="#666" text="Second slide" >}}
|
||||
</div>
|
||||
<div class="carousel-item">
|
||||
{% include icons/placeholder.svg width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#333" background="#555" text="Third slide" %}
|
||||
{{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#333" background="#555" text="Third slide" >}}
|
||||
</div>
|
||||
</div>
|
||||
<a class="carousel-control-prev" href="#carouselExampleControls" role="button" data-slide="prev">
|
||||
@ -71,14 +72,13 @@ Adding in the previous and next controls:
|
||||
<span class="sr-only">Next</span>
|
||||
</a>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
### With indicators
|
||||
|
||||
You can also add the indicators to the carousel, alongside the controls, too.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel">
|
||||
<ol class="carousel-indicators">
|
||||
<li data-target="#carouselExampleIndicators" data-slide-to="0" class="active"></li>
|
||||
@ -87,13 +87,13 @@ You can also add the indicators to the carousel, alongside the controls, too.
|
||||
</ol>
|
||||
<div class="carousel-inner">
|
||||
<div class="carousel-item active">
|
||||
{% include icons/placeholder.svg width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#555" background="#777" text="First slide" %}
|
||||
{{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#555" background="#777" text="First slide" >}}
|
||||
</div>
|
||||
<div class="carousel-item">
|
||||
{% include icons/placeholder.svg width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#444" background="#666" text="Second slide" %}
|
||||
{{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#444" background="#666" text="Second slide" >}}
|
||||
</div>
|
||||
<div class="carousel-item">
|
||||
{% include icons/placeholder.svg width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#333" background="#555" text="Third slide" %}
|
||||
{{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#333" background="#555" text="Third slide" >}}
|
||||
</div>
|
||||
</div>
|
||||
<a class="carousel-control-prev" href="#carouselExampleIndicators" role="button" data-slide="prev">
|
||||
@ -105,14 +105,13 @@ You can also add the indicators to the carousel, alongside the controls, too.
|
||||
<span class="sr-only">Next</span>
|
||||
</a>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
### With captions
|
||||
|
||||
Add captions to your slides easily with the `.carousel-caption` element within any `.carousel-item`. They can be easily hidden on smaller viewports, as shown below, with optional [display utilities]({{ site.baseurl }}/docs/{{ site.docs_version }}/utilities/display/). We hide them initially with `.d-none` and bring them back on medium-sized devices with `.d-md-block`.
|
||||
Add captions to your slides easily with the `.carousel-caption` element within any `.carousel-item`. They can be easily hidden on smaller viewports, as shown below, with optional [display utilities](/docs/{{< param docs_version >}}/utilities/display/). We hide them initially with `.d-none` and bring them back on medium-sized devices with `.d-md-block`.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="bd-example">
|
||||
<div id="carouselExampleCaptions" class="carousel slide" data-ride="carousel">
|
||||
<ol class="carousel-indicators">
|
||||
@ -122,21 +121,21 @@ Add captions to your slides easily with the `.carousel-caption` element within a
|
||||
</ol>
|
||||
<div class="carousel-inner">
|
||||
<div class="carousel-item active">
|
||||
{% include icons/placeholder.svg width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#555" background="#777" text="First slide" %}
|
||||
{{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#555" background="#777" text="First slide" >}}
|
||||
<div class="carousel-caption d-none d-md-block">
|
||||
<h5>First slide label</h5>
|
||||
<p>Nulla vitae elit libero, a pharetra augue mollis interdum.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="carousel-item">
|
||||
{% include icons/placeholder.svg width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#444" background="#666" text="Second slide" %}
|
||||
{{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#444" background="#666" text="Second slide" >}}
|
||||
<div class="carousel-caption d-none d-md-block">
|
||||
<h5>Second slide label</h5>
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="carousel-item">
|
||||
{% include icons/placeholder.svg width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#333" background="#555" text="Third slide" %}
|
||||
{{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#333" background="#555" text="Third slide" >}}
|
||||
<div class="carousel-caption d-none d-md-block">
|
||||
<h5>Third slide label</h5>
|
||||
<p>Praesent commodo cursus magna, vel scelerisque nisl consectetur.</p>
|
||||
@ -153,24 +152,23 @@ Add captions to your slides easily with the `.carousel-caption` element within a
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
### Crossfade
|
||||
|
||||
Add `.carousel-fade` to your carousel to animate slides with a fade transition instead of a slide.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div id="carouselExampleFade" class="carousel slide carousel-fade" data-ride="carousel">
|
||||
<div class="carousel-inner">
|
||||
<div class="carousel-item active">
|
||||
{% include icons/placeholder.svg width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#555" background="#777" text="First slide" %}
|
||||
{{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#555" background="#777" text="First slide" >}}
|
||||
</div>
|
||||
<div class="carousel-item">
|
||||
{% include icons/placeholder.svg width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#444" background="#666" text="Second slide" %}
|
||||
{{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#444" background="#666" text="Second slide" >}}
|
||||
</div>
|
||||
<div class="carousel-item">
|
||||
{% include icons/placeholder.svg width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#333" background="#555" text="Third slide" %}
|
||||
{{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#333" background="#555" text="Third slide" >}}
|
||||
</div>
|
||||
</div>
|
||||
<a class="carousel-control-prev" href="#carouselExampleFade" role="button" data-slide="prev">
|
||||
@ -182,24 +180,23 @@ Add `.carousel-fade` to your carousel to animate slides with a fade transition i
|
||||
<span class="sr-only">Next</span>
|
||||
</a>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
### Individual `.carousel-item` interval
|
||||
|
||||
Add `data-interval=""` to a `.carousel-item` to change the amount of time to delay between automatically cycling to the next item.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div id="carouselExampleInterval" class="carousel slide" data-ride="carousel">
|
||||
<div class="carousel-inner">
|
||||
<div class="carousel-item active" data-interval="10000">
|
||||
{% include icons/placeholder.svg width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#555" background="#777" text="First slide" %}
|
||||
{{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#555" background="#777" text="First slide" >}}
|
||||
</div>
|
||||
<div class="carousel-item" data-interval="2000">
|
||||
{% include icons/placeholder.svg width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#444" background="#666" text="Second slide" %}
|
||||
{{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#444" background="#666" text="Second slide" >}}
|
||||
</div>
|
||||
<div class="carousel-item">
|
||||
{% include icons/placeholder.svg width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#333" background="#555" text="Third slide" %}
|
||||
{{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#333" background="#555" text="Third slide" >}}
|
||||
</div>
|
||||
</div>
|
||||
<a class="carousel-control-prev" href="#carouselExampleInterval" role="button" data-slide="prev">
|
||||
@ -211,8 +208,7 @@ Add `data-interval=""` to a `.carousel-item` to change the amount of time to del
|
||||
<span class="sr-only">Next</span>
|
||||
</a>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
|
||||
## Usage
|
||||
@ -227,10 +223,10 @@ The `data-ride="carousel"` attribute is used to mark a carousel as animating sta
|
||||
|
||||
Call carousel manually with:
|
||||
|
||||
{% highlight js %}
|
||||
{{< highlight js >}}
|
||||
var myCarousel = document.querySelector('#myCarousel')
|
||||
var carousel = new bootstrap.Carousel(myCarousel)
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
### Options
|
||||
|
||||
@ -288,17 +284,19 @@ Options can be passed via data attributes or JavaScript. For data attributes, ap
|
||||
|
||||
### Methods
|
||||
|
||||
{% include callout-danger-async-methods.md %}
|
||||
{{< callout danger >}}
|
||||
{{< partial "callout-danger-async-methods.md" >}}
|
||||
{{< /callout >}}
|
||||
|
||||
You can create a carousel instance with the carousel constructor, for example, to initialize with additional options and start cycling through items:
|
||||
|
||||
{% highlight js %}
|
||||
{{< highlight js >}}
|
||||
var myCarousel = document.querySelector('#myCarousel')
|
||||
var carousel = new bootstrap.Carousel(myCarousel, {
|
||||
interval: 2000,
|
||||
wrap: false
|
||||
})
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
|
||||
| Method | Description |
|
||||
@ -341,11 +339,11 @@ All carousel events are fired at the carousel itself (i.e. at the `<div class="c
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{% highlight js %}
|
||||
{{< highlight js >}}
|
||||
$('#myCarousel').on('slide.bs.carousel', function () {
|
||||
// do something...
|
||||
})
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
### Change transition duration
|
||||
|
@ -10,7 +10,9 @@ toc: true
|
||||
|
||||
The collapse JavaScript plugin is used to show and hide content. Buttons or anchors are used as triggers that are mapped to specific elements you toggle. Collapsing an element will animate the `height` from its current value to `0`. Given how CSS handles animations, you cannot use `padding` on a `.collapse` element. Instead, use the class as an independent wrapping element.
|
||||
|
||||
{% include callout-info-prefersreducedmotion.md %}
|
||||
{{< callout info >}}
|
||||
{{< partial "callout-info-prefersreducedmotion.md" >}}
|
||||
{{< /callout >}}
|
||||
|
||||
## Example
|
||||
|
||||
@ -22,7 +24,7 @@ Click the buttons below to show and hide another element via class changes:
|
||||
|
||||
You can use a link with the `href` attribute, or a button with the `data-target` attribute. In both cases, the `data-toggle="collapse"` is required.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<p>
|
||||
<a class="btn btn-primary" data-toggle="collapse" href="#collapseExample" role="button" aria-expanded="false" aria-controls="collapseExample">
|
||||
Link with href
|
||||
@ -36,15 +38,14 @@ You can use a link with the `href` attribute, or a button with the `data-target`
|
||||
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident.
|
||||
</div>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Multiple targets
|
||||
|
||||
A `<button>` or `<a>` can show and hide multiple elements by referencing them with a selector in its `href` or `data-target` attribute.
|
||||
Multiple `<button>` or `<a>` can show and hide an element if they each reference it with their `href` or `data-target` attribute
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<p>
|
||||
<a class="btn btn-primary" data-toggle="collapse" href="#multiCollapseExample1" role="button" aria-expanded="false" aria-controls="multiCollapseExample1">Toggle first element</a>
|
||||
<button class="btn btn-primary" type="button" data-toggle="collapse" data-target="#multiCollapseExample2" aria-expanded="false" aria-controls="multiCollapseExample2">Toggle second element</button>
|
||||
@ -66,14 +67,13 @@ Multiple `<button>` or `<a>` can show and hide an element if they each reference
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Accordion example
|
||||
|
||||
Using the [card]({{ site.baseurl }}/docs/{{ site.docs_version }}/components/card/) component, you can extend the default collapse behavior to create an accordion. To properly achieve the accordion style, be sure to use `.accordion` as a wrapper.
|
||||
Using the [card](/docs/{{< param docs_version >}}/components/card/) component, you can extend the default collapse behavior to create an accordion. To properly achieve the accordion style, be sure to use `.accordion` as a wrapper.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="accordion" id="accordionExample">
|
||||
<div class="card">
|
||||
<div class="card-header" id="headingOne">
|
||||
@ -119,8 +119,7 @@ Using the [card]({{ site.baseurl }}/docs/{{ site.docs_version }}/components/card
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Accessibility
|
||||
|
||||
@ -150,9 +149,9 @@ To add accordion-like group management to a collapsible area, add the data attri
|
||||
|
||||
Enable manually with:
|
||||
|
||||
{% highlight js %}
|
||||
{{< highlight js >}}
|
||||
$('.collapse').collapse()
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
### Options
|
||||
|
||||
@ -185,18 +184,20 @@ Options can be passed via data attributes or JavaScript. For data attributes, ap
|
||||
|
||||
### Methods
|
||||
|
||||
{% include callout-danger-async-methods.md %}
|
||||
{{< callout danger >}}
|
||||
{{< partial "callout-danger-async-methods.md" >}}
|
||||
{{< /callout >}}
|
||||
|
||||
Activates your content as a collapsible element. Accepts an optional options `object`.
|
||||
|
||||
You can create a collapse instance with the constructor, for example:
|
||||
|
||||
{% highlight js %}
|
||||
{{< highlight js >}}
|
||||
var myCollapse = document.getElementById('myCollapse')
|
||||
var bsCollapse = new bootstrap.Collapse(myCollapse, {
|
||||
toggle: false
|
||||
})
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
| Method | Description |
|
||||
| --- | --- |
|
||||
@ -236,8 +237,8 @@ Bootstrap's collapse class exposes a few events for hooking into collapse functi
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{% highlight js %}
|
||||
{{< highlight js >}}
|
||||
$('#myCollapsible').on('hidden.bs.collapse', function () {
|
||||
// do something...
|
||||
})
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
@ -10,9 +10,9 @@ toc: true
|
||||
|
||||
Dropdowns are toggleable, contextual overlays for displaying lists of links and more. They're made interactive with the included Bootstrap dropdown JavaScript plugin. They're toggled by clicking, not by hovering; this is [an intentional design decision](http://markdotto.com/2012/02/27/bootstrap-explained-dropdowns/).
|
||||
|
||||
Dropdowns are built on a third party library, [Popper.js](https://popper.js.org/), which provides dynamic positioning and viewport detection. Be sure to include [popper.min.js]({{ site.cdn.popper }}) before Bootstrap's JavaScript or use `bootstrap.bundle.min.js` / `bootstrap.bundle.js` which contains Popper.js. Popper.js isn't used to position dropdowns in navbars though as dynamic positioning isn't required.
|
||||
Dropdowns are built on a third party library, [Popper.js](https://popper.js.org/), which provides dynamic positioning and viewport detection. Be sure to include [popper.min.js]({{< param "cdn.popper" >}}) before Bootstrap's JavaScript or use `bootstrap.bundle.min.js` / `bootstrap.bundle.js` which contains Popper.js. Popper.js isn't used to position dropdowns in navbars though as dynamic positioning isn't required.
|
||||
|
||||
If you're building our JavaScript from source, it [requires `util.js`]({{ site.baseurl }}/docs/{{ site.docs_version }}/getting-started/javascript/#util).
|
||||
If you're building our JavaScript from source, it [requires `util.js`](/docs/{{< param docs_version >}}/getting-started/javascript/#util).
|
||||
|
||||
## Accessibility
|
||||
|
||||
@ -30,7 +30,7 @@ Wrap the dropdown's toggle (your button or link) and the dropdown menu within `.
|
||||
|
||||
Any single `.btn` can be turned into a dropdown toggle with some markup changes. Here's how you can put them to work with either `<button>` elements:
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-expanded="false">
|
||||
Dropdown button
|
||||
@ -41,12 +41,11 @@ Any single `.btn` can be turned into a dropdown toggle with some markup changes.
|
||||
<a class="dropdown-item" href="#">Something else here</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
And with `<a>` elements:
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="dropdown">
|
||||
<a class="btn btn-secondary dropdown-toggle" href="#" role="button" id="dropdownMenuLink" data-toggle="dropdown" aria-expanded="false">
|
||||
Dropdown link
|
||||
@ -58,8 +57,7 @@ And with `<a>` elements:
|
||||
<a class="dropdown-item" href="#">Something else here</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
The best part is you can do this with any button variant, too:
|
||||
|
||||
@ -126,7 +124,7 @@ The best part is you can do this with any button variant, too:
|
||||
</div><!-- /btn-group -->
|
||||
</div>
|
||||
|
||||
{% highlight html %}
|
||||
{{< highlight html >}}
|
||||
<!-- Example single danger button -->
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-danger dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
|
||||
@ -140,7 +138,7 @@ The best part is you can do this with any button variant, too:
|
||||
<a class="dropdown-item" href="#">Separated link</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
### Split button
|
||||
|
||||
@ -229,7 +227,7 @@ We use this extra class to reduce the horizontal `padding` on either side of the
|
||||
</div><!-- /btn-group -->
|
||||
</div>
|
||||
|
||||
{% highlight html %}
|
||||
{{< highlight html >}}
|
||||
<!-- Example split danger button -->
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-danger">Action</button>
|
||||
@ -244,7 +242,7 @@ We use this extra class to reduce the horizontal `padding` on either side of the
|
||||
<a class="dropdown-item" href="#">Separated link</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
## Sizing
|
||||
|
||||
@ -307,7 +305,7 @@ Button dropdowns work with buttons of all sizes, including default and split dro
|
||||
</div><!-- /btn-toolbar -->
|
||||
</div><!-- /example -->
|
||||
|
||||
{% highlight html %}
|
||||
{{< highlight html >}}
|
||||
<!-- Large button groups (default and split) -->
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-secondary btn-lg dropdown-toggle" type="button" data-toggle="dropdown" aria-expanded="false">
|
||||
@ -349,7 +347,7 @@ Button dropdowns work with buttons of all sizes, including default and split dro
|
||||
...
|
||||
</div>
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
## Directions
|
||||
|
||||
@ -388,7 +386,7 @@ Trigger dropdown menus above elements by adding `.dropup` to the parent element.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% highlight html %}
|
||||
{{< highlight html >}}
|
||||
<!-- Default dropup button -->
|
||||
<div class="btn-group dropup">
|
||||
<button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
|
||||
@ -411,7 +409,7 @@ Trigger dropdown menus above elements by adding `.dropup` to the parent element.
|
||||
<!-- Dropdown menu links -->
|
||||
</div>
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
### Dropright
|
||||
|
||||
@ -448,7 +446,7 @@ Trigger dropdown menus at the right of the elements by adding `.dropright` to th
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% highlight html %}
|
||||
{{< highlight html >}}
|
||||
<!-- Default dropright button -->
|
||||
<div class="btn-group dropright">
|
||||
<button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
|
||||
@ -471,7 +469,7 @@ Trigger dropdown menus at the right of the elements by adding `.dropright` to th
|
||||
<!-- Dropdown menu links -->
|
||||
</div>
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
### Dropleft
|
||||
|
||||
@ -510,7 +508,7 @@ Trigger dropdown menus at the left of the elements by adding `.dropleft` to the
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% highlight html %}
|
||||
{{< highlight html >}}
|
||||
<!-- Default dropleft button -->
|
||||
<div class="btn-group dropleft">
|
||||
<button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
|
||||
@ -535,13 +533,13 @@ Trigger dropdown menus at the left of the elements by adding `.dropleft` to the
|
||||
Split dropleft
|
||||
</button>
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
## Menu items
|
||||
|
||||
Historically dropdown menu contents *had* to be links, but that's no longer the case with v4. Now you can optionally use `<button>` elements in your dropdowns instead of just `<a>`s.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenu2" data-toggle="dropdown" aria-expanded="false">
|
||||
Dropdown
|
||||
@ -552,57 +550,52 @@ Historically dropdown menu contents *had* to be links, but that's no longer the
|
||||
<button class="dropdown-item" type="button">Something else here</button>
|
||||
</div>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
You can also create non-interactive dropdown items with `.dropdown-item-text`. Feel free to style further with custom CSS or text utilities.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="dropdown-menu">
|
||||
<span class="dropdown-item-text">Dropdown item text</span>
|
||||
<a class="dropdown-item" href="#">Action</a>
|
||||
<a class="dropdown-item" href="#">Another action</a>
|
||||
<a class="dropdown-item" href="#">Something else here</a>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
### Active
|
||||
|
||||
Add `.active` to items in the dropdown to **style them as active**.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="dropdown-menu">
|
||||
<a class="dropdown-item" href="#">Regular link</a>
|
||||
<a class="dropdown-item active" href="#">Active link</a>
|
||||
<a class="dropdown-item" href="#">Another link</a>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
### Disabled
|
||||
|
||||
Add `.disabled` to items in the dropdown to **style them as disabled**.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="dropdown-menu">
|
||||
<a class="dropdown-item" href="#">Regular link</a>
|
||||
<a class="dropdown-item disabled" href="#" tabindex="-1" aria-disabled="true">Disabled link</a>
|
||||
<a class="dropdown-item" href="#">Another link</a>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Menu alignment
|
||||
|
||||
By default, a dropdown menu is automatically positioned 100% from the top and along the left side of its parent. Add `.dropdown-menu-right` to a `.dropdown-menu` to right align the dropdown menu.
|
||||
|
||||
{% capture callout %}
|
||||
{{< callout info >}}
|
||||
**Heads up!** Dropdowns are positioned thanks to Popper.js (except when they are contained in a navbar).
|
||||
{% endcapture %}
|
||||
{% include callout.html content=callout type="info" %}
|
||||
{{< /callout >}}
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
|
||||
Right-aligned menu
|
||||
@ -613,8 +606,7 @@ By default, a dropdown menu is automatically positioned 100% from the top and al
|
||||
<button class="dropdown-item" type="button">Something else here</button>
|
||||
</div>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
### Responsive alignment
|
||||
|
||||
@ -622,7 +614,7 @@ If you want to use responsive alignment, disable dynamic positioning by adding t
|
||||
|
||||
To align **right** the dropdown menu with the given breakpoint or larger, add `.dropdown-menu{-sm|-md|-lg|-xl}-right`.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" data-display="static" aria-expanded="false">
|
||||
Left-aligned but right aligned when large screen
|
||||
@ -633,12 +625,11 @@ To align **right** the dropdown menu with the given breakpoint or larger, add `.
|
||||
<button class="dropdown-item" type="button">Something else here</button>
|
||||
</div>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
To align **left** the dropdown menu with the given breakpoint or larger, add `.dropdown-menu-right` and `.dropdown-menu{-sm|-md|-lg|-xl}-left`.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" data-display="static" aria-expanded="false">
|
||||
Right-aligned but left aligned when large screen
|
||||
@ -649,8 +640,7 @@ To align **left** the dropdown menu with the given breakpoint or larger, add `.d
|
||||
<button class="dropdown-item" type="button">Something else here</button>
|
||||
</div>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
Note that you don't need to add a `data-display="static"` attribute to dropdown buttons in navbars, since Popper.js isn't used in navbars.
|
||||
|
||||
@ -660,20 +650,19 @@ Note that you don't need to add a `data-display="static"` attribute to dropdown
|
||||
|
||||
Add a header to label sections of actions in any dropdown menu.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="dropdown-menu">
|
||||
<h6 class="dropdown-header">Dropdown header</h6>
|
||||
<a class="dropdown-item" href="#">Action</a>
|
||||
<a class="dropdown-item" href="#">Another action</a>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
### Dividers
|
||||
|
||||
Separate groups of related menu items with a divider.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="dropdown-menu">
|
||||
<a class="dropdown-item" href="#">Action</a>
|
||||
<a class="dropdown-item" href="#">Another action</a>
|
||||
@ -681,14 +670,13 @@ Separate groups of related menu items with a divider.
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item" href="#">Separated link</a>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
### Text
|
||||
|
||||
Place any freeform text within a dropdown menu with text and use [spacing utilities]({{ site.baseurl }}/docs/{{ site.docs_version }}/utilities/spacing/). Note that you'll likely need additional sizing styles to constrain the menu width.
|
||||
Place any freeform text within a dropdown menu with text and use [spacing utilities](/docs/{{< param docs_version >}}/utilities/spacing/). Note that you'll likely need additional sizing styles to constrain the menu width.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="dropdown-menu p-4 text-muted" style="max-width: 200px;">
|
||||
<p>
|
||||
Some example text that's free-flowing within the dropdown menu.
|
||||
@ -697,14 +685,13 @@ Place any freeform text within a dropdown menu with text and use [spacing utilit
|
||||
And this is more example text.
|
||||
</p>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
### Forms
|
||||
|
||||
Put a form within a dropdown menu, or make it into a dropdown menu, and use [margin or padding utilities]({{ site.baseurl }}/docs/{{ site.docs_version }}/utilities/spacing/) to give it the negative space you require.
|
||||
Put a form within a dropdown menu, or make it into a dropdown menu, and use [margin or padding utilities](/docs/{{< param docs_version >}}/utilities/spacing/) to give it the negative space you require.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="dropdown-menu">
|
||||
<form class="px-4 py-3">
|
||||
<div class="form-group">
|
||||
@ -729,10 +716,9 @@ Put a form within a dropdown menu, or make it into a dropdown menu, and use [mar
|
||||
<a class="dropdown-item" href="#">New around here? Sign up</a>
|
||||
<a class="dropdown-item" href="#">Forgot password?</a>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<form class="dropdown-menu p-4">
|
||||
<div class="form-group">
|
||||
<label for="exampleDropdownFormEmail2">Email address</label>
|
||||
@ -752,14 +738,13 @@ Put a form within a dropdown menu, or make it into a dropdown menu, and use [mar
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Sign in</button>
|
||||
</form>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Dropdown options
|
||||
|
||||
Use `data-offset` or `data-reference` to change the location of the dropdown.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="d-flex">
|
||||
<div class="dropdown mr-1">
|
||||
<button type="button" class="btn btn-secondary dropdown-toggle" id="dropdownMenuOffset" data-toggle="dropdown" aria-expanded="false" data-offset="10,20">
|
||||
@ -785,23 +770,21 @@ Use `data-offset` or `data-reference` to change the location of the dropdown.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Usage
|
||||
|
||||
Via data attributes or JavaScript, the dropdown plugin toggles hidden content (dropdown menus) by toggling the `.show` class on the parent list item. The `data-toggle="dropdown"` attribute is relied on for closing dropdown menus at an application level, so it's a good idea to always use it.
|
||||
|
||||
{% capture callout %}
|
||||
{{< callout info >}}
|
||||
On touch-enabled devices, opening a dropdown adds empty (`$.noop`) `mouseover` handlers to the immediate children of the `<body>` element. This admittedly ugly hack is necessary to work around a [quirk in iOS' event delegation](https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html), which would otherwise prevent a tap anywhere outside of the dropdown from triggering the code that closes the dropdown. Once the dropdown is closed, these additional empty `mouseover` handlers are removed.
|
||||
{% endcapture %}
|
||||
{% include callout.html content=callout type="info" %}
|
||||
{{< /callout >}}
|
||||
|
||||
### Via data attributes
|
||||
|
||||
Add `data-toggle="dropdown"` to a link or button to toggle a dropdown.
|
||||
|
||||
{% highlight html %}
|
||||
{{< highlight html >}}
|
||||
<div class="dropdown">
|
||||
<button id="dLabel" type="button" data-toggle="dropdown" aria-expanded="false">
|
||||
Dropdown trigger
|
||||
@ -810,22 +793,21 @@ Add `data-toggle="dropdown"` to a link or button to toggle a dropdown.
|
||||
...
|
||||
</div>
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
### Via JavaScript
|
||||
|
||||
Call the dropdowns via JavaScript:
|
||||
|
||||
{% highlight js %}
|
||||
{{< highlight js >}}
|
||||
$('.dropdown-toggle').dropdown()
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
{% capture callout %}
|
||||
{{< callout info >}}
|
||||
##### `data-toggle="dropdown"` still required
|
||||
|
||||
Regardless of whether you call your dropdown via JavaScript or instead use the data-api, `data-toggle="dropdown"` is always required to be present on the dropdown's trigger element.
|
||||
{% endcapture %}
|
||||
{% include callout.html content=callout type="info" %}
|
||||
{{< /callout >}}
|
||||
|
||||
### Options
|
||||
|
||||
@ -902,8 +884,8 @@ All dropdown events are fired at the `.dropdown-menu`'s parent element and have
|
||||
| `hide.bs.dropdown` | This event is fired immediately when the hide instance method has been called. |
|
||||
| `hidden.bs.dropdown`| This event is fired when the dropdown has finished being hidden from the user (will wait for CSS transitions, to complete). |
|
||||
|
||||
{% highlight js %}
|
||||
{{< highlight js >}}
|
||||
$('#myDropdown').on('show.bs.dropdown', function () {
|
||||
// do something...
|
||||
})
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
@ -8,13 +8,13 @@ toc: true
|
||||
|
||||
## Overview
|
||||
|
||||
Bootstrap's form controls expand on [our Rebooted form styles]({{ site.baseurl }}/docs/{{ site.docs_version }}/content/reboot/#forms) with classes. Use these classes to opt into their customized displays for a more consistent rendering across browsers and devices.
|
||||
Bootstrap's form controls expand on [our Rebooted form styles](/docs/{{< param docs_version >}}/content/reboot/#forms) with classes. Use these classes to opt into their customized displays for a more consistent rendering across browsers and devices.
|
||||
|
||||
Be sure to use an appropriate `type` attribute on all inputs (e.g., `email` for email address or `number` for numerical information) to take advantage of newer input controls like email verification, number selection, and more.
|
||||
|
||||
Here's a quick example to demonstrate Bootstrap's form styles. Keep reading for documentation on required classes, form layout, and more.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<form>
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Email address</label>
|
||||
@ -31,8 +31,7 @@ Here's a quick example to demonstrate Bootstrap's form styles. Keep reading for
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Submit</button>
|
||||
</form>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Form controls
|
||||
|
||||
@ -40,7 +39,7 @@ Textual form controls—like `<input>`s, `<select>`s, and `<textarea>`s—are st
|
||||
|
||||
Be sure to explore our [custom forms](#custom-forms) to further style `<select>`s.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<form>
|
||||
<div class="form-group">
|
||||
<label for="exampleFormControlInput1">Email address</label>
|
||||
@ -71,33 +70,30 @@ Be sure to explore our [custom forms](#custom-forms) to further style `<select>`
|
||||
<textarea class="form-control" id="exampleFormControlTextarea1" rows="3"></textarea>
|
||||
</div>
|
||||
</form>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
For file inputs, swap the `.form-control` for `.form-control-file`.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<form>
|
||||
<div class="form-group">
|
||||
<label for="exampleFormControlFile1">Example file input</label>
|
||||
<input type="file" class="form-control-file" id="exampleFormControlFile1">
|
||||
</div>
|
||||
</form>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
### Sizing
|
||||
|
||||
Set heights using classes like `.form-control-lg` and `.form-control-sm`.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<input class="form-control form-control-lg" type="text" placeholder=".form-control-lg">
|
||||
<input class="form-control" type="text" placeholder="Default input">
|
||||
<input class="form-control form-control-sm" type="text" placeholder=".form-control-sm">
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<select class="form-control form-control-lg">
|
||||
<option>Large select</option>
|
||||
</select>
|
||||
@ -107,23 +103,21 @@ Set heights using classes like `.form-control-lg` and `.form-control-sm`.
|
||||
<select class="form-control form-control-sm">
|
||||
<option>Small select</option>
|
||||
</select>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
### Readonly
|
||||
|
||||
Add the `readonly` boolean attribute on an input to prevent modification of the input's value. Read-only inputs appear lighter (just like disabled inputs), but retain the standard cursor.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<input class="form-control" type="text" placeholder="Readonly input here..." readonly>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
### Readonly plain text
|
||||
|
||||
If you want to have `<input readonly>` elements in your form styled as plain text, use the `.form-control-plaintext` class to remove the default form field styling and preserve the correct margin and padding.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<form>
|
||||
<div class="form-group row">
|
||||
<label for="staticEmail" class="col-sm-2 col-form-label">Email</label>
|
||||
@ -138,10 +132,9 @@ If you want to have `<input readonly>` elements in your form styled as plain tex
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<form class="form-inline">
|
||||
<div class="form-group mb-2">
|
||||
<label for="staticEmail2" class="sr-only">Email</label>
|
||||
@ -153,22 +146,20 @@ If you want to have `<input readonly>` elements in your form styled as plain tex
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary mb-2">Confirm identity</button>
|
||||
</form>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Range Inputs
|
||||
|
||||
Set horizontally scrollable range inputs using `.form-control-range`.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<form>
|
||||
<div class="form-group">
|
||||
<label for="formControlRange">Example Range input</label>
|
||||
<input type="range" class="form-control-range" id="formControlRange">
|
||||
</div>
|
||||
</form>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Checkboxes and radios
|
||||
|
||||
@ -182,7 +173,7 @@ Checkboxes and radios use are built to support HTML-based form validation and pr
|
||||
|
||||
By default, any number of checkboxes and radios that are immediate sibling will be vertically stacked and appropriately spaced with `.form-check`.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" value="" id="defaultCheck1">
|
||||
<label class="form-check-label" for="defaultCheck1">
|
||||
@ -195,10 +186,9 @@ By default, any number of checkboxes and radios that are immediate sibling will
|
||||
Disabled checkbox
|
||||
</label>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="radio" name="exampleRadios" id="exampleRadios1" value="option1" checked>
|
||||
<label class="form-check-label" for="exampleRadios1">
|
||||
@ -217,14 +207,13 @@ By default, any number of checkboxes and radios that are immediate sibling will
|
||||
Disabled radio
|
||||
</label>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
### Inline
|
||||
|
||||
Group checkboxes or radios on the same horizontal row by adding `.form-check-inline` to any `.form-check`.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="form-check form-check-inline">
|
||||
<input class="form-check-input" type="checkbox" id="inlineCheckbox1" value="option1">
|
||||
<label class="form-check-label" for="inlineCheckbox1">1</label>
|
||||
@ -237,10 +226,9 @@ Group checkboxes or radios on the same horizontal row by adding `.form-check-inl
|
||||
<input class="form-check-input" type="checkbox" id="inlineCheckbox3" value="option3" disabled>
|
||||
<label class="form-check-label" for="inlineCheckbox3">3 (disabled)</label>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="form-check form-check-inline">
|
||||
<input class="form-check-input" type="radio" name="inlineRadioOptions" id="inlineRadio1" value="option1">
|
||||
<label class="form-check-label" for="inlineRadio1">1</label>
|
||||
@ -253,22 +241,20 @@ Group checkboxes or radios on the same horizontal row by adding `.form-check-inl
|
||||
<input class="form-check-input" type="radio" name="inlineRadioOptions" id="inlineRadio3" value="option3" disabled>
|
||||
<label class="form-check-label" for="inlineRadio3">3 (disabled)</label>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
### Without labels
|
||||
|
||||
Add `.position-static` to inputs within `.form-check` that don't have any label text. Remember to still provide some form of label for assistive technologies (for instance, using `aria-label`).
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="form-check">
|
||||
<input class="form-check-input position-static" type="checkbox" id="blankCheckbox" value="option1" aria-label="...">
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input position-static" type="radio" name="blankRadio" id="blankRadio1" value="option1" aria-label="...">
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Layout
|
||||
|
||||
@ -278,7 +264,7 @@ Since Bootstrap applies `display: block` and `width: 100%` to almost all our for
|
||||
|
||||
The `.form-group` class is the easiest way to add some structure to forms. It provides a flexible class that encourages proper grouping of labels, controls, optional help text, and form validation messaging. By default it only applies `margin-bottom`, but it picks up additional styles in `.form-inline` as needed. Use it with `<fieldset>`s, `<div>`s, or nearly any other element.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<form>
|
||||
<div class="form-group">
|
||||
<label for="formGroupExampleInput">Example label</label>
|
||||
@ -289,14 +275,13 @@ The `.form-group` class is the easiest way to add some structure to forms. It pr
|
||||
<input type="text" class="form-control" id="formGroupExampleInput2" placeholder="Another input placeholder">
|
||||
</div>
|
||||
</form>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
### Form grid
|
||||
|
||||
More complex forms can be built using our grid classes. Use these for form layouts that require multiple columns, varied widths, and additional alignment options.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<form>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
@ -307,14 +292,13 @@ More complex forms can be built using our grid classes. Use these for form layou
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
#### Form row
|
||||
|
||||
You may also swap `.row` for `.form-row`, a variation of our standard grid row that overrides the default column gutters for tighter and more compact layouts.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<form>
|
||||
<div class="form-row">
|
||||
<div class="col">
|
||||
@ -325,12 +309,11 @@ You may also swap `.row` for `.form-row`, a variation of our standard grid row t
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
More complex layouts can also be created with the grid system.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<form>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
@ -377,8 +360,7 @@ More complex layouts can also be created with the grid system.
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Sign in</button>
|
||||
</form>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
#### Horizontal form
|
||||
|
||||
@ -386,7 +368,7 @@ Create horizontal forms with the grid by adding the `.row` class to form groups
|
||||
|
||||
At times, you maybe need to use margin or padding utilities to create that perfect alignment you need. For example, we've removed the `padding-top` on our stacked radio inputs label to better align the text baseline.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<form>
|
||||
<div class="form-group row">
|
||||
<label for="inputEmail3" class="col-sm-2 col-form-label">Email</label>
|
||||
@ -442,14 +424,13 @@ At times, you maybe need to use margin or padding utilities to create that perfe
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
##### Horizontal form label sizing
|
||||
|
||||
Be sure to use `.col-form-label-sm` or `.col-form-label-lg` to your `<label>`s or `<legend>`s to correctly follow the size of `.form-control-lg` and `.form-control-sm`.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<form>
|
||||
<div class="form-group row">
|
||||
<label for="colFormLabelSm" class="col-sm-2 col-form-label col-form-label-sm">Email</label>
|
||||
@ -470,14 +451,13 @@ Be sure to use `.col-form-label-sm` or `.col-form-label-lg` to your `<label>`s o
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
#### Column sizing
|
||||
|
||||
As shown in the previous examples, our grid system allows you to place any number of `.col`s within a `.row` or `.form-row`. They'll split the available width equally between them. You may also pick a subset of your columns to take up more or less space, while the remaining `.col`s equally split the rest, with specific column classes like `.col-7`.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<form>
|
||||
<div class="form-row">
|
||||
<div class="col-7">
|
||||
@ -491,14 +471,13 @@ As shown in the previous examples, our grid system allows you to place any numbe
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
#### Auto-sizing
|
||||
|
||||
The example below uses a flexbox utility to vertically center the contents and changes `.col` to `.col-auto` so that your columns only take up as much space as needed. Put another way, the column sizes itself based on the contents.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<form>
|
||||
<div class="form-row align-items-center">
|
||||
<div class="col-auto">
|
||||
@ -527,12 +506,11 @@ The example below uses a flexbox utility to vertically center the contents and c
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
You can then remix that once again with size-specific column classes.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<form>
|
||||
<div class="form-row align-items-center">
|
||||
<div class="col-sm-3 my-1">
|
||||
@ -561,12 +539,11 @@ You can then remix that once again with size-specific column classes.
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
And of course [custom form controls](#custom-forms) are supported.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<form>
|
||||
<div class="form-row align-items-center">
|
||||
<div class="col-auto my-1">
|
||||
@ -589,20 +566,19 @@ And of course [custom form controls](#custom-forms) are supported.
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
### Inline forms
|
||||
|
||||
Use the `.form-inline` class to display a series of labels, form controls, and buttons on a single horizontal row. Form controls within inline forms vary slightly from their default states.
|
||||
|
||||
- Controls are `display: flex`, collapsing any HTML white space and allowing you to provide alignment control with [spacing]({{ site.baseurl }}/docs/{{ site.docs_version }}/utilities/spacing/) and [flexbox]({{ site.baseurl }}/docs/{{ site.docs_version }}/utilities/flex/) utilities.
|
||||
- Controls are `display: flex`, collapsing any HTML white space and allowing you to provide alignment control with [spacing](/docs/{{< param docs_version >}}/utilities/spacing/) and [flexbox](/docs/{{< param docs_version >}}/utilities/flex/) utilities.
|
||||
- Controls and input groups receive `width: auto` to override the Bootstrap default `width: 100%`.
|
||||
- Controls **only appear inline in viewports that are at least 576px wide** to account for narrow viewports on mobile devices.
|
||||
|
||||
You may need to manually address the width and alignment of individual form controls with [spacing utilities]({{ site.baseurl }}/docs/{{ site.docs_version }}/utilities/spacing/) (as shown below). Lastly, be sure to always include a `<label>` with each form control, even if you need to hide it from non-screenreader visitors with `.sr-only`.
|
||||
You may need to manually address the width and alignment of individual form controls with [spacing utilities](/docs/{{< param docs_version >}}/utilities/spacing/) (as shown below). Lastly, be sure to always include a `<label>` with each form control, even if you need to hide it from non-screenreader visitors with `.sr-only`.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<form class="form-inline">
|
||||
<label class="sr-only" for="inlineFormInputName2">Name</label>
|
||||
<input type="text" class="form-control mb-2 mr-sm-2" id="inlineFormInputName2" placeholder="Jane Doe">
|
||||
@ -624,12 +600,11 @@ You may need to manually address the width and alignment of individual form cont
|
||||
|
||||
<button type="submit" class="btn btn-primary mb-2">Submit</button>
|
||||
</form>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
Custom form controls and selects are also supported.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<form class="form-inline">
|
||||
<label class="my-1 mr-2" for="inlineFormCustomSelectPref">Preference</label>
|
||||
<select class="custom-select my-1 mr-sm-2" id="inlineFormCustomSelectPref">
|
||||
@ -646,40 +621,37 @@ Custom form controls and selects are also supported.
|
||||
|
||||
<button type="submit" class="btn btn-primary my-1">Submit</button>
|
||||
</form>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
{% capture callout %}
|
||||
{{< callout warning >}}
|
||||
##### Alternatives to hidden labels
|
||||
|
||||
Assistive technologies such as screen readers will have trouble with your forms if you don't include a label for every input. For these inline forms, you can hide the labels using the `.sr-only` class. There are further alternative methods of providing a label for assistive technologies, such as the `aria-label`, `aria-labelledby` or `title` attribute. If none of these are present, assistive technologies may resort to using the `placeholder` attribute, if present, but note that use of `placeholder` as a replacement for other labelling methods is not advised.
|
||||
{% endcapture %}
|
||||
{% include callout.html content=callout type="warning" %}
|
||||
{{< /callout >}}
|
||||
|
||||
## Help text
|
||||
|
||||
Block-level help text in forms can be created using `.form-text` (previously known as `.help-block` in v3). Inline help text can be flexibly implemented using any inline HTML element and utility classes like `.text-muted`.
|
||||
|
||||
{% capture callout %}
|
||||
{{< callout warning >}}
|
||||
##### Associating help text with form controls
|
||||
|
||||
Help text should be explicitly associated with the form control it relates to using the `aria-describedby` attribute. This will ensure that assistive technologies—such as screen readers—will announce this help text when the user focuses or enters the control.
|
||||
{% endcapture %}
|
||||
{% include callout.html content=callout type="warning" %}
|
||||
{{< /callout >}}
|
||||
|
||||
Help text below inputs can be styled with `.form-text`. This class includes `display: block` and adds some top margin for easy spacing from the inputs above.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<label for="inputPassword5">Password</label>
|
||||
<input type="password" id="inputPassword5" class="form-control" aria-describedby="passwordHelpBlock">
|
||||
<small id="passwordHelpBlock" class="form-text text-muted">
|
||||
Your password must be 8-20 characters long, contain letters and numbers, and must not contain spaces, special characters, or emoji.
|
||||
</small>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
Inline text can use any typical inline HTML element (be it a `<small>`, `<span>`, or something else) with nothing more than a utility class.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<label for="inputPassword6">Password</label>
|
||||
@ -689,20 +661,19 @@ Inline text can use any typical inline HTML element (be it a `<small>`, `<span>`
|
||||
</small>
|
||||
</div>
|
||||
</form>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Disabled forms
|
||||
|
||||
Add the `disabled` boolean attribute on an input to prevent user interactions and make it appear lighter.
|
||||
|
||||
{% highlight html %}
|
||||
{{< highlight html >}}
|
||||
<input class="form-control" id="disabledInput" type="text" placeholder="Disabled input here..." disabled>
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
Add the `disabled` attribute to a `<fieldset>` to disable all the controls within.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<form>
|
||||
<fieldset disabled>
|
||||
<div class="form-group">
|
||||
@ -726,24 +697,21 @@ Add the `disabled` attribute to a `<fieldset>` to disable all the controls withi
|
||||
<button type="submit" class="btn btn-primary">Submit</button>
|
||||
</fieldset>
|
||||
</form>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
{% capture callout %}
|
||||
{{< callout warning >}}
|
||||
##### Caveat with anchors
|
||||
|
||||
By default, browsers will treat all native form controls (`<input>`, `<select>` and `<button>` elements) inside a `<fieldset disabled>` as disabled, preventing both keyboard and mouse interactions on them. However, if your form also includes `<a ... class="btn btn-*">` elements, these will only be given a style of `pointer-events: none`.
|
||||
{% endcapture %}
|
||||
{% include callout.html content=callout type="warning" %}
|
||||
{{< /callout >}}
|
||||
|
||||
## Validation
|
||||
|
||||
Provide valuable, actionable feedback to your users with HTML5 form validation–[available in all our supported browsers](https://caniuse.com/#feat=form-validation). Choose from the browser default validation feedback, or implement custom messages with our built-in classes and starter JavaScript.
|
||||
|
||||
{% capture callout %}
|
||||
{{< callout warning >}}
|
||||
We currently recommend using custom validation styles, as native browser default validation messages are not consistently exposed to assistive technologies in all browsers (most notably, Chrome on desktop and mobile).
|
||||
{% endcapture %}
|
||||
{% include callout.html content=callout type="warning" %}
|
||||
{{< /callout >}}
|
||||
|
||||
### How it works
|
||||
|
||||
@ -766,7 +734,7 @@ For custom Bootstrap form validation messages, you'll need to add the `novalidat
|
||||
|
||||
Custom feedback styles apply custom colors, borders, focus styles, and background icons to better communicate feedback. Background icons for `<select>`s are only available with `.custom-select`, and not `.form-control`.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<form class="needs-validation" novalidate>
|
||||
<div class="form-row">
|
||||
<div class="col-md-4 mb-3">
|
||||
@ -856,8 +824,7 @@ Custom feedback styles apply custom colors, borders, focus styles, and backgroun
|
||||
}, false);
|
||||
})();
|
||||
</script>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
### Browser defaults
|
||||
|
||||
@ -865,7 +832,7 @@ Not interested in custom validation feedback messages or writing JavaScript to c
|
||||
|
||||
While these feedback styles cannot be styled with CSS, you can still customize the feedback text through JavaScript.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<form>
|
||||
<div class="form-row">
|
||||
<div class="col-md-4 mb-3">
|
||||
@ -913,14 +880,13 @@ While these feedback styles cannot be styled with CSS, you can still customize t
|
||||
</div>
|
||||
<button class="btn btn-primary" type="submit">Submit form</button>
|
||||
</form>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
### Server side
|
||||
|
||||
We recommend using client-side validation, but in case you require server-side validation, you can indicate invalid and valid form fields with `.is-invalid` and `.is-valid`. Note that `.invalid-feedback` is also supported with these classes.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<form>
|
||||
<div class="form-row">
|
||||
<div class="col-md-4 mb-3">
|
||||
@ -989,8 +955,7 @@ We recommend using client-side validation, but in case you require server-side v
|
||||
</div>
|
||||
<button class="btn btn-primary" type="submit">Submit form</button>
|
||||
</form>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
### Supported elements
|
||||
|
||||
@ -1002,7 +967,7 @@ Validation styles are available for the following form controls and components:
|
||||
- `.custom-checkbox`s and `.custom-radio`s
|
||||
- `.custom-file`
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<form class="was-validated">
|
||||
<div class="mb-3">
|
||||
<label for="validationTextarea">Textarea</label>
|
||||
@ -1044,14 +1009,13 @@ Validation styles are available for the following form controls and components:
|
||||
<div class="invalid-feedback">Example invalid custom file feedback</div>
|
||||
</div>
|
||||
</form>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
### Tooltips
|
||||
|
||||
If your form layout allows it, you can swap the `.{valid|invalid}-feedback` classes for `.{valid|invalid}-tooltip` classes to display validation feedback in a styled tooltip. Be sure to have a parent with `position: relative` on it for tooltip positioning. In the example below, our column classes have this already, but your project may require an alternative setup.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<form class="needs-validation" novalidate>
|
||||
<div class="form-row">
|
||||
<div class="col-md-4 mb-3">
|
||||
@ -1109,8 +1073,7 @@ If your form layout allows it, you can swap the `.{valid|invalid}-feedback` clas
|
||||
</div>
|
||||
<button class="btn btn-primary" type="submit">Submit form</button>
|
||||
</form>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
### Customizing
|
||||
|
||||
@ -1118,7 +1081,7 @@ Validation states can be customized via Sass with the `$form-validation-states`
|
||||
|
||||
Please note that we do not recommend customizing these values without also modifying the `form-validation-state` mixin.
|
||||
|
||||
{% highlight scss %}
|
||||
{{< highlight scss >}}
|
||||
// Sass map from `_variables.scss`
|
||||
// Override this and recompile your Sass to generate different states
|
||||
$form-validation-states: map-merge(
|
||||
@ -1141,7 +1104,7 @@ $form-validation-states: map-merge(
|
||||
@each $state, $data in $form-validation-states {
|
||||
@include form-validation-state($state, map-get($data, color), map-get($data, icon));
|
||||
}
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
## Custom forms
|
||||
|
||||
@ -1159,13 +1122,12 @@ In the checked states, we use **base64 embedded SVG icons** from [Open Iconic](h
|
||||
|
||||
#### Checkboxes
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="checkbox" class="custom-control-input" id="customCheck1">
|
||||
<label class="custom-control-label" for="customCheck1">Check this custom checkbox</label>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
Custom checkboxes can also utilize the `:indeterminate` pseudo class when manually set via JavaScript (there is no available HTML attribute for specifying it).
|
||||
|
||||
@ -1176,14 +1138,14 @@ Custom checkboxes can also utilize the `:indeterminate` pseudo class when manual
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% highlight js %}
|
||||
{{< highlight js >}}
|
||||
var checkbox = document.querySelector('.your-checkbox')
|
||||
checkbox.indeterminate = true
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
#### Radios
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="custom-control custom-radio">
|
||||
<input type="radio" id="customRadio1" name="customRadio" class="custom-control-input">
|
||||
<label class="custom-control-label" for="customRadio1">Toggle this custom radio</label>
|
||||
@ -1192,12 +1154,11 @@ checkbox.indeterminate = true
|
||||
<input type="radio" id="customRadio2" name="customRadio" class="custom-control-input">
|
||||
<label class="custom-control-label" for="customRadio2">Or toggle this other custom radio</label>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
#### Inline
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="custom-control custom-radio custom-control-inline">
|
||||
<input type="radio" id="customRadioInline1" name="customRadioInline1" class="custom-control-input">
|
||||
<label class="custom-control-label" for="customRadioInline1">Toggle this custom radio</label>
|
||||
@ -1206,14 +1167,13 @@ checkbox.indeterminate = true
|
||||
<input type="radio" id="customRadioInline2" name="customRadioInline1" class="custom-control-input">
|
||||
<label class="custom-control-label" for="customRadioInline2">Or toggle this other custom radio</label>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
#### Disabled
|
||||
|
||||
Custom checkboxes and radios can also be disabled. Add the `disabled` boolean attribute to the `<input>` and the custom indicator and label description will be automatically styled.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="checkbox" class="custom-control-input" id="customCheckDisabled1" disabled>
|
||||
<label class="custom-control-label" for="customCheckDisabled1">Check this custom checkbox</label>
|
||||
@ -1223,14 +1183,13 @@ Custom checkboxes and radios can also be disabled. Add the `disabled` boolean at
|
||||
<input type="radio" name="radioDisabled" id="customRadioDisabled2" class="custom-control-input" disabled>
|
||||
<label class="custom-control-label" for="customRadioDisabled2">Toggle this custom radio</label>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
### Switches
|
||||
|
||||
A switch has the markup of a custom checkbox but uses the `.custom-switch` class to render a toggle switch. Switches also support the `disabled` attribute.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="custom-control custom-switch">
|
||||
<input type="checkbox" class="custom-control-input" id="customSwitch1">
|
||||
<label class="custom-control-label" for="customSwitch1">Toggle this switch element</label>
|
||||
@ -1239,26 +1198,24 @@ A switch has the markup of a custom checkbox but uses the `.custom-switch` class
|
||||
<input type="checkbox" class="custom-control-input" disabled id="customSwitch2">
|
||||
<label class="custom-control-label" for="customSwitch2">Disabled switch element</label>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
### Select menu
|
||||
|
||||
Custom `<select>` menus need only a custom class, `.custom-select` to trigger the custom styles. Custom styles are limited to the `<select>`'s initial appearance and cannot modify the `<option>`s due to browser limitations.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<select class="custom-select">
|
||||
<option selected>Open this select menu</option>
|
||||
<option value="1">One</option>
|
||||
<option value="2">Two</option>
|
||||
<option value="3">Three</option>
|
||||
</select>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
You may also choose from small and large custom selects to match our similarly sized text inputs.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<select class="custom-select custom-select-lg mb-3">
|
||||
<option selected>Open this select menu</option>
|
||||
<option value="1">One</option>
|
||||
@ -1272,75 +1229,67 @@ You may also choose from small and large custom selects to match our similarly s
|
||||
<option value="2">Two</option>
|
||||
<option value="3">Three</option>
|
||||
</select>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
The `multiple` attribute is also supported:
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<select class="custom-select" multiple>
|
||||
<option selected>Open this select menu</option>
|
||||
<option value="1">One</option>
|
||||
<option value="2">Two</option>
|
||||
<option value="3">Three</option>
|
||||
</select>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
As is the `size` attribute:
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<select class="custom-select" size="3">
|
||||
<option selected>Open this select menu</option>
|
||||
<option value="1">One</option>
|
||||
<option value="2">Two</option>
|
||||
<option value="3">Three</option>
|
||||
</select>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
### Range
|
||||
|
||||
Create custom `<input type="range">` controls with `.custom-range`. The track (the background) and thumb (the value) are both styled to appear the same across browsers. As only Firefox supports "filling" their track from the left or right of the thumb as a means to visually indicate progress, we do not currently support it.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<label for="customRange1">Example range</label>
|
||||
<input type="range" class="custom-range" id="customRange1">
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
Range inputs have implicit values for `min` and `max`—`0` and `100`, respectively. You may specify new values for those using the `min` and `max` attributes.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<label for="customRange2">Example range</label>
|
||||
<input type="range" class="custom-range" min="0" max="5" id="customRange2">
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
By default, range inputs "snap" to integer values. To change this, you can specify a `step` value. In the example below, we double the number of steps by using `step="0.5"`.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<label for="customRange3">Example range</label>
|
||||
<input type="range" class="custom-range" min="0" max="5" step="0.5" id="customRange3">
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
### File browser
|
||||
|
||||
{% capture callout %}
|
||||
{{< callout info >}}
|
||||
The recommended plugin to animate custom file input: [bs-custom-file-input](https://www.npmjs.com/package/bs-custom-file-input), that's what we are using currently here in our docs.
|
||||
{% endcapture %}
|
||||
{% include callout.html content=callout type="info" %}
|
||||
{{< /callout >}}
|
||||
|
||||
The file input is the most gnarly of the bunch and requires additional JavaScript if you'd like to hook them up with functional *Choose file...* and selected file name text.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="custom-file">
|
||||
<input type="file" class="custom-file-input" id="customFile">
|
||||
<label class="custom-file-label" for="customFile">Choose file</label>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
We hide the default file `<input>` via `opacity` and instead style the `<label>`. The button is generated and positioned with `::after`. Lastly, we declare a `width` and `height` on the `<input>` for proper spacing for surrounding content.
|
||||
|
||||
@ -1348,22 +1297,21 @@ We hide the default file `<input>` via `opacity` and instead style the `<label>`
|
||||
|
||||
The [`:lang()` pseudo-class](https://developer.mozilla.org/en-US/docs/Web/CSS/:lang) is used to allow for translation of the "Browse" text into other languages. Override or add entries to the `$custom-file-text` Sass variable with the relevant [language tag](https://en.wikipedia.org/wiki/IETF_language_tag) and localized strings. The English strings can be customized the same way. For example, here's how one might add a Spanish translation (Spanish's language code is `es`):
|
||||
|
||||
{% highlight scss %}
|
||||
{{< highlight scss >}}
|
||||
$custom-file-text: (
|
||||
en: "Browse",
|
||||
es: "Elegir"
|
||||
);
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
Here's `lang(es)` in action on the custom file input for a Spanish translation:
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="custom-file">
|
||||
<input type="file" class="custom-file-input" id="customFileLang" lang="es">
|
||||
<label class="custom-file-label" for="customFileLang">Seleccionar Archivo</label>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
You'll need to set the language of your document (or subtree thereof) correctly in order for the correct text to be shown. This can be done using [the `lang` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang) on the `<html>` element or the [`Content-Language` HTTP header](https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.12), among other methods.
|
||||
|
||||
@ -1371,10 +1319,9 @@ You'll need to set the language of your document (or subtree thereof) correctly
|
||||
|
||||
Bootstrap also provides a way to translate the "Browse" text in HTML with the `data-browse` attribute which can be added to the custom input label (example in Dutch):
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="custom-file">
|
||||
<input type="file" class="custom-file-input" id="customFileLangHTML">
|
||||
<label class="custom-file-label" for="customFileLangHTML" data-browse="Bestand kiezen">Voeg je document toe</label>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
@ -10,7 +10,7 @@ toc: true
|
||||
|
||||
Place one add-on or button on either side of an input. You may also place one on both sides of an input. Remember to place `<label>`s outside the input group.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="input-group mb-3">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text" id="basic-addon1">@</span>
|
||||
@ -49,22 +49,20 @@ Place one add-on or button on either side of an input. You may also place one on
|
||||
</div>
|
||||
<textarea class="form-control" aria-label="With textarea"></textarea>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Wrapping
|
||||
|
||||
Input groups wrap by default via `flex-wrap: wrap` in order to accommodate custom form field validation within an input group. You may disable this with `.flex-nowrap`.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="input-group flex-nowrap">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text" id="addon-wrapping">@</span>
|
||||
</div>
|
||||
<input type="text" class="form-control" placeholder="Username" aria-label="Username" aria-describedby="addon-wrapping">
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Sizing
|
||||
|
||||
@ -72,7 +70,7 @@ Add the relative form sizing classes to the `.input-group` itself and contents w
|
||||
|
||||
**Sizing on the individual input group elements isn't supported.**
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="input-group input-group-sm mb-3">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text" id="inputGroup-sizing-sm">Small</span>
|
||||
@ -93,14 +91,13 @@ Add the relative form sizing classes to the `.input-group` itself and contents w
|
||||
</div>
|
||||
<input type="text" class="form-control" aria-label="Sizing example input" aria-describedby="inputGroup-sizing-lg">
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Checkboxes and radios
|
||||
|
||||
Place any checkbox or radio option within an input group's addon instead of text.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="input-group mb-3">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text">
|
||||
@ -118,14 +115,13 @@ Place any checkbox or radio option within an input group's addon instead of text
|
||||
</div>
|
||||
<input type="text" class="form-control" aria-label="Text input with radio button">
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Multiple inputs
|
||||
|
||||
While multiple `<input>`s are supported visually, validation styles are only available for input groups with a single `<input>`.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">First and last name</span>
|
||||
@ -133,14 +129,13 @@ While multiple `<input>`s are supported visually, validation styles are only ava
|
||||
<input type="text" aria-label="First name" class="form-control">
|
||||
<input type="text" aria-label="Last name" class="form-control">
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Multiple addons
|
||||
|
||||
Multiple add-ons are supported and can be mixed with checkbox and radio input versions.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="input-group mb-3">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">$</span>
|
||||
@ -156,12 +151,11 @@ Multiple add-ons are supported and can be mixed with checkbox and radio input ve
|
||||
<span class="input-group-text">0.00</span>
|
||||
</div>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Button addons
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="input-group mb-3">
|
||||
<div class="input-group-prepend">
|
||||
<button class="btn btn-outline-secondary" type="button" id="button-addon1">Button</button>
|
||||
@ -191,12 +185,11 @@ Multiple add-ons are supported and can be mixed with checkbox and radio input ve
|
||||
<button class="btn btn-outline-secondary" type="button">Button</button>
|
||||
</div>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Buttons with dropdowns
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="input-group mb-3">
|
||||
<div class="input-group-prepend">
|
||||
<button class="btn btn-outline-secondary dropdown-toggle" type="button" data-toggle="dropdown" aria-expanded="false">Dropdown</button>
|
||||
@ -224,12 +217,11 @@ Multiple add-ons are supported and can be mixed with checkbox and radio input ve
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Segmented buttons
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="input-group mb-3">
|
||||
<div class="input-group-prepend">
|
||||
<button type="button" class="btn btn-outline-secondary">Action</button>
|
||||
@ -263,8 +255,7 @@ Multiple add-ons are supported and can be mixed with checkbox and radio input ve
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Custom forms
|
||||
|
||||
@ -272,7 +263,7 @@ Input groups include support for custom selects and custom file inputs. Browser
|
||||
|
||||
### Custom select
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="input-group mb-3">
|
||||
<div class="input-group-prepend">
|
||||
<label class="input-group-text" for="inputGroupSelect01">Options</label>
|
||||
@ -320,12 +311,11 @@ Input groups include support for custom selects and custom file inputs. Browser
|
||||
<button class="btn btn-outline-secondary" type="button">Button</button>
|
||||
</div>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
### Custom file input
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="input-group mb-3">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text" id="inputGroupFileAddon01">Upload</span>
|
||||
@ -365,8 +355,7 @@ Input groups include support for custom selects and custom file inputs. Browser
|
||||
<button class="btn btn-outline-secondary" type="button" id="inputGroupFileAddon04">Button</button>
|
||||
</div>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Accessibility
|
||||
|
@ -7,7 +7,7 @@ group: components
|
||||
|
||||
A lightweight, flexible component that can optionally extend the entire viewport to showcase key marketing messages on your site.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="jumbotron">
|
||||
<h1 class="display-4">Hello, world!</h1>
|
||||
<p class="lead">This is a simple hero unit, a simple jumbotron-style component for calling extra attention to featured content or information.</p>
|
||||
@ -15,17 +15,15 @@ A lightweight, flexible component that can optionally extend the entire viewport
|
||||
<p>It uses utility classes for typography and spacing to space content out within the larger container.</p>
|
||||
<a class="btn btn-primary btn-lg" href="#" role="button">Learn more</a>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
To make the jumbotron full width, and without rounded corners, add the `.jumbotron-fluid` modifier class and add a `.container` or `.container-fluid` within.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="jumbotron jumbotron-fluid">
|
||||
<div class="container">
|
||||
<h1 class="display-4">Fluid jumbotron</h1>
|
||||
<p class="lead">This is a modified jumbotron that occupies the entire horizontal space of its parent.</p>
|
||||
</div>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
@ -10,7 +10,7 @@ toc: true
|
||||
|
||||
The most basic list group is an unordered list with list items and the proper classes. Build upon it with the options that follow, or with your own CSS as needed.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item">Cras justo odio</li>
|
||||
<li class="list-group-item">Dapibus ac facilisis in</li>
|
||||
@ -18,14 +18,13 @@ The most basic list group is an unordered list with list items and the proper cl
|
||||
<li class="list-group-item">Porta ac consectetur ac</li>
|
||||
<li class="list-group-item">Vestibulum at eros</li>
|
||||
</ul>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Active items
|
||||
|
||||
Add `.active` to a `.list-group-item` to indicate the current active selection.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item active">Cras justo odio</li>
|
||||
<li class="list-group-item">Dapibus ac facilisis in</li>
|
||||
@ -33,14 +32,13 @@ Add `.active` to a `.list-group-item` to indicate the current active selection.
|
||||
<li class="list-group-item">Porta ac consectetur ac</li>
|
||||
<li class="list-group-item">Vestibulum at eros</li>
|
||||
</ul>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Disabled items
|
||||
|
||||
Add `.disabled` to a `.list-group-item` to make it _appear_ disabled. Note that some elements with `.disabled` will also require custom JavaScript to fully disable their click events (e.g., links).
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item disabled" aria-disabled="true">Cras justo odio</li>
|
||||
<li class="list-group-item">Dapibus ac facilisis in</li>
|
||||
@ -48,8 +46,7 @@ Add `.disabled` to a `.list-group-item` to make it _appear_ disabled. Note that
|
||||
<li class="list-group-item">Porta ac consectetur ac</li>
|
||||
<li class="list-group-item">Vestibulum at eros</li>
|
||||
</ul>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Links and buttons
|
||||
|
||||
@ -57,7 +54,7 @@ Use `<a>`s or `<button>`s to create _actionable_ list group items with hover, di
|
||||
|
||||
Be sure to **not use the standard `.btn` classes here**.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="list-group">
|
||||
<a href="#" class="list-group-item list-group-item-action active">
|
||||
Cras justo odio
|
||||
@ -67,12 +64,11 @@ Be sure to **not use the standard `.btn` classes here**.
|
||||
<a href="#" class="list-group-item list-group-item-action">Porta ac consectetur ac</a>
|
||||
<a href="#" class="list-group-item list-group-item-action disabled" tabindex="-1" aria-disabled="true">Vestibulum at eros</a>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
With `<button>`s, you can also make use of the `disabled` attribute instead of the `.disabled` class. Sadly, `<a>`s don't support the disabled attribute.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="list-group">
|
||||
<button type="button" class="list-group-item list-group-item-action active">
|
||||
Cras justo odio
|
||||
@ -82,14 +78,13 @@ With `<button>`s, you can also make use of the `disabled` attribute instead of t
|
||||
<button type="button" class="list-group-item list-group-item-action">Porta ac consectetur ac</button>
|
||||
<button type="button" class="list-group-item list-group-item-action" disabled>Vestibulum at eros</button>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Flush
|
||||
|
||||
Add `.list-group-flush` to remove some borders and rounded corners to render list group items edge-to-edge in a parent container (e.g., cards).
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<ul class="list-group list-group-flush">
|
||||
<li class="list-group-item">Cras justo odio</li>
|
||||
<li class="list-group-item">Dapibus ac facilisis in</li>
|
||||
@ -97,8 +92,7 @@ Add `.list-group-flush` to remove some borders and rounded corners to render lis
|
||||
<li class="list-group-item">Porta ac consectetur ac</li>
|
||||
<li class="list-group-item">Vestibulum at eros</li>
|
||||
</ul>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Horizontal
|
||||
|
||||
@ -106,49 +100,55 @@ Add `.list-group-horizontal` to change the layout of list group items from verti
|
||||
|
||||
**ProTip:** Want equal-width list group items when horizontal? Add `.flex-fill` to each list group item.
|
||||
|
||||
{% for bp in site.data.breakpoints %}
|
||||
{% capture example %}
|
||||
<ul class="list-group list-group-horizontal{{ bp.abbr }}">
|
||||
{{< example >}}
|
||||
{{< list-group.inline >}}
|
||||
{{- range $.Site.Data.breakpoints }}
|
||||
<ul class="list-group list-group-horizontal{{ .abbr }}">
|
||||
<li class="list-group-item">Cras justo odio</li>
|
||||
<li class="list-group-item">Dapibus ac facilisis in</li>
|
||||
<li class="list-group-item">Morbi leo risus</li>
|
||||
</ul>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}{% endfor %}
|
||||
{{- end -}}
|
||||
{{< /list-group.inline >}}
|
||||
{{< /example >}}
|
||||
|
||||
## Contextual classes
|
||||
|
||||
Use contextual classes to style list items with a stateful background and color.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item">Dapibus ac facilisis in</li>
|
||||
|
||||
{% for color in site.data.theme-colors %}
|
||||
<li class="list-group-item list-group-item-{{ color.name }}">A simple {{ color.name }} list group item</li>{% endfor %}
|
||||
{{< list.inline >}}
|
||||
{{- range (index $.Site.Data "theme-colors") }}
|
||||
<li class="list-group-item list-group-item-{{ .name }}">A simple {{ .name }} list group item</li>
|
||||
{{- end -}}
|
||||
{{< /list.inline >}}
|
||||
</ul>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
Contextual classes also work with `.list-group-item-action`. Note the addition of the hover styles here not present in the previous example. Also supported is the `.active` state; apply it to indicate an active selection on a contextual list group item.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="list-group">
|
||||
<a href="#" class="list-group-item list-group-item-action">Dapibus ac facilisis in</a>
|
||||
|
||||
{% for color in site.data.theme-colors %}
|
||||
<a href="#" class="list-group-item list-group-item-action list-group-item-{{ color.name }}">A simple {{ color.name }} list group item</a>{% endfor %}
|
||||
{{< list.inline >}}
|
||||
{{- range (index $.Site.Data "theme-colors") }}
|
||||
<a href="#" class="list-group-item list-group-item-action list-group-item-{{ .name }}">A simple {{ .name }} list group item</a>
|
||||
{{- end -}}
|
||||
{{< /list.inline >}}
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
{% include callout-warning-color-assistive-technologies.md %}
|
||||
{{< callout info >}}
|
||||
{{< partial "callout-warning-color-assistive-technologies.md" >}}
|
||||
{{< /callout >}}
|
||||
|
||||
## With badges
|
||||
|
||||
Add badges to any list group item to show unread counts, activity, and more with the help of some [utilities]({{ site.baseurl }}/docs/{{ site.docs_version }}/utilities/flex/).
|
||||
Add badges to any list group item to show unread counts, activity, and more with the help of some [utilities](/docs/{{< param docs_version >}}/utilities/flex/).
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center">
|
||||
Cras justo odio
|
||||
@ -163,14 +163,13 @@ Add badges to any list group item to show unread counts, activity, and more with
|
||||
<span class="badge badge-primary badge-pill">1</span>
|
||||
</li>
|
||||
</ul>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Custom content
|
||||
|
||||
Add nearly any HTML within, even for linked list groups like the one below, with the help of [flexbox utilities]({{ site.baseurl }}/docs/{{ site.docs_version }}/utilities/flex/).
|
||||
Add nearly any HTML within, even for linked list groups like the one below, with the help of [flexbox utilities](/docs/{{< param docs_version >}}/utilities/flex/).
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="list-group">
|
||||
<a href="#" class="list-group-item list-group-item-action active">
|
||||
<div class="d-flex w-100 justify-content-between">
|
||||
@ -197,8 +196,7 @@ Add nearly any HTML within, even for linked list groups like the one below, with
|
||||
<small class="text-muted">Donec id elit non mi porta.</small>
|
||||
</a>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## JavaScript behavior
|
||||
|
||||
@ -233,7 +231,7 @@ Use the tab JavaScript plugin—include it individually or through the compiled
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% highlight html %}
|
||||
{{< highlight html >}}
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
<div class="list-group" id="list-tab" role="tablist">
|
||||
@ -252,14 +250,14 @@ Use the tab JavaScript plugin—include it individually or through the compiled
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
### Using data attributes
|
||||
|
||||
You can activate a list group navigation without writing any JavaScript by simply specifying `data-toggle="list"` or on an element. Use these data attributes on `.list-group-item`.
|
||||
|
||||
<div role="tabpanel">
|
||||
{% highlight html %}
|
||||
{{< highlight html >}}
|
||||
<!-- List group -->
|
||||
<div class="list-group" id="myList" role="tablist">
|
||||
<a class="list-group-item list-group-item-action active" data-toggle="list" href="#home" role="tab">Home</a>
|
||||
@ -275,41 +273,41 @@ You can activate a list group navigation without writing any JavaScript by simpl
|
||||
<div class="tab-pane" id="messages" role="tabpanel">...</div>
|
||||
<div class="tab-pane" id="settings" role="tabpanel">...</div>
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
</div>
|
||||
|
||||
### Via JavaScript
|
||||
|
||||
Enable tabbable list item via JavaScript (each list item needs to be activated individually):
|
||||
|
||||
{% highlight js %}
|
||||
{{< highlight js >}}
|
||||
$('#myList a').on('click', function (e) {
|
||||
e.preventDefault()
|
||||
$(this).tab('show')
|
||||
})
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
You can activate individual list item in several ways:
|
||||
|
||||
{% highlight js %}
|
||||
{{< highlight js >}}
|
||||
$('#myList a[href="#profile"]').tab('show') // Select tab by name
|
||||
$('#myList a:first-child').tab('show') // Select first tab
|
||||
$('#myList a:last-child').tab('show') // Select last tab
|
||||
$('#myList a:nth-child(3)').tab('show') // Select third tab
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
### Fade effect
|
||||
|
||||
To make tabs panel fade in, add `.fade` to each `.tab-pane`. The first tab pane must also have `.show` to make the initial content visible.
|
||||
|
||||
{% highlight html %}
|
||||
{{< highlight html >}}
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane fade show active" id="home" role="tabpanel">...</div>
|
||||
<div class="tab-pane fade" id="profile" role="tabpanel">...</div>
|
||||
<div class="tab-pane fade" id="messages" role="tabpanel">...</div>
|
||||
<div class="tab-pane fade" id="settings" role="tabpanel">...</div>
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
### Methods
|
||||
|
||||
@ -317,7 +315,7 @@ To make tabs panel fade in, add `.fade` to each `.tab-pane`. The first tab pane
|
||||
|
||||
Activates a list item element and content container. Tab should have either a `data-target` or an `href` targeting a container node in the DOM.
|
||||
|
||||
{% highlight html %}
|
||||
{{< highlight html >}}
|
||||
<div class="list-group" id="myList" role="tablist">
|
||||
<a class="list-group-item list-group-item-action active" data-toggle="list" href="#home" role="tab">Home</a>
|
||||
<a class="list-group-item list-group-item-action" data-toggle="list" href="#profile" role="tab">Profile</a>
|
||||
@ -337,15 +335,15 @@ Activates a list item element and content container. Tab should have either a `d
|
||||
$('#myList a:last-child').tab('show')
|
||||
})
|
||||
</script>
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
#### .tab('show')
|
||||
|
||||
Selects the given list item and shows its associated pane. Any other list item that was previously selected becomes unselected and its associated pane is hidden. **Returns to the caller before the tab pane has actually been shown** (for example, before the `shown.bs.tab` event occurs).
|
||||
|
||||
{% highlight js %}
|
||||
{{< highlight js >}}
|
||||
$('#someListItem').tab('show')
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
### Events
|
||||
|
||||
@ -385,9 +383,9 @@ If no tab was already active, the `hide.bs.tab` and `hidden.bs.tab` events will
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{% highlight js %}
|
||||
{{< highlight js >}}
|
||||
$('a[data-toggle="list"]').on('shown.bs.tab', function (e) {
|
||||
e.target // newly activated tab
|
||||
e.relatedTarget // previous active tab
|
||||
})
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
@ -10,33 +10,32 @@ toc: true
|
||||
|
||||
The [media object](http://www.stubbornella.org/content/2010/06/25/the-media-object-saves-hundreds-of-lines-of-code/) helps build complex and repetitive components where some media is positioned alongside content that doesn't wrap around said media. Plus, it does this with only two required classes thanks to flexbox.
|
||||
|
||||
Below is an example of a single media object. Only two classes are required—the wrapping `.media` and the `.media-body` around your content. Optional padding and margin can be controlled through [spacing utilities]({{ site.baseurl }}/docs/{{ site.docs_version }}/utilities/spacing/).
|
||||
Below is an example of a single media object. Only two classes are required—the wrapping `.media` and the `.media-body` around your content. Optional padding and margin can be controlled through [spacing utilities](/docs/{{< param docs_version >}}/utilities/spacing/).
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="media">
|
||||
{% include icons/placeholder.svg width="64" height="64" class="mr-3" %}
|
||||
{{< placeholder width="64" height="64" class="mr-3" >}}
|
||||
<div class="media-body">
|
||||
<h5 class="mt-0">Media heading</h5>
|
||||
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
|
||||
</div>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Nesting
|
||||
|
||||
Media objects can be infinitely nested, though we suggest you stop at some point. Place nested `.media` within the `.media-body` of a parent media object.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="media">
|
||||
{% include icons/placeholder.svg width="64" height="64" class="mr-3" %}
|
||||
{{< placeholder width="64" height="64" class="mr-3" >}}
|
||||
<div class="media-body">
|
||||
<h5 class="mt-0">Media heading</h5>
|
||||
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
|
||||
|
||||
<div class="media mt-3">
|
||||
<a class="mr-3" href="#">
|
||||
{% include icons/placeholder.svg width="64" height="64" %}
|
||||
{{< placeholder width="64" height="64" >}}
|
||||
</a>
|
||||
<div class="media-body">
|
||||
<h5 class="mt-0">Media heading</h5>
|
||||
@ -45,91 +44,85 @@ Media objects can be infinitely nested, though we suggest you stop at some point
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Alignment
|
||||
|
||||
Media in a media object can be aligned with flexbox utilities to the top (default), middle, or end of your `.media-body` content.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="media">
|
||||
{% include icons/placeholder.svg width="64" height="64" class="align-self-start mr-3" %}
|
||||
{{< placeholder width="64" height="64" class="align-self-start mr-3" >}}
|
||||
<div class="media-body">
|
||||
<h5 class="mt-0">Top-aligned media</h5>
|
||||
<p>Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.</p>
|
||||
<p>Donec sed odio dui. Nullam quis risus eget urna mollis ornare vel eu leo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.</p>
|
||||
</div>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="media">
|
||||
{% include icons/placeholder.svg width="64" height="64" class="align-self-center mr-3" %}
|
||||
{{< placeholder width="64" height="64" class="align-self-center mr-3" >}}
|
||||
<div class="media-body">
|
||||
<h5 class="mt-0">Center-aligned media</h5>
|
||||
<p>Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.</p>
|
||||
<p class="mb-0">Donec sed odio dui. Nullam quis risus eget urna mollis ornare vel eu leo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.</p>
|
||||
</div>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="media">
|
||||
{% include icons/placeholder.svg width="64" height="64" class="align-self-end mr-3" %}
|
||||
{{< placeholder width="64" height="64" class="align-self-end mr-3" >}}
|
||||
<div class="media-body">
|
||||
<h5 class="mt-0">Bottom-aligned media</h5>
|
||||
<p>Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.</p>
|
||||
<p class="mb-0">Donec sed odio dui. Nullam quis risus eget urna mollis ornare vel eu leo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.</p>
|
||||
</div>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Order
|
||||
|
||||
Change the order of content in media objects by modifying the HTML itself, or by adding some custom flexbox CSS to set the `order` property (to an integer of your choosing).
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="media">
|
||||
<div class="media-body">
|
||||
<h5 class="mt-0 mb-1">Media object</h5>
|
||||
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
|
||||
</div>
|
||||
{% include icons/placeholder.svg width="64" height="64" class="ml-3" %}
|
||||
{{< placeholder width="64" height="64" class="ml-3" >}}
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Media list
|
||||
|
||||
Because the media object has so few structural requirements, you can also use these classes on list HTML elements. On your `<ul>` or `<ol>`, add the `.list-unstyled` to remove any browser default list styles, and then apply `.media` to your `<li>`s. As always, use spacing utilities wherever needed to fine tune.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<ul class="list-unstyled">
|
||||
<li class="media">
|
||||
{% include icons/placeholder.svg width="64" height="64" class="mr-3" %}
|
||||
{{< placeholder width="64" height="64" class="mr-3" >}}
|
||||
<div class="media-body">
|
||||
<h5 class="mt-0 mb-1">List-based media object</h5>
|
||||
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
|
||||
</div>
|
||||
</li>
|
||||
<li class="media my-4">
|
||||
{% include icons/placeholder.svg width="64" height="64" class="mr-3" %}
|
||||
{{< placeholder width="64" height="64" class="mr-3" >}}
|
||||
<div class="media-body">
|
||||
<h5 class="mt-0 mb-1">List-based media object</h5>
|
||||
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
|
||||
</div>
|
||||
</li>
|
||||
<li class="media">
|
||||
{% include icons/placeholder.svg width="64" height="64" class="mr-3" %}
|
||||
{{< placeholder width="64" height="64" class="mr-3" >}}
|
||||
<div class="media-body">
|
||||
<h5 class="mt-0 mb-1">List-based media object</h5>
|
||||
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
@ -14,16 +14,18 @@ Before getting started with Bootstrap's modal component, be sure to read the fol
|
||||
- Clicking on the modal "backdrop" will automatically close the modal.
|
||||
- Bootstrap only supports one modal window at a time. Nested modals aren't supported as we believe them to be poor user experiences.
|
||||
- Modals use `position: fixed`, which can sometimes be a bit particular about its rendering. Whenever possible, place your modal HTML in a top-level position to avoid potential interference from other elements. You'll likely run into issues when nesting a `.modal` within another fixed element.
|
||||
- Once again, due to `position: fixed`, there are some caveats with using modals on mobile devices. [See our browser support docs]({{ site.baseurl }}/docs/{{ site.docs_version }}/getting-started/browsers-devices/#modals-and-dropdowns-on-mobile) for details.
|
||||
- Once again, due to `position: fixed`, there are some caveats with using modals on mobile devices. [See our browser support docs](/docs/{{< param docs_version >}}/getting-started/browsers-devices/#modals-and-dropdowns-on-mobile) for details.
|
||||
- Due to how HTML5 defines its semantics, [the `autofocus` HTML attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-autofocus) has no effect in Bootstrap modals. To achieve the same effect, use some custom JavaScript:
|
||||
|
||||
{% highlight js %}
|
||||
{{< highlight js >}}
|
||||
$('#myModal').on('shown.bs.modal', function () {
|
||||
$('#myInput').trigger('focus')
|
||||
})
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
{% include callout-info-prefersreducedmotion.md %}
|
||||
{{< callout info >}}
|
||||
{{< partial "callout-info-prefersreducedmotion.md" >}}
|
||||
{{< /callout >}}
|
||||
|
||||
Keep reading for demos and usage guidelines.
|
||||
|
||||
@ -55,7 +57,7 @@ Below is a _static_ modal example (meaning its `position` and `display` have bee
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% highlight html %}
|
||||
{{< highlight html >}}
|
||||
<div class="modal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
@ -75,7 +77,7 @@ Below is a _static_ modal example (meaning its `position` and `display` have bee
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
### Live demo
|
||||
|
||||
@ -107,7 +109,7 @@ Toggle a working modal demo by clicking the button below. It will slide down and
|
||||
</button>
|
||||
</div>
|
||||
|
||||
{% highlight html %}
|
||||
{{< highlight html >}}
|
||||
<!-- Button trigger modal -->
|
||||
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal">
|
||||
Launch demo modal
|
||||
@ -133,7 +135,7 @@ Toggle a working modal demo by clicking the button below. It will slide down and
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
### Scrolling long content
|
||||
|
||||
@ -182,7 +184,7 @@ When modals become too long for the user's viewport or device, they scroll indep
|
||||
</button>
|
||||
</div>
|
||||
|
||||
{% highlight html %}
|
||||
{{< highlight html >}}
|
||||
<!-- Button trigger modal -->
|
||||
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModalLong">
|
||||
Launch demo modal
|
||||
@ -208,7 +210,7 @@ When modals become too long for the user's viewport or device, they scroll indep
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
You can also create a scrollable modal that allows scroll the modal body by adding `.modal-dialog-scrollable` to `.modal-dialog`.
|
||||
|
||||
@ -255,7 +257,7 @@ You can also create a scrollable modal that allows scroll the modal body by addi
|
||||
</button>
|
||||
</div>
|
||||
|
||||
{% highlight html %}
|
||||
{{< highlight html >}}
|
||||
<!-- Button trigger modal -->
|
||||
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModalScrollable">
|
||||
Launch demo modal
|
||||
@ -281,7 +283,7 @@ You can also create a scrollable modal that allows scroll the modal body by addi
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
### Vertically centered
|
||||
|
||||
@ -340,7 +342,7 @@ Add `.modal-dialog-centered` to `.modal-dialog` to vertically center the modal.
|
||||
</button>
|
||||
</div>
|
||||
|
||||
{% highlight html %}
|
||||
{{< highlight html >}}
|
||||
<!-- Button trigger modal -->
|
||||
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModalCenter">
|
||||
Launch demo modal
|
||||
@ -366,11 +368,11 @@ Add `.modal-dialog-centered` to `.modal-dialog` to vertically center the modal.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
### Tooltips and popovers
|
||||
|
||||
[Tooltips]({{ site.baseurl }}/docs/{{ site.docs_version }}/components/tooltips/) and [popovers]({{ site.baseurl }}/docs/{{ site.docs_version }}/components/popovers/) can be placed within modals as needed. When modals are closed, any tooltips and popovers within are also automatically dismissed.
|
||||
[Tooltips](/docs/{{< param docs_version >}}/components/tooltips/) and [popovers](/docs/{{< param docs_version >}}/components/popovers/) can be placed within modals as needed. When modals are closed, any tooltips and popovers within are also automatically dismissed.
|
||||
|
||||
<div id="exampleModalPopovers" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="exampleModalPopoversLabel" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
@ -402,7 +404,7 @@ Add `.modal-dialog-centered` to `.modal-dialog` to vertically center the modal.
|
||||
</button>
|
||||
</div>
|
||||
|
||||
{% highlight html %}
|
||||
{{< highlight html >}}
|
||||
<div class="modal-body">
|
||||
<h5>Popover in a modal</h5>
|
||||
<p>This <a href="#" role="button" class="btn btn-secondary popover-test" title="Popover title" data-content="Popover body content is set in this attribute.">button</a> triggers a popover on click.</p>
|
||||
@ -410,7 +412,7 @@ Add `.modal-dialog-centered` to `.modal-dialog` to vertically center the modal.
|
||||
<h5>Tooltips in a modal</h5>
|
||||
<p><a href="#" class="tooltip-test" title="Tooltip">This link</a> and <a href="#" class="tooltip-test" title="Tooltip">that link</a> have tooltips on hover.</p>
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
### Using the grid
|
||||
|
||||
@ -465,7 +467,7 @@ Utilize the Bootstrap grid system within a modal by nesting `.container-fluid` w
|
||||
</button>
|
||||
</div>
|
||||
|
||||
{% highlight html %}
|
||||
{{< highlight html >}}
|
||||
<div class="modal-body">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
@ -494,7 +496,7 @@ Utilize the Bootstrap grid system within a modal by nesting `.container-fluid` w
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
### Varying modal content
|
||||
|
||||
@ -502,7 +504,7 @@ Have a bunch of buttons that all trigger the same modal with slightly different
|
||||
|
||||
Below is a live demo followed by example HTML and JavaScript. For more information, [read the modal events docs](#events) for details on `relatedTarget`.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal" data-whatever="@mdo">Open modal for @mdo</button>
|
||||
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal" data-whatever="@fat">Open modal for @fat</button>
|
||||
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal" data-whatever="@getbootstrap">Open modal for @getbootstrap</button>
|
||||
@ -535,10 +537,9 @@ Below is a live demo followed by example HTML and JavaScript. For more informati
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
{% highlight js %}
|
||||
{{< highlight js >}}
|
||||
$('#exampleModal').on('show.bs.modal', function (event) {
|
||||
var button = $(event.relatedTarget) // Button that triggered the modal
|
||||
var recipient = button.data('whatever') // Extract info from data-* attributes
|
||||
@ -549,7 +550,7 @@ $('#exampleModal').on('show.bs.modal', function (event) {
|
||||
modal.find('.modal-title').text('New message to ' + recipient)
|
||||
modal.find('.modal-body input').val(recipient)
|
||||
})
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
### Change animation
|
||||
|
||||
@ -561,11 +562,11 @@ If you want for example a zoom-in animation, you can set `$modal-fade-transform:
|
||||
|
||||
For modals that simply appear rather than fade in to view, remove the `.fade` class from your modal markup.
|
||||
|
||||
{% highlight html %}
|
||||
{{< highlight html >}}
|
||||
<div class="modal" tabindex="-1" role="dialog" aria-labelledby="..." aria-hidden="true">
|
||||
...
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
### Dynamic heights
|
||||
|
||||
@ -623,7 +624,7 @@ Our default modal without modifier class constitutes the "medium" size modal.
|
||||
<button type="button" class="btn btn-primary" data-toggle="modal" data-target=".bd-example-modal-sm">Small modal</button>
|
||||
</div>
|
||||
|
||||
{% highlight html %}
|
||||
{{< highlight html >}}
|
||||
<!-- Extra large modal -->
|
||||
<button type="button" class="btn btn-primary" data-toggle="modal" data-target=".bd-example-modal-xl">Extra large modal</button>
|
||||
|
||||
@ -656,7 +657,7 @@ Our default modal without modifier class constitutes the "medium" size modal.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
<div class="modal fade bd-example-modal-xl" tabindex="-1" role="dialog" aria-labelledby="myExtraLargeModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-xl">
|
||||
@ -716,15 +717,15 @@ The modal plugin toggles your hidden content on demand, via data attributes or J
|
||||
|
||||
Activate a modal without writing JavaScript. Set `data-toggle="modal"` on a controller element, like a button, along with a `data-target="#foo"` or `href="#foo"` to target a specific modal to toggle.
|
||||
|
||||
{% highlight html %}
|
||||
{{< highlight html >}}
|
||||
<button type="button" data-toggle="modal" data-target="#myModal">Launch modal</button>
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
### Via JavaScript
|
||||
|
||||
Call a modal with id `myModal` with a single line of JavaScript:
|
||||
|
||||
{% highlight js %}$('#myModal').modal(options){% endhighlight %}
|
||||
{{< highlight js >}}$('#myModal').modal(options){{< /highlight >}}
|
||||
|
||||
### Options
|
||||
|
||||
@ -769,41 +770,43 @@ Options can be passed via data attributes or JavaScript. For data attributes, ap
|
||||
|
||||
### Methods
|
||||
|
||||
{% include callout-danger-async-methods.md %}
|
||||
{{< callout danger >}}
|
||||
{{< partial "callout-danger-async-methods.md" >}}
|
||||
{{< /callout >}}
|
||||
|
||||
#### `.modal(options)`
|
||||
|
||||
Activates your content as a modal. Accepts an optional options `object`.
|
||||
|
||||
{% highlight js %}
|
||||
{{< highlight js >}}
|
||||
$('#myModal').modal({
|
||||
keyboard: false
|
||||
})
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
#### `.modal('toggle')`
|
||||
|
||||
Manually toggles a modal. **Returns to the caller before the modal has actually been shown or hidden** (i.e. before the `shown.bs.modal` or `hidden.bs.modal` event occurs).
|
||||
|
||||
{% highlight js %}$('#myModal').modal('toggle'){% endhighlight %}
|
||||
{{< highlight js >}}$('#myModal').modal('toggle'){{< /highlight >}}
|
||||
|
||||
#### `.modal('show')`
|
||||
|
||||
Manually opens a modal. **Returns to the caller before the modal has actually been shown** (i.e. before the `shown.bs.modal` event occurs).
|
||||
|
||||
{% highlight js %}$('#myModal').modal('show'){% endhighlight %}
|
||||
{{< highlight js >}}$('#myModal').modal('show'){{< /highlight >}}
|
||||
|
||||
#### `.modal('hide')`
|
||||
|
||||
Manually hides a modal. **Returns to the caller before the modal has actually been hidden** (i.e. before the `hidden.bs.modal` event occurs).
|
||||
|
||||
{% highlight js %}$('#myModal').modal('hide'){% endhighlight %}
|
||||
{{< highlight js >}}$('#myModal').modal('hide'){{< /highlight >}}
|
||||
|
||||
#### `.modal('handleUpdate')`
|
||||
|
||||
Manually readjust the modal's position if the height of a modal changes while it is open (i.e. in case a scrollbar appears).
|
||||
|
||||
{% highlight js %}$('#myModal').modal('handleUpdate'){% endhighlight %}
|
||||
{{< highlight js >}}$('#myModal').modal('handleUpdate'){{< /highlight >}}
|
||||
|
||||
#### `.modal('dispose')`
|
||||
|
||||
@ -840,8 +843,8 @@ Bootstrap's modal class exposes a few events for hooking into modal functionalit
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{% highlight js %}
|
||||
{{< highlight js >}}
|
||||
$('#myModal').on('hidden.bs.modal', function (e) {
|
||||
// do something...
|
||||
})
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
@ -12,12 +12,14 @@ Here's what you need to know before getting started with the navbar:
|
||||
|
||||
- Navbars require a wrapping `.navbar` with `.navbar-expand{-sm|-md|-lg|-xl}` for responsive collapsing and [color scheme](#color-schemes) classes.
|
||||
- Navbars and their contents are fluid by default. Use [optional containers](#containers) to limit their horizontal width.
|
||||
- Use our [spacing]({{ site.baseurl }}/docs/{{ site.docs_version }}/utilities/spacing/) and [flex]({{ site.baseurl }}/docs/{{ site.docs_version }}/utilities/flex/) utility classes for controlling spacing and alignment within navbars.
|
||||
- Use our [spacing](/docs/{{< param docs_version >}}/utilities/spacing/) and [flex](/docs/{{< param docs_version >}}/utilities/flex/) utility classes for controlling spacing and alignment within navbars.
|
||||
- Navbars are responsive by default, but you can easily modify them to change that. Responsive behavior depends on our Collapse JavaScript plugin.
|
||||
- Navbars are hidden by default when printing. Force them to be printed by adding `.d-print` to the `.navbar`. See the [display]({{ site.baseurl }}/docs/{{ site.docs_version }}/utilities/display/) utility class.
|
||||
- Navbars are hidden by default when printing. Force them to be printed by adding `.d-print` to the `.navbar`. See the [display](/docs/{{< param docs_version >}}/utilities/display/) utility class.
|
||||
- Ensure accessibility by using a `<nav>` element or, if using a more generic element such as a `<div>`, add a `role="navigation"` to every navbar to explicitly identify it as a landmark region for users of assistive technologies.
|
||||
|
||||
{% include callout-info-prefersreducedmotion.md %}
|
||||
{{< callout info >}}
|
||||
{{< partial "callout-info-prefersreducedmotion.md" >}}
|
||||
{{< /callout >}}
|
||||
|
||||
Read on for an example and list of supported sub-components.
|
||||
|
||||
@ -34,7 +36,7 @@ Navbars come with built-in support for a handful of sub-components. Choose from
|
||||
|
||||
Here's an example of all the sub-components included in a responsive light-themed navbar that automatically collapses at the `lg` (large) breakpoint.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<nav class="navbar navbar-expand-lg navbar-light bg-light">
|
||||
<a class="navbar-brand" href="#">Navbar</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||
@ -70,16 +72,15 @@ Here's an example of all the sub-components included in a responsive light-theme
|
||||
</form>
|
||||
</div>
|
||||
</nav>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
This example uses [color]({{ site.baseurl }}/docs/{{ site.docs_version }}/utilities/colors/) (`bg-light`) and [spacing]({{ site.baseurl }}/docs/{{ site.docs_version }}/utilities/spacing/) (`my-2`, `my-lg-0`, `mr-sm-0`, `my-sm-0`) utility classes.
|
||||
This example uses [color](/docs/{{< param docs_version >}}/utilities/colors/) (`bg-light`) and [spacing](/docs/{{< param docs_version >}}/utilities/spacing/) (`my-2`, `my-lg-0`, `mr-sm-0`, `my-sm-0`) utility classes.
|
||||
|
||||
### Brand
|
||||
|
||||
The `.navbar-brand` can be applied to most elements, but an anchor works best as some elements might require utility classes or custom styles.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<!-- As a link -->
|
||||
<nav class="navbar navbar-light bg-light">
|
||||
<a class="navbar-brand" href="#">Navbar</a>
|
||||
@ -89,31 +90,28 @@ The `.navbar-brand` can be applied to most elements, but an anchor works best as
|
||||
<nav class="navbar navbar-light bg-light">
|
||||
<span class="navbar-brand mb-0 h1">Navbar</span>
|
||||
</nav>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
Adding images to the `.navbar-brand` will likely always require custom styles or utilities to properly size. Here are some examples to demonstrate.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<!-- Just an image -->
|
||||
<nav class="navbar navbar-light bg-light">
|
||||
<a class="navbar-brand" href="#">
|
||||
<img src="{{ site.baseurl }}/docs/{{ site.docs_version }}/assets/brand/bootstrap-solid.svg" width="30" height="30" alt="">
|
||||
<img src="/docs/{{< param docs_version >}}/assets/brand/bootstrap-solid.svg" width="30" height="30" alt="">
|
||||
</a>
|
||||
</nav>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<!-- Image and text -->
|
||||
<nav class="navbar navbar-light bg-light">
|
||||
<a class="navbar-brand" href="#">
|
||||
<img src="{{ site.baseurl }}/docs/{{ site.docs_version }}/assets/brand/bootstrap-solid.svg" width="30" height="30" class="d-inline-block align-top" alt="">
|
||||
<img src="/docs/{{< param docs_version >}}/assets/brand/bootstrap-solid.svg" width="30" height="30" class="d-inline-block align-top" alt="">
|
||||
Bootstrap
|
||||
</a>
|
||||
</nav>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
### Nav
|
||||
|
||||
@ -121,7 +119,7 @@ Navbar navigation links build on our `.nav` options with their own modifier clas
|
||||
|
||||
Active states—with `.active`—to indicate the current page can be applied directly to `.nav-link`s or their immediate parent `.nav-item`s.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<nav class="navbar navbar-expand-lg navbar-light bg-light">
|
||||
<a class="navbar-brand" href="#">Navbar</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
|
||||
@ -144,12 +142,11 @@ Active states—with `.active`—to indicate the current page can be applied dir
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
And because we use classes for our navs, you can avoid the list-based approach entirely if you like.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<nav class="navbar navbar-expand-lg navbar-light bg-light">
|
||||
<a class="navbar-brand" href="#">Navbar</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavAltMarkup" aria-controls="navbarNavAltMarkup" aria-expanded="false" aria-label="Toggle navigation">
|
||||
@ -164,12 +161,11 @@ And because we use classes for our navs, you can avoid the list-based approach e
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
You may also utilize dropdowns in your navbar nav. Dropdown menus require a wrapping element for positioning, so be sure to use separate and nested elements for `.nav-item` and `.nav-link` as shown below.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<nav class="navbar navbar-expand-lg navbar-light bg-light">
|
||||
<a class="navbar-brand" href="#">Navbar</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
|
||||
@ -199,26 +195,24 @@ You may also utilize dropdowns in your navbar nav. Dropdown menus require a wrap
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
### Forms
|
||||
|
||||
Place various form controls and components within a navbar with `.form-inline`.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<nav class="navbar navbar-light bg-light">
|
||||
<form class="form-inline">
|
||||
<input class="form-control mr-sm-2" type="search" placeholder="Search" aria-label="Search">
|
||||
<button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button>
|
||||
</form>
|
||||
</nav>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
Immediate children elements in `.navbar` use flex layout and will default to `justify-content: between`. Use additional [flex utilities]({{ site.baseurl }}/docs/{{ site.docs_version }}/utilities/flex/) as needed to adjust this behavior.
|
||||
Immediate children elements in `.navbar` use flex layout and will default to `justify-content: between`. Use additional [flex utilities](/docs/{{< param docs_version >}}/utilities/flex/) as needed to adjust this behavior.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<nav class="navbar navbar-light bg-light">
|
||||
<a class="navbar-brand">Navbar</a>
|
||||
<form class="form-inline">
|
||||
@ -226,12 +220,11 @@ Immediate children elements in `.navbar` use flex layout and will default to `ju
|
||||
<button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button>
|
||||
</form>
|
||||
</nav>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
Input groups work, too:
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<nav class="navbar navbar-light bg-light">
|
||||
<form class="form-inline">
|
||||
<div class="input-group">
|
||||
@ -242,37 +235,34 @@ Input groups work, too:
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
Various buttons are supported as part of these navbar forms, too. This is also a great reminder that vertical alignment utilities can be used to align different sized elements.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<nav class="navbar navbar-light bg-light">
|
||||
<form class="form-inline">
|
||||
<button class="btn btn-outline-success" type="button">Main button</button>
|
||||
<button class="btn btn-sm btn-outline-secondary" type="button">Smaller button</button>
|
||||
</form>
|
||||
</nav>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
### Text
|
||||
|
||||
Navbars may contain bits of text with the help of `.navbar-text`. This class adjusts vertical alignment and horizontal spacing for strings of text.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<nav class="navbar navbar-light bg-light">
|
||||
<span class="navbar-text">
|
||||
Navbar text with an inline element
|
||||
</span>
|
||||
</nav>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
Mix and match with other components and utilities as needed.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<nav class="navbar navbar-expand-lg navbar-light bg-light">
|
||||
<a class="navbar-brand" href="#">Navbar w/ text</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarText" aria-controls="navbarText" aria-expanded="false" aria-label="Toggle navigation">
|
||||
@ -295,8 +285,7 @@ Mix and match with other components and utilities as needed.
|
||||
</span>
|
||||
</div>
|
||||
</nav>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Color schemes
|
||||
|
||||
@ -388,7 +377,7 @@ Theming the navbar has never been easier thanks to the combination of theming cl
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
{% highlight html %}
|
||||
{{< highlight html >}}
|
||||
<nav class="navbar navbar-dark bg-dark">
|
||||
<!-- Navbar content -->
|
||||
</nav>
|
||||
@ -400,65 +389,59 @@ Theming the navbar has never been easier thanks to the combination of theming cl
|
||||
<nav class="navbar navbar-light" style="background-color: #e3f2fd;">
|
||||
<!-- Navbar content -->
|
||||
</nav>
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
## Containers
|
||||
|
||||
Although it's not required, you can wrap a navbar in a `.container` to center it on a page or add one within to only center the contents of a [fixed or static top navbar](#placement).
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="container">
|
||||
<nav class="navbar navbar-expand-lg navbar-light bg-light">
|
||||
<a class="navbar-brand" href="#">Navbar</a>
|
||||
</nav>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
When the container is within your navbar, its horizontal padding is removed at breakpoints lower than your specified `.navbar-expand{-sm|-md|-lg|-xl}` class. This ensures we're not doubling up on padding unnecessarily on lower viewports when your navbar is collapsed.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<nav class="navbar navbar-expand-lg navbar-light bg-light">
|
||||
<div class="container">
|
||||
<a class="navbar-brand" href="#">Navbar</a>
|
||||
</div>
|
||||
</nav>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Placement
|
||||
|
||||
Use our [position utilities]({{ site.baseurl }}/docs/{{ site.docs_version }}/utilities/position/) to place navbars in non-static positions. Choose from fixed to the top, fixed to the bottom, or stickied to the top (scrolls with the page until it reaches the top, then stays there). Fixed navbars use `position: fixed`, meaning they're pulled from the normal flow of the DOM and may require custom CSS (e.g., `padding-top` on the `<body>`) to prevent overlap with other elements.
|
||||
Use our [position utilities](/docs/{{< param docs_version >}}/utilities/position/) to place navbars in non-static positions. Choose from fixed to the top, fixed to the bottom, or stickied to the top (scrolls with the page until it reaches the top, then stays there). Fixed navbars use `position: fixed`, meaning they're pulled from the normal flow of the DOM and may require custom CSS (e.g., `padding-top` on the `<body>`) to prevent overlap with other elements.
|
||||
|
||||
Also note that **`.sticky-top` uses `position: sticky`, which [isn't fully supported in every browser](https://caniuse.com/#feat=css-sticky)**.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<nav class="navbar navbar-light bg-light">
|
||||
<a class="navbar-brand" href="#">Default</a>
|
||||
</nav>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<nav class="navbar fixed-top navbar-light bg-light">
|
||||
<a class="navbar-brand" href="#">Fixed top</a>
|
||||
</nav>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<nav class="navbar fixed-bottom navbar-light bg-light">
|
||||
<a class="navbar-brand" href="#">Fixed bottom</a>
|
||||
</nav>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<nav class="navbar sticky-top navbar-light bg-light">
|
||||
<a class="navbar-brand" href="#">Sticky top</a>
|
||||
</nav>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Responsive behaviors
|
||||
|
||||
@ -472,7 +455,7 @@ Navbar togglers are left-aligned by default, but should they follow a sibling el
|
||||
|
||||
With no `.navbar-brand` shown in lowest breakpoint:
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<nav class="navbar navbar-expand-lg navbar-light bg-light">
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarTogglerDemo01" aria-controls="navbarTogglerDemo01" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
@ -496,12 +479,11 @@ With no `.navbar-brand` shown in lowest breakpoint:
|
||||
</form>
|
||||
</div>
|
||||
</nav>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
With a brand name shown on the left and toggler on the right:
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<nav class="navbar navbar-expand-lg navbar-light bg-light">
|
||||
<a class="navbar-brand" href="#">Navbar</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarTogglerDemo02" aria-controls="navbarTogglerDemo02" aria-expanded="false" aria-label="Toggle navigation">
|
||||
@ -526,12 +508,11 @@ With a brand name shown on the left and toggler on the right:
|
||||
</form>
|
||||
</div>
|
||||
</nav>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
With a toggler on the left and brand name on the right:
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<nav class="navbar navbar-expand-lg navbar-light bg-light">
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarTogglerDemo03" aria-controls="navbarTogglerDemo03" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
@ -556,14 +537,13 @@ With a toggler on the left and brand name on the right:
|
||||
</form>
|
||||
</div>
|
||||
</nav>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
### External content
|
||||
|
||||
Sometimes you want to use the collapse plugin to trigger hidden content elsewhere on the page. Because our plugin works on the `id` and `data-target` matching, that's easily done!
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="pos-f-t">
|
||||
<div class="collapse" id="navbarToggleExternalContent">
|
||||
<div class="bg-dark p-4">
|
||||
@ -577,5 +557,4 @@ Sometimes you want to use the collapse plugin to trigger hidden content elsewher
|
||||
</button>
|
||||
</nav>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
@ -12,12 +12,11 @@ Navigation available in Bootstrap share general markup and styles, from the base
|
||||
|
||||
The base `.nav` component is built with flexbox and provide a strong foundation for building all types of navigation components. It includes some style overrides (for working with lists), some link padding for larger hit areas, and basic disabled styling.
|
||||
|
||||
{% capture callout %}
|
||||
{{< callout info >}}
|
||||
The base `.nav` component does not include any `.active` state. The following examples include the class, mainly to demonstrate that this particular class does not trigger any special styling.
|
||||
{% endcapture %}
|
||||
{% include callout.html content=callout type="info" %}
|
||||
{{< /callout >}}
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<ul class="nav">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" href="#">Active</a>
|
||||
@ -32,20 +31,18 @@ The base `.nav` component does not include any `.active` state. The following ex
|
||||
<a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
Classes are used throughout, so your markup can be super flexible. Use `<ul>`s like above, `<ol>` if the order of your items is important, or roll your own with a `<nav>` element. Because the `.nav` uses `display: flex`, the nav links behave the same as nav items would, but without the extra markup.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<nav class="nav">
|
||||
<a class="nav-link active" href="#">Active</a>
|
||||
<a class="nav-link" href="#">Link</a>
|
||||
<a class="nav-link" href="#">Link</a>
|
||||
<a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a>
|
||||
</nav>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Available styles
|
||||
|
||||
@ -53,11 +50,11 @@ Change the style of `.nav`s component with modifiers and utilities. Mix and matc
|
||||
|
||||
### Horizontal alignment
|
||||
|
||||
Change the horizontal alignment of your nav with [flexbox utilities]({{ site.baseurl }}/docs/{{ site.docs_version }}/layout/grid/#horizontal-alignment). By default, navs are left-aligned, but you can easily change them to center or right aligned.
|
||||
Change the horizontal alignment of your nav with [flexbox utilities](/docs/{{< param docs_version >}}/layout/grid/#horizontal-alignment). By default, navs are left-aligned, but you can easily change them to center or right aligned.
|
||||
|
||||
Centered with `.justify-content-center`:
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<ul class="nav justify-content-center">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" href="#">Active</a>
|
||||
@ -72,12 +69,11 @@ Centered with `.justify-content-center`:
|
||||
<a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
Right-aligned with `.justify-content-end`:
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<ul class="nav justify-content-end">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" href="#">Active</a>
|
||||
@ -92,14 +88,13 @@ Right-aligned with `.justify-content-end`:
|
||||
<a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
### Vertical
|
||||
|
||||
Stack your navigation by changing the flex item direction with the `.flex-column` utility. Need to stack them on some viewports but not others? Use the responsive versions (e.g., `.flex-sm-column`).
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<ul class="nav flex-column">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" href="#">Active</a>
|
||||
@ -114,26 +109,24 @@ Stack your navigation by changing the flex item direction with the `.flex-column
|
||||
<a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
As always, vertical navigation is possible without `<ul>`s, too.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<nav class="nav flex-column">
|
||||
<a class="nav-link active" href="#">Active</a>
|
||||
<a class="nav-link" href="#">Link</a>
|
||||
<a class="nav-link" href="#">Link</a>
|
||||
<a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a>
|
||||
</nav>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
### Tabs
|
||||
|
||||
Takes the basic nav from above and adds the `.nav-tabs` class to generate a tabbed interface. Use them to create tabbable regions with our [tab JavaScript plugin](#javascript-behavior).
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" href="#">Active</a>
|
||||
@ -148,14 +141,13 @@ Takes the basic nav from above and adds the `.nav-tabs` class to generate a tabb
|
||||
<a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
### Pills
|
||||
|
||||
Take that same HTML, but use `.nav-pills` instead:
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<ul class="nav nav-pills">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" href="#">Active</a>
|
||||
@ -170,14 +162,13 @@ Take that same HTML, but use `.nav-pills` instead:
|
||||
<a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
### Fill and justify
|
||||
|
||||
Force your `.nav`'s contents to extend the full available width one of two modifier classes. To proportionately fill all available space with your `.nav-item`s, use `.nav-fill`. Notice that all horizontal space is occupied, but not every nav item has the same width.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<ul class="nav nav-pills nav-fill">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" href="#">Active</a>
|
||||
@ -192,24 +183,22 @@ Force your `.nav`'s contents to extend the full available width one of two modif
|
||||
<a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
When using a `<nav>`-based navigation, be sure to include `.nav-item` on the anchors.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<nav class="nav nav-pills nav-fill">
|
||||
<a class="nav-item nav-link active" href="#">Active</a>
|
||||
<a class="nav-item nav-link" href="#">Much longer nav link</a>
|
||||
<a class="nav-item nav-link" href="#">Link</a>
|
||||
<a class="nav-item nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a>
|
||||
</nav>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
For equal-width elements, use `.nav-justified`. All horizontal space will be occupied by nav links, but unlike the `.nav-fill` above, every nav item will be the same width.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<ul class="nav nav-pills nav-justified">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" href="#">Active</a>
|
||||
@ -224,12 +213,11 @@ For equal-width elements, use `.nav-justified`. All horizontal space will be occ
|
||||
<a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
Similar to the `.nav-fill` example using a `<nav>`-based navigation, be sure to include `.nav-item` on the anchors.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<nav class="nav nav-pills nav-justified">
|
||||
<a class="nav-item nav-link active" href="#">Active</a>
|
||||
<a class="nav-item nav-link" href="#">Much longer nav link</a>
|
||||
@ -237,21 +225,19 @@ Similar to the `.nav-fill` example using a `<nav>`-based navigation, be sure to
|
||||
<a class="nav-item nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a>
|
||||
</nav>
|
||||
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
## Working with flex utilities
|
||||
|
||||
If you need responsive nav variations, consider using a series of [flexbox utilities]({{ site.baseurl }}/docs/{{ site.docs_version }}/utilities/flex/). While more verbose, these utilities offer greater customization across responsive breakpoints. In the example below, our nav will be stacked on the lowest breakpoint, then adapt to a horizontal layout that fills the available width starting from the small breakpoint.
|
||||
If you need responsive nav variations, consider using a series of [flexbox utilities](/docs/{{< param docs_version >}}/utilities/flex/). While more verbose, these utilities offer greater customization across responsive breakpoints. In the example below, our nav will be stacked on the lowest breakpoint, then adapt to a horizontal layout that fills the available width starting from the small breakpoint.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<nav class="nav nav-pills flex-column flex-sm-row">
|
||||
<a class="flex-sm-fill text-sm-center nav-link active" href="#">Active</a>
|
||||
<a class="flex-sm-fill text-sm-center nav-link" href="#">Longer nav link</a>
|
||||
<a class="flex-sm-fill text-sm-center nav-link" href="#">Link</a>
|
||||
<a class="flex-sm-fill text-sm-center nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a>
|
||||
</nav>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Regarding accessibility
|
||||
|
||||
@ -261,11 +247,11 @@ Note that navigation bars, even if visually styled as tabs with the `.nav-tabs`
|
||||
|
||||
## Using dropdowns
|
||||
|
||||
Add dropdown menus with a little extra HTML and the [dropdowns JavaScript plugin]({{ site.baseurl }}/docs/{{ site.docs_version }}/components/dropdowns/#usage).
|
||||
Add dropdown menus with a little extra HTML and the [dropdowns JavaScript plugin](/docs/{{< param docs_version >}}/components/dropdowns/#usage).
|
||||
|
||||
### Tabs with dropdowns
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" href="#">Active</a>
|
||||
@ -287,12 +273,11 @@ Add dropdown menus with a little extra HTML and the [dropdowns JavaScript plugin
|
||||
<a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
### Pills with dropdowns
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<ul class="nav nav-pills">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" href="#">Active</a>
|
||||
@ -314,14 +299,13 @@ Add dropdown menus with a little extra HTML and the [dropdowns JavaScript plugin
|
||||
<a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## JavaScript behavior
|
||||
|
||||
Use the tab JavaScript plugin—include it individually or through the compiled `bootstrap.js` file—to extend our navigational tabs and pills to create tabbable panes of local content, even via dropdown menus.
|
||||
|
||||
If you're building our JavaScript from source, it [requires `util.js`]({{ site.baseurl }}/docs/{{ site.docs_version }}/getting-started/javascript/#util).
|
||||
If you're building our JavaScript from source, it [requires `util.js`](/docs/{{< param docs_version >}}/getting-started/javascript/#util).
|
||||
|
||||
Dynamic tabbed interfaces, as described in the [<abbr title="Web Accessibility Initiative">WAI</abbr> <abbr title="Accessible Rich Internet Applications">ARIA</abbr> Authoring Practices](https://www.w3.org/TR/wai-aria-practices/#tabpanel), require `role="tablist"`, `role="tab"`, `role="tabpanel"`, and additional `aria-` attributes in order to convey their structure, functionality and current state to users of assistive technologies (such as screen readers).
|
||||
|
||||
@ -352,7 +336,7 @@ Note that dynamic tabbed interfaces should <em>not</em> contain dropdown menus,
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% highlight html %}
|
||||
{{< highlight html >}}
|
||||
<ul class="nav nav-tabs" id="myTab" role="tablist">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" id="home-tab" data-toggle="tab" href="#home" role="tab" aria-controls="home" aria-selected="true">Home</a>
|
||||
@ -369,7 +353,7 @@ Note that dynamic tabbed interfaces should <em>not</em> contain dropdown menus,
|
||||
<div class="tab-pane fade" id="profile" role="tabpanel" aria-labelledby="profile-tab">...</div>
|
||||
<div class="tab-pane fade" id="contact" role="tabpanel" aria-labelledby="contact-tab">...</div>
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
To help fit your needs, this works with `<ul>`-based markup, as shown above, or with any arbitrary "roll your own" markup. Note that if you're using `<nav>`, you shouldn't add `role="tablist"` directly to it, as this would override the element's native role as a navigation landmark. Instead, switch to an alternative element (in the example below, a simple `<div>`) and wrap the `<nav>` around it.
|
||||
|
||||
@ -394,7 +378,7 @@ To help fit your needs, this works with `<ul>`-based markup, as shown above, or
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% highlight html %}
|
||||
{{< highlight html >}}
|
||||
<nav>
|
||||
<div class="nav nav-tabs" id="nav-tab" role="tablist">
|
||||
<a class="nav-item nav-link active" id="nav-home-tab" data-toggle="tab" href="#nav-home" role="tab" aria-controls="nav-home" aria-selected="true">Home</a>
|
||||
@ -407,7 +391,7 @@ To help fit your needs, this works with `<ul>`-based markup, as shown above, or
|
||||
<div class="tab-pane fade" id="nav-profile" role="tabpanel" aria-labelledby="nav-profile-tab">...</div>
|
||||
<div class="tab-pane fade" id="nav-contact" role="tabpanel" aria-labelledby="nav-contact-tab">...</div>
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
The tabs plugin also works with pills.
|
||||
|
||||
@ -436,7 +420,7 @@ The tabs plugin also works with pills.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% highlight html %}
|
||||
{{< highlight html >}}
|
||||
<ul class="nav nav-pills mb-3" id="pills-tab" role="tablist">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" id="pills-home-tab" data-toggle="pill" href="#pills-home" role="tab" aria-controls="pills-home" aria-selected="true">Home</a>
|
||||
@ -453,7 +437,7 @@ The tabs plugin also works with pills.
|
||||
<div class="tab-pane fade" id="pills-profile" role="tabpanel" aria-labelledby="pills-profile-tab">...</div>
|
||||
<div class="tab-pane fade" id="pills-contact" role="tabpanel" aria-labelledby="pills-contact-tab">...</div>
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
And with vertical pills.
|
||||
|
||||
@ -486,7 +470,7 @@ And with vertical pills.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% highlight html %}
|
||||
{{< highlight html >}}
|
||||
<div class="row">
|
||||
<div class="col-3">
|
||||
<div class="nav flex-column nav-pills" id="v-pills-tab" role="tablist" aria-orientation="vertical">
|
||||
@ -505,13 +489,13 @@ And with vertical pills.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
### Using data attributes
|
||||
|
||||
You can activate a tab or pill navigation without writing any JavaScript by simply specifying `data-toggle="tab"` or `data-toggle="pill"` on an element. Use these data attributes on `.nav-tabs` or `.nav-pills`.
|
||||
|
||||
{% highlight html %}
|
||||
{{< highlight html >}}
|
||||
<!-- Nav tabs -->
|
||||
<ul class="nav nav-tabs" id="myTab" role="tablist">
|
||||
<li class="nav-item">
|
||||
@ -535,50 +519,52 @@ You can activate a tab or pill navigation without writing any JavaScript by simp
|
||||
<div class="tab-pane" id="messages" role="tabpanel" aria-labelledby="messages-tab">...</div>
|
||||
<div class="tab-pane" id="settings" role="tabpanel" aria-labelledby="settings-tab">...</div>
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
### Via JavaScript
|
||||
|
||||
Enable tabbable tabs via JavaScript (each tab needs to be activated individually):
|
||||
|
||||
{% highlight js %}
|
||||
{{< highlight js >}}
|
||||
$('#myTab a').on('click', function (e) {
|
||||
e.preventDefault()
|
||||
$(this).tab('show')
|
||||
})
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
You can activate individual tabs in several ways:
|
||||
|
||||
{% highlight js %}
|
||||
{{< highlight js >}}
|
||||
$('#myTab a[href="#profile"]').tab('show') // Select tab by name
|
||||
$('#myTab li:first-child a').tab('show') // Select first tab
|
||||
$('#myTab li:last-child a').tab('show') // Select last tab
|
||||
$('#myTab li:nth-child(3) a').tab('show') // Select third tab
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
### Fade effect
|
||||
|
||||
To make tabs fade in, add `.fade` to each `.tab-pane`. The first tab pane must also have `.show` to make the initial content visible.
|
||||
|
||||
{% highlight html %}
|
||||
{{< highlight html >}}
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane fade show active" id="home" role="tabpanel" aria-labelledby="home-tab">...</div>
|
||||
<div class="tab-pane fade" id="profile" role="tabpanel" aria-labelledby="profile-tab">...</div>
|
||||
<div class="tab-pane fade" id="messages" role="tabpanel" aria-labelledby="messages-tab">...</div>
|
||||
<div class="tab-pane fade" id="settings" role="tabpanel" aria-labelledby="settings-tab">...</div>
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
### Methods
|
||||
|
||||
{% include callout-danger-async-methods.md %}
|
||||
{{< callout danger >}}
|
||||
{{< partial "callout-danger-async-methods.md" >}}
|
||||
{{< /callout >}}
|
||||
|
||||
#### $().tab
|
||||
|
||||
Activates a tab element and content container. Tab should have either a `data-target` or an `href` targeting a container node in the DOM.
|
||||
|
||||
{% highlight html %}
|
||||
{{< highlight html >}}
|
||||
<ul class="nav nav-tabs" id="myTab" role="tablist">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" id="home-tab" data-toggle="tab" href="#home" role="tab" aria-controls="home" aria-selected="true">Home</a>
|
||||
@ -606,15 +592,15 @@ Activates a tab element and content container. Tab should have either a `data-ta
|
||||
$('#myTab li:last-child a').tab('show')
|
||||
})
|
||||
</script>
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
#### .tab('show')
|
||||
|
||||
Selects the given tab and shows its associated pane. Any other tab that was previously selected becomes unselected and its associated pane is hidden. **Returns to the caller before the tab pane has actually been shown** (i.e. before the `shown.bs.tab` event occurs).
|
||||
|
||||
{% highlight js %}
|
||||
{{< highlight js >}}
|
||||
$('#someTab').tab('show')
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
#### .tab('dispose')
|
||||
|
||||
@ -658,9 +644,9 @@ If no tab was already active, then the `hide.bs.tab` and `hidden.bs.tab` events
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{% highlight js %}
|
||||
{{< highlight js >}}
|
||||
$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
|
||||
e.target // newly activated tab
|
||||
e.relatedTarget // previous active tab
|
||||
})
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
@ -12,7 +12,7 @@ We use a large block of connected links for our pagination, making links hard to
|
||||
|
||||
In addition, as pages likely have more than one such navigation section, it's advisable to provide a descriptive `aria-label` for the `<nav>` to reflect its purpose. For example, if the pagination component is used to navigate between a set of search results, an appropriate label could be `aria-label="Search results pages"`.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<nav aria-label="Page navigation example">
|
||||
<ul class="pagination">
|
||||
<li class="page-item"><a class="page-link" href="#">Previous</a></li>
|
||||
@ -22,14 +22,13 @@ In addition, as pages likely have more than one such navigation section, it's ad
|
||||
<li class="page-item"><a class="page-link" href="#">Next</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Working with icons
|
||||
|
||||
Looking to use an icon or symbol in place of text for some pagination links? Be sure to provide proper screen reader support with `aria` attributes.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<nav aria-label="Page navigation example">
|
||||
<ul class="pagination">
|
||||
<li class="page-item">
|
||||
@ -47,8 +46,7 @@ Looking to use an icon or symbol in place of text for some pagination links? Be
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Disabled and active states
|
||||
|
||||
@ -56,7 +54,7 @@ Pagination links are customizable for different circumstances. Use `.disabled` f
|
||||
|
||||
While the `.disabled` class uses `pointer-events: none` to _try_ to disable the link functionality of `<a>`s, that CSS property is not yet standardized and doesn't account for keyboard navigation. As such, you should always add `tabindex="-1"` on disabled links and use custom JavaScript to fully disable their functionality.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<nav aria-label="...">
|
||||
<ul class="pagination">
|
||||
<li class="page-item disabled">
|
||||
@ -72,12 +70,11 @@ While the `.disabled` class uses `pointer-events: none` to _try_ to disable the
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
You can optionally swap out active or disabled anchors for `<span>`, or omit the anchor in the case of the prev/next arrows, to remove click functionality and prevent keyboard focus while retaining intended styles.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<nav aria-label="...">
|
||||
<ul class="pagination">
|
||||
<li class="page-item disabled">
|
||||
@ -96,14 +93,13 @@ You can optionally swap out active or disabled anchors for `<span>`, or omit the
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Sizing
|
||||
|
||||
Fancy larger or smaller pagination? Add `.pagination-lg` or `.pagination-sm` for additional sizes.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<nav aria-label="...">
|
||||
<ul class="pagination pagination-lg">
|
||||
<li class="page-item active" aria-current="page">
|
||||
@ -116,10 +112,9 @@ Fancy larger or smaller pagination? Add `.pagination-lg` or `.pagination-sm` for
|
||||
<li class="page-item"><a class="page-link" href="#">3</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<nav aria-label="...">
|
||||
<ul class="pagination pagination-sm">
|
||||
<li class="page-item active" aria-current="page">
|
||||
@ -132,14 +127,13 @@ Fancy larger or smaller pagination? Add `.pagination-lg` or `.pagination-sm` for
|
||||
<li class="page-item"><a class="page-link" href="#">3</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Alignment
|
||||
|
||||
Change the alignment of pagination components with [flexbox utilities]({{ site.baseurl }}/docs/{{ site.docs_version }}/utilities/flex/).
|
||||
Change the alignment of pagination components with [flexbox utilities](/docs/{{< param docs_version >}}/utilities/flex/).
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<nav aria-label="Page navigation example">
|
||||
<ul class="pagination justify-content-center">
|
||||
<li class="page-item disabled">
|
||||
@ -153,10 +147,9 @@ Change the alignment of pagination components with [flexbox utilities]({{ site.b
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<nav aria-label="Page navigation example">
|
||||
<ul class="pagination justify-content-end">
|
||||
<li class="page-item disabled">
|
||||
@ -170,5 +163,4 @@ Change the alignment of pagination components with [flexbox utilities]({{ site.b
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
@ -10,9 +10,9 @@ toc: true
|
||||
|
||||
Things to know when using the popover plugin:
|
||||
|
||||
- Popovers rely on the 3rd party library [Popper.js](https://popper.js.org/) for positioning. You must include [popper.min.js]({{ site.cdn.popper }}) before bootstrap.js or use `bootstrap.bundle.min.js` / `bootstrap.bundle.js` which contains Popper.js in order for popovers to work!
|
||||
- Popovers require the [tooltip plugin]({{ site.baseurl }}/docs/{{ site.docs_version }}/components/tooltips/) as a dependency.
|
||||
- If you're building our JavaScript from source, it [requires `util.js`]({{ site.baseurl }}/docs/{{ site.docs_version }}/getting-started/javascript/#util).
|
||||
- Popovers rely on the 3rd party library [Popper.js](https://popper.js.org/) for positioning. You must include [popper.min.js]({{< param "cdn.popper" >}}) before bootstrap.js or use `bootstrap.bundle.min.js` / `bootstrap.bundle.js` which contains Popper.js in order for popovers to work!
|
||||
- Popovers require the [tooltip plugin](/docs/{{< param docs_version >}}/components/tooltips/) as a dependency.
|
||||
- If you're building our JavaScript from source, it [requires `util.js`](/docs/{{< param docs_version >}}/getting-started/javascript/#util).
|
||||
- Popovers are opt-in for performance reasons, so **you must initialize them yourself**.
|
||||
- Zero-length `title` and `content` values will never show a popover.
|
||||
- Specify `container: 'body'` to avoid rendering problems in more complex components (like our input groups, button groups, etc).
|
||||
@ -22,7 +22,9 @@ Things to know when using the popover plugin:
|
||||
- Popovers must be hidden before their corresponding elements have been removed from the DOM.
|
||||
- Popovers can be triggered thanks to an element inside a shadow DOM.
|
||||
|
||||
{% include callout-info-prefersreducedmotion.md %}
|
||||
{{< callout info >}}
|
||||
{{< partial "callout-info-prefersreducedmotion.md" >}}
|
||||
{{< /callout >}}
|
||||
|
||||
Keep reading to see how popovers work with some examples.
|
||||
|
||||
@ -30,30 +32,29 @@ Keep reading to see how popovers work with some examples.
|
||||
|
||||
One way to initialize all popovers on a page would be to select them by their `data-toggle` attribute:
|
||||
|
||||
{% highlight js %}
|
||||
{{< highlight js >}}
|
||||
$(function () {
|
||||
$('[data-toggle="popover"]').popover()
|
||||
})
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
## Example: Using the `container` option
|
||||
|
||||
When you have some styles on a parent element that interfere with a popover, you'll want to specify a custom `container` so that the popover's HTML appears within that element instead.
|
||||
|
||||
{% highlight js %}
|
||||
{{< highlight js >}}
|
||||
$(function () {
|
||||
$('.example-popover').popover({
|
||||
container: 'body'
|
||||
})
|
||||
})
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
## Example
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<button type="button" class="btn btn-lg btn-danger" data-toggle="popover" title="Popover title" data-content="And here's some amazing content. It's very engaging. Right?">Click to toggle popover</button>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
### Four directions
|
||||
|
||||
@ -76,7 +77,7 @@ Four options are available: top, right, bottom, and left aligned.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% highlight html %}
|
||||
{{< highlight html >}}
|
||||
<button type="button" class="btn btn-secondary" data-container="body" data-toggle="popover" data-placement="top" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus.">
|
||||
Popover on top
|
||||
</button>
|
||||
@ -93,29 +94,27 @@ sagittis lacus vel augue laoreet rutrum faucibus.">
|
||||
<button type="button" class="btn btn-secondary" data-container="body" data-toggle="popover" data-placement="left" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus.">
|
||||
Popover on left
|
||||
</button>
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
### Dismiss on next click
|
||||
|
||||
Use the `focus` trigger to dismiss popovers on the user's next click of a different element than the toggle element.
|
||||
|
||||
{% capture callout %}
|
||||
{{< callout danger >}}
|
||||
#### Specific markup required for dismiss-on-next-click
|
||||
|
||||
For proper cross-browser and cross-platform behavior, you must use the `<a>` tag, _not_ the `<button>` tag, and you also must include a [`tabindex`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) attribute.
|
||||
{% endcapture %}
|
||||
{% include callout.html content=callout type="danger" %}
|
||||
{{< /callout >}}
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<a tabindex="0" class="btn btn-lg btn-danger" role="button" data-toggle="popover" data-trigger="focus" title="Dismissible popover" data-content="And here's some amazing content. It's very engaging. Right?">Dismissible popover</a>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
{% highlight js %}
|
||||
{{< highlight js >}}
|
||||
$('.popover-dismiss').popover({
|
||||
trigger: 'focus'
|
||||
})
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
### Disabled elements
|
||||
|
||||
@ -123,27 +122,25 @@ Elements with the `disabled` attribute aren't interactive, meaning users cannot
|
||||
|
||||
For disabled popover triggers, you may also prefer `data-trigger="hover"` so that the popover appears as immediate visual feedback to your users as they may not expect to _click_ on a disabled element.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<span class="d-inline-block" data-toggle="popover" data-content="Disabled popover">
|
||||
<button class="btn btn-primary" style="pointer-events: none;" type="button" disabled>Disabled button</button>
|
||||
</span>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Usage
|
||||
|
||||
Enable popovers via JavaScript:
|
||||
|
||||
{% highlight js %}$('#example').popover(options){% endhighlight %}
|
||||
{{< highlight js >}}$('#example').popover(options){{< /highlight >}}
|
||||
|
||||
### Options
|
||||
|
||||
Options can be passed via data attributes or JavaScript. For data attributes, append the option name to `data-`, as in `data-animation=""`.
|
||||
|
||||
{% capture callout %}
|
||||
{{< callout warning >}}
|
||||
Note that for security reasons the `sanitize`, `sanitizeFn` and `whiteList` options cannot be supplied using data attributes.
|
||||
{% endcapture %}
|
||||
{% include callout.html content=callout type="warning" %}
|
||||
{{< /callout >}}
|
||||
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead>
|
||||
@ -207,7 +204,7 @@ Note that for security reasons the `sanitize`, `sanitizeFn` and `whiteList` opti
|
||||
<td>selector</td>
|
||||
<td>string | false</td>
|
||||
<td>false</td>
|
||||
<td>If a selector is provided, popover objects will be delegated to the specified targets. In practice, this is used to enable dynamic HTML content to have popovers added. See <a href="{{ site.repo }}/issues/4215">this</a> and <a href="https://codepen.io/Johann-S/pen/djJYPb">an informative example</a>.</td>
|
||||
<td>If a selector is provided, popover objects will be delegated to the specified targets. In practice, this is used to enable dynamic HTML content to have popovers added. See <a href="{{< param repo >}}/issues/4215">this</a> and <a href="https://codepen.io/Johann-S/pen/djJYPb">an informative example</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>template</td>
|
||||
@ -264,7 +261,7 @@ Note that for security reasons the `sanitize`, `sanitizeFn` and `whiteList` opti
|
||||
<tr>
|
||||
<td>whiteList</td>
|
||||
<td>object</td>
|
||||
<td><a href="{{ site.baseurl }}/docs/{{ site.docs_version }}/getting-started/javascript/#sanitizer">Default value</a></td>
|
||||
<td><a href="/docs/{{< param docs_version >}}/getting-started/javascript/#sanitizer">Default value</a></td>
|
||||
<td>Object which contains allowed attributes and tags</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -276,16 +273,17 @@ Note that for security reasons the `sanitize`, `sanitizeFn` and `whiteList` opti
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{% capture callout %}
|
||||
{{< callout info >}}
|
||||
#### Data attributes for individual popovers
|
||||
|
||||
Options for individual popovers can alternatively be specified through the use of data attributes, as explained above.
|
||||
{% endcapture %}
|
||||
{% include callout.html content=callout type="info" %}
|
||||
{{< /callout >}}
|
||||
|
||||
### Methods
|
||||
|
||||
{% include callout-danger-async-methods.md %}
|
||||
{{< callout danger >}}
|
||||
{{< partial "callout-danger-async-methods.md" >}}
|
||||
{{< /callout >}}
|
||||
|
||||
#### `$().popover(options)`
|
||||
|
||||
@ -295,49 +293,49 @@ Initializes popovers for an element collection.
|
||||
|
||||
Reveals an element's popover. **Returns to the caller before the popover has actually been shown** (i.e. before the `shown.bs.popover` event occurs). This is considered a "manual" triggering of the popover. Popovers whose both title and content are zero-length are never displayed.
|
||||
|
||||
{% highlight js %}$('#element').popover('show'){% endhighlight %}
|
||||
{{< highlight js >}}$('#element').popover('show'){{< /highlight >}}
|
||||
|
||||
#### `.popover('hide')`
|
||||
|
||||
Hides an element's popover. **Returns to the caller before the popover has actually been hidden** (i.e. before the `hidden.bs.popover` event occurs). This is considered a "manual" triggering of the popover.
|
||||
|
||||
{% highlight js %}$('#element').popover('hide'){% endhighlight %}
|
||||
{{< highlight js >}}$('#element').popover('hide'){{< /highlight >}}
|
||||
|
||||
#### `.popover('toggle')`
|
||||
|
||||
Toggles an element's popover. **Returns to the caller before the popover has actually been shown or hidden** (i.e. before the `shown.bs.popover` or `hidden.bs.popover` event occurs). This is considered a "manual" triggering of the popover.
|
||||
|
||||
{% highlight js %}$('#element').popover('toggle'){% endhighlight %}
|
||||
{{< highlight js >}}$('#element').popover('toggle'){{< /highlight >}}
|
||||
|
||||
#### `.popover('dispose')`
|
||||
|
||||
Hides and destroys an element's popover. Popovers that use delegation (which are created using [the `selector` option](#options)) cannot be individually destroyed on descendant trigger elements.
|
||||
|
||||
{% highlight js %}$('#element').popover('dispose'){% endhighlight %}
|
||||
{{< highlight js >}}$('#element').popover('dispose'){{< /highlight >}}
|
||||
|
||||
#### `.popover('enable')`
|
||||
|
||||
Gives an element's popover the ability to be shown. **Popovers are enabled by default.**
|
||||
|
||||
{% highlight js %}$('#element').popover('enable'){% endhighlight %}
|
||||
{{< highlight js >}}$('#element').popover('enable'){{< /highlight >}}
|
||||
|
||||
#### `.popover('disable')`
|
||||
|
||||
Removes the ability for an element's popover to be shown. The popover will only be able to be shown if it is re-enabled.
|
||||
|
||||
{% highlight js %}$('#element').popover('disable'){% endhighlight %}
|
||||
{{< highlight js >}}$('#element').popover('disable'){{< /highlight >}}
|
||||
|
||||
#### `.popover('toggleEnabled')`
|
||||
|
||||
Toggles the ability for an element's popover to be shown or hidden.
|
||||
|
||||
{% highlight js %}$('#element').popover('toggleEnabled'){% endhighlight %}
|
||||
{{< highlight js >}}$('#element').popover('toggleEnabled'){{< /highlight >}}
|
||||
|
||||
#### `.popover('update')`
|
||||
|
||||
Updates the position of an element's popover.
|
||||
|
||||
{% highlight js %}$('#element').popover('update'){% endhighlight %}
|
||||
{{< highlight js >}}$('#element').popover('update'){{< /highlight >}}
|
||||
|
||||
### Events
|
||||
|
||||
@ -372,8 +370,8 @@ Updates the position of an element's popover.
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{% highlight js %}
|
||||
{{< highlight js >}}
|
||||
$('#myPopover').on('hidden.bs.popover', function () {
|
||||
// do something...
|
||||
})
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
@ -17,7 +17,7 @@ Progress components are built with two HTML elements, some CSS to set the width,
|
||||
|
||||
Put that all together, and you have the following examples.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="progress">
|
||||
<div class="progress-bar" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"></div>
|
||||
</div>
|
||||
@ -33,48 +33,44 @@ Put that all together, and you have the following examples.
|
||||
<div class="progress">
|
||||
<div class="progress-bar" role="progressbar" style="width: 100%" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100"></div>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
Bootstrap provides a handful of [utilities for setting width]({{ site.baseurl }}/docs/{{ site.docs_version }}/utilities/sizing/). Depending on your needs, these may help with quickly configuring progress.
|
||||
Bootstrap provides a handful of [utilities for setting width](/docs/{{< param docs_version >}}/utilities/sizing/). Depending on your needs, these may help with quickly configuring progress.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="progress">
|
||||
<div class="progress-bar w-75" role="progressbar" aria-valuenow="75" aria-valuemin="0" aria-valuemax="100"></div>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Labels
|
||||
|
||||
Add labels to your progress bars by placing text within the `.progress-bar`.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="progress">
|
||||
<div class="progress-bar" role="progressbar" style="width: 25%;" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100">25%</div>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Height
|
||||
|
||||
We only set a `height` value on the `.progress`, so if you change that value the inner `.progress-bar` will automatically resize accordingly.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="progress" style="height: 1px;">
|
||||
<div class="progress-bar" role="progressbar" style="width: 25%;" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100"></div>
|
||||
</div>
|
||||
<div class="progress" style="height: 20px;">
|
||||
<div class="progress-bar" role="progressbar" style="width: 25%;" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100"></div>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Backgrounds
|
||||
|
||||
Use background utility classes to change the appearance of individual progress bars.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="progress">
|
||||
<div class="progress-bar bg-success" role="progressbar" style="width: 25%" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100"></div>
|
||||
</div>
|
||||
@ -87,27 +83,25 @@ Use background utility classes to change the appearance of individual progress b
|
||||
<div class="progress">
|
||||
<div class="progress-bar bg-danger" role="progressbar" style="width: 100%" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100"></div>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Multiple bars
|
||||
|
||||
Include multiple progress bars in a progress component if you need.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="progress">
|
||||
<div class="progress-bar" role="progressbar" style="width: 15%" aria-valuenow="15" aria-valuemin="0" aria-valuemax="100"></div>
|
||||
<div class="progress-bar bg-success" role="progressbar" style="width: 30%" aria-valuenow="30" aria-valuemin="0" aria-valuemax="100"></div>
|
||||
<div class="progress-bar bg-info" role="progressbar" style="width: 20%" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100"></div>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Striped
|
||||
|
||||
Add `.progress-bar-striped` to any `.progress-bar` to apply a stripe via CSS gradient over the progress bar's background color.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-striped" role="progressbar" style="width: 10%" aria-valuenow="10" aria-valuemin="0" aria-valuemax="100"></div>
|
||||
</div>
|
||||
@ -123,8 +117,7 @@ Add `.progress-bar-striped` to any `.progress-bar` to apply a stripe via CSS gra
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-striped bg-danger" role="progressbar" style="width: 100%" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100"></div>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Animated stripes
|
||||
|
||||
@ -139,8 +132,8 @@ The striped gradient can also be animated. Add `.progress-bar-animated` to `.pro
|
||||
</button>
|
||||
</div>
|
||||
|
||||
{% highlight html %}
|
||||
{{< highlight html >}}
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-striped progress-bar-animated" role="progressbar" aria-valuenow="75" aria-valuemin="0" aria-valuemax="100" style="width: 75%"></div>
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
@ -10,8 +10,8 @@ toc: true
|
||||
|
||||
Scrollspy has a few requirements to function properly:
|
||||
|
||||
- If you're building our JavaScript from source, it [requires `util.js`]({{ site.baseurl }}/docs/{{ site.docs_version }}/getting-started/javascript/#util).
|
||||
- It must be used on a Bootstrap [nav component]({{ site.baseurl }}/docs/{{ site.docs_version }}/components/navs/) or [list group]({{ site.baseurl }}/docs/{{ site.docs_version }}/components/list-group/).
|
||||
- If you're building our JavaScript from source, it [requires `util.js`](/docs/{{< param docs_version >}}/getting-started/javascript/#util).
|
||||
- It must be used on a Bootstrap [nav component](/docs/{{< param docs_version >}}/components/navs/) or [list group](/docs/{{< param docs_version >}}/components/list-group/).
|
||||
- Scrollspy requires `position: relative;` on the element you're spying on, usually the `<body>`.
|
||||
- When spying on elements other than the `<body>`, be sure to have a `height` set and `overflow-y: scroll;` applied.
|
||||
- Anchors (`<a>`) are required and must point to an element with that `id`.
|
||||
@ -59,7 +59,7 @@ Scroll the area below the navbar and watch the active class change. The dropdown
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% highlight html %}
|
||||
{{< highlight html >}}
|
||||
<nav id="navbar-example2" class="navbar navbar-light bg-light">
|
||||
<a class="navbar-brand" href="#">Navbar</a>
|
||||
<ul class="nav nav-pills">
|
||||
@ -92,7 +92,7 @@ Scroll the area below the navbar and watch the active class change. The dropdown
|
||||
<h4 id="three">three</h4>
|
||||
<p>...</p>
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
## Example with nested nav
|
||||
|
||||
@ -139,7 +139,7 @@ Scrollspy also works with nested `.nav`s. If a nested `.nav` is `.active`, its p
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% highlight html %}
|
||||
{{< highlight html >}}
|
||||
<nav id="navbar-example3" class="navbar navbar-light bg-light">
|
||||
<a class="navbar-brand" href="#">Navbar</a>
|
||||
<nav class="nav nav-pills flex-column">
|
||||
@ -173,7 +173,7 @@ Scrollspy also works with nested `.nav`s. If a nested `.nav` is `.active`, its p
|
||||
<h5 id="item-3-2">Item 3-2</h5>
|
||||
<p>...</p>
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
## Example with list-group
|
||||
|
||||
@ -204,7 +204,7 @@ Scrollspy also works with `.list-group`s. Scroll the area next to the list group
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% highlight html %}
|
||||
{{< highlight html >}}
|
||||
<div id="list-example" class="list-group">
|
||||
<a class="list-group-item list-group-item-action" href="#list-item-1">Item 1</a>
|
||||
<a class="list-group-item list-group-item-action" href="#list-item-2">Item 2</a>
|
||||
@ -221,7 +221,7 @@ Scrollspy also works with `.list-group`s. Scroll the area next to the list group
|
||||
<h4 id="list-item-4">Item 4</h4>
|
||||
<p>...</p>
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
|
||||
## Usage
|
||||
@ -230,13 +230,13 @@ Scrollspy also works with `.list-group`s. Scroll the area next to the list group
|
||||
|
||||
To easily add scrollspy behavior to your topbar navigation, add `data-spy="scroll"` to the element you want to spy on (most typically this would be the `<body>`). Then add the `data-target` attribute with the ID or class of the parent element of any Bootstrap `.nav` component.
|
||||
|
||||
{% highlight css %}
|
||||
{{< highlight css >}}
|
||||
body {
|
||||
position: relative;
|
||||
}
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
{% highlight html %}
|
||||
{{< highlight html >}}
|
||||
<body data-spy="scroll" data-target="#navbar-example">
|
||||
...
|
||||
<div id="navbar-example">
|
||||
@ -246,29 +246,27 @@ body {
|
||||
</div>
|
||||
...
|
||||
</body>
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
### Via JavaScript
|
||||
|
||||
After adding `position: relative;` in your CSS, call the scrollspy via JavaScript:
|
||||
|
||||
{% highlight js %}
|
||||
{{< highlight js >}}
|
||||
$('body').scrollspy({ target: '#navbar-example' })
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
{% capture callout %}
|
||||
{{< callout danger >}}
|
||||
#### Resolvable ID targets required
|
||||
|
||||
Navbar links must have resolvable id targets. For example, a `<a href="#home">home</a>` must correspond to something in the DOM like `<div id="home"></div>`.
|
||||
{% endcapture %}
|
||||
{% include callout.html content=callout type="danger" %}
|
||||
{{< /callout >}}
|
||||
|
||||
{% capture callout %}
|
||||
{{< callout info >}}
|
||||
#### Non-visible target elements ignored
|
||||
|
||||
Target elements that are not visible will be ignored and their corresponding nav items will never be highlighted.
|
||||
{% endcapture %}
|
||||
{% include callout.html content=callout type="info" %}
|
||||
{{< /callout >}}
|
||||
|
||||
### Methods
|
||||
|
||||
@ -276,11 +274,11 @@ Target elements that are not visible will be ignored and their corresponding nav
|
||||
|
||||
When using scrollspy in conjunction with adding or removing of elements from the DOM, you'll need to call the refresh method like so:
|
||||
|
||||
{% highlight js %}
|
||||
{{< highlight js >}}
|
||||
$('[data-spy="scroll"]').each(function () {
|
||||
var $spy = $(this).scrollspy('refresh')
|
||||
})
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
#### `.scrollspy('dispose')`
|
||||
|
||||
@ -338,8 +336,8 @@ Options can be passed via data attributes or JavaScript. For data attributes, ap
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{% highlight js %}
|
||||
{{< highlight js >}}
|
||||
$('[data-spy="scroll"]').on('activate.bs.scrollspy', function () {
|
||||
// do something...
|
||||
})
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
@ -16,50 +16,51 @@ For accessibility purposes, each loader here includes `role="status"` and a nest
|
||||
|
||||
Use the border spinners for a lightweight loading indicator.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="spinner-border" role="status">
|
||||
<span class="sr-only">Loading...</span>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
### Colors
|
||||
|
||||
The border spinner uses `currentColor` for its `border-color`, meaning you can customize the color with [text color utilities][color]. You can use any of our text color utilities on the standard spinner.
|
||||
|
||||
{% capture example %}
|
||||
{% for color in site.data.theme-colors %}
|
||||
<div class="spinner-border text-{{ color.name }}" role="status">
|
||||
{{< example >}}
|
||||
{{< spinner.inline >}}
|
||||
{{- range (index $.Site.Data "theme-colors") }}
|
||||
<div class="spinner-border text-{{ .name }}" role="status">
|
||||
<span class="sr-only">Loading...</span>
|
||||
</div>{% endfor %}
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
</div>
|
||||
{{- end -}}
|
||||
{{< /spinner.inline >}}
|
||||
{{< /example >}}
|
||||
|
||||
{% capture callout %}
|
||||
{{< callout info >}}
|
||||
**Why not use `border-color` utilities?** Each border spinner specifies a `transparent` border for at least one side, so `.border-{color}` utilities would override that.
|
||||
{% endcapture %}
|
||||
{% include callout.html content=callout type="info" %}
|
||||
{{< /callout >}}
|
||||
|
||||
## Growing spinner
|
||||
|
||||
If you don't fancy a border spinner, switch to the grow spinner. While it doesn't technically spin, it does repeatedly grow!
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="spinner-grow" role="status">
|
||||
<span class="sr-only">Loading...</span>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
Once again, this spinner is built with `currentColor`, so you can easily change its appearance with [text color utilities][color]. Here it is in blue, along with the supported variants.
|
||||
|
||||
{% capture example %}
|
||||
{% for color in site.data.theme-colors %}
|
||||
<div class="spinner-grow text-{{ color.name }}" role="status">
|
||||
{{< example >}}
|
||||
{{< spinner.inline >}}
|
||||
{{- range (index $.Site.Data "theme-colors") }}
|
||||
<div class="spinner-grow text-{{ .name }}" role="status">
|
||||
<span class="sr-only">Loading...</span>
|
||||
</div>{% endfor %}
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
</div>
|
||||
{{- end -}}
|
||||
{{< /spinner.inline >}}
|
||||
{{< /example >}}
|
||||
|
||||
## Alignment
|
||||
|
||||
@ -69,12 +70,11 @@ Spinners in Bootstrap are built with `rem`s, `currentColor`, and `display: inlin
|
||||
|
||||
Use [margin utilities][margin] like `.m-5` for easy spacing.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="spinner-border m-5" role="status">
|
||||
<span class="sr-only">Loading...</span>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
### Placement
|
||||
|
||||
@ -82,76 +82,70 @@ Use [flexbox utilities][flex], [float utilities][float], or [text alignment][tex
|
||||
|
||||
#### Flex
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="d-flex justify-content-center">
|
||||
<div class="spinner-border" role="status">
|
||||
<span class="sr-only">Loading...</span>
|
||||
</div>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="d-flex align-items-center">
|
||||
<strong>Loading...</strong>
|
||||
<div class="spinner-border ml-auto" role="status" aria-hidden="true"></div>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
#### Floats
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="clearfix">
|
||||
<div class="spinner-border float-right" role="status">
|
||||
<span class="sr-only">Loading...</span>
|
||||
</div>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
#### Text align
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="text-center">
|
||||
<div class="spinner-border" role="status">
|
||||
<span class="sr-only">Loading...</span>
|
||||
</div>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Size
|
||||
|
||||
Add `.spinner-border-sm` and `.spinner-grow-sm` to make a smaller spinner that can quickly be used within other components.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="spinner-border spinner-border-sm" role="status">
|
||||
<span class="sr-only">Loading...</span>
|
||||
</div>
|
||||
<div class="spinner-grow spinner-grow-sm" role="status">
|
||||
<span class="sr-only">Loading...</span>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
Or, use custom CSS or inline styles to change the dimensions as needed.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<div class="spinner-border" style="width: 3rem; height: 3rem;" role="status">
|
||||
<span class="sr-only">Loading...</span>
|
||||
</div>
|
||||
<div class="spinner-grow" style="width: 3rem; height: 3rem;" role="status">
|
||||
<span class="sr-only">Loading...</span>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Buttons
|
||||
|
||||
Use spinners within buttons to indicate an action is currently processing or taking place. You may also swap the text out of the spinner element and utilize button text as needed.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<button class="btn btn-primary" type="button" disabled>
|
||||
<span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>
|
||||
<span class="sr-only">Loading...</span>
|
||||
@ -160,10 +154,9 @@ Use spinners within buttons to indicate an action is currently processing or tak
|
||||
<span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>
|
||||
Loading...
|
||||
</button>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<button class="btn btn-primary" type="button" disabled>
|
||||
<span class="spinner-grow spinner-grow-sm" role="status" aria-hidden="true"></span>
|
||||
<span class="sr-only">Loading...</span>
|
||||
@ -172,14 +165,13 @@ Use spinners within buttons to indicate an action is currently processing or tak
|
||||
<span class="spinner-grow spinner-grow-sm" role="status" aria-hidden="true"></span>
|
||||
Loading...
|
||||
</button>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
|
||||
[color]: {{ site.baseurl }}/docs/{{ site.docs_version }}/utilities/colors/
|
||||
[display]: {{ site.baseurl }}/docs/{{ site.docs_version }}/utilities/display/
|
||||
[flex]: {{ site.baseurl }}/docs/{{ site.docs_version }}/utilities/flex/
|
||||
[float]: {{ site.baseurl }}/docs/{{ site.docs_version }}/utilities/float/
|
||||
[margin]: {{ site.baseurl }}/docs/{{ site.docs_version }}/utilities/spacing/
|
||||
[sizing]: {{ site.baseurl }}/docs/{{ site.docs_version }}/utilities/sizing/
|
||||
[text]: {{ site.baseurl }}/docs/{{ site.docs_version }}/content/typography/
|
||||
[color]: /docs/{{< param docs_version >}}/utilities/colors/
|
||||
[display]: /docs/{{< param docs_version >}}/utilities/display/
|
||||
[flex]: /docs/{{< param docs_version >}}/utilities/flex/
|
||||
[float]: /docs/{{< param docs_version >}}/utilities/float/
|
||||
[margin]: /docs/{{< param docs_version >}}/utilities/spacing/
|
||||
[sizing]: /docs/{{< param docs_version >}}/utilities/sizing/
|
||||
[text]: /docs/{{< param docs_version >}}/content/typography/
|
@ -12,7 +12,7 @@ Toasts are lightweight notifications designed to mimic the push notifications th
|
||||
|
||||
Things to know when using the toast plugin:
|
||||
|
||||
- If you're building our JavaScript from source, it [requires `util.js`]({{ site.baseurl }}/docs/{{ site.docs_version }}/getting-started/javascript/#util).
|
||||
- If you're building our JavaScript from source, it [requires `util.js`](/docs/{{< param docs_version >}}/getting-started/javascript/#util).
|
||||
- Toasts are opt-in for performance reasons, so **you must initialize them yourself**.
|
||||
- **Please note that you are responsible for positioning toasts.**
|
||||
- Toasts will automatically hide if you do not specify `autohide: false`.
|
||||
@ -25,10 +25,10 @@ To encourage extensible and predictable toasts, we recommend a header and body.
|
||||
|
||||
Toasts are as flexible as you need and have very little required markup. At a minimum, we require a single element to contain your "toasted" content and strongly encourage a dismiss button.
|
||||
|
||||
{% capture example %}
|
||||
{{< example class="bg-light" >}}
|
||||
<div class="toast" role="alert" aria-live="assertive" aria-atomic="true">
|
||||
<div class="toast-header">
|
||||
{% include icons/placeholder.svg width="20" height="20" background="#007aff" class="rounded mr-2" text=" " title=" " %}
|
||||
{{< placeholder width="20" height="20" background="#007aff" class="rounded mr-2" text="false" title="false" >}}
|
||||
<strong class="mr-auto">Bootstrap</strong>
|
||||
<small>11 mins ago</small>
|
||||
<button type="button" class="ml-2 mb-1 close" data-dismiss="toast" aria-label="Close">
|
||||
@ -39,17 +39,16 @@ Toasts are as flexible as you need and have very little required markup. At a mi
|
||||
Hello, world! This is a toast message.
|
||||
</div>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example class="bg-light" %}
|
||||
{{< /example >}}
|
||||
|
||||
### Translucent
|
||||
|
||||
Toasts are slightly translucent, too, so they blend over whatever they might appear over. For browsers that support the `backdrop-filter` CSS property, we'll also attempt to blur the elements under a toast.
|
||||
|
||||
{% capture example %}
|
||||
{{< example class="bg-dark" >}}
|
||||
<div class="toast" role="alert" aria-live="assertive" aria-atomic="true">
|
||||
<div class="toast-header">
|
||||
{% include icons/placeholder.svg width="20" height="20" background="#007aff" class="rounded mr-2" text=" " title=" " %}
|
||||
{{< placeholder width="20" height="20" background="#007aff" class="rounded mr-2" text="false" title="false" >}}
|
||||
<strong class="mr-auto">Bootstrap</strong>
|
||||
<small class="text-muted">11 mins ago</small>
|
||||
<button type="button" class="ml-2 mb-1 close" data-dismiss="toast" aria-label="Close">
|
||||
@ -60,17 +59,16 @@ Toasts are slightly translucent, too, so they blend over whatever they might app
|
||||
Hello, world! This is a toast message.
|
||||
</div>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example class="bg-dark" %}
|
||||
{{< /example >}}
|
||||
|
||||
### Stacking
|
||||
|
||||
When you have multiple toasts, we default to vertically stacking them in a readable manner.
|
||||
|
||||
{% capture example %}
|
||||
{{< example class="bg-light" >}}
|
||||
<div class="toast" role="alert" aria-live="assertive" aria-atomic="true">
|
||||
<div class="toast-header">
|
||||
{% include icons/placeholder.svg width="20" height="20" background="#007aff" class="rounded mr-2" text=" " title=" " %}
|
||||
{{< placeholder width="20" height="20" background="#007aff" class="rounded mr-2" text="false" title="false" >}}
|
||||
<strong class="mr-auto">Bootstrap</strong>
|
||||
<small class="text-muted">just now</small>
|
||||
<button type="button" class="ml-2 mb-1 close" data-dismiss="toast" aria-label="Close">
|
||||
@ -84,7 +82,7 @@ When you have multiple toasts, we default to vertically stacking them in a reada
|
||||
|
||||
<div class="toast" role="alert" aria-live="assertive" aria-atomic="true">
|
||||
<div class="toast-header">
|
||||
{% include icons/placeholder.svg width="20" height="20" background="#007aff" class="rounded mr-2" text=" " title=" " %}
|
||||
{{< placeholder width="20" height="20" background="#007aff" class="rounded mr-2" text="false" title="false" >}}
|
||||
<strong class="mr-auto">Bootstrap</strong>
|
||||
<small class="text-muted">2 seconds ago</small>
|
||||
<button type="button" class="ml-2 mb-1 close" data-dismiss="toast" aria-label="Close">
|
||||
@ -95,18 +93,17 @@ When you have multiple toasts, we default to vertically stacking them in a reada
|
||||
Heads up, toasts will stack automatically
|
||||
</div>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example class="bg-light" %}
|
||||
{{< /example >}}
|
||||
|
||||
## Placement
|
||||
|
||||
Place toasts with custom CSS as you need them. The top right is often used for notifications, as is the top middle. If you're only ever going to show one toast at a time, put the positioning styles right on the `.toast`.
|
||||
|
||||
{% capture example %}
|
||||
{{< example class="bg-dark" >}}
|
||||
<div aria-live="polite" aria-atomic="true" style="position: relative; min-height: 200px;">
|
||||
<div class="toast" style="position: absolute; top: 0; right: 0;">
|
||||
<div class="toast-header">
|
||||
{% include icons/placeholder.svg width="20" height="20" background="#007aff" class="rounded mr-2" text=" " title=" " %}
|
||||
{{< placeholder width="20" height="20" background="#007aff" class="rounded mr-2" text="false" title="false" >}}
|
||||
<strong class="mr-auto">Bootstrap</strong>
|
||||
<small>11 mins ago</small>
|
||||
<button type="button" class="ml-2 mb-1 close" data-dismiss="toast" aria-label="Close">
|
||||
@ -118,12 +115,11 @@ Place toasts with custom CSS as you need them. The top right is often used for n
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example class="bg-dark" %}
|
||||
{{< /example >}}
|
||||
|
||||
For systems that generate more notifications, consider using a wrapping element so they can easily stack.
|
||||
|
||||
{% capture example %}
|
||||
{{< example class="bg-dark" >}}
|
||||
<div aria-live="polite" aria-atomic="true" style="position: relative; min-height: 200px;">
|
||||
<!-- Position it -->
|
||||
<div style="position: absolute; top: 0; right: 0;">
|
||||
@ -131,7 +127,7 @@ For systems that generate more notifications, consider using a wrapping element
|
||||
<!-- Then put toasts within -->
|
||||
<div class="toast" role="alert" aria-live="assertive" aria-atomic="true">
|
||||
<div class="toast-header">
|
||||
{% include icons/placeholder.svg width="20" height="20" background="#007aff" class="rounded mr-2" text=" " title=" " %}
|
||||
{{< placeholder width="20" height="20" background="#007aff" class="rounded mr-2" text="false" title="false" >}}
|
||||
<strong class="mr-auto">Bootstrap</strong>
|
||||
<small class="text-muted">just now</small>
|
||||
<button type="button" class="ml-2 mb-1 close" data-dismiss="toast" aria-label="Close">
|
||||
@ -145,7 +141,7 @@ For systems that generate more notifications, consider using a wrapping element
|
||||
|
||||
<div class="toast" role="alert" aria-live="assertive" aria-atomic="true">
|
||||
<div class="toast-header">
|
||||
{% include icons/placeholder.svg width="20" height="20" background="#007aff" class="rounded mr-2" text=" " title=" " %}
|
||||
{{< placeholder width="20" height="20" background="#007aff" class="rounded mr-2" text="false" title="false" >}}
|
||||
<strong class="mr-auto">Bootstrap</strong>
|
||||
<small class="text-muted">2 seconds ago</small>
|
||||
<button type="button" class="ml-2 mb-1 close" data-dismiss="toast" aria-label="Close">
|
||||
@ -158,19 +154,18 @@ For systems that generate more notifications, consider using a wrapping element
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example class="bg-dark" %}
|
||||
{{< /example >}}
|
||||
|
||||
You can also get fancy with flexbox utilities to align toasts horizontally and/or vertically.
|
||||
|
||||
{% capture example %}
|
||||
{{< example class="bg-dark" >}}
|
||||
<!-- Flexbox container for aligning the toasts -->
|
||||
<div aria-live="polite" aria-atomic="true" class="d-flex justify-content-center align-items-center" style="min-height: 200px;">
|
||||
|
||||
<!-- Then put toasts within -->
|
||||
<div class="toast" role="alert" aria-live="assertive" aria-atomic="true">
|
||||
<div class="toast-header">
|
||||
{% include icons/placeholder.svg width="20" height="20" background="#007aff" class="rounded mr-2" text=" " title=" " %}
|
||||
{{< placeholder width="20" height="20" background="#007aff" class="rounded mr-2" text="false" title="false" >}}
|
||||
<strong class="mr-auto">Bootstrap</strong>
|
||||
<small>11 mins ago</small>
|
||||
<button type="button" class="ml-2 mb-1 close" data-dismiss="toast" aria-label="Close">
|
||||
@ -182,12 +177,11 @@ You can also get fancy with flexbox utilities to align toasts horizontally and/o
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example class="bg-dark" %}
|
||||
{{< /example >}}
|
||||
|
||||
## Accessibility
|
||||
|
||||
Toasts are intended to be small interruptions to your visitors or users, so to help those with screen readers and similar assistive technologies, you should wrap your toasts in an [`aria-live` region](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Live_Regions). Changes to live regions (such as injecting/updating a toast component) are automatically announced by screen readers without needing to move the user's focus or otherwise interrupt the user. Additionally, include `aria-atomic="true"` to ensure that the entire toast is always announced as a single (atomic) unit, rather than announcing what was changed (which could lead to problems if you only update part of the toast's content, or if displaying the same toast content at a later point in time). If the information needed is important for the process, e.g. for a list of errors in a form, then use the [alert component]({{ site.baseurl }}/docs/{{ site.docs_version }}/components/alerts/) instead of toast.
|
||||
Toasts are intended to be small interruptions to your visitors or users, so to help those with screen readers and similar assistive technologies, you should wrap your toasts in an [`aria-live` region](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Live_Regions). Changes to live regions (such as injecting/updating a toast component) are automatically announced by screen readers without needing to move the user's focus or otherwise interrupt the user. Additionally, include `aria-atomic="true"` to ensure that the entire toast is always announced as a single (atomic) unit, rather than announcing what was changed (which could lead to problems if you only update part of the toast's content, or if displaying the same toast content at a later point in time). If the information needed is important for the process, e.g. for a list of errors in a form, then use the [alert component](/docs/{{< param docs_version >}}/components/alerts/) instead of toast.
|
||||
|
||||
Note that the live region needs to be present in the markup *before* the toast is generated or updated. If you dynamically generate both at the same time and inject them into the page, they will generally not be announced by assistive technologies.
|
||||
|
||||
@ -195,18 +189,18 @@ You also need to adapt the `role` and `aria-live` level depending on the content
|
||||
|
||||
As the content you're displaying changes, be sure to update the [`delay` timeout](#options) to ensure people have enough time to read the toast.
|
||||
|
||||
{% highlight html %}
|
||||
{{< highlight html >}}
|
||||
<div class="toast" role="alert" aria-live="polite" aria-atomic="true" data-delay="10000">
|
||||
<div role="alert" aria-live="assertive" aria-atomic="true">...</div>
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
When using `autohide: false`, you must add a close button to allow users to dismiss the toast.
|
||||
|
||||
{% capture example %}
|
||||
{{< example class="bg-light" >}}
|
||||
<div role="alert" aria-live="assertive" aria-atomic="true" class="toast" data-autohide="false">
|
||||
<div class="toast-header">
|
||||
{% include icons/placeholder.svg width="20" height="20" background="#007aff" class="rounded mr-2" text=" " title=" " %}
|
||||
{{< placeholder width="20" height="20" background="#007aff" class="rounded mr-2" text="false" title="false" >}}
|
||||
<strong class="mr-auto">Bootstrap</strong>
|
||||
<small>11 mins ago</small>
|
||||
<button type="button" class="ml-2 mb-1 close" data-dismiss="toast" aria-label="Close">
|
||||
@ -217,8 +211,7 @@ When using `autohide: false`, you must add a close button to allow users to dism
|
||||
Hello, world! This is a toast message.
|
||||
</div>
|
||||
</div>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example class="bg-light" %}
|
||||
{{< /example >}}
|
||||
|
||||
## JavaScript behavior
|
||||
|
||||
@ -226,9 +219,9 @@ When using `autohide: false`, you must add a close button to allow users to dism
|
||||
|
||||
Initialize toasts via JavaScript:
|
||||
|
||||
{% highlight js %}
|
||||
{{< highlight js >}}
|
||||
$('.toast').toast(option)
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
### Options
|
||||
|
||||
@ -269,7 +262,9 @@ Options can be passed via data attributes or JavaScript. For data attributes, ap
|
||||
|
||||
### Methods
|
||||
|
||||
{% include callout-danger-async-methods.md %}
|
||||
{{< callout danger >}}
|
||||
{{< partial "callout-danger-async-methods.md" >}}
|
||||
{{< /callout >}}
|
||||
|
||||
#### `$().toast(options)`
|
||||
|
||||
@ -280,19 +275,19 @@ Attaches a toast handler to an element collection.
|
||||
Reveals an element's toast. **Returns to the caller before the toast has actually been shown** (i.e. before the `shown.bs.toast` event occurs).
|
||||
You have to manually call this method, instead your toast won't show.
|
||||
|
||||
{% highlight js %}$('#element').toast('show'){% endhighlight %}
|
||||
{{< highlight js >}}$('#element').toast('show'){{< /highlight >}}
|
||||
|
||||
#### `.toast('hide')`
|
||||
|
||||
Hides an element's toast. **Returns to the caller before the toast has actually been hidden** (i.e. before the `hidden.bs.toast` event occurs). You have to manually call this method if you made `autohide` to `false`.
|
||||
|
||||
{% highlight js %}$('#element').toast('hide'){% endhighlight %}
|
||||
{{< highlight js >}}$('#element').toast('hide'){{< /highlight >}}
|
||||
|
||||
#### `.toast('dispose')`
|
||||
|
||||
Hides an element's toast. Your toast will remain on the DOM but won't show anymore.
|
||||
|
||||
{% highlight js %}$('#element').toast('dispose'){% endhighlight %}
|
||||
{{< highlight js >}}$('#element').toast('dispose'){{< /highlight >}}
|
||||
|
||||
### Events
|
||||
|
||||
@ -323,8 +318,8 @@ Hides an element's toast. Your toast will remain on the DOM but won't show anymo
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{% highlight js %}
|
||||
{{< highlight js >}}
|
||||
$('#myToast').on('hidden.bs.toast', function () {
|
||||
// do something...
|
||||
})
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
@ -10,8 +10,8 @@ toc: true
|
||||
|
||||
Things to know when using the tooltip plugin:
|
||||
|
||||
- Tooltips rely on the 3rd party library [Popper.js](https://popper.js.org/) for positioning. You must include [popper.min.js]({{ site.cdn.popper }}) before bootstrap.js or use `bootstrap.bundle.min.js` / `bootstrap.bundle.js` which contains Popper.js in order for tooltips to work!
|
||||
- If you're building our JavaScript from source, it [requires `util.js`]({{ site.baseurl }}/docs/{{ site.docs_version }}/getting-started/javascript/#util).
|
||||
- Tooltips rely on the 3rd party library [Popper.js](https://popper.js.org/) for positioning. You must include [popper.min.js]({{< param "cdn.popper" >}}) before bootstrap.js or use `bootstrap.bundle.min.js` / `bootstrap.bundle.js` which contains Popper.js in order for tooltips to work!
|
||||
- If you're building our JavaScript from source, it [requires `util.js`](/docs/{{< param docs_version >}}/getting-started/javascript/#util).
|
||||
- Tooltips are opt-in for performance reasons, so **you must initialize them yourself**.
|
||||
- Tooltips with zero-length titles are never displayed.
|
||||
- Specify `container: 'body'` to avoid rendering problems in more complex components (like our input groups, button groups, etc).
|
||||
@ -21,7 +21,9 @@ Things to know when using the tooltip plugin:
|
||||
- Tooltips must be hidden before their corresponding elements have been removed from the DOM.
|
||||
- Tooltips can be triggered thanks to an element inside a shadow DOM.
|
||||
|
||||
{% include callout-info-prefersreducedmotion.md %}
|
||||
{{< callout info >}}
|
||||
{{< partial "callout-info-prefersreducedmotion.md" >}}
|
||||
{{< /callout >}}
|
||||
|
||||
Got all that? Great, let's see how they work with some examples.
|
||||
|
||||
@ -29,11 +31,11 @@ Got all that? Great, let's see how they work with some examples.
|
||||
|
||||
One way to initialize all tooltips on a page would be to select them by their `data-toggle` attribute:
|
||||
|
||||
{% highlight js %}
|
||||
{{< highlight js >}}
|
||||
$(function () {
|
||||
$('[data-toggle="tooltip"]').tooltip()
|
||||
})
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
## Examples
|
||||
|
||||
@ -56,7 +58,7 @@ Hover over the buttons below to see the four tooltips directions: top, right, bo
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% highlight html %}
|
||||
{{< highlight html >}}
|
||||
<button type="button" class="btn btn-secondary" data-toggle="tooltip" data-placement="top" title="Tooltip on top">
|
||||
Tooltip on top
|
||||
</button>
|
||||
@ -69,15 +71,15 @@ Hover over the buttons below to see the four tooltips directions: top, right, bo
|
||||
<button type="button" class="btn btn-secondary" data-toggle="tooltip" data-placement="left" title="Tooltip on left">
|
||||
Tooltip on left
|
||||
</button>
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
And with custom HTML added:
|
||||
|
||||
{% highlight html %}
|
||||
{{< highlight html >}}
|
||||
<button type="button" class="btn btn-secondary" data-toggle="tooltip" data-html="true" title="<em>Tooltip</em> <u>with</u> <b>HTML</b>">
|
||||
Tooltip with HTML
|
||||
</button>
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
## Usage
|
||||
|
||||
@ -85,35 +87,33 @@ The tooltip plugin generates content and markup on demand, and by default places
|
||||
|
||||
Trigger the tooltip via JavaScript:
|
||||
|
||||
{% highlight js %}
|
||||
{{< highlight js >}}
|
||||
$('#example').tooltip(options)
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
{% capture callout %}
|
||||
{{< callout warning >}}
|
||||
##### Overflow `auto` and `scroll`
|
||||
|
||||
Tooltip position attempts to automatically change when a parent container has `overflow: auto` or `overflow: scroll` like our `.table-responsive`, but still keeps the original placement's positioning. To resolve, set the `boundary` option to anything other than default value, `'scrollParent'`, such as `'window'`:
|
||||
|
||||
{% highlight js %}
|
||||
{{< highlight js >}}
|
||||
$('#example').tooltip({ boundary: 'window' })
|
||||
{% endhighlight %}
|
||||
{% endcapture %}
|
||||
{% include callout.html content=callout type="warning" %}
|
||||
{{< /highlight >}}
|
||||
{{< /callout >}}
|
||||
|
||||
### Markup
|
||||
|
||||
The required markup for a tooltip is only a `data` attribute and `title` on the HTML element you wish to have a tooltip. The generated markup of a tooltip is rather simple, though it does require a position (by default, set to `top` by the plugin).
|
||||
|
||||
{% capture callout %}
|
||||
{{< callout warning >}}
|
||||
##### Making tooltips work for keyboard and assistive technology users
|
||||
|
||||
You should only add tooltips to HTML elements that are traditionally keyboard-focusable and interactive (such as links or form controls). Although arbitrary HTML elements (such as `<span>`s) can be made focusable by adding the `tabindex="0"` attribute, this will add potentially annoying and confusing tab stops on non-interactive elements for keyboard users. In addition, most assistive technologies currently do not announce the tooltip in this situation.
|
||||
|
||||
Additionally, do not rely solely on `hover` as the trigger for your tooltip, as this will make your tooltips impossible to trigger for keyboard users.
|
||||
{% endcapture %}
|
||||
{% include callout.html content=callout type="warning" %}
|
||||
{{< /callout >}}
|
||||
|
||||
{% highlight html %}
|
||||
{{< highlight html >}}
|
||||
<!-- HTML to write -->
|
||||
<a href="#" data-toggle="tooltip" title="Some tooltip text!">Hover over me</a>
|
||||
|
||||
@ -124,29 +124,27 @@ Additionally, do not rely solely on `hover` as the trigger for your tooltip, as
|
||||
Some tooltip text!
|
||||
</div>
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
### Disabled elements
|
||||
|
||||
Elements with the `disabled` attribute aren't interactive, meaning users cannot focus, hover, or click them to trigger a tooltip (or popover). As a workaround, you'll want to trigger the tooltip from a wrapper `<div>` or `<span>`, ideally made keyboard-focusable using `tabindex="0"`, and override the `pointer-events` on the disabled element.
|
||||
|
||||
<div class="tooltip-demo">
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<span class="d-inline-block" tabindex="0" data-toggle="tooltip" title="Disabled tooltip">
|
||||
<button class="btn btn-primary" style="pointer-events: none;" type="button" disabled>Disabled button</button>
|
||||
</span>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
</div>
|
||||
|
||||
### Options
|
||||
|
||||
Options can be passed via data attributes or JavaScript. For data attributes, append the option name to `data-`, as in `data-animation=""`.
|
||||
|
||||
{% capture callout %}
|
||||
{{< callout warning >}}
|
||||
Note that for security reasons the `sanitize`, `sanitizeFn` and `whiteList` options cannot be supplied using data attributes.
|
||||
{% endcapture %}
|
||||
{% include callout.html content=callout type="warning" %}
|
||||
{{< /callout >}}
|
||||
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead>
|
||||
@ -205,7 +203,7 @@ Note that for security reasons the `sanitize`, `sanitizeFn` and `whiteList` opti
|
||||
<td>selector</td>
|
||||
<td>string | false</td>
|
||||
<td>false</td>
|
||||
<td>If a selector is provided, tooltip objects will be delegated to the specified targets. In practice, this is used to also apply tooltips to dynamically added DOM elements (<code>jQuery.on</code> support). See <a href="{{ site.repo }}/issues/4215">this</a> and <a href="https://codepen.io/Johann-S/pen/djJYPb">an informative example</a>.</td>
|
||||
<td>If a selector is provided, tooltip objects will be delegated to the specified targets. In practice, this is used to also apply tooltips to dynamically added DOM elements (<code>jQuery.on</code> support). See <a href="{{< param repo >}}/issues/4215">this</a> and <a href="https://codepen.io/Johann-S/pen/djJYPb">an informative example</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>template</td>
|
||||
@ -269,7 +267,7 @@ Note that for security reasons the `sanitize`, `sanitizeFn` and `whiteList` opti
|
||||
<tr>
|
||||
<td>whiteList</td>
|
||||
<td>object</td>
|
||||
<td><a href="{{ site.baseurl }}/docs/{{ site.docs_version }}/getting-started/javascript/#sanitizer">Default value</a></td>
|
||||
<td><a href="/docs/{{< param docs_version >}}/getting-started/javascript/#sanitizer">Default value</a></td>
|
||||
<td>Object which contains allowed attributes and tags</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -281,16 +279,17 @@ Note that for security reasons the `sanitize`, `sanitizeFn` and `whiteList` opti
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{% capture callout %}
|
||||
{{< callout info >}}
|
||||
#### Data attributes for individual tooltips
|
||||
|
||||
Options for individual tooltips can alternatively be specified through the use of data attributes, as explained above.
|
||||
{% endcapture %}
|
||||
{% include callout.html content=callout type="info" %}
|
||||
{{< /callout >}}
|
||||
|
||||
### Methods
|
||||
|
||||
{% include callout-danger-async-methods.md %}
|
||||
{{< callout danger >}}
|
||||
{{< partial "callout-danger-async-methods.md" >}}
|
||||
{{< /callout >}}
|
||||
|
||||
#### `$().tooltip(options)`
|
||||
|
||||
@ -300,49 +299,49 @@ Attaches a tooltip handler to an element collection.
|
||||
|
||||
Reveals an element's tooltip. **Returns to the caller before the tooltip has actually been shown** (i.e. before the `shown.bs.tooltip` event occurs). This is considered a "manual" triggering of the tooltip. Tooltips with zero-length titles are never displayed.
|
||||
|
||||
{% highlight js %}$('#element').tooltip('show'){% endhighlight %}
|
||||
{{< highlight js >}}$('#element').tooltip('show'){{< /highlight >}}
|
||||
|
||||
#### `.tooltip('hide')`
|
||||
|
||||
Hides an element's tooltip. **Returns to the caller before the tooltip has actually been hidden** (i.e. before the `hidden.bs.tooltip` event occurs). This is considered a "manual" triggering of the tooltip.
|
||||
|
||||
{% highlight js %}$('#element').tooltip('hide'){% endhighlight %}
|
||||
{{< highlight js >}}$('#element').tooltip('hide'){{< /highlight >}}
|
||||
|
||||
#### `.tooltip('toggle')`
|
||||
|
||||
Toggles an element's tooltip. **Returns to the caller before the tooltip has actually been shown or hidden** (i.e. before the `shown.bs.tooltip` or `hidden.bs.tooltip` event occurs). This is considered a "manual" triggering of the tooltip.
|
||||
|
||||
{% highlight js %}$('#element').tooltip('toggle'){% endhighlight %}
|
||||
{{< highlight js >}}$('#element').tooltip('toggle'){{< /highlight >}}
|
||||
|
||||
#### `.tooltip('dispose')`
|
||||
|
||||
Hides and destroys an element's tooltip. Tooltips that use delegation (which are created using [the `selector` option](#options)) cannot be individually destroyed on descendant trigger elements.
|
||||
|
||||
{% highlight js %}$('#element').tooltip('dispose'){% endhighlight %}
|
||||
{{< highlight js >}}$('#element').tooltip('dispose'){{< /highlight >}}
|
||||
|
||||
#### `.tooltip('enable')`
|
||||
|
||||
Gives an element's tooltip the ability to be shown. **Tooltips are enabled by default.**
|
||||
|
||||
{% highlight js %}$('#element').tooltip('enable'){% endhighlight %}
|
||||
{{< highlight js >}}$('#element').tooltip('enable'){{< /highlight >}}
|
||||
|
||||
#### `.tooltip('disable')`
|
||||
|
||||
Removes the ability for an element's tooltip to be shown. The tooltip will only be able to be shown if it is re-enabled.
|
||||
|
||||
{% highlight js %}$('#element').tooltip('disable'){% endhighlight %}
|
||||
{{< highlight js >}}$('#element').tooltip('disable'){{< /highlight >}}
|
||||
|
||||
#### `.tooltip('toggleEnabled')`
|
||||
|
||||
Toggles the ability for an element's tooltip to be shown or hidden.
|
||||
|
||||
{% highlight js %}$('#element').tooltip('toggleEnabled'){% endhighlight %}
|
||||
{{< highlight js >}}$('#element').tooltip('toggleEnabled'){{< /highlight >}}
|
||||
|
||||
#### `.tooltip('update')`
|
||||
|
||||
Updates the position of an element's tooltip.
|
||||
|
||||
{% highlight js %}$('#element').tooltip('update'){% endhighlight %}
|
||||
{{< highlight js >}}$('#element').tooltip('update'){{< /highlight >}}
|
||||
|
||||
### Events
|
||||
|
||||
@ -377,8 +376,8 @@ Updates the position of an element's tooltip.
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{% highlight js %}
|
||||
{{< highlight js >}}
|
||||
$('#myTooltip').on('hidden.bs.tooltip', function () {
|
||||
// do something...
|
||||
})
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
@ -10,46 +10,41 @@ toc: true
|
||||
|
||||
Wrap inline snippets of code with `<code>`. Be sure to escape HTML angle brackets.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
For example, <code><section></code> should be wrapped as inline.
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Code blocks
|
||||
|
||||
Use `<pre>`s for multiple lines of code. Once again, be sure to escape any angle brackets in the code for proper rendering. You may optionally add the `.pre-scrollable` class, which will set a max-height of 340px and provide a y-axis scrollbar.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<pre><code><p>Sample text here...</p>
|
||||
<p>And another line of sample text here...</p>
|
||||
</code></pre>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Variables
|
||||
|
||||
For indicating variables use the `<var>` tag.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<var>y</var> = <var>m</var><var>x</var> + <var>b</var>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## User input
|
||||
|
||||
Use the `<kbd>` to indicate input that is typically entered via keyboard.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
To switch directories, type <kbd>cd</kbd> followed by the name of the directory.<br>
|
||||
To edit settings, press <kbd><kbd>ctrl</kbd> + <kbd>,</kbd></kbd>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Sample output
|
||||
|
||||
For indicating sample output from a program use the `<samp>` tag.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<samp>This text is meant to be treated as sample output from a computer program.</samp>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
26
site/content/docs/4.3/content/figures.md
Normal file
@ -0,0 +1,26 @@
|
||||
---
|
||||
layout: docs
|
||||
title: Figures
|
||||
description: Documentation and examples for displaying related images and text with the figure component in Bootstrap.
|
||||
group: content
|
||||
---
|
||||
|
||||
Anytime you need to display a piece of content—like an image with an optional caption, consider using a `<figure>`.
|
||||
|
||||
Use the included `.figure`, `.figure-img` and `.figure-caption` classes to provide some baseline styles for the HTML5 `<figure>` and `<figcaption>` elements. Images in figures have no explicit size, so be sure to add the `.img-fluid` class to your `<img>` to make it responsive.
|
||||
|
||||
{{< example >}}
|
||||
<figure class="figure">
|
||||
{{< placeholder width="400" height="300" class="figure-img img-fluid rounded" >}}
|
||||
<figcaption class="figure-caption">A caption for the above image.</figcaption>
|
||||
</figure>
|
||||
{{< /example >}}
|
||||
|
||||
Aligning the figure's caption is easy with our [text utilities](/docs/{{< param docs_version >}}/utilities/text/#text-alignment).
|
||||
|
||||
{{< example >}}
|
||||
<figure class="figure">
|
||||
{{< placeholder width="400" height="300" class="figure-img img-fluid rounded" >}}
|
||||
<figcaption class="figure-caption text-right">A caption for the above image.</figcaption>
|
||||
</figure>
|
||||
{{< /example >}}
|
77
site/content/docs/4.3/content/images.md
Normal file
@ -0,0 +1,77 @@
|
||||
---
|
||||
layout: docs
|
||||
title: Images
|
||||
description: Documentation and examples for opting images into responsive behavior (so they never become larger than their parent elements) and add lightweight styles to them—all via classes.
|
||||
group: content
|
||||
toc: true
|
||||
---
|
||||
|
||||
## Responsive images
|
||||
|
||||
Images in Bootstrap are made responsive with `.img-fluid`. `max-width: 100%;` and `height: auto;` are applied to the image so that it scales with the parent element.
|
||||
|
||||
<div class="bd-example">
|
||||
{{< placeholder width="100%" height="250" class="bd-placeholder-img-lg img-fluid" text="Responsive image" >}}
|
||||
</div>
|
||||
|
||||
{{< highlight html >}}
|
||||
<img src="..." class="img-fluid" alt="Responsive image">
|
||||
{{< /highlight >}}
|
||||
|
||||
## Image thumbnails
|
||||
|
||||
In addition to our [border-radius utilities](/docs/{{< param docs_version >}}/utilities/borders/), you can use `.img-thumbnail` to give an image a rounded 1px border appearance.
|
||||
|
||||
<div class="bd-example bd-example-images">
|
||||
{{< placeholder width="200" height="200" class="img-thumbnail" title="A generic square placeholder image with a white border around it, making it resemble a photograph taken with an old instant camera" >}}
|
||||
</div>
|
||||
|
||||
{{< highlight html >}}
|
||||
<img src="..." alt="..." class="img-thumbnail">
|
||||
{{< /highlight >}}
|
||||
|
||||
## Aligning images
|
||||
|
||||
Align images with the [helper float classes](/docs/{{< param docs_version >}}/utilities/float/) or [text alignment classes](/docs/{{< param docs_version >}}/utilities/text/#text-alignment). `block`-level images can be centered using [the `.mx-auto` margin utility class](/docs/{{< param docs_version >}}/utilities/spacing/#horizontal-centering).
|
||||
|
||||
<div class="bd-example bd-example-images">
|
||||
{{< placeholder width="200" height="200" class="rounded float-left" >}}
|
||||
{{< placeholder width="200" height="200" class="rounded float-right" >}}
|
||||
</div>
|
||||
|
||||
{{< highlight html >}}
|
||||
<img src="..." class="rounded float-left" alt="...">
|
||||
<img src="..." class="rounded float-right" alt="...">
|
||||
{{< /highlight >}}
|
||||
|
||||
<div class="bd-example bd-example-images">
|
||||
{{< placeholder width="200" height="200" class="rounded mx-auto d-block" >}}
|
||||
</div>
|
||||
|
||||
{{< highlight html >}}
|
||||
<img src="..." class="rounded mx-auto d-block" alt="...">
|
||||
{{< /highlight >}}
|
||||
|
||||
<div class="bd-example bd-example-images">
|
||||
<div class="text-center">
|
||||
{{< placeholder width="200" height="200" class="rounded" >}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{< highlight html >}}
|
||||
<div class="text-center">
|
||||
<img src="..." class="rounded" alt="...">
|
||||
</div>
|
||||
{{< /highlight >}}
|
||||
|
||||
|
||||
## Picture
|
||||
|
||||
If you are using the `<picture>` element to specify multiple `<source>` elements for a specific `<img>`, make sure to add the `.img-*` classes to the `<img>` and not to the `<picture>` tag.
|
||||
|
||||
{{< highlight html >}}
|
||||
<picture>
|
||||
<source srcset="..." type="image/svg+xml">
|
||||
<img src="..." class="img-fluid img-thumbnail" alt="...">
|
||||
</picture>
|
||||
{{< /highlight >}}
|
@ -3,7 +3,7 @@ layout: docs
|
||||
title: Reboot
|
||||
description: Reboot, a collection of element-specific CSS changes in a single file, kickstart Bootstrap to provide an elegant, consistent, and simple baseline to build upon.
|
||||
group: content
|
||||
redirect_from: "/docs/4.3/content/"
|
||||
aliases: "/docs/4.3/content/"
|
||||
toc: true
|
||||
---
|
||||
|
||||
@ -31,7 +31,7 @@ The `<html>` and `<body>` elements are updated to provide better page-wide defau
|
||||
|
||||
The default web fonts (Helvetica Neue, Helvetica, and Arial) have been dropped in Bootstrap 4 and replaced with a "native font stack" for optimum text rendering on every device and OS. Read more about [native font stacks in this *Smashing Magazine* article](https://www.smashingmagazine.com/2015/11/using-system-ui-fonts-practical-guide/).
|
||||
|
||||
{% highlight sass %}
|
||||
{{< highlight scss >}}
|
||||
$font-family-sans-serif:
|
||||
// Safari for macOS and iOS (San Francisco)
|
||||
-apple-system,
|
||||
@ -45,7 +45,7 @@ $font-family-sans-serif:
|
||||
"Helvetica Neue", Arial, sans-serif,
|
||||
// Emoji fonts
|
||||
"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol" !default;
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
This `font-family` is applied to the `<body>` and automatically inherited globally throughout Bootstrap. To switch the global `font-family`, update `$font-family-base` and recompile Bootstrap.
|
||||
|
||||
@ -63,37 +63,37 @@ All heading elements—e.g., `<h1>`—and `<p>` are reset to have their `margin-
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
{{ "`<h1></h1>`" | markdownify }}
|
||||
{{< markdown >}}`<h1></h1>`{{< /markdown >}}
|
||||
</td>
|
||||
<td><span class="h1">h1. Bootstrap heading</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{{ "`<h2></h2>`" | markdownify }}
|
||||
{{< markdown >}}`<h2></h2>`{{< /markdown >}}
|
||||
</td>
|
||||
<td><span class="h2">h2. Bootstrap heading</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{{ "`<h3></h3>`" | markdownify }}
|
||||
{{< markdown >}}`<h3></h3>`{{< /markdown >}}
|
||||
</td>
|
||||
<td><span class="h3">h3. Bootstrap heading</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{{ "`<h4></h4>`" | markdownify }}
|
||||
{{< markdown >}}`<h4></h4>`{{< /markdown >}}
|
||||
</td>
|
||||
<td><span class="h4">h4. Bootstrap heading</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{{ "`<h5></h5>`" | markdownify }}
|
||||
{{< markdown >}}`<h5></h5>`{{< /markdown >}}
|
||||
</td>
|
||||
<td><span class="h5">h5. Bootstrap heading</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{{ "`<h6></h6>`" | markdownify }}
|
||||
{{< markdown >}}`<h6></h6>`{{< /markdown >}}
|
||||
</td>
|
||||
<td><span class="h6">h6. Bootstrap heading</span></td>
|
||||
</tr>
|
||||
@ -105,7 +105,7 @@ All heading elements—e.g., `<h1>`—and `<p>` are reset to have their `margin-
|
||||
All lists—`<ul>`, `<ol>`, and `<dl>`—have their `margin-top` removed and a `margin-bottom: 1rem`. Nested lists have no `margin-bottom`.
|
||||
|
||||
<div class="bd-example">
|
||||
{% capture markdown %}
|
||||
{{< markdown >}}
|
||||
* Lorem ipsum dolor sit amet
|
||||
* Consectetur adipiscing elit
|
||||
* Integer molestie lorem at massa
|
||||
@ -127,8 +127,7 @@ All lists—`<ul>`, `<ol>`, and `<dl>`—have their `margin-top` removed and a `
|
||||
6. Faucibus porta lacus fringilla vel
|
||||
7. Aenean sit amet erat nunc
|
||||
8. Eget porttitor lorem
|
||||
{% endcapture %}
|
||||
{{ markdown | markdownify }}
|
||||
{{< /markdown >}}
|
||||
</div>
|
||||
|
||||
For simpler styling, clear hierarchy, and better spacing, description lists have updated `margin`s. `<dd>`s reset `margin-left` to `0` and add `margin-bottom: .5rem`. `<dt>`s are **bolded**.
|
||||
@ -159,7 +158,7 @@ The `<pre>` element is reset to remove its `margin-top` and use `rem` units for
|
||||
|
||||
## Tables
|
||||
|
||||
Tables are slightly adjusted to style `<caption>`s, collapse borders, and ensure consistent `text-align` throughout. Additional changes for borders, padding, and more come with [the `.table` class]({{ site.baseurl }}/docs/{{ site.docs_version }}/content/tables/).
|
||||
Tables are slightly adjusted to style `<caption>`s, collapse borders, and ensure consistent `text-align` throughout. Additional changes for borders, padding, and more come with [the `.table` class](/docs/{{< param docs_version >}}/content/tables/).
|
||||
|
||||
<div class="bd-example">
|
||||
<table>
|
||||
@ -353,15 +352,14 @@ The default `cursor` on summary is `text`, so we reset that to `pointer` to conv
|
||||
|
||||
HTML5 adds [a new global attribute named `[hidden]`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/hidden), which is styled as `display: none` by default. Borrowing an idea from [PureCSS](https://purecss.io/), we improve upon this default by making `[hidden] { display: none !important; }` to help prevent its `display` from getting accidentally overridden. While `[hidden]` isn't natively supported by IE10, the explicit declaration in our CSS gets around that problem.
|
||||
|
||||
{% highlight html %}
|
||||
{{< highlight html >}}
|
||||
<input type="text" hidden>
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
{% capture callout %}
|
||||
{{< callout warning >}}
|
||||
##### jQuery incompatibility
|
||||
|
||||
`[hidden]` is not compatible with jQuery's `$(...).hide()` and `$(...).show()` methods. Therefore, we don't currently especially endorse `[hidden]` over other techniques for managing the `display` of elements.
|
||||
{% endcapture %}
|
||||
{% include callout.html content=callout type="warning" %}
|
||||
{{< /callout >}}
|
||||
|
||||
To merely toggle the visibility of an element, meaning its `display` is not modified and the element can still affect the flow of the document, use [the `.invisible` class]({{ site.baseurl }}/docs/{{ site.docs_version }}/utilities/visibility/) instead.
|
||||
To merely toggle the visibility of an element, meaning its `display` is not modified and the element can still affect the flow of the document, use [the `.invisible` class](/docs/{{< param docs_version >}}/utilities/visibility/) instead.
|
@ -12,7 +12,7 @@ Due to the widespread use of tables across third-party widgets like calendars an
|
||||
|
||||
Using the most basic table markup, here's how `.table`-based tables look in Bootstrap. **All table styles are inherited in Bootstrap 4**, meaning any nested tables will be styled in the same manner as the parent.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
@ -43,12 +43,11 @@ Using the most basic table markup, here's how `.table`-based tables look in Boot
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
You can also invert the colors—with light text on dark backgrounds—with `.table-dark`.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<table class="table table-dark">
|
||||
<thead>
|
||||
<tr>
|
||||
@ -79,14 +78,13 @@ You can also invert the colors—with light text on dark backgrounds—with `.ta
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Table head options
|
||||
|
||||
Similar to tables and dark tables, use the modifier classes `.thead-light` or `.thead-dark` to make `<thead>`s appear light or dark gray.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<table class="table">
|
||||
<thead class="thead-dark">
|
||||
<tr>
|
||||
@ -148,14 +146,13 @@ Similar to tables and dark tables, use the modifier classes `.thead-light` or `.
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Striped rows
|
||||
|
||||
Use `.table-striped` to add zebra-striping to any table row within the `<tbody>`.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
@ -186,10 +183,9 @@ Use `.table-striped` to add zebra-striping to any table row within the `<tbody>`
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<table class="table table-striped table-dark">
|
||||
<thead>
|
||||
<tr>
|
||||
@ -220,14 +216,13 @@ Use `.table-striped` to add zebra-striping to any table row within the `<tbody>`
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Bordered table
|
||||
|
||||
Add `.table-bordered` for borders on all sides of the table and cells.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
@ -257,10 +252,9 @@ Add `.table-bordered` for borders on all sides of the table and cells.
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<table class="table table-bordered table-dark">
|
||||
<thead>
|
||||
<tr>
|
||||
@ -290,14 +284,13 @@ Add `.table-bordered` for borders on all sides of the table and cells.
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Borderless table
|
||||
|
||||
Add `.table-borderless` for a table without borders.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<table class="table table-borderless">
|
||||
<thead>
|
||||
<tr>
|
||||
@ -327,12 +320,11 @@ Add `.table-borderless` for a table without borders.
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
`.table-borderless` can also be used on dark tables.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<table class="table table-borderless table-dark">
|
||||
<thead>
|
||||
<tr>
|
||||
@ -362,14 +354,13 @@ Add `.table-borderless` for a table without borders.
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Hoverable rows
|
||||
|
||||
Add `.table-hover` to enable a hover state on table rows within a `<tbody>`.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
@ -399,10 +390,9 @@ Add `.table-hover` to enable a hover state on table rows within a `<tbody>`.
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<table class="table table-hover table-dark">
|
||||
<thead>
|
||||
<tr>
|
||||
@ -432,14 +422,13 @@ Add `.table-hover` to enable a hover state on table rows within a `<tbody>`.
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Small table
|
||||
|
||||
Add `.table-sm` to make tables more compact by cutting cell padding in half.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<table class="table table-sm">
|
||||
<thead>
|
||||
<tr>
|
||||
@ -469,10 +458,9 @@ Add `.table-sm` to make tables more compact by cutting cell padding in half.
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<table class="table table-sm table-dark">
|
||||
<thead>
|
||||
<tr>
|
||||
@ -502,8 +490,7 @@ Add `.table-sm` to make tables more compact by cutting cell padding in half.
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Contextual classes
|
||||
|
||||
@ -530,31 +517,40 @@ Use contextual classes to color table rows or individual cells.
|
||||
<td>Cell</td>
|
||||
</tr>
|
||||
|
||||
{% for color in site.data.theme-colors %}
|
||||
<tr class="table-{{ color.name }}">
|
||||
<th scope="row">{{ color.name | capitalize }}</th>
|
||||
{{< table.inline >}}
|
||||
{{- range (index $.Site.Data "theme-colors") }}
|
||||
<tr class="table-{{ .name }}">
|
||||
<th scope="row">{{ .name | title }}</th>
|
||||
<td>Cell</td>
|
||||
<td>Cell</td>
|
||||
</tr>{% endfor %}
|
||||
</tr>
|
||||
{{- end -}}
|
||||
{{< /table.inline >}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{% highlight html %}
|
||||
{{< highlight html >}}
|
||||
<!-- On rows -->
|
||||
<tr class="table-active">...</tr>
|
||||
{% for color in site.data.theme-colors %}
|
||||
<tr class="table-{{ color.name }}">...</tr>{% endfor %}
|
||||
{{< table.inline >}}
|
||||
{{- range (index $.Site.Data "theme-colors") }}
|
||||
<tr class="table-{{ .name }}">...</tr>
|
||||
{{- end -}}
|
||||
{{< /table.inline >}}
|
||||
|
||||
<!-- On cells (`td` or `th`) -->
|
||||
<tr>
|
||||
<td class="table-active">...</td>
|
||||
{% for color in site.data.theme-colors %}
|
||||
<td class="table-{{ color.name }}">...</td>{% endfor %}
|
||||
{{< table.inline >}}
|
||||
{{- range (index $.Site.Data "theme-colors") }}
|
||||
<td class="table-{{ .name }}">...</td>
|
||||
{{- end -}}
|
||||
{{< /table.inline >}}
|
||||
</tr>
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
Regular table background variants are not available with the dark table, however, you may use [text or background utilities]({{ site.baseurl }}/docs/{{ site.docs_version }}/utilities/colors/) to achieve similar styles.
|
||||
Regular table background variants are not available with the dark table, however, you may use [text or background utilities](/docs/{{< param docs_version >}}/utilities/colors/) to achieve similar styles.
|
||||
|
||||
<div class="bd-example">
|
||||
<table class="table table-dark">
|
||||
@ -615,7 +611,7 @@ Regular table background variants are not available with the dark table, however
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{% highlight html %}
|
||||
{{< highlight html >}}
|
||||
<!-- On rows -->
|
||||
<tr class="bg-primary">...</tr>
|
||||
<tr class="bg-success">...</tr>
|
||||
@ -631,19 +627,23 @@ Regular table background variants are not available with the dark table, however
|
||||
<td class="bg-danger">...</td>
|
||||
<td class="bg-info">...</td>
|
||||
</tr>
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
{% include callout-warning-color-assistive-technologies.md %}
|
||||
{{< callout info >}}
|
||||
{{< partial "callout-warning-color-assistive-technologies.md" >}}
|
||||
{{< /callout >}}
|
||||
|
||||
Create responsive tables by wrapping any `.table` with `.table-responsive{-sm|-md|-lg|-xl}`, making the table scroll horizontally at each `max-width` breakpoint of up to (but not including) 576px, 768px, 992px, and 1120px, respectively.
|
||||
|
||||
{% include callout-info-mediaqueries-breakpoints.md %}
|
||||
{{< callout info >}}
|
||||
{{< partial "callout-info-mediaqueries-breakpoints.md" >}}
|
||||
{{< /callout >}}
|
||||
|
||||
## Captions
|
||||
|
||||
A `<caption>` functions like a heading for a table. It helps users with screen readers to find a table and understand what it's about and decide if they want to read it.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<table class="table">
|
||||
<caption>List of users</caption>
|
||||
<thead>
|
||||
@ -675,19 +675,17 @@ A `<caption>` functions like a heading for a table. It helps users with screen r
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Responsive tables
|
||||
|
||||
Responsive tables allow tables to be scrolled horizontally with ease. Make any table responsive across all viewports by wrapping a `.table` with `.table-responsive`. Or, pick a maximum breakpoint with which to have a responsive table up to by using `.table-responsive{-sm|-md|-lg|-xl}`.
|
||||
|
||||
{% capture callout %}
|
||||
{{< callout warning >}}
|
||||
##### Vertical clipping/truncation
|
||||
|
||||
Responsive tables make use of `overflow-y: hidden`, which clips off any content that goes beyond the bottom or top edges of the table. In particular, this can clip off dropdown menus and other third-party widgets.
|
||||
{% endcapture %}
|
||||
{% include callout.html content=callout type="warning" %}
|
||||
{{< /callout >}}
|
||||
|
||||
### Always responsive
|
||||
|
||||
@ -752,13 +750,13 @@ Across every breakpoint, use `.table-responsive` for horizontally scrolling tabl
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% highlight html %}
|
||||
{{< highlight html >}}
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
...
|
||||
</table>
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
### Breakpoint specific
|
||||
|
||||
@ -766,66 +764,77 @@ Use `.table-responsive{-sm|-md|-lg|-xl}` as needed to create responsive tables u
|
||||
|
||||
**These tables may appear broken until their responsive styles apply at specific viewport widths.**
|
||||
|
||||
{% for bp in site.data.breakpoints %}{% unless bp.breakpoint == "xs" %}
|
||||
{{< tables.inline >}}
|
||||
{{ range $bp := $.Site.Data.breakpoints }}
|
||||
{{ if not (eq $bp "xs") }}
|
||||
<div class="bd-example">
|
||||
<div class="table-responsive{{ bp.abbr }}">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">#</th>
|
||||
<th scope="col">Heading</th>
|
||||
<th scope="col">Heading</th>
|
||||
<th scope="col">Heading</th>
|
||||
<th scope="col">Heading</th>
|
||||
<th scope="col">Heading</th>
|
||||
<th scope="col">Heading</th>
|
||||
<th scope="col">Heading</th>
|
||||
<th scope="col">Heading</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">1</th>
|
||||
<td>Cell</td>
|
||||
<td>Cell</td>
|
||||
<td>Cell</td>
|
||||
<td>Cell</td>
|
||||
<td>Cell</td>
|
||||
<td>Cell</td>
|
||||
<td>Cell</td>
|
||||
<td>Cell</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">2</th>
|
||||
<td>Cell</td>
|
||||
<td>Cell</td>
|
||||
<td>Cell</td>
|
||||
<td>Cell</td>
|
||||
<td>Cell</td>
|
||||
<td>Cell</td>
|
||||
<td>Cell</td>
|
||||
<td>Cell</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">3</th>
|
||||
<td>Cell</td>
|
||||
<td>Cell</td>
|
||||
<td>Cell</td>
|
||||
<td>Cell</td>
|
||||
<td>Cell</td>
|
||||
<td>Cell</td>
|
||||
<td>Cell</td>
|
||||
<td>Cell</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="table-responsive{{ $bp.abbr }}">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">#</th>
|
||||
<th scope="col">Heading</th>
|
||||
<th scope="col">Heading</th>
|
||||
<th scope="col">Heading</th>
|
||||
<th scope="col">Heading</th>
|
||||
<th scope="col">Heading</th>
|
||||
<th scope="col">Heading</th>
|
||||
<th scope="col">Heading</th>
|
||||
<th scope="col">Heading</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">1</th>
|
||||
<td>Cell</td>
|
||||
<td>Cell</td>
|
||||
<td>Cell</td>
|
||||
<td>Cell</td>
|
||||
<td>Cell</td>
|
||||
<td>Cell</td>
|
||||
<td>Cell</td>
|
||||
<td>Cell</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">2</th>
|
||||
<td>Cell</td>
|
||||
<td>Cell</td>
|
||||
<td>Cell</td>
|
||||
<td>Cell</td>
|
||||
<td>Cell</td>
|
||||
<td>Cell</td>
|
||||
<td>Cell</td>
|
||||
<td>Cell</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">3</th>
|
||||
<td>Cell</td>
|
||||
<td>Cell</td>
|
||||
<td>Cell</td>
|
||||
<td>Cell</td>
|
||||
<td>Cell</td>
|
||||
<td>Cell</td>
|
||||
<td>Cell</td>
|
||||
<td>Cell</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<div class="table-responsive{{ bp.abbr }}">
|
||||
{{ end -}}
|
||||
{{- end -}}
|
||||
{{< /tables.inline >}}
|
||||
|
||||
{{< highlight html >}}
|
||||
{{< tables.inline >}}
|
||||
{{- range $bp := $.Site.Data.breakpoints -}}
|
||||
{{- if not (eq $bp "xs") }}
|
||||
<div class="table-responsive{{ $bp.abbr }}">
|
||||
<table class="table">
|
||||
...
|
||||
</table>
|
||||
</div>
|
||||
{% endhighlight %}
|
||||
{% endunless %}{% endfor %}
|
||||
{{ end -}}
|
||||
{{- end -}}
|
||||
{{< /tables.inline >}}
|
||||
{{< /highlight >}}
|
@ -8,9 +8,9 @@ toc: true
|
||||
|
||||
## Global settings
|
||||
|
||||
Bootstrap sets basic global display, typography, and link styles. When more control is needed, check out the [textual utility classes]({{ site.baseurl }}/docs/{{ site.docs_version }}/utilities/text/).
|
||||
Bootstrap sets basic global display, typography, and link styles. When more control is needed, check out the [textual utility classes](/docs/{{< param docs_version >}}/utilities/text/).
|
||||
|
||||
- Use a [native font stack]({{ site.baseurl }}/docs/{{ site.docs_version }}/content/reboot/#native-font-stack) that selects the best `font-family` for each OS and device.
|
||||
- Use a [native font stack](/docs/{{< param docs_version >}}/content/reboot/#native-font-stack) that selects the best `font-family` for each OS and device.
|
||||
- For a more inclusive and accessible type scale, we assume the browser default root `font-size` (typically 16px) so visitors can customize their browser defaults as needed.
|
||||
- Use the `$font-family-base`, `$font-size-base`, and `$line-height-base` attributes as our typographic base applied to the `<body>`.
|
||||
- Set the global link color via `$link-color` and apply link underlines only on `:hover`.
|
||||
@ -32,75 +32,73 @@ All HTML headings, `<h1>` through `<h6>`, are available.
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
{{ "`<h1></h1>`" | markdownify }}
|
||||
{{< markdown >}}`<h1></h1>`{{< /markdown >}}
|
||||
</td>
|
||||
<td><span class="h1">h1. Bootstrap heading</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{{ "`<h2></h2>`" | markdownify }}
|
||||
{{< markdown >}}`<h2></h2>`{{< /markdown >}}
|
||||
</td>
|
||||
<td><span class="h2">h2. Bootstrap heading</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{{ "`<h3></h3>`" | markdownify }}
|
||||
{{< markdown >}}`<h3></h3>`{{< /markdown >}}
|
||||
</td>
|
||||
<td><span class="h3">h3. Bootstrap heading</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{{ "`<h4></h4>`" | markdownify }}
|
||||
{{< markdown >}}`<h4></h4>`{{< /markdown >}}
|
||||
</td>
|
||||
<td><span class="h4">h4. Bootstrap heading</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{{ "`<h5></h5>`" | markdownify }}
|
||||
{{< markdown >}}`<h5></h5>`{{< /markdown >}}
|
||||
</td>
|
||||
<td><span class="h5">h5. Bootstrap heading</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{{ "`<h6></h6>`" | markdownify }}
|
||||
{{< markdown >}}`<h6></h6>`{{< /markdown >}}
|
||||
</td>
|
||||
<td><span class="h6">h6. Bootstrap heading</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{% highlight html %}
|
||||
{{< highlight html >}}
|
||||
<h1>h1. Bootstrap heading</h1>
|
||||
<h2>h2. Bootstrap heading</h2>
|
||||
<h3>h3. Bootstrap heading</h3>
|
||||
<h4>h4. Bootstrap heading</h4>
|
||||
<h5>h5. Bootstrap heading</h5>
|
||||
<h6>h6. Bootstrap heading</h6>
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
`.h1` through `.h6` classes are also available, for when you want to match the font styling of a heading but cannot use the associated HTML element.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<p class="h1">h1. Bootstrap heading</p>
|
||||
<p class="h2">h2. Bootstrap heading</p>
|
||||
<p class="h3">h3. Bootstrap heading</p>
|
||||
<p class="h4">h4. Bootstrap heading</p>
|
||||
<p class="h5">h5. Bootstrap heading</p>
|
||||
<p class="h6">h6. Bootstrap heading</p>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
### Customizing headings
|
||||
|
||||
Use the included utility classes to recreate the small secondary heading text from Bootstrap 3.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<h3>
|
||||
Fancy display heading
|
||||
<small class="text-muted">With faded secondary text</small>
|
||||
</h3>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Display headings
|
||||
|
||||
@ -125,29 +123,28 @@ Traditional heading elements are designed to work best in the meat of your page
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{% highlight html %}
|
||||
{{< highlight html >}}
|
||||
<h1 class="display-1">Display 1</h1>
|
||||
<h1 class="display-2">Display 2</h1>
|
||||
<h1 class="display-3">Display 3</h1>
|
||||
<h1 class="display-4">Display 4</h1>
|
||||
{% endhighlight %}
|
||||
{{< /highlight >}}
|
||||
|
||||
## Lead
|
||||
|
||||
Make a paragraph stand out by adding `.lead`.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<p class="lead">
|
||||
Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Duis mollis, est non commodo luctus.
|
||||
</p>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Inline text elements
|
||||
|
||||
Styling for common inline HTML5 elements.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<p>You can use the mark tag to <mark>highlight</mark> text.</p>
|
||||
<p><del>This line of text is meant to be treated as deleted text.</del></p>
|
||||
<p><s>This line of text is meant to be treated as no longer accurate.</s></p>
|
||||
@ -156,8 +153,7 @@ Styling for common inline HTML5 elements.
|
||||
<p><small>This line of text is meant to be treated as fine print.</small></p>
|
||||
<p><strong>This line rendered as bold text.</strong></p>
|
||||
<p><em>This line rendered as italicized text.</em></p>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
`.mark` and `.small` classes are also available to apply the same styles as `<mark>` and `<small>` while avoiding any unwanted semantic implications that the tags would bring.
|
||||
|
||||
@ -165,7 +161,7 @@ While not shown above, feel free to use `<b>` and `<i>` in HTML5. `<b>` is meant
|
||||
|
||||
## Text utilities
|
||||
|
||||
Change text alignment, transform, style, weight, and color with our [text utilities]({{ site.baseurl }}/docs/{{ site.docs_version }}/utilities/text/) and [color utilities]({{ site.baseurl }}/docs/{{ site.docs_version }}/utilities/colors/).
|
||||
Change text alignment, transform, style, weight, and color with our [text utilities](/docs/{{< param docs_version >}}/utilities/text/) and [color utilities](/docs/{{< param docs_version >}}/utilities/colors/).
|
||||
|
||||
## Abbreviations
|
||||
|
||||
@ -173,54 +169,49 @@ Stylized implementation of HTML's `<abbr>` element for abbreviations and acronym
|
||||
|
||||
Add `.initialism` to an abbreviation for a slightly smaller font-size.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<p><abbr title="attribute">attr</abbr></p>
|
||||
<p><abbr title="HyperText Markup Language" class="initialism">HTML</abbr></p>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Blockquotes
|
||||
|
||||
For quoting blocks of content from another source within your document. Wrap `<blockquote class="blockquote">` around any <abbr title="HyperText Markup Language">HTML</abbr> as the quote.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<blockquote class="blockquote">
|
||||
<p class="mb-0">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p>
|
||||
</blockquote>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
### Naming a source
|
||||
|
||||
Add a `<footer class="blockquote-footer">` for identifying the source. Wrap the name of the source work in `<cite>`.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<blockquote class="blockquote">
|
||||
<p class="mb-0">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p>
|
||||
<footer class="blockquote-footer">Someone famous in <cite title="Source Title">Source Title</cite></footer>
|
||||
</blockquote>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
### Alignment
|
||||
|
||||
Use text utilities as needed to change the alignment of your blockquote.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<blockquote class="blockquote text-center">
|
||||
<p class="mb-0">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p>
|
||||
<footer class="blockquote-footer">Someone famous in <cite title="Source Title">Source Title</cite></footer>
|
||||
</blockquote>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<blockquote class="blockquote text-right">
|
||||
<p class="mb-0">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p>
|
||||
<footer class="blockquote-footer">Someone famous in <cite title="Source Title">Source Title</cite></footer>
|
||||
</blockquote>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Lists
|
||||
|
||||
@ -228,7 +219,7 @@ Use text utilities as needed to change the alignment of your blockquote.
|
||||
|
||||
Remove the default `list-style` and left margin on list items (immediate children only). **This only applies to immediate children list items**, meaning you will need to add the class for any nested lists as well.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<ul class="list-unstyled">
|
||||
<li>Lorem ipsum dolor sit amet</li>
|
||||
<li>Consectetur adipiscing elit</li>
|
||||
@ -246,27 +237,25 @@ Remove the default `list-style` and left margin on list items (immediate childre
|
||||
<li>Aenean sit amet erat nunc</li>
|
||||
<li>Eget porttitor lorem</li>
|
||||
</ul>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
### Inline
|
||||
|
||||
Remove a list's bullets and apply some light `margin` with a combination of two classes, `.list-inline` and `.list-inline-item`.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<ul class="list-inline">
|
||||
<li class="list-inline-item">Lorem ipsum</li>
|
||||
<li class="list-inline-item">Phasellus iaculis</li>
|
||||
<li class="list-inline-item">Nulla volutpat</li>
|
||||
</ul>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
### Description list alignment
|
||||
|
||||
Align terms and descriptions horizontally by using our grid system's predefined classes (or semantic mixins). For longer terms, you can optionally add a `.text-truncate` class to truncate the text with an ellipsis.
|
||||
|
||||
{% capture example %}
|
||||
{{< example >}}
|
||||
<dl class="row">
|
||||
<dt class="col-sm-3">Description lists</dt>
|
||||
<dd class="col-sm-9">A description list is perfect for defining terms.</dd>
|
||||
@ -291,8 +280,7 @@ Align terms and descriptions horizontally by using our grid system's predefined
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
{% endcapture %}
|
||||
{% include example.html content=example %}
|
||||
{{< /example >}}
|
||||
|
||||
## Responsive font sizes
|
||||
|
8
site/content/docs/4.3/examples/_index.md
Normal file
@ -0,0 +1,8 @@
|
||||
---
|
||||
layout: single
|
||||
title: Examples
|
||||
description: Quickly get a project started with any of our examples ranging from using parts of the framework to custom components and layouts.
|
||||
aliases: "/examples/"
|
||||
---
|
||||
|
||||
{{< list-examples >}}
|
@ -1,7 +1,8 @@
|
||||
---
|
||||
layout: examples
|
||||
title: Album example
|
||||
extra_css: "album.css"
|
||||
extra_css:
|
||||
- "album.css"
|
||||
---
|
||||
|
||||
<header>
|
||||
@ -55,7 +56,7 @@ extra_css: "album.css"
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="card mb-4 shadow-sm">
|
||||
{% include icons/placeholder.svg width="100%" height="225" background="#55595c" color="#eceeef" class="card-img-top" text="Thumbnail" %}
|
||||
{{< placeholder width="100%" height="225" background="#55595c" color="#eceeef" class="card-img-top" text="Thumbnail" >}}
|
||||
<div class="card-body">
|
||||
<p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
@ -70,7 +71,7 @@ extra_css: "album.css"
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="card mb-4 shadow-sm">
|
||||
{% include icons/placeholder.svg width="100%" height="225" background="#55595c" color="#eceeef" class="card-img-top" text="Thumbnail" %}
|
||||
{{< placeholder width="100%" height="225" background="#55595c" color="#eceeef" class="card-img-top" text="Thumbnail" >}}
|
||||
<div class="card-body">
|
||||
<p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
@ -85,7 +86,7 @@ extra_css: "album.css"
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="card mb-4 shadow-sm">
|
||||
{% include icons/placeholder.svg width="100%" height="225" background="#55595c" color="#eceeef" class="card-img-top" text="Thumbnail" %}
|
||||
{{< placeholder width="100%" height="225" background="#55595c" color="#eceeef" class="card-img-top" text="Thumbnail" >}}
|
||||
<div class="card-body">
|
||||
<p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
@ -101,7 +102,7 @@ extra_css: "album.css"
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="card mb-4 shadow-sm">
|
||||
{% include icons/placeholder.svg width="100%" height="225" background="#55595c" color="#eceeef" class="card-img-top" text="Thumbnail" %}
|
||||
{{< placeholder width="100%" height="225" background="#55595c" color="#eceeef" class="card-img-top" text="Thumbnail" >}}
|
||||
<div class="card-body">
|
||||
<p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
@ -116,7 +117,7 @@ extra_css: "album.css"
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="card mb-4 shadow-sm">
|
||||
{% include icons/placeholder.svg width="100%" height="225" background="#55595c" color="#eceeef" class="card-img-top" text="Thumbnail" %}
|
||||
{{< placeholder width="100%" height="225" background="#55595c" color="#eceeef" class="card-img-top" text="Thumbnail" >}}
|
||||
<div class="card-body">
|
||||
<p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
@ -131,7 +132,7 @@ extra_css: "album.css"
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="card mb-4 shadow-sm">
|
||||
{% include icons/placeholder.svg width="100%" height="225" background="#55595c" color="#eceeef" class="card-img-top" text="Thumbnail" %}
|
||||
{{< placeholder width="100%" height="225" background="#55595c" color="#eceeef" class="card-img-top" text="Thumbnail" >}}
|
||||
<div class="card-body">
|
||||
<p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
@ -147,7 +148,7 @@ extra_css: "album.css"
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="card mb-4 shadow-sm">
|
||||
{% include icons/placeholder.svg width="100%" height="225" background="#55595c" color="#eceeef" class="card-img-top" text="Thumbnail" %}
|
||||
{{< placeholder width="100%" height="225" background="#55595c" color="#eceeef" class="card-img-top" text="Thumbnail" >}}
|
||||
<div class="card-body">
|
||||
<p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
@ -162,7 +163,7 @@ extra_css: "album.css"
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="card mb-4 shadow-sm">
|
||||
{% include icons/placeholder.svg width="100%" height="225" background="#55595c" color="#eceeef" class="card-img-top" text="Thumbnail" %}
|
||||
{{< placeholder width="100%" height="225" background="#55595c" color="#eceeef" class="card-img-top" text="Thumbnail" >}}
|
||||
<div class="card-body">
|
||||
<p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
@ -177,7 +178,7 @@ extra_css: "album.css"
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="card mb-4 shadow-sm">
|
||||
{% include icons/placeholder.svg width="100%" height="225" background="#55595c" color="#eceeef" class="card-img-top" text="Thumbnail" %}
|
||||
{{< placeholder width="100%" height="225" background="#55595c" color="#eceeef" class="card-img-top" text="Thumbnail" >}}
|
||||
<div class="card-body">
|
||||
<p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
@ -202,6 +203,6 @@ extra_css: "album.css"
|
||||
<a href="#">Back to top</a>
|
||||
</p>
|
||||
<p>Album example is © Bootstrap, but please download and customize it for yourself!</p>
|
||||
<p>New to Bootstrap? <a href="{{ site.url }}/">Visit the homepage</a> or read our <a href="{{ site.baseurl }}/docs/{{ site.docs_version }}/getting-started/introduction/">getting started guide</a>.</p>
|
||||
<p>New to Bootstrap? <a href="/">Visit the homepage</a> or read our <a href="/docs/{{< param docs_version >}}/getting-started/introduction/">getting started guide</a>.</p>
|
||||
</div>
|
||||
</footer>
|
@ -61,7 +61,7 @@ include_js: false
|
||||
<a href="#" class="stretched-link">Continue reading</a>
|
||||
</div>
|
||||
<div class="col-auto d-none d-lg-block">
|
||||
{% include icons/placeholder.svg width="200" height="250" background="#55595c" color="#eceeef" text="Thumbnail" %}
|
||||
{{< placeholder width="200" height="250" background="#55595c" color="#eceeef" text="Thumbnail" >}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -75,7 +75,7 @@ include_js: false
|
||||
<a href="#" class="stretched-link">Continue reading</a>
|
||||
</div>
|
||||
<div class="col-auto d-none d-lg-block">
|
||||
{% include icons/placeholder.svg width="200" height="250" background="#55595c" color="#eceeef" text="Thumbnail" %}
|
||||
{{< placeholder width="200" height="250" background="#55595c" color="#eceeef" text="Thumbnail" >}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -1,7 +1,8 @@
|
||||
---
|
||||
layout: examples
|
||||
title: Carousel Template
|
||||
extra_css: "carousel.css"
|
||||
extra_css:
|
||||
- "carousel.css"
|
||||
---
|
||||
|
||||
<header>
|
||||
@ -40,7 +41,7 @@ extra_css: "carousel.css"
|
||||
</ol>
|
||||
<div class="carousel-inner">
|
||||
<div class="carousel-item active">
|
||||
{% include icons/placeholder.svg width="100%" height="100%" background="#777" color="#777" text=" " title=" " %}
|
||||
{{< placeholder width="100%" height="100%" background="#777" color="#777" text="false" title="false" >}}
|
||||
<div class="container">
|
||||
<div class="carousel-caption text-left">
|
||||
<h1>Example headline.</h1>
|
||||
@ -50,7 +51,7 @@ extra_css: "carousel.css"
|
||||
</div>
|
||||
</div>
|
||||
<div class="carousel-item">
|
||||
{% include icons/placeholder.svg width="100%" height="100%" background="#777" color="#777" text=" " title=" " %}
|
||||
{{< placeholder width="100%" height="100%" background="#777" color="#777" text="false" title="false" >}}
|
||||
<div class="container">
|
||||
<div class="carousel-caption">
|
||||
<h1>Another example headline.</h1>
|
||||
@ -60,7 +61,7 @@ extra_css: "carousel.css"
|
||||
</div>
|
||||
</div>
|
||||
<div class="carousel-item">
|
||||
{% include icons/placeholder.svg width="100%" height="100%" background="#777" color="#777" text=" " title=" " %}
|
||||
{{< placeholder width="100%" height="100%" background="#777" color="#777" text="false" title="false" >}}
|
||||
<div class="container">
|
||||
<div class="carousel-caption text-right">
|
||||
<h1>One more for good measure.</h1>
|
||||
@ -90,19 +91,19 @@ extra_css: "carousel.css"
|
||||
<!-- Three columns of text below the carousel -->
|
||||
<div class="row">
|
||||
<div class="col-lg-4">
|
||||
{% include icons/placeholder.svg width="140" height="140" background="#777" color="#777" class="rounded-circle" %}
|
||||
{{< placeholder width="140" height="140" background="#777" color="#777" class="rounded-circle" >}}
|
||||
<h2>Heading</h2>
|
||||
<p>Donec sed odio dui. Etiam porta sem malesuada magna mollis euismod. Nullam id dolor id nibh ultricies vehicula ut id elit. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Praesent commodo cursus magna.</p>
|
||||
<p><a class="btn btn-secondary" href="#" role="button">View details »</a></p>
|
||||
</div><!-- /.col-lg-4 -->
|
||||
<div class="col-lg-4">
|
||||
{% include icons/placeholder.svg width="140" height="140" background="#777" color="#777" class="rounded-circle" %}
|
||||
{{< placeholder width="140" height="140" background="#777" color="#777" class="rounded-circle" >}}
|
||||
<h2>Heading</h2>
|
||||
<p>Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Cras mattis consectetur purus sit amet fermentum. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh.</p>
|
||||
<p><a class="btn btn-secondary" href="#" role="button">View details »</a></p>
|
||||
</div><!-- /.col-lg-4 -->
|
||||
<div class="col-lg-4">
|
||||
{% include icons/placeholder.svg width="140" height="140" background="#777" color="#777" class="rounded-circle" %}
|
||||
{{< placeholder width="140" height="140" background="#777" color="#777" class="rounded-circle" >}}
|
||||
<h2>Heading</h2>
|
||||
<p>Donec sed odio dui. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Vestibulum id ligula porta felis euismod semper. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.</p>
|
||||
<p><a class="btn btn-secondary" href="#" role="button">View details »</a></p>
|
||||
@ -120,7 +121,7 @@ extra_css: "carousel.css"
|
||||
<p class="lead">Donec ullamcorper nulla non metus auctor fringilla. Vestibulum id ligula porta felis euismod semper. Praesent commodo cursus magna, vel scelerisque nisl consectetur. Fusce dapibus, tellus ac cursus commodo.</p>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
{% include icons/placeholder.svg width="500" height="500" background="#eee" color="#aaa" class="bd-placeholder-img-lg featurette-image img-fluid mx-auto" %}
|
||||
{{< placeholder width="500" height="500" background="#eee" color="#aaa" class="bd-placeholder-img-lg featurette-image img-fluid mx-auto" >}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -132,7 +133,7 @@ extra_css: "carousel.css"
|
||||
<p class="lead">Donec ullamcorper nulla non metus auctor fringilla. Vestibulum id ligula porta felis euismod semper. Praesent commodo cursus magna, vel scelerisque nisl consectetur. Fusce dapibus, tellus ac cursus commodo.</p>
|
||||
</div>
|
||||
<div class="col-md-5 order-md-1">
|
||||
{% include icons/placeholder.svg width="500" height="500" background="#eee" color="#aaa" class="bd-placeholder-img-lg featurette-image img-fluid mx-auto" %}
|
||||
{{< placeholder width="500" height="500" background="#eee" color="#aaa" class="bd-placeholder-img-lg featurette-image img-fluid mx-auto" >}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -144,7 +145,7 @@ extra_css: "carousel.css"
|
||||
<p class="lead">Donec ullamcorper nulla non metus auctor fringilla. Vestibulum id ligula porta felis euismod semper. Praesent commodo cursus magna, vel scelerisque nisl consectetur. Fusce dapibus, tellus ac cursus commodo.</p>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
{% include icons/placeholder.svg width="500" height="500" background="#eee" color="#aaa" class="bd-placeholder-img-lg featurette-image img-fluid mx-auto" %}
|
||||
{{< placeholder width="500" height="500" background="#eee" color="#aaa" class="bd-placeholder-img-lg featurette-image img-fluid mx-auto" >}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -158,6 +159,6 @@ extra_css: "carousel.css"
|
||||
<!-- FOOTER -->
|
||||
<footer class="container">
|
||||
<p class="float-right"><a href="#">Back to top</a></p>
|
||||
<p>© 2017-{{ site.time | date: "%Y" }} Company, Inc. · <a href="#">Privacy</a> · <a href="#">Terms</a></p>
|
||||
<p>© 2017-{{< year >}} Company, Inc. · <a href="#">Privacy</a> · <a href="#">Terms</a></p>
|
||||
</footer>
|
||||
</main>
|
@ -1,14 +1,16 @@
|
||||
---
|
||||
layout: examples
|
||||
title: Checkout example
|
||||
extra_css: "form-validation.css"
|
||||
extra_js: "form-validation.js"
|
||||
extra_css:
|
||||
- "form-validation.css"
|
||||
extra_js:
|
||||
- "form-validation.js"
|
||||
body_class: "bg-light"
|
||||
---
|
||||
|
||||
<div class="container">
|
||||
<div class="py-5 text-center">
|
||||
<img class="d-block mx-auto mb-4" src="{{ site.baseurl }}/docs/{{ site.docs_version }}/assets/brand/bootstrap-solid.svg" alt="" width="72" height="72">
|
||||
<img class="d-block mx-auto mb-4" src="/docs/{{< param docs_version >}}/assets/brand/bootstrap-solid.svg" alt="" width="72" height="72">
|
||||
<h2>Checkout form</h2>
|
||||
<p class="lead">Below is an example form built entirely with Bootstrap’s form controls. Each required form group has a validation state that can be triggered by attempting to submit the form without completing it.</p>
|
||||
</div>
|
||||
@ -213,7 +215,7 @@ body_class: "bg-light"
|
||||
</div>
|
||||
|
||||
<footer class="my-5 pt-5 text-muted text-center text-small">
|
||||
<p class="mb-1">© 2017-{{ site.time | date: "%Y" }} Company Name</p>
|
||||
<p class="mb-1">© 2017-{{< year >}} Company Name</p>
|
||||
<ul class="list-inline">
|
||||
<li class="list-inline-item"><a href="#">Privacy</a></li>
|
||||
<li class="list-inline-item"><a href="#">Terms</a></li>
|
@ -1,7 +1,8 @@
|
||||
---
|
||||
layout: examples
|
||||
title: Cover Template
|
||||
extra_css: "cover.css"
|
||||
extra_css:
|
||||
- "cover.css"
|
||||
body_class: "text-center"
|
||||
include_js: false
|
||||
---
|
@ -1,7 +1,8 @@
|
||||
---
|
||||
layout: examples
|
||||
title: Dashboard Template
|
||||
extra_css: "dashboard.css"
|
||||
extra_css:
|
||||
- "dashboard.css"
|
||||
extra_js:
|
||||
- "https://cdnjs.cloudflare.com/ajax/libs/feather-icons/4.9.0/feather.min.js"
|
||||
- "https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.3/Chart.min.js"
|
@ -1,13 +1,14 @@
|
||||
---
|
||||
layout: examples
|
||||
title: Floating labels example
|
||||
extra_css: "floating-labels.css"
|
||||
extra_css:
|
||||
- "floating-labels.css"
|
||||
include_js: false
|
||||
---
|
||||
|
||||
<form class="form-signin">
|
||||
<div class="text-center mb-4">
|
||||
<img class="mb-4" src="{{ site.baseurl }}/docs/{{ site.docs_version }}/assets/brand/bootstrap-solid.svg" alt="" width="72" height="72">
|
||||
<img class="mb-4" src="/docs/{{< param docs_version >}}/assets/brand/bootstrap-solid.svg" alt="" width="72" height="72">
|
||||
<h1 class="h3 mb-3 font-weight-normal">Floating labels</h1>
|
||||
<p>Build form controls with floating labels via the <code>:placeholder-shown</code> pseudo-element. <a href="https://caniuse.com/#feat=css-placeholder-shown">Works in latest Chrome, Safari, and Firefox.</a></p>
|
||||
</div>
|
||||
@ -28,5 +29,5 @@ include_js: false
|
||||
</label>
|
||||
</div>
|
||||
<button class="btn btn-lg btn-primary btn-block" type="submit">Sign in</button>
|
||||
<p class="mt-5 mb-3 text-muted text-center">© 2017-{{ site.time | date: "%Y" }}</p>
|
||||
<p class="mt-5 mb-3 text-muted text-center">© 2017-{{< year >}}</p>
|
||||
</form>
|
@ -1,7 +1,8 @@
|
||||
---
|
||||
layout: examples
|
||||
title: Grid Template
|
||||
extra_css: "grid.css"
|
||||
extra_css:
|
||||
- "grid.css"
|
||||
body_class: "py-4"
|
||||
include_js: false
|
||||
---
|
@ -1,7 +1,8 @@
|
||||
---
|
||||
layout: examples
|
||||
title: Jumbotron Template
|
||||
extra_css: "jumbotron.css"
|
||||
extra_css:
|
||||
- "jumbotron.css"
|
||||
---
|
||||
|
||||
<nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
|
||||
@ -75,5 +76,5 @@ extra_css: "jumbotron.css"
|
||||
</main>
|
||||
|
||||
<footer class="container">
|
||||
<p>© Company 2017-{{ site.time | date: "%Y" }}</p>
|
||||
<p>© Company 2017-{{< year >}}</p>
|
||||
</footer>
|
@ -7,7 +7,7 @@ title: Bottom navbar example
|
||||
<div class="jumbotron mt-3">
|
||||
<h1>Bottom Navbar example</h1>
|
||||
<p class="lead">This example is a quick exercise to illustrate how the bottom navbar works.</p>
|
||||
<a class="btn btn-lg btn-primary" href="{{ site.baseurl }}/docs/{{ site.docs_version }}/components/navbar/" role="button">View navbar docs »</a>
|
||||
<a class="btn btn-lg btn-primary" href="/docs/{{< param docs_version >}}/components/navbar/" role="button">View navbar docs »</a>
|
||||
</div>
|
||||
</div>
|
||||
<nav class="navbar fixed-bottom navbar-expand-sm navbar-dark bg-dark">
|
@ -1,7 +1,8 @@
|
||||
---
|
||||
layout: examples
|
||||
title: Fixed top navbar example
|
||||
extra_css: "navbar-top-fixed.css"
|
||||
extra_css:
|
||||
- "navbar-top-fixed.css"
|
||||
---
|
||||
|
||||
<nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
|
||||
@ -32,6 +33,6 @@ extra_css: "navbar-top-fixed.css"
|
||||
<div class="jumbotron">
|
||||
<h1>Navbar example</h1>
|
||||
<p class="lead">This example is a quick exercise to illustrate how fixed to top navbar works. As you scroll, it will remain fixed to the top of your browser’s viewport.</p>
|
||||
<a class="btn btn-lg btn-primary" href="{{ site.baseurl }}/docs/{{ site.docs_version }}/components/navbar/" role="button">View navbar docs »</a>
|
||||
<a class="btn btn-lg btn-primary" href="/docs/{{< param docs_version >}}/components/navbar/" role="button">View navbar docs »</a>
|
||||
</div>
|
||||
</main>
|