Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/site
diff options
context:
space:
mode:
authorXhmikosR <xhmikosr@gmail.com>2019-01-08 19:33:28 +0300
committerXhmikosR <xhmikosr@gmail.com>2019-03-13 20:22:59 +0300
commitd95d30029f8d63190eb242c9914cee16b6b90627 (patch)
tree06fbab510fa94ac092606eb04b37d061e64d8fbc /site
parent6aa475c82e69a02882e87da7067e522806d6579c (diff)
Switch to Hugo.
No more Ruby dependency and most important more than 10 times less build time (at least on Windows)!
Diffstat (limited to 'site')
-rw-r--r--site/_data/docs-versions.yml44
-rw-r--r--site/_includes/bugify.html42
-rw-r--r--site/_includes/callout-info-prefersreducedmotion.md4
-rw-r--r--site/_includes/callout.html9
-rw-r--r--site/_includes/docs-navbar.html71
-rw-r--r--site/_includes/docs-sidebar.html43
-rw-r--r--site/_includes/example.html51
-rw-r--r--site/_includes/favicons.html9
-rw-r--r--site/_includes/footer.html12
-rw-r--r--site/_includes/header.html23
-rw-r--r--site/_includes/icons/bootstrap-stack.svg1
-rw-r--r--site/_includes/icons/bootstrap.svg1
-rw-r--r--site/_includes/icons/download.svg1
-rw-r--r--site/_includes/icons/github.svg1
-rw-r--r--site/_includes/icons/import.svg1
-rw-r--r--site/_includes/icons/lightning.svg1
-rw-r--r--site/_includes/icons/menu.svg1
-rw-r--r--site/_includes/icons/opencollective.svg1
-rw-r--r--site/_includes/icons/placeholder.svg35
-rw-r--r--site/_includes/icons/slack.svg1
-rw-r--r--site/_includes/icons/twitter.svg1
-rw-r--r--site/_includes/scripts.html19
-rw-r--r--site/_includes/social.html18
-rw-r--r--site/_includes/stylesheet.html16
-rw-r--r--site/_layouts/default.html22
-rw-r--r--site/_layouts/docs.html34
-rw-r--r--site/_layouts/examples.html52
-rw-r--r--site/_layouts/home.html16
-rw-r--r--site/_layouts/simple.html18
-rw-r--r--site/content/docs/4.3/about/brand.md (renamed from site/docs/4.3/about/brand.md)10
-rw-r--r--site/content/docs/4.3/about/license.md (renamed from site/docs/4.3/about/license.md)4
-rw-r--r--site/content/docs/4.3/about/overview.md (renamed from site/docs/4.3/about/overview.md)6
-rw-r--r--site/content/docs/4.3/about/team.md23
-rw-r--r--site/content/docs/4.3/about/translations.md (renamed from site/docs/4.3/about/translations.md)8
-rw-r--r--site/content/docs/4.3/browser-bugs.md (renamed from site/docs/4.3/browser-bugs.md)24
-rw-r--r--site/content/docs/4.3/components/alerts.md (renamed from site/docs/4.3/components/alerts.md)68
-rw-r--r--site/content/docs/4.3/components/badge.md (renamed from site/docs/4.3/components/badge.md)52
-rw-r--r--site/content/docs/4.3/components/breadcrumb.md (renamed from site/docs/4.3/components/breadcrumb.md)5
-rw-r--r--site/content/docs/4.3/components/button-group.md (renamed from site/docs/4.3/components/button-group.md)35
-rw-r--r--site/content/docs/4.3/components/buttons.md (renamed from site/docs/4.3/components/buttons.md)91
-rw-r--r--site/content/docs/4.3/components/card.md (renamed from site/docs/4.3/components/card.md)233
-rw-r--r--site/content/docs/4.3/components/carousel.md (renamed from site/docs/4.3/components/carousel.md)90
-rw-r--r--site/content/docs/4.3/components/collapse.md (renamed from site/docs/4.3/components/collapse.md)37
-rw-r--r--site/content/docs/4.3/components/dropdowns.md (renamed from site/docs/4.3/components/dropdowns.md)134
-rw-r--r--site/content/docs/4.3/components/forms.md (renamed from site/docs/4.3/components/forms.md)293
-rw-r--r--site/content/docs/4.3/components/input-group.md (renamed from site/docs/4.3/components/input-group.md)55
-rw-r--r--site/content/docs/4.3/components/jumbotron.md (renamed from site/docs/4.3/components/jumbotron.md)10
-rw-r--r--site/content/docs/4.3/components/list-group.md (renamed from site/docs/4.3/components/list-group.md)118
-rw-r--r--site/content/docs/4.3/components/media-object.md (renamed from site/docs/4.3/components/media-object.md)57
-rw-r--r--site/content/docs/4.3/components/modal.md (renamed from site/docs/4.3/components/modal.md)83
-rw-r--r--site/content/docs/4.3/components/navbar.md (renamed from site/docs/4.3/components/navbar.md)137
-rw-r--r--site/content/docs/4.3/components/navs.md (renamed from site/docs/4.3/components/navs.md)136
-rw-r--r--site/content/docs/4.3/components/pagination.md (renamed from site/docs/4.3/components/pagination.md)42
-rw-r--r--site/content/docs/4.3/components/popovers.md (renamed from site/docs/4.3/components/popovers.md)86
-rw-r--r--site/content/docs/4.3/components/progress.md (renamed from site/docs/4.3/components/progress.md)41
-rw-r--r--site/content/docs/4.3/components/scrollspy.md (renamed from site/docs/4.3/components/scrollspy.md)46
-rw-r--r--site/content/docs/4.3/components/spinners.md (renamed from site/docs/4.3/components/spinners.md)102
-rw-r--r--site/content/docs/4.3/components/toasts.md (renamed from site/docs/4.3/components/toasts.md)79
-rw-r--r--site/content/docs/4.3/components/tooltips.md (renamed from site/docs/4.3/components/tooltips.md)85
-rw-r--r--site/content/docs/4.3/content/code.md (renamed from site/docs/4.3/content/code.md)25
-rw-r--r--site/content/docs/4.3/content/figures.md26
-rw-r--r--site/content/docs/4.3/content/images.md77
-rw-r--r--site/content/docs/4.3/content/reboot.md (renamed from site/docs/4.3/content/reboot.md)36
-rw-r--r--site/content/docs/4.3/content/tables.md (renamed from site/docs/4.3/content/tables.md)247
-rw-r--r--site/content/docs/4.3/content/typography.md (renamed from site/docs/4.3/content/typography.md)86
-rw-r--r--site/content/docs/4.3/examples/.stylelintrc (renamed from site/docs/4.3/examples/.stylelintrc)0
-rw-r--r--site/content/docs/4.3/examples/_index.md8
-rw-r--r--site/content/docs/4.3/examples/album/album.css (renamed from site/docs/4.3/examples/album/album.css)0
-rw-r--r--site/content/docs/4.3/examples/album/index.html (renamed from site/docs/4.3/examples/album/index.html)23
-rw-r--r--site/content/docs/4.3/examples/blog/blog.css (renamed from site/docs/4.3/examples/blog/blog.css)0
-rw-r--r--site/content/docs/4.3/examples/blog/index.html (renamed from site/docs/4.3/examples/blog/index.html)4
-rw-r--r--site/content/docs/4.3/examples/carousel/carousel.css (renamed from site/docs/4.3/examples/carousel/carousel.css)0
-rw-r--r--site/content/docs/4.3/examples/carousel/index.html (renamed from site/docs/4.3/examples/carousel/index.html)23
-rw-r--r--site/content/docs/4.3/examples/checkout/form-validation.css (renamed from site/docs/4.3/examples/checkout/form-validation.css)0
-rw-r--r--site/content/docs/4.3/examples/checkout/form-validation.js (renamed from site/docs/4.3/examples/checkout/form-validation.js)0
-rw-r--r--site/content/docs/4.3/examples/checkout/index.html (renamed from site/docs/4.3/examples/checkout/index.html)10
-rw-r--r--site/content/docs/4.3/examples/cover/cover.css (renamed from site/docs/4.3/examples/cover/cover.css)0
-rw-r--r--site/content/docs/4.3/examples/cover/index.html (renamed from site/docs/4.3/examples/cover/index.html)3
-rw-r--r--site/content/docs/4.3/examples/dashboard/dashboard.css (renamed from site/docs/4.3/examples/dashboard/dashboard.css)0
-rw-r--r--site/content/docs/4.3/examples/dashboard/dashboard.js (renamed from site/docs/4.3/examples/dashboard/dashboard.js)0
-rw-r--r--site/content/docs/4.3/examples/dashboard/index.html (renamed from site/docs/4.3/examples/dashboard/index.html)3
-rw-r--r--site/content/docs/4.3/examples/floating-labels/floating-labels.css (renamed from site/docs/4.3/examples/floating-labels/floating-labels.css)0
-rw-r--r--site/content/docs/4.3/examples/floating-labels/index.html (renamed from site/docs/4.3/examples/floating-labels/index.html)7
-rw-r--r--site/content/docs/4.3/examples/grid/grid.css (renamed from site/docs/4.3/examples/grid/grid.css)0
-rw-r--r--site/content/docs/4.3/examples/grid/index.html (renamed from site/docs/4.3/examples/grid/index.html)3
-rw-r--r--site/content/docs/4.3/examples/jumbotron/index.html (renamed from site/docs/4.3/examples/jumbotron/index.html)5
-rw-r--r--site/content/docs/4.3/examples/jumbotron/jumbotron.css (renamed from site/docs/4.3/examples/jumbotron/jumbotron.css)0
-rw-r--r--site/content/docs/4.3/examples/navbar-bottom/index.html (renamed from site/docs/4.3/examples/navbar-bottom/index.html)2
-rw-r--r--site/content/docs/4.3/examples/navbar-fixed/index.html (renamed from site/docs/4.3/examples/navbar-fixed/index.html)5
-rw-r--r--site/content/docs/4.3/examples/navbar-fixed/navbar-top-fixed.css (renamed from site/docs/4.3/examples/navbar-fixed/navbar-top-fixed.css)0
-rw-r--r--site/content/docs/4.3/examples/navbar-static/index.html (renamed from site/docs/4.3/examples/navbar-static/index.html)5
-rw-r--r--site/content/docs/4.3/examples/navbar-static/navbar-top.css (renamed from site/docs/4.3/examples/navbar-static/navbar-top.css)0
-rw-r--r--site/content/docs/4.3/examples/navbars/index.html (renamed from site/docs/4.3/examples/navbars/index.html)7
-rw-r--r--site/content/docs/4.3/examples/navbars/navbar.css (renamed from site/docs/4.3/examples/navbars/navbar.css)0
-rw-r--r--site/content/docs/4.3/examples/offcanvas/index.html (renamed from site/docs/4.3/examples/offcanvas/index.html)20
-rw-r--r--site/content/docs/4.3/examples/offcanvas/offcanvas.css (renamed from site/docs/4.3/examples/offcanvas/offcanvas.css)0
-rw-r--r--site/content/docs/4.3/examples/offcanvas/offcanvas.js (renamed from site/docs/4.3/examples/offcanvas/offcanvas.js)0
-rw-r--r--site/content/docs/4.3/examples/pricing/index.html (renamed from site/docs/4.3/examples/pricing/index.html)7
-rw-r--r--site/content/docs/4.3/examples/pricing/pricing.css (renamed from site/docs/4.3/examples/pricing/pricing.css)0
-rw-r--r--site/content/docs/4.3/examples/product/index.html (renamed from site/docs/4.3/examples/product/index.html)5
-rw-r--r--site/content/docs/4.3/examples/product/product.css (renamed from site/docs/4.3/examples/product/product.css)0
-rw-r--r--site/content/docs/4.3/examples/sign-in/index.html (renamed from site/docs/4.3/examples/sign-in/index.html)7
-rw-r--r--site/content/docs/4.3/examples/sign-in/signin.css (renamed from site/docs/4.3/examples/sign-in/signin.css)0
-rw-r--r--site/content/docs/4.3/examples/starter-template/index.html (renamed from site/docs/4.3/examples/starter-template/index.html)3
-rw-r--r--site/content/docs/4.3/examples/starter-template/starter-template.css (renamed from site/docs/4.3/examples/starter-template/starter-template.css)0
-rw-r--r--site/content/docs/4.3/examples/sticky-footer-navbar/index.html (renamed from site/docs/4.3/examples/sticky-footer-navbar/index.html)5
-rw-r--r--site/content/docs/4.3/examples/sticky-footer-navbar/sticky-footer-navbar.css (renamed from site/docs/4.3/examples/sticky-footer-navbar/sticky-footer-navbar.css)0
-rw-r--r--site/content/docs/4.3/examples/sticky-footer/index.html (renamed from site/docs/4.3/examples/sticky-footer/index.html)5
-rw-r--r--site/content/docs/4.3/examples/sticky-footer/sticky-footer.css (renamed from site/docs/4.3/examples/sticky-footer/sticky-footer.css)0
-rw-r--r--site/content/docs/4.3/extend/approach.md (renamed from site/docs/4.3/extend/approach.md)9
-rw-r--r--site/content/docs/4.3/extend/icons.md (renamed from site/docs/4.3/extend/icons.md)0
-rw-r--r--site/content/docs/4.3/getting-started/accessibility.md (renamed from site/docs/4.3/getting-started/accessibility.md)8
-rw-r--r--site/content/docs/4.3/getting-started/best-practices.md (renamed from site/docs/4.3/getting-started/best-practices.md)5
-rw-r--r--site/content/docs/4.3/getting-started/browsers-devices.md (renamed from site/docs/4.3/getting-started/browsers-devices.md)18
-rw-r--r--site/content/docs/4.3/getting-started/build-tools.md (renamed from site/docs/4.3/getting-started/build-tools.md)21
-rw-r--r--site/content/docs/4.3/getting-started/contents.md (renamed from site/docs/4.3/getting-started/contents.md)21
-rw-r--r--site/content/docs/4.3/getting-started/download.md (renamed from site/docs/4.3/getting-started/download.md)58
-rw-r--r--site/content/docs/4.3/getting-started/introduction.md (renamed from site/docs/4.3/getting-started/introduction.md)61
-rw-r--r--site/content/docs/4.3/getting-started/javascript.md (renamed from site/docs/4.3/getting-started/javascript.md)77
-rw-r--r--site/content/docs/4.3/getting-started/theming.md (renamed from site/docs/4.3/getting-started/theming.md)133
-rw-r--r--site/content/docs/4.3/getting-started/webpack.md (renamed from site/docs/4.3/getting-started/webpack.md)30
-rw-r--r--site/content/docs/4.3/layout/grid.md (renamed from site/docs/4.3/layout/grid.md)156
-rw-r--r--site/content/docs/4.3/layout/overview.md (renamed from site/docs/4.3/layout/overview.md)50
-rw-r--r--site/content/docs/4.3/layout/utilities-for-layout.md25
-rw-r--r--site/content/docs/4.3/migration.md (renamed from site/docs/4.3/migration.md)24
-rw-r--r--site/content/docs/4.3/utilities/borders.md (renamed from site/docs/4.3/utilities/borders.md)52
-rw-r--r--site/content/docs/4.3/utilities/clearfix.md (renamed from site/docs/4.3/utilities/clearfix.md)13
-rw-r--r--site/content/docs/4.3/utilities/close-icon.md (renamed from site/docs/4.3/utilities/close-icon.md)5
-rw-r--r--site/content/docs/4.3/utilities/colors.md (renamed from site/docs/4.3/utilities/colors.md)56
-rw-r--r--site/content/docs/4.3/utilities/display.md (renamed from site/docs/4.3/utilities/display.md)22
-rw-r--r--site/content/docs/4.3/utilities/embed.md (renamed from site/docs/4.3/utilities/embed.md)13
-rw-r--r--site/content/docs/4.3/utilities/flex.md (renamed from site/docs/4.3/utilities/flex.md)236
-rw-r--r--site/content/docs/4.3/utilities/float.md (renamed from site/docs/4.3/utilities/float.md)33
-rw-r--r--site/content/docs/4.3/utilities/image-replacement.md (renamed from site/docs/4.3/utilities/image-replacement.md)19
-rw-r--r--site/content/docs/4.3/utilities/overflow.md (renamed from site/docs/4.3/utilities/overflow.md)4
-rw-r--r--site/content/docs/4.3/utilities/position.md (renamed from site/docs/4.3/utilities/position.md)16
-rw-r--r--site/content/docs/4.3/utilities/screen-readers.md (renamed from site/docs/4.3/utilities/screen-readers.md)13
-rw-r--r--site/content/docs/4.3/utilities/shadows.md (renamed from site/docs/4.3/utilities/shadows.md)5
-rw-r--r--site/content/docs/4.3/utilities/sizing.md (renamed from site/docs/4.3/utilities/sizing.md)30
-rw-r--r--site/content/docs/4.3/utilities/spacing.md (renamed from site/docs/4.3/utilities/spacing.md)17
-rw-r--r--site/content/docs/4.3/utilities/stretched-link.md (renamed from site/docs/4.3/utilities/stretched-link.md)28
-rw-r--r--site/content/docs/4.3/utilities/text.md (renamed from site/docs/4.3/utilities/text.md)55
-rw-r--r--site/content/docs/4.3/utilities/vertical-align.md (renamed from site/docs/4.3/utilities/vertical-align.md)10
-rw-r--r--site/content/docs/4.3/utilities/visibility.md (renamed from site/docs/4.3/utilities/visibility.md)8
-rw-r--r--site/content/docs/versions.md6
-rw-r--r--site/data/breakpoints.yml (renamed from site/_data/breakpoints.yml)0
-rw-r--r--site/data/browser-bugs.yml (renamed from site/_data/browser-bugs.yml)2
-rw-r--r--site/data/browser-features.yml (renamed from site/_data/browser-features.yml)0
-rw-r--r--site/data/colors.yml (renamed from site/_data/colors.yml)0
-rw-r--r--site/data/core-team.yml (renamed from site/_data/core-team.yml)0
-rw-r--r--site/data/docs-versions.yml44
-rw-r--r--site/data/examples.yml (renamed from site/_data/examples.yml)2
-rw-r--r--site/data/grays.yml (renamed from site/_data/grays.yml)0
-rw-r--r--site/data/nav.yml (renamed from site/_data/nav.yml)0
-rw-r--r--site/data/theme-colors.yml (renamed from site/_data/theme-colors.yml)0
-rw-r--r--site/data/translations.yml (renamed from site/_data/translations.yml)0
-rw-r--r--site/docs/4.3/about/team.md21
-rw-r--r--site/docs/4.3/content/figures.md28
-rw-r--r--site/docs/4.3/content/images.md77
-rw-r--r--site/docs/4.3/examples/index.html24
-rw-r--r--site/docs/4.3/layout/utilities-for-layout.md25
-rw-r--r--site/docs/versions.html29
-rw-r--r--site/index.html88
-rw-r--r--site/layouts/_default/docs.html34
-rw-r--r--site/layouts/_default/examples.html52
-rw-r--r--site/layouts/_default/home.html19
-rw-r--r--site/layouts/_default/single.html29
-rw-r--r--site/layouts/alias.html11
-rw-r--r--site/layouts/partials/ads.html (renamed from site/_includes/ads.html)0
-rw-r--r--site/layouts/partials/analytics.html (renamed from site/_includes/analytics.html)0
-rw-r--r--site/layouts/partials/callout-danger-async-methods.md (renamed from site/_includes/callout-danger-async-methods.md)5
-rw-r--r--site/layouts/partials/callout-info-mediaqueries-breakpoints.md (renamed from site/_includes/callout-info-mediaqueries-breakpoints.md)3
-rw-r--r--site/layouts/partials/callout-info-prefersreducedmotion.md1
-rw-r--r--site/layouts/partials/callout-warning-color-assistive-technologies.md (renamed from site/_includes/callout-warning-color-assistive-technologies.md)3
-rw-r--r--site/layouts/partials/docs-navbar.html71
-rw-r--r--site/layouts/partials/docs-sidebar.html43
-rw-r--r--site/layouts/partials/favicons.html9
-rw-r--r--site/layouts/partials/footer.html12
-rw-r--r--site/layouts/partials/header.html17
-rw-r--r--site/layouts/partials/home/masthead-followup.html46
-rw-r--r--site/layouts/partials/home/masthead.html30
-rw-r--r--site/layouts/partials/icons/bootstrap-stack.svg1
-rw-r--r--site/layouts/partials/icons/bootstrap.svg1
-rw-r--r--site/layouts/partials/icons/download.svg1
-rw-r--r--site/layouts/partials/icons/github.svg1
-rw-r--r--site/layouts/partials/icons/import.svg1
-rw-r--r--site/layouts/partials/icons/lightning.svg1
-rw-r--r--site/layouts/partials/icons/menu.svg1
-rw-r--r--site/layouts/partials/icons/opencollective.svg1
-rw-r--r--site/layouts/partials/icons/slack.svg1
-rw-r--r--site/layouts/partials/icons/twitter.svg1
-rw-r--r--site/layouts/partials/scripts.html19
-rw-r--r--site/layouts/partials/skippy.html (renamed from site/_includes/skippy.html)0
-rw-r--r--site/layouts/partials/social.html18
-rw-r--r--site/layouts/partials/stylesheet.html16
-rw-r--r--site/layouts/robots.txt8
-rw-r--r--site/layouts/shortcodes/bugify.html40
-rw-r--r--site/layouts/shortcodes/callout.html10
-rw-r--r--site/layouts/shortcodes/example.html53
-rw-r--r--site/layouts/shortcodes/list-examples.html19
-rw-r--r--site/layouts/shortcodes/list-versions.html20
-rw-r--r--site/layouts/shortcodes/markdown.html1
-rw-r--r--site/layouts/shortcodes/partial.html1
-rw-r--r--site/layouts/shortcodes/placeholder.html30
-rw-r--r--site/layouts/shortcodes/year.html5
-rw-r--r--site/layouts/sitemap.xml9
-rw-r--r--site/robots.txt9
-rw-r--r--site/static/CNAME1
-rw-r--r--site/static/docs/4.3/assets/brand/bootstrap-outline.svg (renamed from site/docs/4.3/assets/brand/bootstrap-outline.svg)0
-rw-r--r--site/static/docs/4.3/assets/brand/bootstrap-punchout.svg (renamed from site/docs/4.3/assets/brand/bootstrap-punchout.svg)0
-rw-r--r--site/static/docs/4.3/assets/brand/bootstrap-social-logo.png (renamed from site/docs/4.3/assets/brand/bootstrap-social-logo.png)bin23959 -> 23959 bytes
-rw-r--r--site/static/docs/4.3/assets/brand/bootstrap-social.png (renamed from site/docs/4.3/assets/brand/bootstrap-social.png)bin231733 -> 231733 bytes
-rw-r--r--site/static/docs/4.3/assets/brand/bootstrap-solid.svg (renamed from site/docs/4.3/assets/brand/bootstrap-solid.svg)0
-rw-r--r--site/static/docs/4.3/assets/css/docs.min.css (renamed from site/docs/4.3/assets/css/docs.min.css)0
-rw-r--r--site/static/docs/4.3/assets/css/docs.min.css.map (renamed from site/docs/4.3/assets/css/docs.min.css.map)0
-rw-r--r--site/static/docs/4.3/assets/img/bootstrap-themes.png (renamed from site/docs/4.3/assets/img/bootstrap-themes.png)bin28187 -> 28187 bytes
-rw-r--r--site/static/docs/4.3/assets/img/bootstrap-themes@2x.png (renamed from site/docs/4.3/assets/img/bootstrap-themes@2x.png)bin80588 -> 80588 bytes
-rw-r--r--site/static/docs/4.3/assets/img/examples/album.png (renamed from site/docs/4.3/assets/img/examples/album.png)bin21740 -> 21740 bytes
-rw-r--r--site/static/docs/4.3/assets/img/examples/album@2x.png (renamed from site/docs/4.3/assets/img/examples/album@2x.png)bin26370 -> 26370 bytes
-rw-r--r--site/static/docs/4.3/assets/img/examples/blog.png (renamed from site/docs/4.3/assets/img/examples/blog.png)bin32843 -> 32843 bytes
-rw-r--r--site/static/docs/4.3/assets/img/examples/blog@2x.png (renamed from site/docs/4.3/assets/img/examples/blog@2x.png)bin36944 -> 36944 bytes
-rw-r--r--site/static/docs/4.3/assets/img/examples/carousel.png (renamed from site/docs/4.3/assets/img/examples/carousel.png)bin21450 -> 21450 bytes
-rw-r--r--site/static/docs/4.3/assets/img/examples/carousel@2x.png (renamed from site/docs/4.3/assets/img/examples/carousel@2x.png)bin31465 -> 31465 bytes
-rw-r--r--site/static/docs/4.3/assets/img/examples/checkout.png (renamed from site/docs/4.3/assets/img/examples/checkout.png)bin25151 -> 25151 bytes
-rw-r--r--site/static/docs/4.3/assets/img/examples/checkout@2x.png (renamed from site/docs/4.3/assets/img/examples/checkout@2x.png)bin28180 -> 28180 bytes
-rw-r--r--site/static/docs/4.3/assets/img/examples/cover.png (renamed from site/docs/4.3/assets/img/examples/cover.png)bin7240 -> 7240 bytes
-rw-r--r--site/static/docs/4.3/assets/img/examples/cover@2x.png (renamed from site/docs/4.3/assets/img/examples/cover@2x.png)bin17953 -> 17953 bytes
-rw-r--r--site/static/docs/4.3/assets/img/examples/dashboard.png (renamed from site/docs/4.3/assets/img/examples/dashboard.png)bin24376 -> 24376 bytes
-rw-r--r--site/static/docs/4.3/assets/img/examples/dashboard@2x.png (renamed from site/docs/4.3/assets/img/examples/dashboard@2x.png)bin26556 -> 26556 bytes
-rw-r--r--site/static/docs/4.3/assets/img/examples/floating-labels.png (renamed from site/docs/4.3/assets/img/examples/floating-labels.png)bin10516 -> 10516 bytes
-rw-r--r--site/static/docs/4.3/assets/img/examples/floating-labels@2x.png (renamed from site/docs/4.3/assets/img/examples/floating-labels@2x.png)bin11053 -> 11053 bytes
-rw-r--r--site/static/docs/4.3/assets/img/examples/grid.png (renamed from site/docs/4.3/assets/img/examples/grid.png)bin37960 -> 37960 bytes
-rw-r--r--site/static/docs/4.3/assets/img/examples/grid@2x.png (renamed from site/docs/4.3/assets/img/examples/grid@2x.png)bin34834 -> 34834 bytes
-rw-r--r--site/static/docs/4.3/assets/img/examples/jumbotron.png (renamed from site/docs/4.3/assets/img/examples/jumbotron.png)bin31403 -> 31403 bytes
-rw-r--r--site/static/docs/4.3/assets/img/examples/jumbotron@2x.png (renamed from site/docs/4.3/assets/img/examples/jumbotron@2x.png)bin38408 -> 38408 bytes
-rw-r--r--site/static/docs/4.3/assets/img/examples/navbar-bottom.png (renamed from site/docs/4.3/assets/img/examples/navbar-bottom.png)bin9774 -> 9774 bytes
-rw-r--r--site/static/docs/4.3/assets/img/examples/navbar-bottom@2x.png (renamed from site/docs/4.3/assets/img/examples/navbar-bottom@2x.png)bin11316 -> 11316 bytes
-rw-r--r--site/static/docs/4.3/assets/img/examples/navbar-fixed.png (renamed from site/docs/4.3/assets/img/examples/navbar-fixed.png)bin11569 -> 11569 bytes
-rw-r--r--site/static/docs/4.3/assets/img/examples/navbar-fixed@2x.png (renamed from site/docs/4.3/assets/img/examples/navbar-fixed@2x.png)bin13616 -> 13616 bytes
-rw-r--r--site/static/docs/4.3/assets/img/examples/navbar-static.png (renamed from site/docs/4.3/assets/img/examples/navbar-static.png)bin12523 -> 12523 bytes
-rw-r--r--site/static/docs/4.3/assets/img/examples/navbar-static@2x.png (renamed from site/docs/4.3/assets/img/examples/navbar-static@2x.png)bin14893 -> 14893 bytes
-rw-r--r--site/static/docs/4.3/assets/img/examples/navbars.png (renamed from site/docs/4.3/assets/img/examples/navbars.png)bin24748 -> 24748 bytes
-rw-r--r--site/static/docs/4.3/assets/img/examples/navbars@2x.png (renamed from site/docs/4.3/assets/img/examples/navbars@2x.png)bin27187 -> 27187 bytes
-rw-r--r--site/static/docs/4.3/assets/img/examples/offcanvas.png (renamed from site/docs/4.3/assets/img/examples/offcanvas.png)bin20148 -> 20148 bytes
-rw-r--r--site/static/docs/4.3/assets/img/examples/offcanvas@2x.png (renamed from site/docs/4.3/assets/img/examples/offcanvas@2x.png)bin23975 -> 23975 bytes
-rw-r--r--site/static/docs/4.3/assets/img/examples/pricing.png (renamed from site/docs/4.3/assets/img/examples/pricing.png)bin25033 -> 25033 bytes
-rw-r--r--site/static/docs/4.3/assets/img/examples/pricing@2x.png (renamed from site/docs/4.3/assets/img/examples/pricing@2x.png)bin29128 -> 29128 bytes
-rw-r--r--site/static/docs/4.3/assets/img/examples/product.png (renamed from site/docs/4.3/assets/img/examples/product.png)bin24977 -> 24977 bytes
-rw-r--r--site/static/docs/4.3/assets/img/examples/product@2x.png (renamed from site/docs/4.3/assets/img/examples/product@2x.png)bin27953 -> 27953 bytes
-rw-r--r--site/static/docs/4.3/assets/img/examples/sign-in.png (renamed from site/docs/4.3/assets/img/examples/sign-in.png)bin5704 -> 5704 bytes
-rw-r--r--site/static/docs/4.3/assets/img/examples/sign-in@2x.png (renamed from site/docs/4.3/assets/img/examples/sign-in@2x.png)bin5680 -> 5680 bytes
-rw-r--r--site/static/docs/4.3/assets/img/examples/starter-template.png (renamed from site/docs/4.3/assets/img/examples/starter-template.png)bin9761 -> 9761 bytes
-rw-r--r--site/static/docs/4.3/assets/img/examples/starter-template@2x.png (renamed from site/docs/4.3/assets/img/examples/starter-template@2x.png)bin11334 -> 11334 bytes
-rw-r--r--site/static/docs/4.3/assets/img/examples/sticky-footer-navbar.png (renamed from site/docs/4.3/assets/img/examples/sticky-footer-navbar.png)bin14167 -> 14167 bytes
-rw-r--r--site/static/docs/4.3/assets/img/examples/sticky-footer-navbar@2x.png (renamed from site/docs/4.3/assets/img/examples/sticky-footer-navbar@2x.png)bin15836 -> 15836 bytes
-rw-r--r--site/static/docs/4.3/assets/img/examples/sticky-footer.png (renamed from site/docs/4.3/assets/img/examples/sticky-footer.png)bin8170 -> 8170 bytes
-rw-r--r--site/static/docs/4.3/assets/img/examples/sticky-footer@2x.png (renamed from site/docs/4.3/assets/img/examples/sticky-footer@2x.png)bin9665 -> 9665 bytes
-rw-r--r--site/static/docs/4.3/assets/img/favicons/android-chrome-192x192.png (renamed from site/docs/4.3/assets/img/favicons/android-chrome-192x192.png)bin1935 -> 1935 bytes
-rw-r--r--site/static/docs/4.3/assets/img/favicons/android-chrome-512x512.png (renamed from site/docs/4.3/assets/img/favicons/android-chrome-512x512.png)bin4269 -> 4269 bytes
-rw-r--r--site/static/docs/4.3/assets/img/favicons/apple-touch-icon.png (renamed from site/docs/4.3/assets/img/favicons/apple-touch-icon.png)bin1738 -> 1738 bytes
-rw-r--r--site/static/docs/4.3/assets/img/favicons/browserconfig.xml (renamed from site/docs/4.3/assets/img/favicons/browserconfig.xml)4
-rw-r--r--site/static/docs/4.3/assets/img/favicons/favicon-16x16.png (renamed from site/docs/4.3/assets/img/favicons/favicon-16x16.png)bin310 -> 310 bytes
-rw-r--r--site/static/docs/4.3/assets/img/favicons/favicon-32x32.png (renamed from site/docs/4.3/assets/img/favicons/favicon-32x32.png)bin491 -> 491 bytes
-rw-r--r--site/static/docs/4.3/assets/img/favicons/favicon.ico (renamed from site/favicon.ico)bin5430 -> 5430 bytes
-rw-r--r--site/static/docs/4.3/assets/img/favicons/manifest.json (renamed from site/docs/4.3/assets/img/favicons/manifest.json)6
-rw-r--r--site/static/docs/4.3/assets/img/favicons/mstile-144x144.png (renamed from site/docs/4.3/assets/img/favicons/mstile-144x144.png)bin1479 -> 1479 bytes
-rw-r--r--site/static/docs/4.3/assets/img/favicons/mstile-150x150.png (renamed from site/docs/4.3/assets/img/favicons/mstile-150x150.png)bin1428 -> 1428 bytes
-rw-r--r--site/static/docs/4.3/assets/img/favicons/mstile-310x150.png (renamed from site/docs/4.3/assets/img/favicons/mstile-310x150.png)bin1746 -> 1746 bytes
-rw-r--r--site/static/docs/4.3/assets/img/favicons/mstile-310x310.png (renamed from site/docs/4.3/assets/img/favicons/mstile-310x310.png)bin3085 -> 3085 bytes
-rw-r--r--site/static/docs/4.3/assets/img/favicons/mstile-70x70.png (renamed from site/docs/4.3/assets/img/favicons/mstile-70x70.png)bin1104 -> 1104 bytes
-rw-r--r--site/static/docs/4.3/assets/img/favicons/safari-pinned-tab.svg (renamed from site/docs/4.3/assets/img/favicons/safari-pinned-tab.svg)0
-rw-r--r--site/static/docs/4.3/assets/js/docs.min.js (renamed from site/docs/4.3/assets/js/docs.min.js)0
-rw-r--r--site/static/docs/4.3/assets/js/src/application.js (renamed from site/docs/4.3/assets/js/src/application.js)0
-rw-r--r--site/static/docs/4.3/assets/js/src/search.js (renamed from site/docs/4.3/assets/js/src/search.js)0
-rw-r--r--site/static/docs/4.3/assets/js/vendor/anchor.min.js (renamed from site/docs/4.3/assets/js/vendor/anchor.min.js)0
-rw-r--r--site/static/docs/4.3/assets/js/vendor/bs-custom-file-input.min.js (renamed from site/docs/4.3/assets/js/vendor/bs-custom-file-input.min.js)0
-rw-r--r--site/static/docs/4.3/assets/js/vendor/clipboard.min.js (renamed from site/docs/4.3/assets/js/vendor/clipboard.min.js)0
-rw-r--r--site/static/docs/4.3/assets/scss/_ads.scss (renamed from site/docs/4.3/assets/scss/_ads.scss)0
-rw-r--r--site/static/docs/4.3/assets/scss/_algolia.scss (renamed from site/docs/4.3/assets/scss/_algolia.scss)0
-rw-r--r--site/static/docs/4.3/assets/scss/_anchor.scss (renamed from site/docs/4.3/assets/scss/_anchor.scss)0
-rw-r--r--site/static/docs/4.3/assets/scss/_brand.scss (renamed from site/docs/4.3/assets/scss/_brand.scss)0
-rw-r--r--site/static/docs/4.3/assets/scss/_browser-bugs.scss (renamed from site/docs/4.3/assets/scss/_browser-bugs.scss)3
-rw-r--r--site/static/docs/4.3/assets/scss/_buttons.scss (renamed from site/docs/4.3/assets/scss/_buttons.scss)0
-rw-r--r--site/static/docs/4.3/assets/scss/_callouts.scss (renamed from site/docs/4.3/assets/scss/_callouts.scss)0
-rw-r--r--site/static/docs/4.3/assets/scss/_clipboard-js.scss (renamed from site/docs/4.3/assets/scss/_clipboard-js.scss)0
-rw-r--r--site/static/docs/4.3/assets/scss/_colors.scss (renamed from site/docs/4.3/assets/scss/_colors.scss)0
-rw-r--r--site/static/docs/4.3/assets/scss/_component-examples.scss (renamed from site/docs/4.3/assets/scss/_component-examples.scss)0
-rw-r--r--site/static/docs/4.3/assets/scss/_content.scss (renamed from site/docs/4.3/assets/scss/_content.scss)0
-rw-r--r--site/static/docs/4.3/assets/scss/_footer.scss (renamed from site/docs/4.3/assets/scss/_footer.scss)0
-rw-r--r--site/static/docs/4.3/assets/scss/_masthead.scss (renamed from site/docs/4.3/assets/scss/_masthead.scss)0
-rw-r--r--site/static/docs/4.3/assets/scss/_nav.scss (renamed from site/docs/4.3/assets/scss/_nav.scss)0
-rw-r--r--site/static/docs/4.3/assets/scss/_placeholder-img.scss (renamed from site/docs/4.3/assets/scss/_placeholder-img.scss)0
-rw-r--r--site/static/docs/4.3/assets/scss/_sidebar.scss (renamed from site/docs/4.3/assets/scss/_sidebar.scss)35
-rw-r--r--site/static/docs/4.3/assets/scss/_skippy.scss (renamed from site/docs/4.3/assets/scss/_skippy.scss)0
-rw-r--r--site/static/docs/4.3/assets/scss/_syntax.scss (renamed from site/docs/4.3/assets/scss/_syntax.scss)0
-rw-r--r--site/static/docs/4.3/assets/scss/_variables.scss (renamed from site/docs/4.3/assets/scss/_variables.scss)0
-rw-r--r--site/static/docs/4.3/assets/scss/docs.scss (renamed from site/docs/4.3/assets/scss/docs.scss)6
-rw-r--r--site/static/favicon.icobin0 -> 5430 bytes
-rw-r--r--site/static/sw.js (renamed from site/sw.js)0
299 files changed, 2797 insertions, 2983 deletions
diff --git a/site/_data/docs-versions.yml b/site/_data/docs-versions.yml
deleted file mode 100644
index 3249553a6d..0000000000
--- a/site/_data/docs-versions.yml
+++ /dev/null
@@ -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
diff --git a/site/_includes/bugify.html b/site/_includes/bugify.html
deleted file mode 100644
index 7f3340421a..0000000000
--- a/site/_includes/bugify.html
+++ /dev/null
@@ -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 -%}
diff --git a/site/_includes/callout-info-prefersreducedmotion.md b/site/_includes/callout-info-prefersreducedmotion.md
deleted file mode 100644
index 9c30903769..0000000000
--- a/site/_includes/callout-info-prefersreducedmotion.md
+++ /dev/null
@@ -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" %}
diff --git a/site/_includes/callout.html b/site/_includes/callout.html
deleted file mode 100644
index 434d10e1e9..0000000000
--- a/site/_includes/callout.html
+++ /dev/null
@@ -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>
diff --git a/site/_includes/docs-navbar.html b/site/_includes/docs-navbar.html
deleted file mode 100644
index 7714d2e46b..0000000000
--- a/site/_includes/docs-navbar.html
+++ /dev/null
@@ -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>
diff --git a/site/_includes/docs-sidebar.html b/site/_includes/docs-sidebar.html
deleted file mode 100644
index d2d47a57d8..0000000000
--- a/site/_includes/docs-sidebar.html
+++ /dev/null
@@ -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>
diff --git a/site/_includes/example.html b/site/_includes/example.html
deleted file mode 100644
index dcd148b02a..0000000000
--- a/site/_includes/example.html
+++ /dev/null
@@ -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 -%}
diff --git a/site/_includes/favicons.html b/site/_includes/favicons.html
deleted file mode 100644
index df4c15e645..0000000000
--- a/site/_includes/favicons.html
+++ /dev/null
@@ -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">
diff --git a/site/_includes/footer.html b/site/_includes/footer.html
deleted file mode 100644
index 03192a861a..0000000000
--- a/site/_includes/footer.html
+++ /dev/null
@@ -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>
diff --git a/site/_includes/header.html b/site/_includes/header.html
deleted file mode 100644
index 9dbd350fc5..0000000000
--- a/site/_includes/header.html
+++ /dev/null
@@ -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 %}
diff --git a/site/_includes/icons/bootstrap-stack.svg b/site/_includes/icons/bootstrap-stack.svg
deleted file mode 100644
index c22b373838..0000000000
--- a/site/_includes/icons/bootstrap-stack.svg
+++ /dev/null
@@ -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> \ No newline at end of file
diff --git a/site/_includes/icons/bootstrap.svg b/site/_includes/icons/bootstrap.svg
deleted file mode 100644
index 7dfcf3f86c..0000000000
--- a/site/_includes/icons/bootstrap.svg
+++ /dev/null
@@ -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> \ No newline at end of file
diff --git a/site/_includes/icons/download.svg b/site/_includes/icons/download.svg
deleted file mode 100644
index 4ee80d2168..0000000000
--- a/site/_includes/icons/download.svg
+++ /dev/null
@@ -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> \ No newline at end of file
diff --git a/site/_includes/icons/github.svg b/site/_includes/icons/github.svg
deleted file mode 100644
index 0fc4c3eff4..0000000000
--- a/site/_includes/icons/github.svg
+++ /dev/null
@@ -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> \ No newline at end of file
diff --git a/site/_includes/icons/import.svg b/site/_includes/icons/import.svg
deleted file mode 100644
index 3c42c1e406..0000000000
--- a/site/_includes/icons/import.svg
+++ /dev/null
@@ -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> \ No newline at end of file
diff --git a/site/_includes/icons/lightning.svg b/site/_includes/icons/lightning.svg
deleted file mode 100644
index 5d5809e135..0000000000
--- a/site/_includes/icons/lightning.svg
+++ /dev/null
@@ -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> \ No newline at end of file
diff --git a/site/_includes/icons/menu.svg b/site/_includes/icons/menu.svg
deleted file mode 100644
index bbba4f87e1..0000000000
--- a/site/_includes/icons/menu.svg
+++ /dev/null
@@ -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> \ No newline at end of file
diff --git a/site/_includes/icons/opencollective.svg b/site/_includes/icons/opencollective.svg
deleted file mode 100644
index 5c80a9d170..0000000000
--- a/site/_includes/icons/opencollective.svg
+++ /dev/null
@@ -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> \ No newline at end of file
diff --git a/site/_includes/icons/placeholder.svg b/site/_includes/icons/placeholder.svg
deleted file mode 100644
index c3c74af893..0000000000
--- a/site/_includes/icons/placeholder.svg
+++ /dev/null
@@ -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 -}}
diff --git a/site/_includes/icons/slack.svg b/site/_includes/icons/slack.svg
deleted file mode 100644
index da05e3613f..0000000000
--- a/site/_includes/icons/slack.svg
+++ /dev/null
@@ -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> \ No newline at end of file
diff --git a/site/_includes/icons/twitter.svg b/site/_includes/icons/twitter.svg
deleted file mode 100644
index 4c2b19150d..0000000000
--- a/site/_includes/icons/twitter.svg
+++ /dev/null
@@ -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> \ No newline at end of file
diff --git a/site/_includes/scripts.html b/site/_includes/scripts.html
deleted file mode 100644
index 5b7f380b18..0000000000
--- a/site/_includes/scripts.html
+++ /dev/null
@@ -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 -%}
diff --git a/site/_includes/social.html b/site/_includes/social.html
deleted file mode 100644
index 277ee2313d..0000000000
--- a/site/_includes/social.html
+++ /dev/null
@@ -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">
diff --git a/site/_includes/stylesheet.html b/site/_includes/stylesheet.html
deleted file mode 100644
index 3846f9fe1c..0000000000
--- a/site/_includes/stylesheet.html
+++ /dev/null
@@ -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 -%}
diff --git a/site/_layouts/default.html b/site/_layouts/default.html
deleted file mode 100644
index 59f5c122b8..0000000000
--- a/site/_layouts/default.html
+++ /dev/null
@@ -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>
diff --git a/site/_layouts/docs.html b/site/_layouts/docs.html
deleted file mode 100644
index cc4910c041..0000000000
--- a/site/_layouts/docs.html
+++ /dev/null
@@ -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>
diff --git a/site/_layouts/examples.html b/site/_layouts/examples.html
deleted file mode 100644
index f7e4556e40..0000000000
--- a/site/_layouts/examples.html
+++ /dev/null
@@ -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>
diff --git a/site/_layouts/home.html b/site/_layouts/home.html
deleted file mode 100644
index 88a23d49ce..0000000000
--- a/site/_layouts/home.html
+++ /dev/null
@@ -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>
diff --git a/site/_layouts/simple.html b/site/_layouts/simple.html
deleted file mode 100644
index bbf808df33..0000000000
--- a/site/_layouts/simple.html
+++ /dev/null
@@ -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>
diff --git a/site/docs/4.3/about/brand.md b/site/content/docs/4.3/about/brand.md
index 084c36bd88..9d44edf9c4 100644
--- a/site/docs/4.3/about/brand.md
+++ b/site/content/docs/4.3/about/brand.md
@@ -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>
diff --git a/site/docs/4.3/about/license.md b/site/content/docs/4.3/about/license.md
index 39720029d7..c7f1302035 100644
--- a/site/docs/4.3/about/license.md
+++ b/site/content/docs/4.3/about/license.md
@@ -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.
diff --git a/site/docs/4.3/about/overview.md b/site/content/docs/4.3/about/overview.md
index f3460baa15..b99a41ad12 100644
--- a/site/docs/4.3/about/overview.md
+++ b/site/content/docs/4.3/about/overview.md
@@ -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.
diff --git a/site/content/docs/4.3/about/team.md b/site/content/docs/4.3/about/team.md
new file mode 100644
index 0000000000..ce4b00e953
--- /dev/null
+++ b/site/content/docs/4.3/about/team.md
@@ -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.
diff --git a/site/docs/4.3/about/translations.md b/site/content/docs/4.3/about/translations.md
index 576259d356..e719e3a842 100644
--- a/site/docs/4.3/about/translations.md
+++ b/site/content/docs/4.3/about/translations.md
@@ -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.**
diff --git a/site/docs/4.3/browser-bugs.md b/site/content/docs/4.3/browser-bugs.md
index fca303950e..32285844e3 100644
--- a/site/docs/4.3/browser-bugs.md
+++ b/site/content/docs/4.3/browser-bugs.md
@@ -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>
diff --git a/site/docs/4.3/components/alerts.md b/site/content/docs/4.3/components/alerts.md
index 1e7481a43d..8c530d0f5f 100644
--- a/site/docs/4.3/components/alerts.md
+++ b/site/content/docs/4.3/components/alerts.md
@@ -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">&times;</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">&times;</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 >}}
diff --git a/site/docs/4.3/components/badge.md b/site/content/docs/4.3/components/badge.md
index 8c17600459..0f2ec97acd 100644
--- a/site/docs/4.3/components/badge.md
+++ b/site/content/docs/4.3/components/badge.md
@@ -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 >}}
diff --git a/site/docs/4.3/components/breadcrumb.md b/site/content/docs/4.3/components/breadcrumb.md
index 0837e83633..b26b58969f 100644
--- a/site/docs/4.3/components/breadcrumb.md
+++ b/site/content/docs/4.3/components/breadcrumb.md
@@ -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
diff --git a/site/docs/4.3/components/button-group.md b/site/content/docs/4.3/components/button-group.md
index 8459dc4c26..f8eadaf707 100644
--- a/site/docs/4.3/components/button-group.md
+++ b/site/content/docs/4.3/components/button-group.md
@@ -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 >}}
diff --git a/site/docs/4.3/components/buttons.md b/site/content/docs/4.3/components/buttons.md
index f100192042..de13ae5dfa 100644
--- a/site/docs/4.3/components/buttons.md
+++ b/site/content/docs/4.3/components/buttons.md
@@ -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 >}}
diff --git a/site/docs/4.3/components/card.md b/site/content/docs/4.3/components/card.md
index fa9c6ffc15..73f1afdbdd 100644
--- a/site/docs/4.3/components/card.md
+++ b/site/content/docs/4.3/components/card.md
@@ -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 >}}
diff --git a/site/docs/4.3/components/carousel.md b/site/content/docs/4.3/components/carousel.md
index 36cea4f00b..e17db95166 100644
--- a/site/docs/4.3/components/carousel.md
+++ b/site/content/docs/4.3/components/carousel.md
@@ -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
diff --git a/site/docs/4.3/components/collapse.md b/site/content/docs/4.3/components/collapse.md
index 8a7ea3c610..b8e83d29c3 100644
--- a/site/docs/4.3/components/collapse.md
+++ b/site/content/docs/4.3/components/collapse.md
@@ -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 >}}
diff --git a/site/docs/4.3/components/dropdowns.md b/site/content/docs/4.3/components/dropdowns.md
index 865160a5c4..110400c8ae 100644
--- a/site/docs/4.3/components/dropdowns.md
+++ b/site/content/docs/4.3/components/dropdowns.md
@@ -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 >}}
diff --git a/site/docs/4.3/components/forms.md b/site/content/docs/4.3/components/forms.md
index 6c3436fd2d..3d84376e23 100644
--- a/site/docs/4.3/components/forms.md
+++ b/site/content/docs/4.3/components/forms.md
@@ -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 >}}
diff --git a/site/docs/4.3/components/input-group.md b/site/content/docs/4.3/components/input-group.md
index 1e23e7f99a..1af67621b1 100644
--- a/site/docs/4.3/components/input-group.md
+++ b/site/content/docs/4.3/components/input-group.md
@@ -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
diff --git a/site/docs/4.3/components/jumbotron.md b/site/content/docs/4.3/components/jumbotron.md
index c146215653..9810be418b 100644
--- a/site/docs/4.3/components/jumbotron.md
+++ b/site/content/docs/4.3/components/jumbotron.md
@@ -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 >}}
diff --git a/site/docs/4.3/components/list-group.md b/site/content/docs/4.3/components/list-group.md
index 251dae672e..324091d529 100644
--- a/site/docs/4.3/components/list-group.md
+++ b/site/content/docs/4.3/components/list-group.md
@@ -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 >}}
diff --git a/site/docs/4.3/components/media-object.md b/site/content/docs/4.3/components/media-object.md
index 0fbaf150b5..3f558c7af9 100644
--- a/site/docs/4.3/components/media-object.md
+++ b/site/content/docs/4.3/components/media-object.md
@@ -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 >}}
diff --git a/site/docs/4.3/components/modal.md b/site/content/docs/4.3/components/modal.md
index c46afec957..55548fe859 100644
--- a/site/docs/4.3/components/modal.md
+++ b/site/content/docs/4.3/components/modal.md
@@ -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 >}}
diff --git a/site/docs/4.3/components/navbar.md b/site/content/docs/4.3/components/navbar.md
index 6c7cfc44ba..b23d99679c 100644
--- a/site/docs/4.3/components/navbar.md
+++ b/site/content/docs/4.3/components/navbar.md
@@ -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 >}}
diff --git a/site/docs/4.3/components/navs.md b/site/content/docs/4.3/components/navs.md
index da6cc903d3..6d1f76c9c6 100644
--- a/site/docs/4.3/components/navs.md
+++ b/site/content/docs/4.3/components/navs.md
@@ -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 >}}
diff --git a/site/docs/4.3/components/pagination.md b/site/content/docs/4.3/components/pagination.md
index b1f8e58a23..3789990c00 100644
--- a/site/docs/4.3/components/pagination.md
+++ b/site/content/docs/4.3/components/pagination.md
@@ -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 >}}
diff --git a/site/docs/4.3/components/popovers.md b/site/content/docs/4.3/components/popovers.md
index b3a3a39b17..6d1cdf8a9e 100644
--- a/site/docs/4.3/components/popovers.md
+++ b/site/content/docs/4.3/components/popovers.md
@@ -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 >}}
diff --git a/site/docs/4.3/components/progress.md b/site/content/docs/4.3/components/progress.md
index e342b06d93..dcbbc66793 100644
--- a/site/docs/4.3/components/progress.md
+++ b/site/content/docs/4.3/components/progress.md
@@ -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 >}}
diff --git a/site/docs/4.3/components/scrollspy.md b/site/content/docs/4.3/components/scrollspy.md
index 44ab177751..45b02067bc 100644
--- a/site/docs/4.3/components/scrollspy.md
+++ b/site/content/docs/4.3/components/scrollspy.md
@@ -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 >}}
diff --git a/site/docs/4.3/components/spinners.md b/site/content/docs/4.3/components/spinners.md
index c165945727..c2ee20eaec 100644
--- a/site/docs/4.3/components/spinners.md
+++ b/site/content/docs/4.3/components/spinners.md
@@ -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/
diff --git a/site/docs/4.3/components/toasts.md b/site/content/docs/4.3/components/toasts.md
index 56c6848e98..3e7cc3e6de 100644
--- a/site/docs/4.3/components/toasts.md
+++ b/site/content/docs/4.3/components/toasts.md
@@ -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 >}}
diff --git a/site/docs/4.3/components/tooltips.md b/site/content/docs/4.3/components/tooltips.md
index ff1e383597..c8fa5194c1 100644
--- a/site/docs/4.3/components/tooltips.md
+++ b/site/content/docs/4.3/components/tooltips.md
@@ -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 >}}
diff --git a/site/docs/4.3/content/code.md b/site/content/docs/4.3/content/code.md
index d1ce12ccdc..c0ddf5839f 100644
--- a/site/docs/4.3/content/code.md
+++ b/site/content/docs/4.3/content/code.md
@@ -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>&lt;section&gt;</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>&lt;p&gt;Sample text here...&lt;/p&gt;
&lt;p&gt;And another line of sample text here...&lt;/p&gt;
</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 >}}
diff --git a/site/content/docs/4.3/content/figures.md b/site/content/docs/4.3/content/figures.md
new file mode 100644
index 0000000000..04a33fcc5c
--- /dev/null
+++ b/site/content/docs/4.3/content/figures.md
@@ -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 >}}
diff --git a/site/content/docs/4.3/content/images.md b/site/content/docs/4.3/content/images.md
new file mode 100644
index 0000000000..fd37b843d2
--- /dev/null
+++ b/site/content/docs/4.3/content/images.md
@@ -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 >}}
diff --git a/site/docs/4.3/content/reboot.md b/site/content/docs/4.3/content/reboot.md
index bd8070f639..38e22baaae 100644
--- a/site/docs/4.3/content/reboot.md
+++ b/site/content/docs/4.3/content/reboot.md
@@ -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.
diff --git a/site/docs/4.3/content/tables.md b/site/content/docs/4.3/content/tables.md
index 8799d47f25..b7ec0c8a64 100644
--- a/site/docs/4.3/content/tables.md
+++ b/site/content/docs/4.3/content/tables.md
@@ -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>
+ <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>
-{% 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 >}}
diff --git a/site/docs/4.3/content/typography.md b/site/content/docs/4.3/content/typography.md
index 19a783d8e7..8e88a6b3bd 100644
--- a/site/docs/4.3/content/typography.md
+++ b/site/content/docs/4.3/content/typography.md
@@ -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
diff --git a/site/docs/4.3/examples/.stylelintrc b/site/content/docs/4.3/examples/.stylelintrc
index dc76dedbde..dc76dedbde 100644
--- a/site/docs/4.3/examples/.stylelintrc
+++ b/site/content/docs/4.3/examples/.stylelintrc
diff --git a/site/content/docs/4.3/examples/_index.md b/site/content/docs/4.3/examples/_index.md
new file mode 100644
index 0000000000..e063c7a8a3
--- /dev/null
+++ b/site/content/docs/4.3/examples/_index.md
@@ -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 >}}
diff --git a/site/docs/4.3/examples/album/album.css b/site/content/docs/4.3/examples/album/album.css
index bfc270d52e..bfc270d52e 100644
--- a/site/docs/4.3/examples/album/album.css
+++ b/site/content/docs/4.3/examples/album/album.css
diff --git a/site/docs/4.3/examples/album/index.html b/site/content/docs/4.3/examples/album/index.html
index 6b3a53c315..5a500f79b5 100644
--- a/site/docs/4.3/examples/album/index.html
+++ b/site/content/docs/4.3/examples/album/index.html
@@ -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 &copy; 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>
diff --git a/site/docs/4.3/examples/blog/blog.css b/site/content/docs/4.3/examples/blog/blog.css
index f129611b5c..f129611b5c 100644
--- a/site/docs/4.3/examples/blog/blog.css
+++ b/site/content/docs/4.3/examples/blog/blog.css
diff --git a/site/docs/4.3/examples/blog/index.html b/site/content/docs/4.3/examples/blog/index.html
index ba4edd7452..06b8d2a64a 100644
--- a/site/docs/4.3/examples/blog/index.html
+++ b/site/content/docs/4.3/examples/blog/index.html
@@ -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>
diff --git a/site/docs/4.3/examples/carousel/carousel.css b/site/content/docs/4.3/examples/carousel/carousel.css
index 20300e90c6..20300e90c6 100644
--- a/site/docs/4.3/examples/carousel/carousel.css
+++ b/site/content/docs/4.3/examples/carousel/carousel.css
diff --git a/site/docs/4.3/examples/carousel/index.html b/site/content/docs/4.3/examples/carousel/index.html
index 5f63fa35fc..28116557b9 100644
--- a/site/docs/4.3/examples/carousel/index.html
+++ b/site/content/docs/4.3/examples/carousel/index.html
@@ -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 &raquo;</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 &raquo;</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 &raquo;</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>&copy; 2017-{{ site.time | date: "%Y" }} Company, Inc. &middot; <a href="#">Privacy</a> &middot; <a href="#">Terms</a></p>
+ <p>&copy; 2017-{{< year >}} Company, Inc. &middot; <a href="#">Privacy</a> &middot; <a href="#">Terms</a></p>
</footer>
</main>
diff --git a/site/docs/4.3/examples/checkout/form-validation.css b/site/content/docs/4.3/examples/checkout/form-validation.css
index 7a6246faec..7a6246faec 100644
--- a/site/docs/4.3/examples/checkout/form-validation.css
+++ b/site/content/docs/4.3/examples/checkout/form-validation.css
diff --git a/site/docs/4.3/examples/checkout/form-validation.js b/site/content/docs/4.3/examples/checkout/form-validation.js
index 59291c8b39..59291c8b39 100644
--- a/site/docs/4.3/examples/checkout/form-validation.js
+++ b/site/content/docs/4.3/examples/checkout/form-validation.js
diff --git a/site/docs/4.3/examples/checkout/index.html b/site/content/docs/4.3/examples/checkout/index.html
index 396270e742..353111883f 100644
--- a/site/docs/4.3/examples/checkout/index.html
+++ b/site/content/docs/4.3/examples/checkout/index.html
@@ -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">&copy; 2017-{{ site.time | date: "%Y" }} Company Name</p>
+ <p class="mb-1">&copy; 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>
diff --git a/site/docs/4.3/examples/cover/cover.css b/site/content/docs/4.3/examples/cover/cover.css
index 4e70a1c7a9..4e70a1c7a9 100644
--- a/site/docs/4.3/examples/cover/cover.css
+++ b/site/content/docs/4.3/examples/cover/cover.css
diff --git a/site/docs/4.3/examples/cover/index.html b/site/content/docs/4.3/examples/cover/index.html
index 0b74e4fae9..67d8e85387 100644
--- a/site/docs/4.3/examples/cover/index.html
+++ b/site/content/docs/4.3/examples/cover/index.html
@@ -1,7 +1,8 @@
---
layout: examples
title: Cover Template
-extra_css: "cover.css"
+extra_css:
+ - "cover.css"
body_class: "text-center"
include_js: false
---
diff --git a/site/docs/4.3/examples/dashboard/dashboard.css b/site/content/docs/4.3/examples/dashboard/dashboard.css
index 6b5d7b5a5a..6b5d7b5a5a 100644
--- a/site/docs/4.3/examples/dashboard/dashboard.css
+++ b/site/content/docs/4.3/examples/dashboard/dashboard.css
diff --git a/site/docs/4.3/examples/dashboard/dashboard.js b/site/content/docs/4.3/examples/dashboard/dashboard.js
index d3f5499285..d3f5499285 100644
--- a/site/docs/4.3/examples/dashboard/dashboard.js
+++ b/site/content/docs/4.3/examples/dashboard/dashboard.js
diff --git a/site/docs/4.3/examples/dashboard/index.html b/site/content/docs/4.3/examples/dashboard/index.html
index 836e29b367..f44d6b326d 100644
--- a/site/docs/4.3/examples/dashboard/index.html
+++ b/site/content/docs/4.3/examples/dashboard/index.html
@@ -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"
diff --git a/site/docs/4.3/examples/floating-labels/floating-labels.css b/site/content/docs/4.3/examples/floating-labels/floating-labels.css
index 295a7e695e..295a7e695e 100644
--- a/site/docs/4.3/examples/floating-labels/floating-labels.css
+++ b/site/content/docs/4.3/examples/floating-labels/floating-labels.css
diff --git a/site/docs/4.3/examples/floating-labels/index.html b/site/content/docs/4.3/examples/floating-labels/index.html
index d837ccaf1c..e9ad7ae370 100644
--- a/site/docs/4.3/examples/floating-labels/index.html
+++ b/site/content/docs/4.3/examples/floating-labels/index.html
@@ -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">&copy; 2017-{{ site.time | date: "%Y" }}</p>
+ <p class="mt-5 mb-3 text-muted text-center">&copy; 2017-{{< year >}}</p>
</form>
diff --git a/site/docs/4.3/examples/grid/grid.css b/site/content/docs/4.3/examples/grid/grid.css
index e726996d31..e726996d31 100644
--- a/site/docs/4.3/examples/grid/grid.css
+++ b/site/content/docs/4.3/examples/grid/grid.css
diff --git a/site/docs/4.3/examples/grid/index.html b/site/content/docs/4.3/examples/grid/index.html
index b41090438d..7fc1f70fb2 100644
--- a/site/docs/4.3/examples/grid/index.html
+++ b/site/content/docs/4.3/examples/grid/index.html
@@ -1,7 +1,8 @@
---
layout: examples
title: Grid Template
-extra_css: "grid.css"
+extra_css:
+ - "grid.css"
body_class: "py-4"
include_js: false
---
diff --git a/site/docs/4.3/examples/jumbotron/index.html b/site/content/docs/4.3/examples/jumbotron/index.html
index db8803035c..efcae9cae6 100644
--- a/site/docs/4.3/examples/jumbotron/index.html
+++ b/site/content/docs/4.3/examples/jumbotron/index.html
@@ -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>&copy; Company 2017-{{ site.time | date: "%Y" }}</p>
+ <p>&copy; Company 2017-{{< year >}}</p>
</footer>
diff --git a/site/docs/4.3/examples/jumbotron/jumbotron.css b/site/content/docs/4.3/examples/jumbotron/jumbotron.css
index d751264eff..d751264eff 100644
--- a/site/docs/4.3/examples/jumbotron/jumbotron.css
+++ b/site/content/docs/4.3/examples/jumbotron/jumbotron.css
diff --git a/site/docs/4.3/examples/navbar-bottom/index.html b/site/content/docs/4.3/examples/navbar-bottom/index.html
index 692ace0402..605d0f0305 100644
--- a/site/docs/4.3/examples/navbar-bottom/index.html
+++ b/site/content/docs/4.3/examples/navbar-bottom/index.html
@@ -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 &raquo;</a>
+ <a class="btn btn-lg btn-primary" href="/docs/{{< param docs_version >}}/components/navbar/" role="button">View navbar docs &raquo;</a>
</div>
</div>
<nav class="navbar fixed-bottom navbar-expand-sm navbar-dark bg-dark">
diff --git a/site/docs/4.3/examples/navbar-fixed/index.html b/site/content/docs/4.3/examples/navbar-fixed/index.html
index b456d768b5..94db86fbd8 100644
--- a/site/docs/4.3/examples/navbar-fixed/index.html
+++ b/site/content/docs/4.3/examples/navbar-fixed/index.html
@@ -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 &raquo;</a>
+ <a class="btn btn-lg btn-primary" href="/docs/{{< param docs_version >}}/components/navbar/" role="button">View navbar docs &raquo;</a>
</div>
</main>
diff --git a/site/docs/4.3/examples/navbar-fixed/navbar-top-fixed.css b/site/content/docs/4.3/examples/navbar-fixed/navbar-top-fixed.css
index c77c0c1475..c77c0c1475 100644
--- a/site/docs/4.3/examples/navbar-fixed/navbar-top-fixed.css
+++ b/site/content/docs/4.3/examples/navbar-fixed/navbar-top-fixed.css
diff --git a/site/docs/4.3/examples/navbar-static/index.html b/site/content/docs/4.3/examples/navbar-static/index.html
index 2f887c3454..cd34fbe734 100644
--- a/site/docs/4.3/examples/navbar-static/index.html
+++ b/site/content/docs/4.3/examples/navbar-static/index.html
@@ -1,7 +1,8 @@
---
layout: examples
title: Top navbar example
-extra_css: "navbar-top.css"
+extra_css:
+ - "navbar-top.css"
---
<nav class="navbar navbar-expand-md navbar-dark bg-dark mb-4">
@@ -32,6 +33,6 @@ extra_css: "navbar-top.css"
<div class="jumbotron">
<h1>Navbar example</h1>
<p class="lead">This example is a quick exercise to illustrate how the top-aligned navbar works. As you scroll, this navbar remains in its original position and moves with the rest of the page.</p>
- <a class="btn btn-lg btn-primary" href="{{ site.baseurl }}/docs/{{ site.docs_version }}/components/navbar/" role="button">View navbar docs &raquo;</a>
+ <a class="btn btn-lg btn-primary" href="/docs/{{< param docs_version >}}/components/navbar/" role="button">View navbar docs &raquo;</a>
</div>
</main>
diff --git a/site/docs/4.3/examples/navbar-static/navbar-top.css b/site/content/docs/4.3/examples/navbar-static/navbar-top.css
index 25bbdde094..25bbdde094 100644
--- a/site/docs/4.3/examples/navbar-static/navbar-top.css
+++ b/site/content/docs/4.3/examples/navbar-static/navbar-top.css
diff --git a/site/docs/4.3/examples/navbars/index.html b/site/content/docs/4.3/examples/navbars/index.html
index 66bbc62e73..6483435497 100644
--- a/site/docs/4.3/examples/navbars/index.html
+++ b/site/content/docs/4.3/examples/navbars/index.html
@@ -1,7 +1,8 @@
---
layout: examples
title: Navbar Template
-extra_css: "navbar.css"
+extra_css:
+ - "navbar.css"
---
<nav class="navbar navbar-dark bg-dark">
@@ -312,10 +313,10 @@ extra_css: "navbar.css"
<div class="jumbotron">
<div class="col-sm-8 mx-auto">
<h1>Navbar examples</h1>
- <p>This example is a quick exercise to illustrate how the navbar and its contents work. Some navbars extend the width of the viewport, others are confined within a <code>.container</code>. For positioning of navbars, checkout the <a href="{{ site.baseurl }}/docs/{{ site.docs_version }}/examples/navbar-static/">top</a> and <a href="{{ site.baseurl }}/docs/{{ site.docs_version }}/examples/navbar-fixed/">fixed top</a> examples.</p>
+ <p>This example is a quick exercise to illustrate how the navbar and its contents work. Some navbars extend the width of the viewport, others are confined within a <code>.container</code>. For positioning of navbars, checkout the <a href="/docs/{{< param docs_version >}}/examples/navbar-static/">top</a> and <a href="/docs/{{< param docs_version >}}/examples/navbar-fixed/">fixed top</a> examples.</p>
<p>At the smallest breakpoint, the collapse plugin is used to hide the links and show a menu button to toggle the collapsed content.</p>
<p>
- <a class="btn btn-primary" href="{{ site.baseurl }}/docs/{{ site.docs_version }}/components/navbar/" role="button">View navbar docs &raquo;</a>
+ <a class="btn btn-primary" href="/docs/{{< param docs_version >}}/components/navbar/" role="button">View navbar docs &raquo;</a>
</p>
</div>
</div>
diff --git a/site/docs/4.3/examples/navbars/navbar.css b/site/content/docs/4.3/examples/navbars/navbar.css
index 70d209409d..70d209409d 100644
--- a/site/docs/4.3/examples/navbars/navbar.css
+++ b/site/content/docs/4.3/examples/navbars/navbar.css
diff --git a/site/docs/4.3/examples/offcanvas/index.html b/site/content/docs/4.3/examples/offcanvas/index.html
index 662ab2d47d..0e529d8194 100644
--- a/site/docs/4.3/examples/offcanvas/index.html
+++ b/site/content/docs/4.3/examples/offcanvas/index.html
@@ -1,8 +1,10 @@
---
layout: examples
title: Offcanvas template
-extra_css: "offcanvas.css"
-extra_js: "offcanvas.js"
+extra_css:
+ - "offcanvas.css"
+extra_js:
+ - "offcanvas.js"
body_class: "bg-light"
---
@@ -61,7 +63,7 @@ body_class: "bg-light"
<main role="main" class="container">
<div class="d-flex align-items-center p-3 my-3 text-white-50 bg-purple rounded shadow-sm">
- <img class="mr-3" src="{{ site.baseurl }}/docs/{{ site.docs_version }}/assets/brand/bootstrap-outline.svg" alt="" width="48" height="48">
+ <img class="mr-3" src="/docs/{{< param docs_version >}}/assets/brand/bootstrap-outline.svg" alt="" width="48" height="48">
<div class="lh-100">
<h6 class="mb-0 text-white lh-100">Bootstrap</h6>
<small>Since 2011</small>
@@ -71,21 +73,21 @@ body_class: "bg-light"
<div class="my-3 p-3 bg-white rounded shadow-sm">
<h6 class="border-bottom border-gray pb-2 mb-0">Recent updates</h6>
<div class="media text-muted pt-3">
- {% include icons/placeholder.svg width="32" height="32" background="#007bff" color="#007bff" class="mr-2 rounded" %}
+ {{< placeholder width="32" height="32" background="#007bff" color="#007bff" class="mr-2 rounded" >}}
<p class="media-body pb-3 mb-0 small lh-125 border-bottom border-gray">
<strong class="d-block text-gray-dark">@username</strong>
Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.
</p>
</div>
<div class="media text-muted pt-3">
- {% include icons/placeholder.svg width="32" height="32" background="#e83e8c" color="#e83e8c" class="mr-2 rounded" %}
+ {{< placeholder width="32" height="32" background="#e83e8c" color="#e83e8c" class="mr-2 rounded" >}}
<p class="media-body pb-3 mb-0 small lh-125 border-bottom border-gray">
<strong class="d-block text-gray-dark">@username</strong>
Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.
</p>
</div>
<div class="media text-muted pt-3">
- {% include icons/placeholder.svg width="32" height="32" background="#6f42c1" color="#6f42c1" class="mr-2 rounded" %}
+ {{< placeholder width="32" height="32" background="#6f42c1" color="#6f42c1" class="mr-2 rounded" >}}
<p class="media-body pb-3 mb-0 small lh-125 border-bottom border-gray">
<strong class="d-block text-gray-dark">@username</strong>
Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.
@@ -99,7 +101,7 @@ body_class: "bg-light"
<div class="my-3 p-3 bg-white rounded shadow-sm">
<h6 class="border-bottom border-gray pb-2 mb-0">Suggestions</h6>
<div class="media text-muted pt-3">
- {% include icons/placeholder.svg width="32" height="32" background="#007bff" color="#007bff" class="mr-2 rounded" %}
+ {{< placeholder width="32" height="32" background="#007bff" color="#007bff" class="mr-2 rounded" >}}
<div class="media-body pb-3 mb-0 small lh-125 border-bottom border-gray">
<div class="d-flex justify-content-between align-items-center w-100">
<strong class="text-gray-dark">Full Name</strong>
@@ -109,7 +111,7 @@ body_class: "bg-light"
</div>
</div>
<div class="media text-muted pt-3">
- {% include icons/placeholder.svg width="32" height="32" background="#007bff" color="#007bff" class="mr-2 rounded" %}
+ {{< placeholder width="32" height="32" background="#007bff" color="#007bff" class="mr-2 rounded" >}}
<div class="media-body pb-3 mb-0 small lh-125 border-bottom border-gray">
<div class="d-flex justify-content-between align-items-center w-100">
<strong class="text-gray-dark">Full Name</strong>
@@ -119,7 +121,7 @@ body_class: "bg-light"
</div>
</div>
<div class="media text-muted pt-3">
- {% include icons/placeholder.svg width="32" height="32" background="#007bff" color="#007bff" class="mr-2 rounded" %}
+ {{< placeholder width="32" height="32" background="#007bff" color="#007bff" class="mr-2 rounded" >}}
<div class="media-body pb-3 mb-0 small lh-125 border-bottom border-gray">
<div class="d-flex justify-content-between align-items-center w-100">
<strong class="text-gray-dark">Full Name</strong>
diff --git a/site/docs/4.3/examples/offcanvas/offcanvas.css b/site/content/docs/4.3/examples/offcanvas/offcanvas.css
index 8779dc3764..8779dc3764 100644
--- a/site/docs/4.3/examples/offcanvas/offcanvas.css
+++ b/site/content/docs/4.3/examples/offcanvas/offcanvas.css
diff --git a/site/docs/4.3/examples/offcanvas/offcanvas.js b/site/content/docs/4.3/examples/offcanvas/offcanvas.js
index 242849afd8..242849afd8 100644
--- a/site/docs/4.3/examples/offcanvas/offcanvas.js
+++ b/site/content/docs/4.3/examples/offcanvas/offcanvas.js
diff --git a/site/docs/4.3/examples/pricing/index.html b/site/content/docs/4.3/examples/pricing/index.html
index 395242d6bd..5cd295a80e 100644
--- a/site/docs/4.3/examples/pricing/index.html
+++ b/site/content/docs/4.3/examples/pricing/index.html
@@ -1,7 +1,8 @@
---
layout: examples
title: Pricing example
-extra_css: "pricing.css"
+extra_css:
+ - "pricing.css"
include_js: false
---
@@ -73,8 +74,8 @@ include_js: false
<footer class="pt-4 my-md-5 pt-md-5 border-top">
<div class="row">
<div class="col-12 col-md">
- <img class="mb-2" src="{{ site.baseurl }}/docs/{{ site.docs_version }}/assets/brand/bootstrap-solid.svg" alt="" width="24" height="24">
- <small class="d-block mb-3 text-muted">&copy; 2017-{{ site.time | date: "%Y" }}</small>
+ <img class="mb-2" src="/docs/{{< param docs_version >}}/assets/brand/bootstrap-solid.svg" alt="" width="24" height="24">
+ <small class="d-block mb-3 text-muted">&copy; 2017-{{< year >}}</small>
</div>
<div class="col-6 col-md">
<h5>Features</h5>
diff --git a/site/docs/4.3/examples/pricing/pricing.css b/site/content/docs/4.3/examples/pricing/pricing.css
index cbf0ec013a..cbf0ec013a 100644
--- a/site/docs/4.3/examples/pricing/pricing.css
+++ b/site/content/docs/4.3/examples/pricing/pricing.css
diff --git a/site/docs/4.3/examples/product/index.html b/site/content/docs/4.3/examples/product/index.html
index 8179b921e5..f9b6915d34 100644
--- a/site/docs/4.3/examples/product/index.html
+++ b/site/content/docs/4.3/examples/product/index.html
@@ -1,7 +1,8 @@
---
layout: examples
title: Product example
-extra_css: "product.css"
+extra_css:
+ - "product.css"
---
<nav class="site-header sticky-top py-1">
@@ -101,7 +102,7 @@ extra_css: "product.css"
<div class="row">
<div class="col-12 col-md">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" class="d-block mb-2" role="img" viewBox="0 0 24 24"><title>Product</title><circle cx="12" cy="12" r="10"/><path d="M14.31 8l5.74 9.94M9.69 8h11.48M7.38 12l5.74-9.94M9.69 16L3.95 6.06M14.31 16H2.83m13.79-4l-5.74 9.94"/></svg>
- <small class="d-block mb-3 text-muted">&copy; 2017-{{ site.time | date: "%Y" }}</small>
+ <small class="d-block mb-3 text-muted">&copy; 2017-{{< year >}}</small>
</div>
<div class="col-6 col-md">
<h5>Features</h5>
diff --git a/site/docs/4.3/examples/product/product.css b/site/content/docs/4.3/examples/product/product.css
index 62110018ef..62110018ef 100644
--- a/site/docs/4.3/examples/product/product.css
+++ b/site/content/docs/4.3/examples/product/product.css
diff --git a/site/docs/4.3/examples/sign-in/index.html b/site/content/docs/4.3/examples/sign-in/index.html
index ac480c8172..c49ad12b0a 100644
--- a/site/docs/4.3/examples/sign-in/index.html
+++ b/site/content/docs/4.3/examples/sign-in/index.html
@@ -1,13 +1,14 @@
---
layout: examples
title: Signin Template
-extra_css: "signin.css"
+extra_css:
+ - "signin.css"
body_class: "text-center"
include_js: false
---
<form class="form-signin">
- <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">Please sign in</h1>
<label for="inputEmail" class="sr-only">Email address</label>
<input type="email" id="inputEmail" class="form-control" placeholder="Email address" required autofocus>
@@ -19,5 +20,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">&copy; 2017-{{ site.time | date: "%Y" }}</p>
+ <p class="mt-5 mb-3 text-muted">&copy; 2017-{{< year >}}</p>
</form>
diff --git a/site/docs/4.3/examples/sign-in/signin.css b/site/content/docs/4.3/examples/sign-in/signin.css
index eaa08ba618..eaa08ba618 100644
--- a/site/docs/4.3/examples/sign-in/signin.css
+++ b/site/content/docs/4.3/examples/sign-in/signin.css
diff --git a/site/docs/4.3/examples/starter-template/index.html b/site/content/docs/4.3/examples/starter-template/index.html
index 819f9d919a..001d1e60ec 100644
--- a/site/docs/4.3/examples/starter-template/index.html
+++ b/site/content/docs/4.3/examples/starter-template/index.html
@@ -1,7 +1,8 @@
---
layout: examples
title: Starter Template
-extra_css: "starter-template.css"
+extra_css:
+ - "starter-template.css"
---
<nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top">
diff --git a/site/docs/4.3/examples/starter-template/starter-template.css b/site/content/docs/4.3/examples/starter-template/starter-template.css
index 5f64cd294e..5f64cd294e 100644
--- a/site/docs/4.3/examples/starter-template/starter-template.css
+++ b/site/content/docs/4.3/examples/starter-template/starter-template.css
diff --git a/site/docs/4.3/examples/sticky-footer-navbar/index.html b/site/content/docs/4.3/examples/sticky-footer-navbar/index.html
index cd01e0bbdb..1eeee68e00 100644
--- a/site/docs/4.3/examples/sticky-footer-navbar/index.html
+++ b/site/content/docs/4.3/examples/sticky-footer-navbar/index.html
@@ -1,7 +1,8 @@
---
layout: examples
title: Sticky Footer Navbar Template
-extra_css: "sticky-footer-navbar.css"
+extra_css:
+ - "sticky-footer-navbar.css"
html_class: "h-100"
body_class: "d-flex flex-column h-100"
---
@@ -38,7 +39,7 @@ body_class: "d-flex flex-column h-100"
<div class="container">
<h1 class="mt-5">Sticky footer with fixed navbar</h1>
<p class="lead">Pin a footer to the bottom of the viewport in desktop browsers with this custom HTML and CSS. A fixed navbar has been added with <code>padding-top: 60px;</code> on the <code>main &gt; .container</code>.</p>
- <p>Back to <a href="{{ site.baseurl }}/docs/{{ site.docs_version }}/examples/sticky-footer/">the default sticky footer</a> minus the navbar.</p>
+ <p>Back to <a href="/docs/{{< param docs_version >}}/examples/sticky-footer/">the default sticky footer</a> minus the navbar.</p>
</div>
</main>
diff --git a/site/docs/4.3/examples/sticky-footer-navbar/sticky-footer-navbar.css b/site/content/docs/4.3/examples/sticky-footer-navbar/sticky-footer-navbar.css
index b4696dab6e..b4696dab6e 100644
--- a/site/docs/4.3/examples/sticky-footer-navbar/sticky-footer-navbar.css
+++ b/site/content/docs/4.3/examples/sticky-footer-navbar/sticky-footer-navbar.css
diff --git a/site/docs/4.3/examples/sticky-footer/index.html b/site/content/docs/4.3/examples/sticky-footer/index.html
index 0d684ce924..a27b40c4d1 100644
--- a/site/docs/4.3/examples/sticky-footer/index.html
+++ b/site/content/docs/4.3/examples/sticky-footer/index.html
@@ -1,7 +1,8 @@
---
layout: examples
title: Sticky Footer Template
-extra_css: "sticky-footer.css"
+extra_css:
+ - "sticky-footer.css"
html_class: "h-100"
body_class: "d-flex flex-column h-100"
include_js: false
@@ -12,7 +13,7 @@ include_js: false
<div class="container">
<h1 class="mt-5">Sticky footer</h1>
<p class="lead">Pin a footer to the bottom of the viewport in desktop browsers with this custom HTML and CSS.</p>
- <p>Use <a href="{{ site.baseurl }}/docs/{{ site.docs_version }}/examples/sticky-footer-navbar/">the sticky footer with a fixed navbar</a> if need be, too.</p>
+ <p>Use <a href="/docs/{{< param docs_version >}}/examples/sticky-footer-navbar/">the sticky footer with a fixed navbar</a> if need be, too.</p>
</div>
</main>
diff --git a/site/docs/4.3/examples/sticky-footer/sticky-footer.css b/site/content/docs/4.3/examples/sticky-footer/sticky-footer.css
index 7e85cdd2aa..7e85cdd2aa 100644
--- a/site/docs/4.3/examples/sticky-footer/sticky-footer.css
+++ b/site/content/docs/4.3/examples/sticky-footer/sticky-footer.css
diff --git a/site/docs/4.3/extend/approach.md b/site/content/docs/4.3/extend/approach.md
index 53443d7f83..0a65229713 100644
--- a/site/docs/4.3/extend/approach.md
+++ b/site/content/docs/4.3/extend/approach.md
@@ -3,12 +3,13 @@ layout: docs
title: Approach
description: Learn about the guiding principles, strategies, and techniques used to build and maintain Bootstrap so you can more easily customize and extend it yourself.
group: extend
-redirect_from: "/docs/4.3/extend/"
+aliases:
+ - "/docs/4.3/extend/"
---
While the getting started pages provide an introductory tour of the project and what it offers, this document focuses on _why_ we do the things we do in Bootstrap. It explains our philosophy to building on the web so that others can learn from us, contribute with us, and help us improve.
-See something that doesn't sound right, or perhaps could be done better? [Open an issue]({{ site.repo }}/issues/new)—we'd love to discuss it with you.
+See something that doesn't sound right, or perhaps could be done better? [Open an issue]({{< param repo >}}/issues/new)—we'd love to discuss it with you.
## Summary
@@ -54,13 +55,13 @@ Bootstrap includes several components that function as an overlay of some kind.
Each overlay component increases it's `z-index` value slightly in such a way that common UI principles allow user focused or hovered elements to remain in view at all times. For example, a modal is document blocking (e.g., you cannot take any other action save for the modal's action), so we put that above our navbars.
-Learn more about this in our [`z-index` layout page]({{ site.baseurl }}/docs/{{ site.docs_version }}/layout/overview/#z-index).
+Learn more about this in our [`z-index` layout page](/docs/{{< param docs_version >}}/layout/overview/#z-index).
## HTML and CSS over JS
Whenever possible, we prefer to write HTML and CSS over JavaScript. In general, HTML and CSS are more prolific and accessible to more people of all different experience levels. HTML and CSS are also faster in your browser than JavaScript, and your browser generally provides a great deal of functionality for you.
-This principle is our first-class JavaScript API is `data` attributes. You don't need to write nearly any JavaScript to use our JavaScript plugins; instead, write HTML. Read more about this in [our JavaScript overview page]({{ site.baseurl }}/docs/{{ site.docs_version }}/getting-started/javascript/#data-attributes).
+This principle is our first-class JavaScript API is `data` attributes. You don't need to write nearly any JavaScript to use our JavaScript plugins; instead, write HTML. Read more about this in [our JavaScript overview page](/docs/{{< param docs_version >}}/getting-started/javascript/#data-attributes).
Lastly, our styles build on the fundamental behaviors of common web elements. Whenever possible, we prefer to use what the browser provides. For example, you can put a `.btn` class on nearly any element, but most elements don't provide any semantic value or browser functionality. So instead, we use `<button>`s and `<a>`s.
diff --git a/site/docs/4.3/extend/icons.md b/site/content/docs/4.3/extend/icons.md
index 9acdbeb866..9acdbeb866 100644
--- a/site/docs/4.3/extend/icons.md
+++ b/site/content/docs/4.3/extend/icons.md
diff --git a/site/docs/4.3/getting-started/accessibility.md b/site/content/docs/4.3/getting-started/accessibility.md
index edfe914dff..83dd3a9f35 100644
--- a/site/docs/4.3/getting-started/accessibility.md
+++ b/site/content/docs/4.3/getting-started/accessibility.md
@@ -30,18 +30,18 @@ Most colors that currently make up Bootstrap's default palette—used throughout
Content which should be visually hidden, but remain accessible to assistive technologies such as screen readers, can be styled using the `.sr-only` class. This can be useful in situations where additional visual information or cues (such as meaning denoted through the use of color) need to also be conveyed to non-visual users.
-{% highlight html %}
+{{< highlight html >}}
<p class="text-danger">
<span class="sr-only">Danger: </span>
This action is not reversible
</p>
-{% endhighlight %}
+{{< /highlight >}}
For visually hidden interactive controls, such as traditional "skip" links, `.sr-only` can be combined with the `.sr-only-focusable` class. This will ensure that the control becomes visible once focused (for sighted keyboard users).
-{% highlight html %}
+{{< highlight html >}}
<a class="sr-only sr-only-focusable" href="#content">Skip to main content</a>
-{% endhighlight %}
+{{< /highlight >}}
### Reduced motion
diff --git a/site/docs/4.3/getting-started/best-practices.md b/site/content/docs/4.3/getting-started/best-practices.md
index 1e7af39ee9..e17fc1290a 100644
--- a/site/docs/4.3/getting-started/best-practices.md
+++ b/site/content/docs/4.3/getting-started/best-practices.md
@@ -7,10 +7,9 @@ group: getting-started
We've designed and developed Bootstrap to work in a number of environments. Here are some of the best practices we've gathered from years of working on and using it ourselves.
-{% capture callout %}
+{{< callout info >}}
**Heads up!** This copy is a work in progress.
-{% endcapture %}
-{% include callout.html content=callout type="info" %}
+{{< /callout >}}
### General outline
diff --git a/site/docs/4.3/getting-started/browsers-devices.md b/site/content/docs/4.3/getting-started/browsers-devices.md
index c9f5a4ac62..ccbdf3ac0b 100644
--- a/site/docs/4.3/getting-started/browsers-devices.md
+++ b/site/content/docs/4.3/getting-started/browsers-devices.md
@@ -12,9 +12,9 @@ Bootstrap supports the **latest, stable releases** of all major browsers and pla
Alternative browsers which use the latest version of WebKit, Blink, or Gecko, whether directly or via the platform's web view API, are not explicitly supported. However, Bootstrap should (in most cases) display and function correctly in these browsers as well. More specific support information is provided below.
-You can find our supported range of browsers and their versions [in our `.browserslistrc file`]({{ site.repo }}/blob/v{{ site.current_version }}/.browserslistrc):
+You can find our supported range of browsers and their versions [in our `.browserslistrc file`]({{< param repo >}}/blob/v{{< param current_version >}}/.browserslistrc):
-```
+```text
# https://github.com/browserslist/browserslist#readme
>= 1%
@@ -116,11 +116,11 @@ For Firefox, in addition to the latest normal stable release, we also support th
Unofficially, Bootstrap should look and behave well enough in Chromium and Chrome for Linux, Firefox for Linux, and Internet Explorer 9, though they are not officially supported.
-For a list of some of the browser bugs that Bootstrap has to grapple with, see our [Wall of browser bugs]({{ site.baseurl }}/docs/{{ site.docs_version }}/browser-bugs/).
+For a list of some of the browser bugs that Bootstrap has to grapple with, see our [Wall of browser bugs](/docs/{{< param docs_version >}}/browser-bugs/).
## Internet Explorer
-Internet Explorer 11 is not supported officially. However, if you build Bootstrap yourself, you can add the needed CSS prefixes and follow the instructions on the [JavaScript page]({{ site.baseurl }}/docs/{{ site.docs_version }}/getting-started/javascript/#compatibility-with-ie-11). Please note that this might break at any time. **If you require Internet Explorer 10/11 support, use Bootstrap 4.**
+Internet Explorer 11 is not supported officially. However, if you build Bootstrap yourself, you can add the needed CSS prefixes and follow the instructions on the [JavaScript page](/docs/{{< param docs_version >}}/getting-started/javascript/#compatibility-with-ie-11). Please note that this might break at any time. **If you require Internet Explorer 10/11 support, use Bootstrap 4.**
## Modals and dropdowns on mobile
@@ -150,15 +150,15 @@ Throughout our v4 alpha and beta releases, we included incomplete and commented
Even in some modern browsers, printing can be quirky.
-As of Safari v8.0, use of the fixed-width `.container` class can cause Safari to use an unusually small font size when printing. See [issue #14868]({{ site.repo }}/issues/14868) and [WebKit bug #138192](https://bugs.webkit.org/show_bug.cgi?id=138192) for more details. One potential workaround is the following CSS:
+As of Safari v8.0, use of the fixed-width `.container` class can cause Safari to use an unusually small font size when printing. See [issue #14868]({{< param repo >}}/issues/14868) and [WebKit bug #138192](https://bugs.webkit.org/show_bug.cgi?id=138192) for more details. One potential workaround is the following CSS:
-{% highlight css %}
+{{< highlight css >}}
@media print {
.container {
width: auto;
}
}
-{% endhighlight %}
+{{< /highlight >}}
## Android stock browser
@@ -168,7 +168,7 @@ Out of the box, Android 4.1 (and even some newer releases apparently) ship with
On `<select>` elements, the Android stock browser will not display the side controls if there is a `border-radius` and/or `border` applied. (See [this StackOverflow question](https://stackoverflow.com/questions/14744437/html-select-box-not-showing-drop-down-arrow-on-android-version-4-0-when-set-with) for details.) Use the snippet of code below to remove the offending CSS and render the `<select>` as an unstyled element on the Android stock browser. The user agent sniffing avoids interference with Chrome, Safari, and Mozilla browsers.
-{% highlight html %}
+{{< highlight html >}}
<script>
$(function () {
var nua = navigator.userAgent
@@ -178,7 +178,7 @@ $(function () {
}
})
</script>
-{% endhighlight %}
+{{< /highlight >}}
Want to see an example? [Check out this JS Bin demo](http://jsbin.com/OyaqoDO/2).
diff --git a/site/docs/4.3/getting-started/build-tools.md b/site/content/docs/4.3/getting-started/build-tools.md
index cf7a24353b..a52dc44205 100644
--- a/site/docs/4.3/getting-started/build-tools.md
+++ b/site/content/docs/4.3/getting-started/build-tools.md
@@ -8,23 +8,18 @@ toc: true
## Tooling setup
-Bootstrap uses [npm scripts](https://docs.npmjs.com/misc/scripts) for its build system. Our [package.json]({{ site.repo }}/blob/v{{ site.current_version }}/package.json) includes convenient methods for working with the framework, including compiling code, running tests, and more.
+Bootstrap uses [npm scripts](https://docs.npmjs.com/misc/scripts) for its build system. Our [package.json]({{< param repo >}}/blob/v{{< param current_version >}}/package.json) includes convenient methods for working with the framework, including compiling code, running tests, and more.
To use our build system and run our documentation locally, you'll need a copy of Bootstrap's source files and Node. Follow these steps and you should be ready to rock:
1. [Download and install Node.js](https://nodejs.org/en/download/), which we use to manage our dependencies.
-2. Navigate to the root `/bootstrap` directory and run `npm install` to install our local dependencies listed in [package.json]({{ site.repo }}/blob/v{{ site.current_version }}/package.json).
-3. [Install Ruby][install-ruby], install [Bundler][gembundler] with `gem install bundler`, and finally run `bundle install`. This will install all Ruby dependencies, such as Jekyll and plugins.
- - **Windows users:** Read [this guide](https://jekyllrb.com/docs/windows/) to get Jekyll up and running without problems.
+2. Navigate to the root `/bootstrap` directory and run `npm install` to install our local dependencies listed in [package.json]({{< param repo >}}/blob/v{{< param current_version >}}/package.json).
When completed, you'll be able to run the various commands provided from the command line.
-[install-ruby]: https://www.ruby-lang.org/en/documentation/installation/
-[gembundler]: https://bundler.io/
-
## Using npm scripts
-Our [package.json]({{ site.repo }}/blob/v{{ site.current_version }}/package.json) includes the following commands and tasks:
+Our [package.json]({{< param repo >}}/blob/v{{< param current_version >}}/package.json) includes the following commands and tasks:
| Task | Description |
| --- | --- |
@@ -38,17 +33,17 @@ Run `npm run` to see all the npm scripts.
Bootstrap uses [Autoprefixer][autoprefixer] (included in our build process) to automatically add vendor prefixes to some CSS properties at build time. Doing so saves us time and code by allowing us to write key parts of our CSS a single time while eliminating the need for vendor mixins like those found in v3.
-We maintain the list of browsers supported through Autoprefixer in a separate file within our GitHub repository. See [.browserslistrc]({{ site.repo }}/blob/v{{ site.current_version }}/.browserslistrc) for details.
+We maintain the list of browsers supported through Autoprefixer in a separate file within our GitHub repository. See [.browserslistrc]({{< param repo >}}/blob/v{{< param current_version >}}/.browserslistrc) for details.
## Local documentation
-Running our documentation locally requires the use of Jekyll, a decently flexible static site generator that provides us: basic includes, Markdown-based files, templates, and more. Here's how to get it started:
+Running our documentation locally requires the use of Hugo, which gets installed via the [hugo-bin](https://www.npmjs.com/package/hugo-bin) npm package. Hugo is a blazingly fast and quite extensible static site generator that provides us: basic includes, Markdown-based files, templates, and more. Here's how to get it started:
-1. Run through the [tooling setup](#tooling-setup) above to install Jekyll (the site builder) and other Ruby dependencies with `bundle install`.
+1. Run through the [tooling setup](#tooling-setup) above to install all dependencies.
2. From the root `/bootstrap` directory, run `npm run docs-serve` in the command line.
-3. Open `http://localhost:9001` in your browser, and voilà.
+3. Open `http://localhost:9001/` in your browser, and voilà.
-Learn more about using Jekyll by reading its [documentation](https://jekyllrb.com/docs/).
+Learn more about using Hugo by reading its [documentation](https://gohugo.io/documentation/).
## Troubleshooting
diff --git a/site/docs/4.3/getting-started/contents.md b/site/content/docs/4.3/getting-started/contents.md
index efaee638cc..586ebe9268 100644
--- a/site/docs/4.3/getting-started/contents.md
+++ b/site/content/docs/4.3/getting-started/contents.md
@@ -12,7 +12,7 @@ Once downloaded, unzip the compressed folder and you'll see something like this:
<!-- NOTE: This info is intentionally duplicated in the README. Copy any changes made here over to the README too, but be sure to keep in mind to add the `dist` folder. -->
-{% highlight plaintext %}
+{{< highlight text >}}
bootstrap/
├── css/
│ ├── bootstrap-grid.css
@@ -40,7 +40,7 @@ bootstrap/
├── bootstrap.js.map
├── bootstrap.min.js
└── bootstrap.min.js.map
-{% endhighlight %}
+{{< /highlight >}}
This is the most basic form of Bootstrap: precompiled files for quick drop-in usage in nearly any web project. We provide compiled CSS and JS (`bootstrap.*`), as well as compiled and minified CSS and JS (`bootstrap.min.*`). [source maps](https://developers.google.com/web/tools/chrome-devtools/javascript/source-maps) (`bootstrap.*.map`) are available for use with certain browsers' developer tools. Bundled JS files (`bootstrap.bundle.js` and minified `bootstrap.bundle.min.js`) include [Popper](https://popper.js.org/).
@@ -74,10 +74,10 @@ Bootstrap includes a handful of options for including some or all of our compile
<div><code class="font-weight-normal text-nowrap">bootstrap-grid.css</code></div>
<div><code class="font-weight-normal text-nowrap">bootstrap-grid.min.css</code></div>
</th>
- <td><a class="text-warning" href="{{ site.baseurl }}/docs/{{ site.docs_version }}/layout/grid/">Only grid system</a></td>
+ <td><a class="text-warning" href="/docs/{{< param docs_version >}}/layout/grid/">Only grid system</a></td>
<td class="bg-light text-muted">Not included</td>
<td class="bg-light text-muted">Not included</td>
- <td><a class="text-warning" href="{{ site.baseurl }}/docs/{{ site.docs_version }}/utilities/flex/">Only flex utilities</a></td>
+ <td><a class="text-warning" href="/docs/{{< param docs_version >}}/utilities/flex/">Only flex utilities</a></td>
</tr>
<tr>
<th scope="row">
@@ -85,7 +85,7 @@ Bootstrap includes a handful of options for including some or all of our compile
<div><code class="font-weight-normal text-nowrap">bootstrap-reboot.min.css</code></div>
</th>
<td class="bg-light text-muted">Not included</td>
- <td><a class="text-warning" href="{{ site.baseurl }}/docs/{{ site.docs_version }}/content/reboot/">Only Reboot</a></td>
+ <td><a class="text-warning" href="/docs/{{< param docs_version >}}/content/reboot/">Only Reboot</a></td>
<td class="bg-light text-muted">Not included</td>
<td class="bg-light text-muted">Not included</td>
</tr>
@@ -125,17 +125,18 @@ Similarly, we have options for including some or all of our compiled JavaScript.
The Bootstrap source code download includes the precompiled CSS and JavaScript assets, along with source Sass, JavaScript, and documentation. More specifically, it includes the following and more:
-{% highlight plaintext %}
+{{< highlight text >}}
bootstrap/
├── dist/
│ ├── css/
│ └── js/
├── site/
-│ └──docs/
-│ └── 4.3/
-│ └── examples/
+│ └──content/
+│ └── docs/
+│ └── 4.3/
+│ └── examples/
├── js/
└── scss/
-{% endhighlight %}
+{{< /highlight >}}
The `scss/` and `js/` are the source code for our CSS and JavaScript. The `dist/` folder includes everything listed in the precompiled download section above. The `site/docs/` folder includes the source code for our documentation, and `examples/` of Bootstrap usage. Beyond that, any other included file provides support for packages, license information, and development.
diff --git a/site/docs/4.3/getting-started/download.md b/site/content/docs/4.3/getting-started/download.md
index c93a94bb45..580658788c 100644
--- a/site/docs/4.3/getting-started/download.md
+++ b/site/content/docs/4.3/getting-started/download.md
@@ -8,14 +8,14 @@ toc: true
## Compiled CSS and JS
-Download ready-to-use compiled code for **Bootstrap v{{ site.current_version}}** to easily drop into your project, which includes:
+Download ready-to-use compiled code for **Bootstrap v{{< param current_version >}}** to easily drop into your project, which includes:
-- Compiled and minified CSS bundles (see [CSS files comparison]({{ site.baseurl }}/docs/{{ site.docs_version }}/getting-started/contents/#css-files))
+- Compiled and minified CSS bundles (see [CSS files comparison](/docs/{{< param docs_version >}}/getting-started/contents/#css-files))
- Compiled and minified JavaScript plugins
This doesn't include documentation, source files, or any optional JavaScript dependencies like Popper.js.
-<a href="{{ site.download.dist }}" class="btn btn-bd-primary" onclick="ga('send', 'event', 'Getting started', 'Download', 'Download Bootstrap');">Download</a>
+<a href="{{< param "download.dist" >}}" class="btn btn-bd-primary" onclick="ga('send', 'event', 'Getting started', 'Download', 'Download Bootstrap');">Download</a>
## Source files
@@ -24,24 +24,24 @@ Compile Bootstrap with your own asset pipeline by downloading our source Sass, J
- Sass compiler (Libsass or Ruby Sass is supported) for compiling your CSS.
- [Autoprefixer](https://github.com/postcss/autoprefixer) for CSS vendor prefixing
-Should you require [build tools]({{ site.baseurl }}/docs/{{ site.docs_version }}/getting-started/build-tools/#tooling-setup), they are included for developing Bootstrap and its docs, but they're likely unsuitable for your own purposes.
+Should you require [build tools](/docs/{{< param docs_version >}}/getting-started/build-tools/#tooling-setup), they are included for developing Bootstrap and its docs, but they're likely unsuitable for your own purposes.
-<a href="{{ site.download.source }}" class="btn btn-bd-primary" onclick="ga('send', 'event', 'Getting started', 'Download', 'Download source');">Download source</a>
+<a href="{{< param "download.source" >}}" class="btn btn-bd-primary" onclick="ga('send', 'event', 'Getting started', 'Download', 'Download source');">Download source</a>
## BootstrapCDN
Skip the download with [BootstrapCDN](https://www.bootstrapcdn.com/) to deliver cached version of Bootstrap's compiled CSS and JS to your project.
-{% highlight html %}
-<link rel="stylesheet" href="{{ site.cdn.css }}" integrity="{{ site.cdn.css_hash }}" crossorigin="anonymous">
-<script src="{{ site.cdn.js }}" integrity="{{ site.cdn.js_hash }}" crossorigin="anonymous"></script>
-{% endhighlight %}
+{{< highlight html >}}
+<link rel="stylesheet" href="{{< param "cdn.css" >}}" integrity="{{< param "cdn.css_hash" >}}" crossorigin="anonymous">
+<script src="{{< param "cdn.js" >}}" integrity="{{< param "cdn.js_hash" >}}" crossorigin="anonymous"></script>
+{{< /highlight >}}
If you're using our compiled JavaScript, don't forget to include Popper.js, via a CDN preferably, before our JS.
-{% highlight html %}
-<script src="{{ site.cdn.popper }}" integrity="{{ site.cdn.popper_hash }}" crossorigin="anonymous"></script>
-{% endhighlight %}
+{{< highlight html >}}
+<script src="{{< param "cdn.popper" >}}" integrity="{{< param "cdn.popper_hash" >}}" crossorigin="anonymous"></script>
+{{< /highlight >}}
## Package managers
@@ -51,9 +51,9 @@ Pull in Bootstrap's **source files** into nearly any project with some of the mo
Install Bootstrap in your Node.js powered apps with [the npm package](https://www.npmjs.com/package/bootstrap):
-{% highlight sh %}
+{{< highlight sh >}}
npm install bootstrap
-{% endhighlight %}
+{{< /highlight >}}
`const bootstrap = require('bootstrap')` or `import bootstrap from 'bootstrap'` will load all of Bootstrap's plugins onto a `bootstrap` object.
The `bootstrap` module itself exports all of our plugins. You can manually load Bootstrap's plugins individually by loading the `/js/dist/*.js` files under the package's top-level directory.
@@ -67,23 +67,23 @@ Bootstrap's `package.json` contains some additional metadata under the following
Install Bootstrap in your Node.js powered apps with [the yarn package](https://yarnpkg.com/en/package/yarn):
-{% highlight sh %}
+{{< highlight sh >}}
yarn add bootstrap
-{% endhighlight %}
+{{< /highlight >}}
### RubyGems
Install Bootstrap in your Ruby apps using [Bundler](https://bundler.io/) (**recommended**) and [RubyGems](https://rubygems.org/) by adding the following line to your [`Gemfile`](https://bundler.io/gemfile.html):
-{% highlight ruby %}
-gem 'bootstrap', '~> {{ site.current_ruby_version }}'
-{% endhighlight %}
+{{< highlight ruby >}}
+gem 'bootstrap', '~> {{< param current_ruby_version >}}'
+{{< /highlight >}}
Alternatively, if you're not using Bundler, you can install the gem by running this command:
-{% highlight sh %}
-gem install bootstrap -v {{ site.current_ruby_version }}
-{% endhighlight %}
+{{< highlight sh >}}
+gem install bootstrap -v {{< param current_ruby_version >}}
+{{< /highlight >}}
[See the gem's README](https://github.com/twbs/bootstrap-rubygem/blob/master/README.md) for further details.
@@ -91,18 +91,18 @@ gem install bootstrap -v {{ site.current_ruby_version }}
You can also install and manage Bootstrap's Sass and JavaScript using [Composer](https://getcomposer.org/):
-{% highlight sh %}
-composer require twbs/bootstrap:{{ site.current_version }}
-{% endhighlight %}
+{{< highlight sh >}}
+composer require twbs/bootstrap:{{< param current_version >}}
+{{< /highlight >}}
### NuGet
If you develop in .NET, you can also install and manage Bootstrap's [CSS](https://www.nuget.org/packages/bootstrap/) or [Sass](https://www.nuget.org/packages/bootstrap.sass/) and JavaScript using [NuGet](https://www.nuget.org/):
-{% highlight powershell %}
+{{< highlight powershell >}}
Install-Package bootstrap
-{% endhighlight %}
+{{< /highlight >}}
-{% highlight powershell %}
+{{< highlight powershell >}}
Install-Package bootstrap.sass
-{% endhighlight %}
+{{< /highlight >}}
diff --git a/site/docs/4.3/getting-started/introduction.md b/site/content/docs/4.3/getting-started/introduction.md
index 08363687c9..438be1ea8c 100644
--- a/site/docs/4.3/getting-started/introduction.md
+++ b/site/content/docs/4.3/getting-started/introduction.md
@@ -3,7 +3,7 @@ layout: docs
title: Introduction
description: Get started with Bootstrap, the world's most popular framework for building responsive, mobile-first sites, with BootstrapCDN and a template starter page.
group: getting-started
-redirect_from:
+aliases:
- "/docs/"
- "/docs/4.3/"
- "/docs/4.3/getting-started/"
@@ -14,34 +14,34 @@ toc: true
## Quick start
-Looking to quickly add Bootstrap to your project? Use BootstrapCDN, provided for free by the folks at StackPath. Using a package manager or need to download the source files? [Head to the downloads page]({{ site.baseurl }}/docs/{{ site.docs_version }}/getting-started/download/).
+Looking to quickly add Bootstrap to your project? Use BootstrapCDN, provided for free by the folks at StackPath. Using a package manager or need to download the source files? [Head to the downloads page](/docs/{{< param docs_version >}}/getting-started/download/).
### CSS
Copy-paste the stylesheet `<link>` into your `<head>` before all other stylesheets to load our CSS.
-{% highlight html %}
-<link rel="stylesheet" href="{{ site.cdn.css }}" integrity="{{ site.cdn.css_hash }}" crossorigin="anonymous">
-{% endhighlight %}
+{{< highlight html >}}
+<link rel="stylesheet" href="{{< param "cdn.css" >}}" integrity="{{< param "cdn.css_hash" >}}" crossorigin="anonymous">
+{{< /highlight >}}
### JS
Many of our components require the use of JavaScript to function. Specifically, they require our own JavaScript plugins and [Popper.js](https://popper.js.org/). Place the following `<script>`s near the end of your pages, right before the closing `</body>` tag, to enable them. Popper.js must come first, and then our JavaScript plugins.
-{% highlight html %}
-<script src="{{ site.cdn.popper }}" integrity="{{ site.cdn.popper_hash }}" crossorigin="anonymous"></script>
-<script src="{{ site.cdn.js }}" integrity="{{ site.cdn.js_hash }}" crossorigin="anonymous"></script>
-{% endhighlight %}
+{{< highlight html >}}
+<script src="{{< param "cdn.popper" >}}" integrity="{{< param "cdn.popper_hash" >}}" crossorigin="anonymous"></script>
+<script src="{{< param "cdn.js" >}}" integrity="{{< param "cdn.js_hash" >}}" crossorigin="anonymous"></script>
+{{< /highlight >}}
-If you use `<script type="module">`, please refer to our [using Bootstrap as a module]({{ site.baseurl }}/docs/{{ site.docs_version }}/getting-started/javascript/#using-bootstrap-as-a-module) section.
+If you use `<script type="module">`, please refer to our [using Bootstrap as a module](/docs/{{< param docs_version >}}/getting-started/javascript/#using-bootstrap-as-a-module) section.
Curious which components explicitly require our JavaScript and Popper.js? Click the show components link below. If you're at all unsure about the general page structure, keep reading for an example page template.
-Our `bootstrap.bundle.js` and `bootstrap.bundle.min.js` include [Popper](https://popper.js.org/). For more information about what's included in Bootstrap, please see our [contents]({{ site.baseurl }}/docs/{{ site.docs_version }}/getting-started/contents/#precompiled-bootstrap) section.
+Our `bootstrap.bundle.js` and `bootstrap.bundle.min.js` include [Popper](https://popper.js.org/). For more information about what's included in Bootstrap, please see our [contents](/docs/{{< param docs_version >}}/getting-started/contents/#precompiled-bootstrap) section.
<details>
<summary class="text-primary mb-3">Show components requiring JavaScript</summary>
-{% capture markdown %}
+{{< markdown >}}
- Alerts for dismissing
- Buttons for toggling states and checkbox/radio functionality
- Carousel for all slide behaviors, controls, and indicators
@@ -51,15 +51,14 @@ Our `bootstrap.bundle.js` and `bootstrap.bundle.min.js` include [Popper](https:/
- Navbar for extending our Collapse plugin to implement responsive behavior
- Tooltips and popovers for displaying and positioning (also requires [Popper.js](https://popper.js.org/))
- Scrollspy for scroll behavior and navigation updates
-{% endcapture %}
-{{ markdown | markdownify }}
+{{< /markdown >}}
</details>
## Starter template
Be sure to have your pages set up with the latest design and development standards. That means using an HTML5 doctype and including a viewport meta tag for proper responsive behaviors. Put it all together and your pages should look like this:
-{% highlight html %}
+{{< highlight html >}}
<!doctype html>
<html lang="en">
<head>
@@ -68,7 +67,7 @@ Be sure to have your pages set up with the latest design and development standar
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Bootstrap CSS -->
- <link rel="stylesheet" href="{{ site.cdn.css }}" integrity="{{ site.cdn.css_hash }}" crossorigin="anonymous">
+ <link rel="stylesheet" href="{{< param "cdn.css" >}}" integrity="{{< param "cdn.css_hash" >}}" crossorigin="anonymous">
<title>Hello, world!</title>
</head>
@@ -77,13 +76,13 @@ Be sure to have your pages set up with the latest design and development standar
<!-- Optional JavaScript -->
<!-- Popper.js first, then Bootstrap JS -->
- <script src="{{ site.cdn.popper }}" integrity="{{ site.cdn.popper_hash }}" crossorigin="anonymous"></script>
- <script src="{{ site.cdn.js }}" integrity="{{ site.cdn.js_hash }}" crossorigin="anonymous"></script>
+ <script src="{{< param "cdn.popper" >}}" integrity="{{< param "cdn.popper_hash" >}}" crossorigin="anonymous"></script>
+ <script src="{{< param "cdn.js" >}}" integrity="{{< param "cdn.js_hash" >}}" crossorigin="anonymous"></script>
</body>
</html>
-{% endhighlight %}
+{{< /highlight >}}
-That's all you need for overall page requirements. Visit the [Layout docs]({{ site.baseurl }}/docs/{{ site.docs_version }}/layout/overview/) or [our official examples]({{ site.baseurl }}/docs/{{ site.docs_version }}/examples/) to start laying out your site's content and components.
+That's all you need for overall page requirements. Visit the [Layout docs](/docs/{{< param docs_version >}}/layout/overview/) or [our official examples](/docs/{{< param docs_version >}}/examples/) to start laying out your site's content and components.
## Important globals
@@ -93,20 +92,20 @@ Bootstrap employs a handful of important global styles and settings that you'll
Bootstrap requires the use of the HTML5 doctype. Without it, you'll see some funky incomplete styling, but including it shouldn't cause any considerable hiccups.
-{% highlight html %}
+{{< highlight html >}}
<!doctype html>
<html lang="en">
...
</html>
-{% endhighlight %}
+{{< /highlight >}}
### Responsive meta tag
Bootstrap is developed *mobile first*, a strategy in which we optimize code for mobile devices first and then scale up components as necessary using CSS media queries. To ensure proper rendering and touch zooming for all devices, **add the responsive viewport meta tag** to your `<head>`.
-{% highlight html %}
+{{< highlight html >}}
<meta name="viewport" content="width=device-width, initial-scale=1">
-{% endhighlight %}
+{{< /highlight >}}
You can see an example of this in action in the [starter template](#starter-template).
@@ -116,11 +115,11 @@ For more straightforward sizing in CSS, we switch the global `box-sizing` value
On the rare occasion you need to override it, use something like the following:
-{% highlight css %}
+{{< highlight css >}}
.selector-for-some-widget {
box-sizing: content-box;
}
-{% endhighlight %}
+{{< /highlight >}}
With the above snippet, nested elements—including generated content via `::before` and `::after`—will all inherit the specified `box-sizing` for that `.selector-for-some-widget`.
@@ -128,17 +127,17 @@ Learn more about [box model and sizing at CSS Tricks](https://css-tricks.com/box
### Reboot
-For improved cross-browser rendering, we use [Reboot]({{ site.baseurl }}/docs/{{ site.docs_version }}/content/reboot/) to correct inconsistencies across browsers and devices while providing slightly more opinionated resets to common HTML elements.
+For improved cross-browser rendering, we use [Reboot](/docs/{{< param docs_version >}}/content/reboot/) to correct inconsistencies across browsers and devices while providing slightly more opinionated resets to common HTML elements.
## Community
Stay up to date on the development of Bootstrap and reach out to the community with these helpful resources.
-- Follow [@getbootstrap on Twitter](https://twitter.com/{{ site.twitter }}).
-- Read and subscribe to [The Official Bootstrap Blog]({{ site.blog }}/).
-- Join [the official Slack room]({{ site.slack }}/).
+- Follow [@getbootstrap on Twitter](https://twitter.com/{{< param twitter >}}).
+- Read and subscribe to [The Official Bootstrap Blog]({{< param blog >}}/).
+- Join [the official Slack room]({{< param slack >}}/).
- Chat with fellow Bootstrappers in IRC. On the `irc.freenode.net` server, in the `##bootstrap` channel.
- Implementation help may be found at Stack Overflow (tagged [`bootstrap-4`](https://stackoverflow.com/questions/tagged/bootstrap-4)).
- Developers should use the keyword `bootstrap` on packages which modify or add to the functionality of Bootstrap when distributing through [npm](https://www.npmjs.com/search?q=keywords:bootstrap) or similar delivery mechanisms for maximum discoverability.
-You can also follow [@getbootstrap on Twitter](https://twitter.com/{{ site.twitter }}) for the latest gossip and awesome music videos.
+You can also follow [@getbootstrap on Twitter](https://twitter.com/{{< param twitter >}}) for the latest gossip and awesome music videos.
diff --git a/site/docs/4.3/getting-started/javascript.md b/site/content/docs/4.3/getting-started/javascript.md
index bf9ebfe633..3781dbbbce 100644
--- a/site/docs/4.3/getting-started/javascript.md
+++ b/site/content/docs/4.3/getting-started/javascript.md
@@ -16,21 +16,20 @@ If you use a bundler (Webpack, Rollup...), you can use `/js/dist/*.js` files whi
We provide a version of Bootstrap built as `ESM` (`bootstrap.esm.js` and `bootstrap.esm.min.js`) which allows you to use Bootstrap as a module in your browser, if your [targeted browsers support it](https://caniuse.com/#feat=es6-module).
-{% highlight html %}
+{{< highlight html >}}
<script type="module">
import { Toast } from 'bootstrap.esm.min.js'
Array.from(document.querySelectorAll('.toast'))
.forEach(toastNode => new Toast(toastNode))
</script>
-{% endhighlight %}
+{{< /highlight >}}
-{% capture callout %}
+{{< callout warning >}}
## Incompatible plugins
Due to browser limitations, some of our plugins, namely Dropdown, Tooltip and Popover plugins, cannot be used in a `<script>` tag with `module` type because they depend on Popper.js. For more information about the issue see [here](https://developers.google.com/web/fundamentals/primers/modules#specifiers).
-{% endcapture %}
-{% include callout.html content=callout type="warning" %}
+{{< /callout >}}
## Dependencies
@@ -44,23 +43,22 @@ Nearly all Bootstrap plugins can be enabled and configured through HTML alone wi
However, in some situations it may be desirable to disable this functionality. To disable the data attribute API, unbind all events on the document namespaced with `data-api` like so:
-{% highlight js %}
+{{< highlight js >}}
$(document).off('.data-api')
-{% endhighlight %}
+{{< /highlight >}}
Alternatively, to target a specific plugin, just include the plugin's name as a namespace along with the data-api namespace like this:
-{% highlight js %}
+{{< highlight js >}}
$(document).off('.alert.data-api')
-{% endhighlight %}
+{{< /highlight >}}
-{% capture callout %}
+{{< callout warning >}}
## Selectors
Currently to query DOM elements we use the native methods `querySelector` and `querySelectorAll` for performance reasons, so you have to use [valid selectors](https://www.w3.org/TR/CSS21/syndata.html#value-def-identifier).
If you use special selectors, for example: `collapse:Example` be sure to escape them.
-{% endcapture %}
-{% include callout.html content=callout type="warning" %}
+{{< /callout >}}
## Events
@@ -68,29 +66,29 @@ Bootstrap provides custom events for most plugins' unique actions. Generally, th
All infinitive events provide [`preventDefault()`](https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault) functionality. This provides the ability to stop the execution of an action before it starts. Returning false from an event handler will also automatically call `preventDefault()`.
-{% highlight js %}
+{{< highlight js >}}
$('#myModal').on('show.bs.modal', function (e) {
if (!data) {
return e.preventDefault() // stops modal from being shown
}
})
-{% endhighlight %}
+{{< /highlight >}}
## Programmatic API
We also believe you should be able to use all Bootstrap plugins purely through the JavaScript API. All public APIs are single, chainable methods, and return the collection acted upon.
-{% highlight js %}
+{{< highlight js >}}
$('.btn.danger').button('toggle').addClass('fat')
-{% endhighlight %}
+{{< /highlight >}}
All methods should accept an optional options object, a string which targets a particular method, or nothing (which initiates a plugin with default behavior):
-{% highlight js %}
+{{< highlight js >}}
$('#myModal').modal() // initialized with defaults
$('#myModal').modal({ keyboard: false }) // initialized with no keyboard
$('#myModal').modal('show') // initializes and invokes show immediately
-{% endhighlight %}
+{{< /highlight >}}
Each plugin also exposes its raw constructor on a `Constructor` property: `$.fn.popover.Constructor`. If you'd like to get a particular plugin instance, retrieve it directly from an element: `$('[rel="popover"]').data('popover')`.
@@ -100,59 +98,58 @@ All programmatic API methods are **asynchronous** and return to the caller once
In order to execute an action once the transition is complete, you can listen to the corresponding event.
-{% highlight js %}
+{{< highlight js >}}
$('#myCollapse').on('shown.bs.collapse', function (e) {
// Action to execute once the collapsible area is expanded
})
-{% endhighlight %}
+{{< /highlight >}}
In addition a method call on a **transitioning component will be ignored**.
-{% highlight js %}
+{{< highlight js >}}
$('#myCarousel').on('slid.bs.carousel', function (e) {
$('#myCarousel').carousel('2') // Will slide to the slide 2 as soon as the transition to slide 1 is finished
})
$('#myCarousel').carousel('1') // Will start sliding to the slide 1 and returns to the caller
$('#myCarousel').carousel('2') // !! Will be ignored, as the transition to the slide 1 is not finished !!
-{% endhighlight %}
+{{< /highlight >}}
### Default settings
You can change the default settings for a plugin by modifying the plugin's `Constructor.Default` object:
-{% highlight js %}
+{{< highlight js >}}
// changes default for the modal plugin's `keyboard` option to false
$.fn.modal.Constructor.Default.keyboard = false
-{% endhighlight %}
+{{< /highlight >}}
## No conflict
Sometimes it is necessary to use Bootstrap plugins with other UI frameworks. In these circumstances, namespace collisions can occasionally occur. If this happens, you may call `.noConflict` on the plugin you wish to revert the value of.
-{% highlight js %}
+{{< highlight js >}}
var bootstrapButton = $.fn.button.noConflict() // return $.fn.button to previously assigned value
$.fn.bootstrapBtn = bootstrapButton // give $().bootstrapBtn the Bootstrap functionality
-{% endhighlight %}
+{{< /highlight >}}
## Version numbers
The version of each of Bootstrap's plugins can be accessed via the `VERSION` property of the plugin's constructor. For example, for the tooltip plugin:
-{% highlight js %}
-$.fn.tooltip.Constructor.VERSION // => "{{ site.current_version }}"
-{% endhighlight %}
+{{< highlight js >}}
+$.fn.tooltip.Constructor.VERSION // => "{{< param current_version >}}"
+{{< /highlight >}}
## No special fallbacks when JavaScript is disabled
Bootstrap's plugins don't fall back particularly gracefully when JavaScript is disabled. If you care about the user experience in this case, use [`<noscript>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/noscript) to explain the situation (and how to re-enable JavaScript) to your users, and/or add your own custom fallbacks.
-{% capture callout %}
+{{< callout warning >}}
##### Third-party libraries
**Bootstrap does not officially support third-party JavaScript libraries** like Prototype or jQuery UI. Despite `.noConflict` and namespaced events, there may be compatibility problems that you need to fix on your own.
-{% endcapture %}
-{% include callout.html content=callout type="warning" %}
+{{< /callout >}}
## Sanitizer
@@ -160,7 +157,7 @@ Tooltips and Popovers use our built-in sanitizer to sanitize options which accep
The default `whiteList` value is the following:
-{% highlight js %}
+{{< highlight js >}}
var ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i
var DefaultWhitelist = {
// Global attributes allowed on any supplied element below.
@@ -195,11 +192,11 @@ var DefaultWhitelist = {
u: [],
ul: []
}
-{% endhighlight %}
+{{< /highlight >}}
If you want to add new values to this default `whiteList` you can do the following:
-{% highlight js %}
+{{< highlight js >}}
var myDefaultWhiteList = $.fn.tooltip.Constructor.Default.whiteList
// To allow table elements
@@ -212,23 +209,23 @@ myDefaultWhiteList.td = ['data-option']
// Be careful about your regular expressions being too lax
var myCustomRegex = /^data-my-app-[\w-]+/
myDefaultWhiteList['*'].push(myCustomRegex)
-{% endhighlight %}
+{{< /highlight >}}
If you want to bypass our sanitizer because you prefer to use a dedicated library, for example [DOMPurify](https://www.npmjs.com/package/dompurify), you should do the following:
-{% highlight js %}
+{{< highlight js >}}
$('#yourTooltip').tooltip({
sanitizeFn: function (content) {
return DOMPurify.sanitize(content)
}
})
-{% endhighlight %}
+{{< /highlight >}}
## Compatibility with IE 11
Bootstrap v5 isn't designed to work with Internet Explorer 11, but you can add the following polyfills to make it work:
-{% highlight html %}
+{{< highlight html >}}
<!-- Polyfill.io will load polyfills your browser needs -->
<script crossorigin="anonymous" src="https://polyfill.io/v3/polyfill.min.js"></script>
<script>
@@ -259,4 +256,4 @@ Bootstrap v5 isn't designed to work with Internet Explorer 11, but you can add t
}
})()
</script>
-{% endhighlight %}
+{{< /highlight >}}
diff --git a/site/docs/4.3/getting-started/theming.md b/site/content/docs/4.3/getting-started/theming.md
index 8e3339c15d..b49903bc81 100644
--- a/site/docs/4.3/getting-started/theming.md
+++ b/site/content/docs/4.3/getting-started/theming.md
@@ -20,7 +20,7 @@ Utilize our source Sass files to take advantage of variables, maps, mixins, and
Whenever possible, avoid modifying Bootstrap's core files. For Sass, that means creating your own stylesheet that imports Bootstrap so you can modify and extend it. Assuming you're using a package manager like npm, you'll have a file structure that looks like this:
-{% highlight plaintext %}
+{{< highlight text >}}
your-project/
├── scss
│ └── custom.scss
@@ -28,31 +28,31 @@ your-project/
└── bootstrap
├── js
└── scss
-{% endhighlight %}
+{{< /highlight >}}
If you've downloaded our source files and aren't using a package manager, you'll want to manually setup something similar to that structure, keeping Bootstrap's source files separate from your own.
-{% highlight plaintext %}
+{{< highlight text >}}
your-project/
├── scss
│ └── custom.scss
└── bootstrap/
├── js
└── scss
-{% endhighlight %}
+{{< /highlight >}}
### Importing
In your `custom.scss`, you'll import Bootstrap's source Sass files. You have two options: include all of Bootstrap, or pick the parts you need. We encourage the latter, though be aware there are some requirements and dependencies across our components. You also will need to include some JavaScript for our plugins.
-{% highlight scss %}
+{{< highlight scss >}}
// Custom.scss
// Option A: Include all of Bootstrap
@import "../node_modules/bootstrap/scss/bootstrap";
-{% endhighlight %}
+{{< /highlight >}}
-{% highlight scss %}
+{{< highlight scss >}}
// Custom.scss
// Option B: Include parts of Bootstrap
@@ -67,7 +67,7 @@ In your `custom.scss`, you'll import Bootstrap's source Sass files. You have two
@import "../node_modules/bootstrap/scss/images";
@import "../node_modules/bootstrap/scss/code";
@import "../node_modules/bootstrap/scss/grid";
-{% endhighlight %}
+{{< /highlight >}}
With that setup in place, you can begin to modify any of the Sass variables and maps in your `custom.scss`. You can also start to add parts of Bootstrap under the `// Optional` section as needed. We suggest using the full import stack from our `bootstrap.scss` file as your starting point.
@@ -81,14 +81,14 @@ Variable overrides within the same Sass file can come before or after the defaul
Here's an example that changes the `background-color` and `color` for the `<body>` when importing and compiling Bootstrap via npm:
-{% highlight scss %}
+{{< highlight scss >}}
// Your variable overrides
$body-bg: #000;
$body-color: #111;
// Bootstrap and its default variables
@import "../node_modules/bootstrap/scss/bootstrap";
-{% endhighlight %}
+{{< /highlight >}}
Repeat as necessary for any variable in Bootstrap, including the global options below.
@@ -102,28 +102,28 @@ Some of our Sass maps are merged into empty ones by default. This is done to all
To modify an existing color in our `$theme-colors` map, add the following to your custom Sass file:
-{% highlight scss %}
+{{< highlight scss >}}
$theme-colors: (
"primary": #0074d9,
"danger": #ff4136
);
-{% endhighlight %}
+{{< /highlight >}}
#### Add to map
To add a new color to `$theme-colors`, add the new key and value:
-{% highlight scss %}
+{{< highlight scss >}}
$theme-colors: (
"custom-color": #900
);
-{% endhighlight %}
+{{< /highlight >}}
#### Remove from map
To remove colors from `$theme-colors`, or any other map, use `map-remove`. Be aware you must insert it between our requirements and options:
-{% highlight scss %}
+{{< highlight scss >}}
// Required
@import "../node_modules/bootstrap/scss/functions";
@import "../node_modules/bootstrap/scss/variables";
@@ -136,7 +136,7 @@ $theme-colors: map-remove($theme-colors, "info", "light", "dark");
@import "../node_modules/bootstrap/scss/reboot";
@import "../node_modules/bootstrap/scss/type";
...
-{% endhighlight %}
+{{< /highlight >}}
#### Required keys
@@ -148,7 +148,7 @@ For example, we use the `primary`, `success`, and `danger` keys from `$theme-col
Bootstrap utilizes several Sass functions, but only a subset are applicable to general theming. We've included three functions for getting values from the color maps:
-{% highlight scss %}
+{{< highlight scss >}}
@function color($key: "blue") {
@return map-get($colors, $key);
}
@@ -160,20 +160,20 @@ Bootstrap utilizes several Sass functions, but only a subset are applicable to g
@function gray($key: "100") {
@return map-get($grays, $key);
}
-{% endhighlight %}
+{{< /highlight >}}
These allow you to pick one color from a Sass map much like how you'd use a color variable from v3.
-{% highlight scss %}
+{{< highlight scss >}}
.custom-element {
color: gray("100");
background-color: theme-color("dark");
}
-{% endhighlight %}
+{{< /highlight >}}
We also have another function for getting a particular _level_ of color from the `$theme-colors` map. Negative level values will lighten the color, while higher levels will darken.
-{% highlight scss %}
+{{< highlight scss >}}
@function theme-color-level($color-name: "primary", $level: 0) {
$color: theme-color($color-name);
$color-base: if($level > 0, #000, #fff);
@@ -181,15 +181,15 @@ We also have another function for getting a particular _level_ of color from the
@return mix($color-base, $color, $level * $theme-color-interval);
}
-{% endhighlight %}
+{{< /highlight >}}
In practice, you'd call the function and pass in two parameters: the name of the color from `$theme-colors` (e.g., primary or danger) and a numeric level.
-{% highlight scss %}
+{{< highlight scss >}}
.custom-element {
color: theme-color-level(primary, -10);
}
-{% endhighlight %}
+{{< /highlight >}}
Additional functions could be added in the future or your own custom Sass to create level functions for additional Sass maps, or even a generic one if you wanted to be more verbose.
@@ -199,29 +199,29 @@ One additional function we include in Bootstrap is the color contrast function,
For example, to generate color swatches from our `$theme-colors` map:
-{% highlight scss %}
+{{< highlight scss >}}
@each $color, $value in $theme-colors {
.swatch-#{$color} {
color: color-yiq($value);
}
}
-{% endhighlight %}
+{{< /highlight >}}
It can also be used for one-off contrast needs:
-{% highlight scss %}
+{{< highlight scss >}}
.custom-element {
color: color-yiq(#000); // returns `color: #fff`
}
-{% endhighlight %}
+{{< /highlight >}}
You can also specify a base color with our color map functions:
-{% highlight scss %}
+{{< highlight scss >}}
.custom-element {
color: color-yiq(theme-color("dark")); // returns `color: #fff`
}
-{% endhighlight %}
+{{< /highlight >}}
## Sass options
@@ -231,18 +231,18 @@ You can find and customize these variables for key global options in Bootstrap's
| Variable | Values | Description |
| -------------------------------------------- | ---------------------------------- | -------------------------------------------------------------------------------------- |
-| `$spacer` | `1rem` (default), or any value > 0 | Specifies the default spacer value to programmatically generate our [spacer utilities]({{ site.baseurl }}/docs/{{ site.docs_version }}/utilities/spacing/). |
+| `$spacer` | `1rem` (default), or any value > 0 | Specifies the default spacer value to programmatically generate our [spacer utilities](/docs/{{< param docs_version >}}/utilities/spacing/). |
| `$enable-rounded` | `true` (default) or `false` | Enables predefined `border-radius` styles on various components. |
| `$enable-shadows` | `true` or `false` (default) | Enables predefined `box-shadow` styles on various components. |
| `$enable-gradients` | `true` or `false` (default) | Enables predefined gradients via `background-image` styles on various components. |
| `$enable-transitions` | `true` (default) or `false` | Enables predefined `transition`s on various components. |
-| `$enable-prefers-reduced-motion-media-query` | `true` (default) or `false` | Enables the [`prefers-reduced-motion` media query]({{ site.baseurl }}/docs/{{ site.docs_version }}/getting-started/accessibility/#reduced-motion), which suppresses certain animations/transitions based on the users' browser/operating system preferences. |
+| `$enable-prefers-reduced-motion-media-query` | `true` (default) or `false` | Enables the [`prefers-reduced-motion` media query](/docs/{{< param docs_version >}}/getting-started/accessibility/#reduced-motion), which suppresses certain animations/transitions based on the users' browser/operating system preferences. |
| `$enable-hover-media-query` | `true` or `false` (default) | **Deprecated** |
| `$enable-grid-classes` | `true` (default) or `false` | Enables the generation of CSS classes for the grid system (e.g., `.container`, `.row`, `.col-md-1`, etc.). |
| `$enable-caret` | `true` (default) or `false` | Enables pseudo element caret on `.dropdown-toggle`. |
| `$enable-pointer-cursor-for-buttons` | `true` (default) or `false` | Add "hand" cursor to non-disabled button elements. |
| `$enable-print-styles` | `true` (default) or `false` | Enables styles for optimizing printing. |
-| `$enable-responsive-font-sizes` | `true` or `false` (default) | Enables [responsive font sizes]({{ site.baseurl }}/docs/{{ site.docs_version }}/content/typography/#responsive-font-sizes). |
+| `$enable-responsive-font-sizes` | `true` or `false` (default) | Enables [responsive font sizes](/docs/{{< param docs_version >}}/content/typography/#responsive-font-sizes). |
| `$enable-validation-icons` | `true` (default) or `false` | Enables `background-image` icons within textual inputs and some custom forms for validation states. |
| `$enable-deprecation-messages` | `true` or `false` (default) | Set to `true` to show warnings when using any of the deprecated mixins and functions that are planned to be removed in `v5`. |
@@ -255,42 +255,45 @@ Many of Bootstrap's various components and utilities are built through a series
All colors available in Bootstrap 4, are available as Sass variables and a Sass map in `scss/_variables.scss` file. This will be expanded upon in subsequent minor releases to add additional shades, much like the [grayscale palette](#grays) we already include.
<div class="row">
- {% for color in site.data.colors %}
- {% unless color.name == "white" or color.name == "gray" or color.name == "gray-dark" %}
+ {{< theme-colors.inline >}}
+ {{- range $.Site.Data.colors }}
+ {{- if (and (not (eq .name "white")) (not (eq .name "gray")) (not (eq .name "gray-dark"))) }}
<div class="col-md-4">
- <div class="p-3 mb-3 swatch-{{ color.name }}">{{ color.name | capitalize }}</div>
+ <div class="p-3 mb-3 swatch-{{ .name }}">{{ .name | title }}</div>
</div>
- {% endunless %}
- {% endfor %}
+ {{ end -}}
+ {{ end -}}
+ {{< /theme-colors.inline >}}
</div>
Here's how you can use these in your Sass:
-{% highlight scss %}
+{{< highlight scss >}}
// With variable
.alpha { color: $purple; }
// From the Sass map with our `color()` function
.beta { color: color("purple"); }
-{% endhighlight %}
+{{< /highlight >}}
-[Color utility classes]({{ site.baseurl }}/docs/{{ site.docs_version }}/utilities/colors/) are also available for setting `color` and `background-color`.
+[Color utility classes](/docs/{{< param docs_version >}}/utilities/colors/) are also available for setting `color` and `background-color`.
-{% capture callout %}
+{{< callout info >}}
In the future, we'll aim to provide Sass maps and variables for shades of each color as we've done with the grayscale colors below.
-{% endcapture %}
-{% include callout.html content=callout type="info" %}
+{{< /callout >}}
### Theme colors
We use a subset of all colors to create a smaller color palette for generating color schemes, also available as Sass variables and a Sass map in Bootstraps's `scss/_variables.scss` file.
<div class="row">
- {% for color in site.data.theme-colors %}
+ {{< theme-colors.inline >}}
+ {{- range (index $.Site.Data "theme-colors") }}
<div class="col-md-4">
- <div class="p-3 mb-3 swatch-{{ color.name }}">{{ color.name | capitalize }}</div>
+ <div class="p-3 mb-3 swatch-{{ .name }}">{{ .name | title }}</div>
</div>
- {% endfor %}
+ {{ end -}}
+ {{< /theme-colors.inline >}}
</div>
### Grays
@@ -299,15 +302,17 @@ An expansive set of gray variables and a Sass map in `scss/_variables.scss` for
<div class="row mb-3">
<div class="col-md-4">
- {% for color in site.data.grays %}
- <div class="p-3 swatch-{{ color.name }}">{{ color.name | capitalize }}</div>
- {% endfor %}
+ {{< theme-colors.inline >}}
+ {{- range $.Site.Data.grays }}
+ <div class="p-3 swatch-{{ .name }}">{{ .name }}</div>
+ {{ end -}}
+ {{< /theme-colors.inline >}}
</div>
</div>
Within `scss/_variables.scss`, you'll find Bootstrap's color variables and Sass map. Here's an example of the `$colors` Sass map:
-{% highlight scss %}
+{{< highlight scss >}}
$colors: (
"blue": $blue,
"indigo": $indigo,
@@ -323,7 +328,7 @@ $colors: (
"gray": $gray-600,
"gray-dark": $gray-800
) !default;
-{% endhighlight %}
+{{< /highlight >}}
Add, remove, or modify values within the map to update how they're used in many other components. Unfortunately at this time, not _every_ component utilizes this Sass map. Future updates will strive to improve upon this. Until then, plan on making use of the `${color}` variables and this Sass map.
@@ -337,7 +342,7 @@ Many of Bootstrap's components are built with a base-modifier class approach. Th
Here are two examples of how we loop over the `$theme-colors` map to generate modifiers to the `.alert` component and all our `.bg-*` background utilities.
-{% highlight scss %}
+{{< highlight scss >}}
// Generate alert modifier classes
@each $color, $value in $theme-colors {
.alert-#{$color} {
@@ -349,13 +354,13 @@ Here are two examples of how we loop over the `$theme-colors` map to generate mo
@each $color, $value in $theme-colors {
@include bg-variant('.bg-#{$color}', $value);
}
-{% endhighlight %}
+{{< /highlight >}}
### Responsive
These Sass loops aren't limited to color maps, either. You can also generate responsive variations of your components or utilities. Take for example our responsive text alignment utilities where we mix an `@each` loop for the `$grid-breakpoints` Sass map with a media query include.
-{% highlight scss %}
+{{< highlight scss >}}
@each $breakpoint in map-keys($grid-breakpoints) {
@include media-breakpoint-up($breakpoint) {
$infix: breakpoint-infix($breakpoint, $grid-breakpoints);
@@ -365,7 +370,7 @@ These Sass loops aren't limited to color maps, either. You can also generate res
.text#{$infix}-center { text-align: center !important; }
}
}
-{% endhighlight %}
+{{< /highlight >}}
Should you need to modify your `$grid-breakpoints`, your changes will apply to all the loops iterating over that map.
@@ -377,7 +382,7 @@ Bootstrap 4 includes around two dozen [CSS custom properties (variables)](https:
Here are the variables we include (note that the `:root` is required). They're located in our `_root.scss` file.
-{% highlight css %}
+{{< highlight css >}}
:root {
--blue: #007bff;
--indigo: #6610f2;
@@ -408,20 +413,20 @@ Here are the variables we include (note that the `:root` is required). They're l
--font-family-sans-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
--font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
-{% endhighlight %}
+{{< /highlight >}}
### Examples
CSS variables offer similar flexibility to Sass's variables, but without the need for compilation before being served to the browser. For example, here we're resetting our page's font and link styles with CSS variables.
-{% highlight css %}
+{{< highlight css >}}
body {
font: 1rem/1.5 var(--font-family-sans-serif);
}
a {
color: var(--blue);
}
-{% endhighlight %}
+{{< /highlight >}}
### Breakpoint variables
@@ -429,18 +434,18 @@ While we originally included breakpoints in our CSS variables (e.g., `--breakpoi
Here's an example of **what's not supported:**
-{% highlight css %}
+{{< highlight css >}}
@media (min-width: var(--breakpoint-sm)) {
...
}
-{% endhighlight %}
+{{< /highlight >}}
And here's an example of **what is supported:**
-{% highlight css %}
+{{< highlight css >}}
@media (min-width: 768px) {
.custom-element {
color: var(--primary);
}
}
-{% endhighlight %}
+{{< /highlight >}}
diff --git a/site/docs/4.3/getting-started/webpack.md b/site/content/docs/4.3/getting-started/webpack.md
index b8c5f8a0da..658a7a7e78 100644
--- a/site/docs/4.3/getting-started/webpack.md
+++ b/site/content/docs/4.3/getting-started/webpack.md
@@ -8,22 +8,22 @@ toc: true
## Installing Bootstrap
-[Install bootstrap]({{ site.baseurl }}/docs/{{ site.docs_version }}/getting-started/download/#npm) as a Node.js module using npm.
+[Install bootstrap](/docs/{{< param docs_version >}}/getting-started/download/#npm) as a Node.js module using npm.
## Importing JavaScript
-Import [Bootstrap's JavaScript]({{ site.baseurl }}/docs/{{ site.docs_version }}/getting-started/javascript/) by adding this line to your app's entry point (usually `index.js` or `app.js`):
+Import [Bootstrap's JavaScript](/docs/{{< param docs_version >}}/getting-started/javascript/) by adding this line to your app's entry point (usually `index.js` or `app.js`):
-{% highlight js %}
+{{< highlight js >}}
import 'bootstrap';
-{% endhighlight %}
+{{< /highlight >}}
Alternatively, you may **import plugins individually** as needed:
-{% highlight js %}
+{{< highlight js >}}
import 'bootstrap/js/dist/alert';
...
-{% endhighlight %}
+{{< /highlight >}}
Bootstrap dependends on [Popper](https://popper.js.org/), which is speicified in the `peerDependencies` property.
This means that you will have to make sure to add both of them to your `package.json` using `npm install popper.js`.
@@ -34,16 +34,16 @@ This means that you will have to make sure to add both of them to your `package.
To enjoy the full potential of Bootstrap and customize it to your needs, use the source files as a part of your project's bundling process.
-First, create your own `_custom.scss` and use it to override the [built-in custom variables]({{ site.baseurl }}/docs/{{ site.docs_version }}/getting-started/theming/). Then, use your main Sass file to import your custom variables, followed by Bootstrap:
+First, create your own `_custom.scss` and use it to override the [built-in custom variables](/docs/{{< param docs_version >}}/getting-started/theming/). Then, use your main Sass file to import your custom variables, followed by Bootstrap:
-{% highlight scss %}
+{{< highlight scss >}}
@import "custom";
@import "~bootstrap/scss/bootstrap";
-{% endhighlight %}
+{{< /highlight >}}
For Bootstrap to compile, make sure you install and use the required loaders: [sass-loader](https://github.com/webpack-contrib/sass-loader), [postcss-loader](https://github.com/postcss/postcss-loader) with [Autoprefixer](https://github.com/postcss/autoprefixer#webpack). With minimal setup, your webpack config should include this rule or similar:
-{% highlight js %}
+{{< highlight js >}}
...
{
test: /\.(scss)$/,
@@ -65,19 +65,19 @@ For Bootstrap to compile, make sure you install and use the required loaders: [s
}]
},
...
-{% endhighlight %}
+{{< /highlight >}}
### Importing Compiled CSS
Alternatively, you may use Bootstrap's ready-to-use CSS by simply adding this line to your project's entry point:
-{% highlight js %}
+{{< highlight js >}}
import 'bootstrap/dist/css/bootstrap.min.css';
-{% endhighlight %}
+{{< /highlight >}}
In this case you may use your existing rule for `css` without any special modifications to webpack config, except you don't need `sass-loader` just [style-loader](https://github.com/webpack-contrib/style-loader) and [css-loader](https://github.com/webpack-contrib/css-loader).
-{% highlight js %}
+{{< highlight js >}}
...
module: {
rules: [
@@ -88,4 +88,4 @@ module: {
]
}
...
-{% endhighlight %}
+{{< /highlight >}}
diff --git a/site/docs/4.3/layout/grid.md b/site/content/docs/4.3/layout/grid.md
index 7a909bd9e7..5c212db237 100644
--- a/site/docs/4.3/layout/grid.md
+++ b/site/content/docs/4.3/layout/grid.md
@@ -13,7 +13,7 @@ Bootstrap's grid system uses a series of containers, rows, and columns to layout
**New to or unfamiliar with flexbox?** [Read this CSS Tricks flexbox guide](https://css-tricks.com/snippets/css/a-guide-to-flexbox/#flexbox-background) for background, terminology, guidelines, and code snippets.
<div class="bd-example-row">
-{% capture example %}
+{{< example >}}
<div class="container">
<div class="row">
<div class="col-sm">
@@ -27,8 +27,7 @@ Bootstrap's grid system uses a series of containers, rows, and columns to layout
</div>
</div>
</div>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
</div>
The above example creates three equal-width columns on small, medium, large, and extra large devices using our predefined grid classes. Those columns are centered in the page with the parent `.container`.
@@ -42,7 +41,7 @@ Breaking it down, here's how it works:
- Column classes indicate the number of columns you'd like to use out of the possible 12 per row. So, if you want three equal-width columns across, you can use `.col-4`.
- Column `width`s are set in percentages, so they're always fluid and sized relative to their parent element.
- Columns have horizontal `padding` to create the gutters between individual columns, however, you can remove the `margin` from rows and `padding` from columns with `.no-gutters` on the `.row`.
-- To make the grid responsive, there are five grid breakpoints, one for each [responsive breakpoint]({{ site.baseurl }}/docs/{{ site.docs_version }}/layout/overview/#responsive-breakpoints): all breakpoints (extra small), small, medium, large, and extra large.
+- To make the grid responsive, there are five grid breakpoints, one for each [responsive breakpoint](/docs/{{< param docs_version >}}/layout/overview/#responsive-breakpoints): all breakpoints (extra small), small, medium, large, and extra large.
- Grid breakpoints are based on minimum width media queries, meaning **they apply to that one breakpoint and all those above it** (e.g., `.col-sm-4` applies to small, medium, large, and extra large devices, but not the first `xs` breakpoint).
- You can use predefined grid classes (like `.col-4`) or [Sass mixins](#sass-mixins) for more semantic markup.
@@ -125,7 +124,7 @@ Utilize breakpoint-specific column classes for easy column sizing without an exp
For example, here are two grid layouts that apply to every device and viewport, from `xs` to `xl`. Add any number of unit-less classes for each breakpoint you need and every column will be the same width.
<div class="bd-example-row">
-{% capture example %}
+{{< example >}}
<div class="container">
<div class="row">
<div class="col">
@@ -147,14 +146,13 @@ For example, here are two grid layouts that apply to every device and viewport,
</div>
</div>
</div>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
</div>
Equal-width columns can be broken into multiple lines, but there was a [Safari flexbox bug](https://github.com/philipwalton/flexbugs#flexbug-11) that prevented this from working without an explicit `flex-basis` or `border`. There are workarounds for older browser versions, but they shouldn't be necessary if you're up-to-date.
<div class="bd-example-row">
-{% capture example %}
+{{< example >}}
<div class="container">
<div class="row">
<div class="col">Column</div>
@@ -164,8 +162,7 @@ Equal-width columns can be broken into multiple lines, but there was a [Safari f
<div class="col">Column</div>
</div>
</div>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
</div>
### Setting one column width
@@ -173,7 +170,7 @@ Equal-width columns can be broken into multiple lines, but there was a [Safari f
Auto-layout for flexbox grid columns also means you can set the width of one column and have the sibling columns automatically resize around it. You may use predefined grid classes (as shown below), grid mixins, or inline widths. Note that the other columns will resize no matter the width of the center column.
<div class="bd-example-row">
-{% capture example %}
+{{< example >}}
<div class="container">
<div class="row">
<div class="col">
@@ -198,8 +195,7 @@ Auto-layout for flexbox grid columns also means you can set the width of one col
</div>
</div>
</div>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
</div>
### Variable width content
@@ -207,7 +203,7 @@ Auto-layout for flexbox grid columns also means you can set the width of one col
Use `col-{breakpoint}-auto` classes to size columns based on the natural width of their content.
<div class="bd-example-row">
-{% capture example %}
+{{< example >}}
<div class="container">
<div class="row justify-content-md-center">
<div class="col col-lg-2">
@@ -232,16 +228,15 @@ Use `col-{breakpoint}-auto` classes to size columns based on the natural width o
</div>
</div>
</div>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
</div>
### Equal-width multi-row
-Create equal-width columns that span multiple rows by inserting a `.w-100` where you want the columns to break to a new line. Make the breaks responsive by mixing the `.w-100` with some [responsive display utilities]({{ site.baseurl }}/docs/{{ site.docs_version }}/utilities/display/).
+Create equal-width columns that span multiple rows by inserting a `.w-100` where you want the columns to break to a new line. Make the breaks responsive by mixing the `.w-100` with some [responsive display utilities](/docs/{{< param docs_version >}}/utilities/display/).
<div class="bd-example-row">
-{% capture example %}
+{{< example >}}
<div class="container">
<div class="row">
<div class="col">col</div>
@@ -251,8 +246,7 @@ Create equal-width columns that span multiple rows by inserting a `.w-100` where
<div class="col">col</div>
</div>
</div>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
</div>
## Responsive classes
@@ -264,7 +258,7 @@ Bootstrap's grid includes five tiers of predefined classes for building complex
For grids that are the same from the smallest of devices to the largest, use the `.col` and `.col-*` classes. Specify a numbered class when you need a particularly sized column; otherwise, feel free to stick to `.col`.
<div class="bd-example-row">
-{% capture example %}
+{{< example >}}
<div class="container">
<div class="row">
<div class="col">col</div>
@@ -277,8 +271,7 @@ For grids that are the same from the smallest of devices to the largest, use the
<div class="col-4">col-4</div>
</div>
</div>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
</div>
### Stacked to horizontal
@@ -286,7 +279,7 @@ For grids that are the same from the smallest of devices to the largest, use the
Using a single set of `.col-sm-*` classes, you can create a basic grid system that starts out stacked and becomes horizontal at the small breakpoint (`sm`).
<div class="bd-example-row">
-{% capture example %}
+{{< example >}}
<div class="container">
<div class="row">
<div class="col-sm-8">col-sm-8</div>
@@ -298,8 +291,7 @@ Using a single set of `.col-sm-*` classes, you can create a basic grid system th
<div class="col-sm">col-sm</div>
</div>
</div>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
</div>
### Mix and match
@@ -307,7 +299,7 @@ Using a single set of `.col-sm-*` classes, you can create a basic grid system th
Don't want your columns to simply stack in some grid tiers? Use a combination of different classes for each tier as needed. See the example below for a better idea of how it all works.
<div class="bd-example-row">
-{% capture example %}
+{{< example >}}
<div class="container">
<!-- Stack the columns on mobile by making one full-width and the other half-width -->
<div class="row">
@@ -328,8 +320,7 @@ Don't want your columns to simply stack in some grid tiers? Use a combination of
<div class="col-6">.col-6</div>
</div>
</div>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
</div>
### Gutters
@@ -338,15 +329,14 @@ Gutters can be responsively adjusted by breakpoint-specific padding and negative
Here's an example of customizing the Bootstrap grid at the large (`lg`) breakpoint and above. We've increased the `.col` padding with `.px-lg-5`, counteracted that with `.mx-lg-n5` on the parent `.row` and then adjusted the `.container` wrapper with `.px-lg-5`.
-{% capture example %}
+{{< example >}}
<div class="container px-lg-5">
<div class="row mx-lg-n5">
<div class="col py-3 px-lg-5 border bg-light">Custom column padding</div>
<div class="col py-3 px-lg-5 border bg-light">Custom column padding</div>
</div>
</div>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
## Alignment
@@ -355,7 +345,7 @@ Use flexbox alignment utilities to vertically and horizontally align columns.
### Vertical alignment
<div class="bd-example-row bd-example-row-flex-cols">
-{% capture example %}
+{{< example >}}
<div class="container">
<div class="row align-items-start">
<div class="col">
@@ -391,12 +381,11 @@ Use flexbox alignment utilities to vertically and horizontally align columns.
</div>
</div>
</div>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
</div>
<div class="bd-example-row bd-example-row-flex-cols">
-{% capture example %}
+{{< example >}}
<div class="container">
<div class="row">
<div class="col align-self-start">
@@ -410,14 +399,13 @@ Use flexbox alignment utilities to vertically and horizontally align columns.
</div>
</div>
</div>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
</div>
### Horizontal alignment
<div class="bd-example-row">
-{% capture example %}
+{{< example >}}
<div class="container">
<div class="row justify-content-start">
<div class="col-4">
@@ -460,19 +448,18 @@ Use flexbox alignment utilities to vertically and horizontally align columns.
</div>
</div>
</div>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
</div>
### No gutters
The gutters between columns in our predefined grid classes can be removed with `.no-gutters`. This removes the negative `margin`s from `.row` and the horizontal `padding` from all immediate children columns.
-Here's the source code for creating these styles. Note that column overrides are scoped to only the first children columns and are targeted via [attribute selector](https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors). While this generates a more specific selector, column padding can still be further customized with [spacing utilities]({{ site.baseurl }}/docs/{{ site.docs_version }}/utilities/spacing/).
+Here's the source code for creating these styles. Note that column overrides are scoped to only the first children columns and are targeted via [attribute selector](https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors). While this generates a more specific selector, column padding can still be further customized with [spacing utilities](/docs/{{< param docs_version >}}/utilities/spacing/).
**Need an edge-to-edge design?** Drop the parent `.container` or `.container-fluid`.
-{% highlight sass %}
+{{< highlight scss >}}
.no-gutters {
margin-right: 0;
margin-left: 0;
@@ -483,18 +470,17 @@ Here's the source code for creating these styles. Note that column overrides are
padding-left: 0;
}
}
-{% endhighlight %}
+{{< /highlight >}}
In practice, here's how it looks. Note you can continue to use this with all other predefined grid classes (including column widths, responsive tiers, reorders, and more).
<div class="bd-example-row">
-{% capture example %}
+{{< example >}}
<div class="row no-gutters">
<div class="col-12 col-sm-6 col-md-8">.col-12 .col-sm-6 .col-md-8</div>
<div class="col-6 col-md-4">.col-6 .col-md-4</div>
</div>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
</div>
### Column wrapping
@@ -502,7 +488,7 @@ In practice, here's how it looks. Note you can continue to use this with all oth
If more than 12 columns are placed within a single row, each group of extra columns will, as one unit, wrap onto a new line.
<div class="bd-example-row">
-{% capture example %}
+{{< example >}}
<div class="container">
<div class="row">
<div class="col-9">.col-9</div>
@@ -510,8 +496,7 @@ If more than 12 columns are placed within a single row, each group of extra colu
<div class="col-6">.col-6<br>Subsequent columns continue along the new line.</div>
</div>
</div>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
</div>
### Column breaks
@@ -519,7 +504,7 @@ If more than 12 columns are placed within a single row, each group of extra colu
Breaking columns to a new line in flexbox requires a small hack: add an element with `width: 100%` wherever you want to wrap your columns to a new line. Normally this is accomplished with multiple `.row`s, but not every implementation method can account for this.
<div class="bd-example-row">
-{% capture example %}
+{{< example >}}
<div class="container">
<div class="row">
<div class="col-6 col-sm-3">.col-6 .col-sm-3</div>
@@ -532,14 +517,13 @@ Breaking columns to a new line in flexbox requires a small hack: add an element
<div class="col-6 col-sm-3">.col-6 .col-sm-3</div>
</div>
</div>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
</div>
-You may also apply this break at specific breakpoints with our [responsive display utilities]({{ site.baseurl }}/docs/{{ site.docs_version }}/utilities/display/).
+You may also apply this break at specific breakpoints with our [responsive display utilities](/docs/{{< param docs_version >}}/utilities/display/).
<div class="bd-example-row">
-{% capture example %}
+{{< example >}}
<div class="container">
<div class="row">
<div class="col-6 col-sm-4">.col-6 .col-sm-4</div>
@@ -552,8 +536,7 @@ You may also apply this break at specific breakpoints with our [responsive displ
<div class="col-6 col-sm-4">.col-6 .col-sm-4</div>
</div>
</div>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
</div>
## Reordering
@@ -563,7 +546,7 @@ You may also apply this break at specific breakpoints with our [responsive displ
Use `.order-` classes for controlling the **visual order** of your content. These classes are responsive, so you can set the `order` by breakpoint (e.g., `.order-1.order-md-2`). Includes support for `1` through `12` across all five grid tiers.
<div class="bd-example-row">
-{% capture example %}
+{{< example >}}
<div class="container">
<div class="row">
<div class="col">
@@ -577,14 +560,13 @@ Use `.order-` classes for controlling the **visual order** of your content. Thes
</div>
</div>
</div>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
</div>
There are also responsive `.order-first` and `.order-last` classes that change the `order` of an element by applying `order: -1` and `order: 13` (`order: $columns + 1`), respectively. These classes can also be intermixed with the numbered `.order-*` classes as needed.
<div class="bd-example-row">
-{% capture example %}
+{{< example >}}
<div class="container">
<div class="row">
<div class="col order-last">
@@ -598,20 +580,19 @@ There are also responsive `.order-first` and `.order-last` classes that change t
</div>
</div>
</div>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
</div>
### Offsetting columns
-You can offset grid columns in two ways: our responsive `.offset-` grid classes and our [margin utilities]({{ site.baseurl }}/docs/{{ site.docs_version }}/utilities/spacing/). Grid classes are sized to match columns while margins are more useful for quick layouts where the width of the offset is variable.
+You can offset grid columns in two ways: our responsive `.offset-` grid classes and our [margin utilities](/docs/{{< param docs_version >}}/utilities/spacing/). Grid classes are sized to match columns while margins are more useful for quick layouts where the width of the offset is variable.
#### Offset classes
Move columns to the right using `.offset-md-*` classes. These classes increase the left margin of a column by `*` columns. For example, `.offset-md-4` moves `.col-md-4` over four columns.
<div class="bd-example-row">
-{% capture example %}
+{{< example >}}
<div class="container">
<div class="row">
<div class="col-md-4">.col-md-4</div>
@@ -625,14 +606,13 @@ Move columns to the right using `.offset-md-*` classes. These classes increase t
<div class="col-md-6 offset-md-3">.col-md-6 .offset-md-3</div>
</div>
</div>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
</div>
-In addition to column clearing at responsive breakpoints, you may need to reset offsets. See this in action in [the grid example]({{ site.baseurl }}/docs/{{ site.docs_version }}/examples/grid/).
+In addition to column clearing at responsive breakpoints, you may need to reset offsets. See this in action in [the grid example](/docs/{{< param docs_version >}}/examples/grid/).
<div class="bd-example-row">
-{% capture example %}
+{{< example >}}
<div class="container">
<div class="row">
<div class="col-sm-5 col-md-6">.col-sm-5 .col-md-6</div>
@@ -643,8 +623,7 @@ In addition to column clearing at responsive breakpoints, you may need to reset
<div class="col-sm-6 col-md-5 offset-md-2 col-lg-6 offset-lg-0">.col-sm-6 .col-md-5 .offset-md-2 .col-lg-6 .offset-lg-0</div>
</div>
</div>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
</div>
#### Margin utilities
@@ -652,7 +631,7 @@ In addition to column clearing at responsive breakpoints, you may need to reset
With the move to flexbox in v4, you can use margin utilities like `.mr-auto` to force sibling columns away from one another.
<div class="bd-example-row">
-{% capture example %}
+{{< example >}}
<div class="container">
<div class="row">
<div class="col-md-4">.col-md-4</div>
@@ -667,8 +646,7 @@ With the move to flexbox in v4, you can use margin utilities like `.mr-auto` to
<div class="col-auto">.col-auto</div>
</div>
</div>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
</div>
## Nesting
@@ -676,7 +654,7 @@ With the move to flexbox in v4, you can use margin utilities like `.mr-auto` to
To nest your content with the default grid, add a new `.row` and set of `.col-sm-*` columns within an existing `.col-sm-*` column. Nested rows should include a set of columns that add up to 12 or fewer (it is not required that you use all 12 available columns).
<div class="bd-example-row">
-{% capture example %}
+{{< example >}}
<div class="container">
<div class="row">
<div class="col-sm-9">
@@ -692,8 +670,7 @@ To nest your content with the default grid, add a new `.row` and set of `.col-sm
</div>
</div>
</div>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
</div>
## Sass mixins
@@ -704,7 +681,7 @@ When using Bootstrap's source Sass files, you have the option of using Sass vari
Variables and maps determine the number of columns, the gutter width, and the media query point at which to begin floating columns. We use these to generate the predefined grid classes documented above, as well as for the custom mixins listed below.
-{% highlight scss %}
+{{< highlight scss >}}
$grid-columns: 12;
$grid-gutter-width: 30px;
@@ -727,13 +704,13 @@ $container-max-widths: (
lg: 960px,
xl: 1140px
);
-{% endhighlight %}
+{{< /highlight >}}
### Mixins
Mixins are used in conjunction with the grid variables to generate semantic CSS for individual grid columns.
-{% highlight scss %}
+{{< highlight scss >}}
// Creates a wrapper for a series of columns
@include make-row();
@@ -743,13 +720,13 @@ Mixins are used in conjunction with the grid variables to generate semantic CSS
// Get fancy by offsetting, or changing the sort order
@include make-col-offset($size, $columns: $grid-columns);
-{% endhighlight %}
+{{< /highlight >}}
### Example usage
You can modify the variables to your own custom values, or just use the mixins with their default values. Here's an example of using the default settings to create a two-column layout with a gap between.
-{% highlight scss %}
+{{< highlight scss >}}
.example-container {
width: 800px;
@include make-container();
@@ -780,17 +757,16 @@ You can modify the variables to your own custom values, or just use the mixins w
@include make-col(4);
}
}
-{% endhighlight %}
+{{< /highlight >}}
-{% capture example %}
+{{< example >}}
<div class="example-container">
<div class="example-row">
<div class="example-content-main">Main content</div>
<div class="example-content-secondary">Secondary content</div>
</div>
</div>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
## Customizing the grid
@@ -800,16 +776,16 @@ Using our built-in grid Sass variables and maps, it's possible to completely cus
The number of grid columns can be modified via Sass variables. `$grid-columns` is used to generate the widths (in percent) of each individual column while `$grid-gutter-width` sets the width for the column gutters.
-{% highlight scss %}
+{{< highlight scss >}}
$grid-columns: 12 !default;
$grid-gutter-width: 30px !default;
-{% endhighlight %}
+{{< /highlight >}}
### Grid tiers
Moving beyond the columns themselves, you may also customize the number of grid tiers. If you wanted just four grid tiers, you'd update the `$grid-breakpoints` and `$container-max-widths` to something like this:
-{% highlight scss %}
+{{< highlight scss >}}
$grid-breakpoints: (
xs: 0,
sm: 480px,
@@ -822,6 +798,6 @@ $container-max-widths: (
md: 720px,
lg: 960px
);
-{% endhighlight %}
+{{< /highlight >}}
When making any changes to the Sass variables or maps, you'll need to save your changes and recompile. Doing so will output a brand new set of predefined grid classes for column widths, offsets, and ordering. Responsive visibility utilities will also be updated to use the custom breakpoints. Make sure to set grid values in `px` (not `rem`, `em`, or `%`).
diff --git a/site/docs/4.3/layout/overview.md b/site/content/docs/4.3/layout/overview.md
index ff21f2cba8..87f8691930 100644
--- a/site/docs/4.3/layout/overview.md
+++ b/site/content/docs/4.3/layout/overview.md
@@ -3,7 +3,7 @@ layout: docs
title: Overview
description: Components and options for laying out your Bootstrap project, including wrapping containers, a powerful grid system, a flexible media object, and responsive utility classes.
group: layout
-redirect_from: "/docs/4.3/layout/"
+aliases: "/docs/4.3/layout/"
toc: true
---
@@ -21,11 +21,11 @@ While containers *can* be nested, most layouts do not require a nested container
</div>
</div>
-{% highlight html %}
+{{< highlight html >}}
<div class="container">
<!-- Content here -->
</div>
-{% endhighlight %}
+{{< /highlight >}}
Use `.container-fluid` for a full width container, spanning the entire width of the viewport.
@@ -37,11 +37,11 @@ Use `.container-fluid` for a full width container, spanning the entire width of
</div>
</div>
-{% highlight html %}
+{{< highlight html >}}
<div class="container-fluid">
...
</div>
-{% endhighlight %}
+{{< /highlight >}}
## Responsive breakpoints
@@ -50,7 +50,7 @@ Since Bootstrap is developed to be mobile first, we use a handful of [media quer
Bootstrap primarily uses the following media query ranges—or breakpoints—in our source Sass files for our layout, grid system, and components.
-{% highlight scss %}
+{{< highlight scss >}}
// Extra small devices (portrait phones, less than 576px)
// No media query for `xs` since this is the default in Bootstrap
@@ -65,11 +65,11 @@ Bootstrap primarily uses the following media query ranges—or breakpoints—in
// Extra large devices (large desktops, 1200px and up)
@media (min-width: 1200px) { ... }
-{% endhighlight %}
+{{< /highlight >}}
Since we write our source CSS in Sass, all our media queries are available via Sass mixins:
-{% highlight scss %}
+{{< highlight scss >}}
// No media query necessary for xs breakpoint as it's effectively `@media (min-width: 0) { ... }`
@include media-breakpoint-up(sm) { ... }
@include media-breakpoint-up(md) { ... }
@@ -85,11 +85,11 @@ Since we write our source CSS in Sass, all our media queries are available via S
display: block;
}
}
-{% endhighlight %}
+{{< /highlight >}}
We occasionally use media queries that go in the other direction (the given screen size *or smaller*):
-{% highlight scss %}
+{{< highlight scss >}}
// Extra small devices (portrait phones, less than 576px)
@media (max-width: 575.98px) { ... }
@@ -104,13 +104,15 @@ We occasionally use media queries that go in the other direction (the given scre
// Extra large devices (large desktops)
// No media query since the extra-large breakpoint has no upper bound on its width
-{% endhighlight %}
+{{< /highlight >}}
-{% include callout-info-mediaqueries-breakpoints.md %}
+{{< callout info >}}
+{{< partial "callout-info-mediaqueries-breakpoints.md" >}}
+{{< /callout >}}
Once again, these media queries are also available via Sass mixins:
-{% highlight scss %}
+{{< highlight scss >}}
@include media-breakpoint-down(xs) { ... }
@include media-breakpoint-down(sm) { ... }
@include media-breakpoint-down(md) { ... }
@@ -123,11 +125,11 @@ Once again, these media queries are also available via Sass mixins:
display: block;
}
}
-{% endhighlight %}
+{{< /highlight >}}
There are also media queries and mixins for targeting a single segment of screen sizes using the minimum and maximum breakpoint widths.
-{% highlight scss %}
+{{< highlight scss >}}
// Extra small devices (portrait phones, less than 576px)
@media (max-width: 575.98px) { ... }
@@ -142,31 +144,31 @@ There are also media queries and mixins for targeting a single segment of screen
// Extra large devices (large desktops, 1200px and up)
@media (min-width: 1200px) { ... }
-{% endhighlight %}
+{{< /highlight >}}
These media queries are also available via Sass mixins:
-{% highlight scss %}
+{{< highlight scss >}}
@include media-breakpoint-only(xs) { ... }
@include media-breakpoint-only(sm) { ... }
@include media-breakpoint-only(md) { ... }
@include media-breakpoint-only(lg) { ... }
@include media-breakpoint-only(xl) { ... }
-{% endhighlight %}
+{{< /highlight >}}
Similarly, media queries may span multiple breakpoint widths:
-{% highlight scss %}
+{{< highlight scss >}}
// Example
// Apply styles starting from medium devices and up to extra large devices
@media (min-width: 768px) and (max-width: 1199.98px) { ... }
-{% endhighlight %}
+{{< /highlight >}}
The Sass mixin for targeting the same screen size range would be:
-{% highlight scss %}
+{{< highlight scss >}}
@include media-breakpoint-between(md, xl) { ... }
-{% endhighlight %}
+{{< /highlight >}}
## Z-index
@@ -176,7 +178,7 @@ These higher values start at an arbitrary number, high and specific enough to id
We don't encourage customization of these individual values; should you change one, you likely need to change them all.
-{% highlight scss %}
+{{< highlight scss >}}
$zindex-dropdown: 1000 !default;
$zindex-sticky: 1020 !default;
$zindex-fixed: 1030 !default;
@@ -184,6 +186,6 @@ $zindex-modal-backdrop: 1040 !default;
$zindex-modal: 1050 !default;
$zindex-popover: 1060 !default;
$zindex-tooltip: 1070 !default;
-{% endhighlight %}
+{{< /highlight >}}
To handle overlapping borders within components (e.g., buttons and inputs in input groups), we use low single digit `z-index` values of `1`, `2`, and `3` for default, hover, and active states. On hover/focus/active, we bring a particular element to the forefront with a higher `z-index` value to show their border over the sibling elements.
diff --git a/site/content/docs/4.3/layout/utilities-for-layout.md b/site/content/docs/4.3/layout/utilities-for-layout.md
new file mode 100644
index 0000000000..ea267d249a
--- /dev/null
+++ b/site/content/docs/4.3/layout/utilities-for-layout.md
@@ -0,0 +1,25 @@
+---
+layout: docs
+title: Utilities for layout
+description: For faster mobile-friendly and responsive development, Bootstrap includes dozens of utility classes for showing, hiding, aligning, and spacing content.
+group: layout
+toc: true
+---
+
+## Changing `display`
+
+Use our [display utilities](/docs/{{< param docs_version >}}/utilities/display/) for responsively toggling common values of the `display` property. Mix it with our grid system, content, or components to show or hide them across specific viewports.
+
+## Flexbox options
+
+Bootstrap 4 is built with flexbox, but not every element's `display` has been changed to `display: flex` as this would add many unnecessary overrides and unexpectedly change key browser behaviors. Most of [our components](/docs/{{< param docs_version >}}/components/alerts/) are built with flexbox enabled.
+
+Should you need to add `display: flex` to an element, do so with `.d-flex` or one of the responsive variants (e.g., `.d-sm-flex`). You'll need this class or `display` value to allow the use of our extra [flexbox utilities](/docs/{{< param docs_version >}}/utilities/flex/) for sizing, alignment, spacing, and more.
+
+## Margin and padding
+
+Use the `margin` and `padding` [spacing utilities](/docs/{{< param docs_version >}}/utilities/spacing/) to control how elements and components are spaced and sized. Bootstrap 4 includes a five-level scale for spacing utilities, based on a `1rem` value default `$spacer` variable. Choose values for all viewports (e.g., `.mr-3` for `margin-right: 1rem`), or pick responsive variants to target specific viewports (e.g., `.mr-md-3` for `margin-right: 1rem` starting at the `md` breakpoint).
+
+## Toggle `visibility`
+
+When toggling `display` isn't needed, you can toggle the `visibility` of an element with our [visibility utilities](/docs/{{< param docs_version >}}/utilities/visibility/). Invisible elements will still affect the layout of the page, but are visually hidden from visitors.
diff --git a/site/docs/4.3/migration.md b/site/content/docs/4.3/migration.md
index af76b022cf..cf1ca1bb32 100644
--- a/site/docs/4.3/migration.md
+++ b/site/content/docs/4.3/migration.md
@@ -3,7 +3,7 @@ layout: docs
title: Migrating to v4
description: Bootstrap 4 is a major rewrite of the entire project. The most notable changes are summarized below, followed by more specific changes to relevant components.
group: migration
-redirect_from: "/migration/"
+aliases: "/migration/"
toc: true
---
@@ -89,7 +89,7 @@ Here are the big ticket items you'll want to be aware of when moving from v3 to
- Build system overhauled to use a series of npm scripts instead of Grunt. See `package.json` for all scripts, or our project readme for local development needs.
- Non-responsive usage of Bootstrap is no longer supported.
- Dropped the online Customizer in favor of more extensive setup documentation and customized builds.
-- Added dozens of new [utility classes]({{ site.baseurl }}/docs/{{ site.docs_version }}/utilities/) for common CSS property-value pairs and margin/padding spacing shortcuts.
+- Added dozens of new [utility classes](/docs/{{< param docs_version >}}/utilities/) for common CSS property-value pairs and margin/padding spacing shortcuts.
### Grid system
@@ -108,12 +108,12 @@ Here are the big ticket items you'll want to be aware of when moving from v3 to
### Components
-- **Dropped panels, thumbnails, and wells** for a new all-encompassing component, [cards]({{ site.baseurl }}/docs/{{ site.docs_version }}/components/card/).
+- **Dropped panels, thumbnails, and wells** for a new all-encompassing component, [cards](/docs/{{< param docs_version >}}/components/card/).
- **Dropped the Glyphicons icon font.** If you need icons, some options are:
- the upstream version of [Glyphicons](https://www.glyphicons.com/)
- [Octicons](https://octicons.github.com/)
- [Font Awesome](https://fontawesome.com/)
- - See the [Extend page]({{ site.baseurl }}/docs/{{ site.docs_version }}/extend/icons/) for a list of alternatives. Have additional suggestions? Please open an issue or PR.
+ - See the [Extend page](/docs/{{< param docs_version >}}/extend/icons/) for a list of alternatives. Have additional suggestions? Please open an issue or PR.
- **Dropped the Affix jQuery plugin.**
- We recommend using `position: sticky` instead. [See the HTML5 Please entry](https://html5please.com/#sticky) for details and specific polyfill recommendations. One suggestion is to use an `@supports` rule for implementing it (e.g., `@supports (position: sticky) { ... }`)
- If you were using Affix to apply additional, non-`position` styles, the polyfills might not support your use case. One option for such uses is the third-party [ScrollPos-Styler](https://github.com/acch/scrollpos-styler) library.
@@ -126,7 +126,7 @@ This list highlights key changes by component between v3.x.x and v4.0.0.
### Reboot
-New to Bootstrap 4 is the [Reboot]({{ site.baseurl }}/docs/{{ site.docs_version }}/content/reboot/), a new stylesheet that builds on Normalize with our own somewhat opinionated reset styles. Selectors appearing in this file only use elements—there are no classes here. This isolates our reset styles from our component styles for a more modular approach. Some of the most important resets this includes are the `box-sizing: border-box` change, moving from `em` to `rem` units on many elements, link styles, and many form element resets.
+New to Bootstrap 4 is the [Reboot](/docs/{{< param docs_version >}}/content/reboot/), a new stylesheet that builds on Normalize with our own somewhat opinionated reset styles. Selectors appearing in this file only use elements—there are no classes here. This isolates our reset styles from our component styles for a more modular approach. Some of the most important resets this includes are the `box-sizing: border-box` change, moving from `em` to `rem` units on many elements, link styles, and many form element resets.
### Typography
@@ -172,7 +172,7 @@ New to Bootstrap 4 is the [Reboot]({{ site.baseurl }}/docs/{{ site.docs_version
- Renamed `.btn-default` to `.btn-secondary`.
- Dropped the `.btn-xs` class entirely as `.btn-sm` is proportionally much smaller than v3's.
-- The [stateful button]({{ site.url }}/docs/3.3/javascript/#buttons-stateful) feature of the `button.js` jQuery plugin has been dropped. This includes the `$().button(string)` and `$().button('reset')` methods. We advise using a tiny bit of custom JavaScript instead, which will have the benefit of behaving exactly the way you want it to.
+- The [stateful button]({{< abs.inline >}}{{ printf "%s/docs/3.3/javascript/#buttons-stateful" $.Site.BaseURL }}{{< /abs.inline >}}) feature of the `button.js` jQuery plugin has been dropped. This includes the `$().button(string)` and `$().button('reset')` methods. We advise using a tiny bit of custom JavaScript instead, which will have the benefit of behaving exactly the way you want it to.
- Note that the other features of the plugin (button checkboxes, button radios, single-toggle buttons) have been retained in v4.
- Change buttons' `[disabled]` to `:disabled` as IE9+ supports `:disabled`. However `fieldset[disabled]` is still necessary because [native disabled fieldsets are still buggy in IE11](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/fieldset#Browser_compatibility).
@@ -225,7 +225,7 @@ The navbar has been entirely rewritten in flexbox with improved support for alig
- Responsive navbar behaviors are now applied to the `.navbar` class via the **required** `.navbar-expand-{breakpoint}` where you choose where to collapse the navbar. Previously this was a Less variable modification and required recompiling.
- `.navbar-default` is now `.navbar-light`, though `.navbar-dark` remains the same. **One of these is required on each navbar.** However, these classes no longer set `background-color`s; instead they essentially only affect `color`.
-- Navbars now require a background declaration of some kind. Choose from our background utilities (`.bg-*`) or set your own with the light/inverse classes above [for mad customization]({{ site.baseurl }}/docs/{{ site.docs_version }}/components/navbar/#color-schemes).
+- Navbars now require a background declaration of some kind. Choose from our background utilities (`.bg-*`) or set your own with the light/inverse classes above [for mad customization](/docs/{{< param docs_version >}}/components/navbar/#color-schemes).
- Given flexbox styles, navbars can now use flexbox utilities for easy alignment options.
- `.navbar-toggle` is now `.navbar-toggler` and has different styles and inner markup (no more three `<span>`s).
- Dropped the `.navbar-form` class entirely. It's no longer necessary; instead, just use `.form-inline` and apply margin utilities as necessary.
@@ -259,7 +259,7 @@ Dropped entirely for the new card component.
- `.panel-default` removed and no replacement.
- `.panel-group` removed and no replacement. `.card-group` is not a replacement, it is different.
- `.panel-heading` to `.card-header`
-- `.panel-title` to `.card-title`. Depending on the desired look, you may also want to use [heading elements or classes]({{ site.baseurl }}/docs/{{ site.docs_version }}/content/typography/#headings) (e.g. `<h3>`, `.h3`) or bold elements or classes (e.g. `<strong>`, `<b>`, [`.font-weight-bold`]({{ site.baseurl }}/docs/{{ site.docs_version }}/utilities/text/#font-weight-and-italics)). Note that `.card-title`, while similarly named, produces a different look than `.panel-title`.
+- `.panel-title` to `.card-title`. Depending on the desired look, you may also want to use [heading elements or classes](/docs/{{< param docs_version >}}/content/typography/#headings) (e.g. `<h3>`, `.h3`) or bold elements or classes (e.g. `<strong>`, `<b>`, [`.font-weight-bold`](/docs/{{< param docs_version >}}/utilities/text/#font-weight-and-italics)). Note that `.card-title`, while similarly named, produces a different look than `.panel-title`.
- `.panel-body` to `.card-body`
- `.panel-footer` to `.card-footer`
- `.panel-primary`, `.panel-success`, `.panel-info`, `.panel-warning`, and `.panel-danger` have been dropped for `.bg-`, `.text-`, and `.border` utilities generated from our `$theme-colors` Sass map.
@@ -289,13 +289,13 @@ Dropped entirely for the new card component.
- **Display, hidden, and more:**
- Made display utilities responsive (e.g., `.d-none` and `d-{sm,md,lg,xl}-none`).
- - Dropped the bulk of `.hidden-*` utilities for new [display utilities]({{ site.baseurl }}/docs/{{ site.docs_version }}/utilities/display/). For example, instead of `.hidden-sm-up`, use `.d-sm-none`. Renamed the `.hidden-print` utilities to use the display utility naming scheme. More info under the [Responsive utilities](#responsive-utilities) section of this page.
+ - Dropped the bulk of `.hidden-*` utilities for new [display utilities](/docs/{{< param docs_version >}}/utilities/display/). For example, instead of `.hidden-sm-up`, use `.d-sm-none`. Renamed the `.hidden-print` utilities to use the display utility naming scheme. More info under the [Responsive utilities](#responsive-utilities) section of this page.
- Added `.float-{sm,md,lg,xl}-{left,right,none}` classes for responsive floats and removed `.pull-left` and `.pull-right` since they're redundant to `.float-left` and `.float-right`.
- **Type:**
- Added responsive variations to our text alignment classes `.text-{sm,md,lg,xl}-{left,center,right}`.
- **Alignment and spacing:**
- - Added new [responsive margin and padding utilities]({{ site.baseurl }}/docs/{{ site.docs_version }}/utilities/spacing/) for all sides, plus vertical and horizontal shorthands.
- - Added boatload of [flexbox utilities]({{ site.baseurl }}/docs/{{ site.docs_version }}/utilities/flex/).
+ - Added new [responsive margin and padding utilities](/docs/{{< param docs_version >}}/utilities/spacing/) for all sides, plus vertical and horizontal shorthands.
+ - Added boatload of [flexbox utilities](/docs/{{< param docs_version >}}/utilities/flex/).
- Dropped `.center-block` for the new `.mx-auto` class.
- Clearfix updated to drop support for older browser versions.
@@ -310,7 +310,7 @@ Removed the following mixins: `animation`, `animation-delay`, `animation-directi
Our documentation received an upgrade across the board as well. Here's the low down:
- We're still using Jekyll, but we have plugins in the mix:
- - `bugify.rb` is used to efficiently list out the entries on our [browser bugs]({{ site.baseurl }}/docs/{{ site.docs_version }}/browser-bugs/) page.
+ - `bugify.rb` is used to efficiently list out the entries on our [browser bugs](/docs/{{< param docs_version >}}/browser-bugs/) page.
- `example.rb` is a custom fork of the default `highlight.rb` plugin, allowing for easier example-code handling.
- `callout.rb` is a similar custom fork of that, but designed for our special docs callouts.
- [jekyll-toc](https://github.com/toshimaru/jekyll-toc) is used to generate our table of contents.
diff --git a/site/docs/4.3/utilities/borders.md b/site/content/docs/4.3/utilities/borders.md
index c9855776da..0cb9fc1216 100644
--- a/site/docs/4.3/utilities/borders.md
+++ b/site/content/docs/4.3/utilities/borders.md
@@ -3,7 +3,7 @@ layout: docs
title: Borders
description: Use border utilities to quickly style the border and border-radius of an element. Great for images, buttons, or any other element.
group: utilities
-redirect_from: "/docs/4.3/utilities/"
+aliases: "/docs/4.3/utilities/"
toc: true
---
@@ -14,27 +14,25 @@ Use border utilities to add or remove an element's borders. Choose from all bord
### Additive
<div class="bd-example-border-utils">
-{% capture example %}
+{{< example >}}
<span class="border"></span>
<span class="border-top"></span>
<span class="border-right"></span>
<span class="border-bottom"></span>
<span class="border-left"></span>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
</div>
### Subtractive
<div class="bd-example-border-utils bd-example-border-utils-0">
-{% capture example %}
+{{< example >}}
<span class="border-0"></span>
<span class="border-top-0"></span>
<span class="border-right-0"></span>
<span class="border-bottom-0"></span>
<span class="border-left-0"></span>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
</div>
## Border color
@@ -42,12 +40,14 @@ Use border utilities to add or remove an element's borders. Choose from all bord
Change the border color using utilities built on our theme colors.
<div class="bd-example-border-utils">
-{% capture example %}
-{% for color in site.data.theme-colors %}
-<span class="border border-{{ color.name }}"></span>{% endfor %}
+{{< example >}}
+{{< border.inline >}}
+{{- range (index $.Site.Data "theme-colors") }}
+<span class="border border-{{ .name }}"></span>
+{{- end -}}
+{{< /border.inline >}}
<span class="border border-white"></span>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
</div>
## Border-radius
@@ -55,17 +55,17 @@ Change the border color using utilities built on our theme colors.
Add classes to an element to easily round its corners.
<div class="bd-example bd-example-images">
- {%- include icons/placeholder.svg width="75" height="75" class="rounded" title="Example rounded image" -%}
- {%- include icons/placeholder.svg width="75" height="75" class="rounded-top" title="Example top rounded image" -%}
- {%- include icons/placeholder.svg width="75" height="75" class="rounded-right" title="Example right rounded image" -%}
- {%- include icons/placeholder.svg width="75" height="75" class="rounded-bottom" title="Example bottom rounded image" -%}
- {%- include icons/placeholder.svg width="75" height="75" class="rounded-left" title="Example left rounded image" -%}
- {%- include icons/placeholder.svg width="75" height="75" class="rounded-circle" title="Completely round image" -%}
- {%- include icons/placeholder.svg width="150" height="75" class="rounded-pill" title="Rounded pill image" -%}
- {%- include icons/placeholder.svg width="75" height="75" class="rounded-0" title="Example non-rounded image (overrides rounding applied elsewhere)" -%}
+ {{< placeholder width="75" height="75" class="rounded" title="Example rounded image" >}}
+ {{< placeholder width="75" height="75" class="rounded-top" title="Example top rounded image" >}}
+ {{< placeholder width="75" height="75" class="rounded-right" title="Example right rounded image" >}}
+ {{< placeholder width="75" height="75" class="rounded-bottom" title="Example bottom rounded image" >}}
+ {{< placeholder width="75" height="75" class="rounded-left" title="Example left rounded image" >}}
+ {{< placeholder width="75" height="75" class="rounded-circle" title="Completely round image" >}}
+ {{< placeholder width="150" height="75" class="rounded-pill" title="Rounded pill image" >}}
+ {{< placeholder width="75" height="75" class="rounded-0" title="Example non-rounded image (overrides rounding applied elsewhere)" >}}
</div>
-{% highlight html %}
+{{< highlight html >}}
<img src="..." alt="..." class="rounded">
<img src="..." alt="..." class="rounded-top">
<img src="..." alt="..." class="rounded-right">
@@ -74,18 +74,18 @@ Add classes to an element to easily round its corners.
<img src="..." alt="..." class="rounded-circle">
<img src="..." alt="..." class="rounded-pill">
<img src="..." alt="..." class="rounded-0">
-{% endhighlight %}
+{{< /highlight >}}
## Sizes
Use `.rounded-lg` or `.rounded-sm` for larger or smaller border-radius.
<div class="bd-example bd-example-images">
- {%- include icons/placeholder.svg width="75" height="75" class="rounded-sm" title="Example small rounded image" -%}
- {%- include icons/placeholder.svg width="75" height="75" class="rounded-lg" title="Example large rounded image" -%}
+ {{< placeholder width="75" height="75" class="rounded-sm" title="Example small rounded image" >}}
+ {{< placeholder width="75" height="75" class="rounded-lg" title="Example large rounded image" >}}
</div>
-{% highlight html %}
+{{< highlight html >}}
<img src="..." alt="..." class="rounded-sm">
<img src="..." alt="..." class="rounded-lg">
-{% endhighlight %}
+{{< /highlight >}}
diff --git a/site/docs/4.3/utilities/clearfix.md b/site/content/docs/4.3/utilities/clearfix.md
index dcf93e9bbf..d89a55a68c 100644
--- a/site/docs/4.3/utilities/clearfix.md
+++ b/site/content/docs/4.3/utilities/clearfix.md
@@ -7,11 +7,11 @@ group: utilities
Easily clear `float`s by adding `.clearfix` **to the parent element**. Can also be used as a mixin.
-{% highlight html %}
+{{< highlight html >}}
<div class="clearfix">...</div>
-{% endhighlight %}
+{{< /highlight >}}
-{% highlight scss %}
+{{< highlight scss >}}
// Mixin itself
@mixin clearfix() {
&::after {
@@ -25,14 +25,13 @@ Easily clear `float`s by adding `.clearfix` **to the parent element**. Can also
.element {
@include clearfix;
}
-{% endhighlight %}
+{{< /highlight >}}
The following example shows how the clearfix can be used. Without the clearfix the wrapping div would not span around the buttons which would cause a broken layout.
-{% capture example %}
+{{< example >}}
<div class="bg-info clearfix">
<button type="button" class="btn btn-secondary float-left">Example Button floated left</button>
<button type="button" class="btn btn-secondary float-right">Example Button floated right</button>
</div>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
diff --git a/site/docs/4.3/utilities/close-icon.md b/site/content/docs/4.3/utilities/close-icon.md
index 3a8cb3c445..8329fd94b0 100644
--- a/site/docs/4.3/utilities/close-icon.md
+++ b/site/content/docs/4.3/utilities/close-icon.md
@@ -7,9 +7,8 @@ group: utilities
**Be sure to include text for screen readers**, as we've done with `aria-label`.
-{% capture example %}
+{{< example >}}
<button type="button" class="close" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
diff --git a/site/docs/4.3/utilities/colors.md b/site/content/docs/4.3/utilities/colors.md
index 55699adb8c..4fe3c6c84d 100644
--- a/site/docs/4.3/utilities/colors.md
+++ b/site/content/docs/4.3/utilities/colors.md
@@ -8,51 +8,63 @@ toc: true
## Color
-{% capture example %}
-{% for color in site.data.theme-colors %}
-<p class="text-{{ color.name }}{% if color.name == "light" %} bg-dark{% endif %}">.text-{{ color.name }}</p>{% endfor %}
+{{< example >}}
+{{< colors.inline >}}
+{{- range (index $.Site.Data "theme-colors") }}
+<p class="text-{{ .name }}{{ if eq .name "light" }} bg-dark{{ end }}">.text-{{ .name }}</p>
+{{- end -}}
+{{< /colors.inline >}}
<p class="text-body">.text-body</p>
<p class="text-muted">.text-muted</p>
<p class="text-white bg-dark">.text-white</p>
<p class="text-black-50">.text-black-50</p>
<p class="text-white-50 bg-dark">.text-white-50</p>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
Contextual text classes also work well on anchors with the provided hover and focus states. **Note that the `.text-white` and `.text-muted` class has no additional link styling beyond underline.**
-{% capture example %}
-{% for color in site.data.theme-colors %}
-<p><a href="#" class="text-{{ color.name }}{% if color.name == "light" %} bg-dark{% endif %}">{{ color.name | capitalize }} link</a></p>{% endfor %}
+{{< example >}}
+{{< colors.inline >}}
+{{- range (index $.Site.Data "theme-colors") }}
+<p><a href="#" class="text-{{ .name }}{{ if eq .name "light" }} bg-dark{{ end }}">{{ .name | title }} link</a></p>
+{{- end -}}
+{{< /colors.inline >}}
<p><a href="#" class="text-muted">Muted link</a></p>
<p><a href="#" class="text-white bg-dark">White link</a></p>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
## Background color
Similar to the contextual text color classes, easily set the background of an element to any contextual class. Anchor components will darken on hover, just like the text classes. Background utilities **do not set `color`**, so in some cases you'll want to use `.text-*` utilities.
-{% capture example %}
-{% for color in site.data.theme-colors %}
-<div class="p-3 mb-2 bg-{{ color.name }} {% if color.name == "light" or color.name == "warning" %}text-dark{% else %}text-white{% endif %}">.bg-{{ color.name }}</div>{% endfor %}
+{{< example >}}
+{{< colors.inline >}}
+{{- range (index $.Site.Data "theme-colors") }}
+<div class="p-3 mb-2 bg-{{ .name }} {{ if or (eq .name "light") (eq .name "warning") }}text-dark{{ else }}text-white{{ end }}">.bg-{{ .name }}</div>
+{{- end -}}
+{{< /colors.inline >}}
<div class="p-3 mb-2 bg-white text-dark">.bg-white</div>
<div class="p-3 mb-2 bg-transparent text-dark">.bg-transparent</div>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
## Background gradient
-When `$enable-gradients` is set to `true` (default is `false`), you can use `.bg-gradient-` utility classes. [Learn about our Sass options]({{ site.baseurl }}/docs/{{ site.docs_version }}/getting-started/theming/#sass-options) to enable these classes and more.
+When `$enable-gradients` is set to `true` (default is `false`), you can use `.bg-gradient-` utility classes. [Learn about our Sass options](/docs/{{< param docs_version >}}/getting-started/theming/#sass-options) to enable these classes and more.
-{% for color in site.data.theme-colors %}
-- `.bg-gradient-{{ color.name }}`{% endfor %}
+{{< markdown >}}
+{{< colors.inline >}}
+{{- range (index $.Site.Data "theme-colors") }}
+- `.bg-gradient-{{ .name }}`
+{{- end -}}
+{{< /colors.inline >}}
+{{< /markdown >}}
-{% capture callout %}
+{{< callout info >}}
#### Dealing with specificity
Sometimes contextual classes cannot be applied due to the specificity of another selector. In some cases, a sufficient workaround is to wrap your element's content in a `<div>` with the class.
-{% endcapture %}
-{% include callout.html content=callout type="info" %}
+{{< /callout >}}
-{% include callout-warning-color-assistive-technologies.md %}
+{{< callout info >}}
+{{< partial "callout-warning-color-assistive-technologies.md" >}}
+{{< /callout >}}
diff --git a/site/docs/4.3/utilities/display.md b/site/content/docs/4.3/utilities/display.md
index 8dafce2d89..061c5d8351 100644
--- a/site/docs/4.3/utilities/display.md
+++ b/site/content/docs/4.3/utilities/display.md
@@ -12,7 +12,7 @@ Change the value of the [`display` property](https://developer.mozilla.org/en-US
## Notation
-Display utility classes that apply to all [breakpoints]({{ site.baseurl }}/docs/{{ site.docs_version }}/layout/overview/#responsive-breakpoints), from `xs` to `xl`, have no breakpoint abbreviation in them. This is because those classes are applied from `min-width: 0;` and up, and thus are not bound by a media query. The remaining breakpoints, however, do include a breakpoint abbreviation.
+Display utility classes that apply to all [breakpoints](/docs/{{< param docs_version >}}/layout/overview/#responsive-breakpoints), from `xs` to `xl`, have no breakpoint abbreviation in them. This is because those classes are applied from `min-width: 0;` and up, and thus are not bound by a media query. The remaining breakpoints, however, do include a breakpoint abbreviation.
As such, the classes are named using the format:
@@ -37,17 +37,15 @@ The media queries effect screen widths with the given breakpoint *or larger*. Fo
## Examples
-{% capture example %}
+{{< example >}}
<div class="d-inline p-2 bg-primary text-white">d-inline</div>
<div class="d-inline p-2 bg-dark text-white">d-inline</div>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
-{% capture example %}
+{{< example >}}
<span class="d-block p-2 bg-primary text-white">d-block</span>
<span class="d-block p-2 bg-dark text-white">d-block</span>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
## Hiding elements
@@ -72,11 +70,10 @@ To show an element only on a given interval of screen sizes you can combine one
| Visible only on lg | `.d-none .d-lg-block .d-xl-none` |
| Visible only on xl | `.d-none .d-xl-block` |
-{% capture example %}
+{{< example >}}
<div class="d-lg-none">hide on screens wider than lg</div>
<div class="d-none d-lg-block">hide on screens smaller than lg</div>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
## Display in print
@@ -94,9 +91,8 @@ Change the `display` value of elements when printing with our print display util
The print and display classes can be combined.
-{% capture example %}
+{{< example >}}
<div class="d-print-none">Screen Only (Hide on print only)</div>
<div class="d-none d-print-block">Print Only (Hide on screen only)</div>
<div class="d-none d-lg-block d-print-block">Hide up to large on screen, but always show on print</div>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
diff --git a/site/docs/4.3/utilities/embed.md b/site/content/docs/4.3/utilities/embed.md
index 1f68680746..7fdb6b943d 100644
--- a/site/docs/4.3/utilities/embed.md
+++ b/site/content/docs/4.3/utilities/embed.md
@@ -16,18 +16,17 @@ Rules are directly applied to `<iframe>`, `<embed>`, `<video>`, and `<object>` e
Wrap any embed like an `<iframe>` in a parent element with `.embed-responsive` and an aspect ratio. The `.embed-responsive-item` isn't strictly required, but we encourage it.
-{% capture example %}
+{{< example >}}
<div class="embed-responsive embed-responsive-16by9">
<iframe class="embed-responsive-item" src="https://www.youtube.com/embed/zpOULjyy-n8?rel=0" allowfullscreen></iframe>
</div>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
## Aspect ratios
Aspect ratios can be customized with modifier classes. By default the following ratio classes are provided:
-{% highlight html %}
+{{< highlight html >}}
<!-- 21:9 aspect ratio -->
<div class="embed-responsive embed-responsive-21by9">
<iframe class="embed-responsive-item" src="..."></iframe>
@@ -47,15 +46,15 @@ Aspect ratios can be customized with modifier classes. By default the following
<div class="embed-responsive embed-responsive-1by1">
<iframe class="embed-responsive-item" src="..."></iframe>
</div>
-{% endhighlight %}
+{{< /highlight >}}
Within `_variables.scss`, you can change the aspect ratios you want to use. Here's an example of the `$embed-responsive-aspect-ratios` list:
-{% highlight scss %}
+{{< highlight scss >}}
$embed-responsive-aspect-ratios: (
(21 9),
(16 9),
(4 3),
(1 1)
) !default;
-{% endhighlight %}
+{{< /highlight >}}
diff --git a/site/docs/4.3/utilities/flex.md b/site/content/docs/4.3/utilities/flex.md
index acaa2a51b8..244fc2198c 100644
--- a/site/docs/4.3/utilities/flex.md
+++ b/site/content/docs/4.3/utilities/flex.md
@@ -10,21 +10,24 @@ toc: true
Apply `display` utilities to create a flexbox container and transform **direct children elements** into flex items. Flex containers and items are able to be modified further with additional flex properties.
-{% capture example %}
+{{< example >}}
<div class="d-flex p-2 bd-highlight">I'm a flexbox container!</div>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
-{% capture example %}
+{{< example >}}
<div class="d-inline-flex p-2 bd-highlight">I'm an inline flexbox container!</div>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
Responsive variations also exist for `.d-flex` and `.d-inline-flex`.
-{% for bp in site.data.breakpoints %}
-- `.d{{ bp.abbr }}-flex`
-- `.d{{ bp.abbr }}-inline-flex`{% endfor %}
+{{< markdown >}}
+{{< flex.inline >}}
+{{- range $.Site.Data.breakpoints }}
+- `.d{{ .abbr }}-flex`
+- `.d{{ .abbr }}-inline-flex`
+{{- end -}}
+{{< /flex.inline >}}
+{{< /markdown >}}
## Direction
@@ -32,7 +35,7 @@ Set the direction of flex items in a flex container with direction utilities. In
Use `.flex-row` to set a horizontal direction (the browser default), or `.flex-row-reverse` to start the horizontal direction from the opposite side.
-{% capture example %}
+{{< example >}}
<div class="d-flex flex-row bd-highlight mb-3">
<div class="p-2 bd-highlight">Flex item 1</div>
<div class="p-2 bd-highlight">Flex item 2</div>
@@ -43,12 +46,11 @@ Use `.flex-row` to set a horizontal direction (the browser default), or `.flex-r
<div class="p-2 bd-highlight">Flex item 2</div>
<div class="p-2 bd-highlight">Flex item 3</div>
</div>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
Use `.flex-column` to set a vertical direction, or `.flex-column-reverse` to start the vertical direction from the opposite side.
-{% capture example %}
+{{< example >}}
<div class="d-flex flex-column bd-highlight mb-3">
<div class="p-2 bd-highlight">Flex item 1</div>
<div class="p-2 bd-highlight">Flex item 2</div>
@@ -59,16 +61,20 @@ Use `.flex-column` to set a vertical direction, or `.flex-column-reverse` to st
<div class="p-2 bd-highlight">Flex item 2</div>
<div class="p-2 bd-highlight">Flex item 3</div>
</div>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
Responsive variations also exist for `flex-direction`.
-{% for bp in site.data.breakpoints %}
-- `.flex{{ bp.abbr }}-row`
-- `.flex{{ bp.abbr }}-row-reverse`
-- `.flex{{ bp.abbr }}-column`
-- `.flex{{ bp.abbr }}-column-reverse`{% endfor %}
+{{< markdown >}}
+{{< flex.inline >}}
+{{- range $.Site.Data.breakpoints }}
+- `.flex{{ .abbr }}-row`
+- `.flex{{ .abbr }}-row-reverse`
+- `.flex{{ .abbr }}-column`
+- `.flex{{ .abbr }}-column-reverse`
+{{- end -}}
+{{< /flex.inline >}}
+{{< /markdown >}}
## Justify content
@@ -102,22 +108,27 @@ Use `justify-content` utilities on flexbox containers to change the alignment of
</div>
</div>
-{% highlight html %}
+{{< highlight html >}}
<div class="d-flex justify-content-start">...</div>
<div class="d-flex justify-content-end">...</div>
<div class="d-flex justify-content-center">...</div>
<div class="d-flex justify-content-between">...</div>
<div class="d-flex justify-content-around">...</div>
-{% endhighlight %}
+{{< /highlight >}}
Responsive variations also exist for `justify-content`.
-{% for bp in site.data.breakpoints %}
-- `.justify-content{{ bp.abbr }}-start`
-- `.justify-content{{ bp.abbr }}-end`
-- `.justify-content{{ bp.abbr }}-center`
-- `.justify-content{{ bp.abbr }}-between`
-- `.justify-content{{ bp.abbr }}-around`{% endfor %}
+{{< markdown >}}
+{{< flex.inline >}}
+{{- range $.Site.Data.breakpoints }}
+- `.justify-content{{ .abbr }}-start`
+- `.justify-content{{ .abbr }}-end`
+- `.justify-content{{ .abbr }}-center`
+- `.justify-content{{ .abbr }}-between`
+- `.justify-content{{ .abbr }}-around`
+{{- end -}}
+{{< /flex.inline >}}
+{{< /markdown >}}
## Align items
@@ -151,22 +162,27 @@ Use `align-items` utilities on flexbox containers to change the alignment of fle
</div>
</div>
-{% highlight html %}
+{{< highlight html >}}
<div class="d-flex align-items-start">...</div>
<div class="d-flex align-items-end">...</div>
<div class="d-flex align-items-center">...</div>
<div class="d-flex align-items-baseline">...</div>
<div class="d-flex align-items-stretch">...</div>
-{% endhighlight %}
+{{< /highlight >}}
Responsive variations also exist for `align-items`.
-{% for bp in site.data.breakpoints %}
-- `.align-items{{ bp.abbr }}-start`
-- `.align-items{{ bp.abbr }}-end`
-- `.align-items{{ bp.abbr }}-center`
-- `.align-items{{ bp.abbr }}-baseline`
-- `.align-items{{ bp.abbr }}-stretch`{% endfor %}
+{{< markdown >}}
+{{< flex.inline >}}
+{{- range $.Site.Data.breakpoints }}
+- `.align-items{{ .abbr }}-start`
+- `.align-items{{ .abbr }}-end`
+- `.align-items{{ .abbr }}-center`
+- `.align-items{{ .abbr }}-baseline`
+- `.align-items{{ .abbr }}-stretch`
+{{- end -}}
+{{< /flex.inline >}}
+{{< /markdown >}}
## Align self
@@ -200,69 +216,81 @@ Use `align-self` utilities on flexbox items to individually change their alignme
</div>
</div>
-{% highlight html %}
+{{< highlight html >}}
<div class="align-self-start">Aligned flex item</div>
<div class="align-self-end">Aligned flex item</div>
<div class="align-self-center">Aligned flex item</div>
<div class="align-self-baseline">Aligned flex item</div>
<div class="align-self-stretch">Aligned flex item</div>
-{% endhighlight %}
+{{< /highlight >}}
Responsive variations also exist for `align-self`.
-{% for bp in site.data.breakpoints %}
-- `.align-self{{ bp.abbr }}-start`
-- `.align-self{{ bp.abbr }}-end`
-- `.align-self{{ bp.abbr }}-center`
-- `.align-self{{ bp.abbr }}-baseline`
-- `.align-self{{ bp.abbr }}-stretch`{% endfor %}
+{{< markdown >}}
+{{< flex.inline >}}
+{{- range $.Site.Data.breakpoints }}
+- `.align-self{{ .abbr }}-start`
+- `.align-self{{ .abbr }}-end`
+- `.align-self{{ .abbr }}-center`
+- `.align-self{{ .abbr }}-baseline`
+- `.align-self{{ .abbr }}-stretch`
+{{- end -}}
+{{< /flex.inline >}}
+{{< /markdown >}}
## Fill
Use the `.flex-fill` class on a series of sibling elements to force them into widths equal to their content (or equal widths if their content does not surpass their border-boxes) while taking up all available horizontal space.
-{% capture example %}
+{{< example >}}
<div class="d-flex bd-highlight">
<div class="p-2 flex-fill bd-highlight">Flex item with a lot of content</div>
<div class="p-2 flex-fill bd-highlight">Flex item</div>
<div class="p-2 flex-fill bd-highlight">Flex item</div>
</div>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
Responsive variations also exist for `flex-fill`.
-{% for bp in site.data.breakpoints %}
-- `.flex{{ bp.abbr }}-fill`{% endfor %}
+{{< markdown >}}
+{{< flex.inline >}}
+{{- range $.Site.Data.breakpoints }}
+- `.flex{{ .abbr }}-fill`
+{{- end -}}
+{{< /flex.inline >}}
+{{< /markdown >}}
## Grow and shrink
Use `.flex-grow-*` utilities to toggle a flex item's ability to grow to fill available space. In the example below, the `.flex-grow-1` elements uses all available space it can, while allowing the remaining two flex items their necessary space.
-{% capture example %}
+{{< example >}}
<div class="d-flex bd-highlight">
<div class="p-2 flex-grow-1 bd-highlight">Flex item</div>
<div class="p-2 bd-highlight">Flex item</div>
<div class="p-2 bd-highlight">Third flex item</div>
</div>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
Use `.flex-shrink-*` utilities to toggle a flex item's ability to shrink if necessary. In the example below, the second flex item with `.flex-shrink-1` is forced to wrap it's contents to a new line, "shrinking" to allow more space for the previous flex item with `.w-100`.
-{% capture example %}
+{{< example >}}
<div class="d-flex bd-highlight">
<div class="p-2 w-100 bd-highlight">Flex item</div>
<div class="p-2 flex-shrink-1 bd-highlight">Flex item</div>
</div>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
Responsive variations also exist for `flex-grow` and `flex-shrink`.
-{% for bp in site.data.breakpoints %}
-- `.flex{{ bp.abbr }}-{grow|shrink}-0`
-- `.flex{{ bp.abbr }}-{grow|shrink}-1`{% endfor %}
+{{< markdown >}}
+{{< flex.inline >}}
+{{- range $.Site.Data.breakpoints }}
+- `.flex{{ .abbr }}-{grow|shrink}-0`
+- `.flex{{ .abbr }}-{grow|shrink}-1`
+{{- end -}}
+{{< /flex.inline >}}
+{{< /markdown >}}
## Auto margins
@@ -270,7 +298,7 @@ Flexbox can do some pretty awesome things when you mix flex alignments with auto
**Unfortunately, IE10 and IE11 do not properly support auto margins on flex items whose parent has a non-default `justify-content` value.** [See this StackOverflow answer](https://stackoverflow.com/a/37535548) for more details.
-{% capture example %}
+{{< example >}}
<div class="d-flex bd-highlight mb-3">
<div class="p-2 bd-highlight">Flex item</div>
<div class="p-2 bd-highlight">Flex item</div>
@@ -288,14 +316,13 @@ Flexbox can do some pretty awesome things when you mix flex alignments with auto
<div class="p-2 bd-highlight">Flex item</div>
<div class="ml-auto p-2 bd-highlight">Flex item</div>
</div>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
### With align-items
Vertically move one flex item to the top or bottom of a container by mixing `align-items`, `flex-direction: column`, and `margin-top: auto` or `margin-bottom: auto`.
-{% capture example %}
+{{< example >}}
<div class="d-flex align-items-start flex-column bd-highlight mb-3" style="height: 200px;">
<div class="mb-auto p-2 bd-highlight">Flex item</div>
<div class="p-2 bd-highlight">Flex item</div>
@@ -307,8 +334,7 @@ Vertically move one flex item to the top or bottom of a container by mixing `ali
<div class="p-2 bd-highlight">Flex item</div>
<div class="mt-auto p-2 bd-highlight">Flex item</div>
</div>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
## Wrap
@@ -324,11 +350,11 @@ Change how flex items wrap in a flex container. Choose from no wrapping at all (
</div>
</div>
-{% highlight html %}
+{{< highlight html >}}
<div class="d-flex flex-nowrap">
...
</div>
-{% endhighlight %}
+{{< /highlight >}}
<div class="bd-example">
<div class="d-flex flex-wrap bd-highlight">
@@ -350,11 +376,11 @@ Change how flex items wrap in a flex container. Choose from no wrapping at all (
</div>
</div>
-{% highlight html %}
+{{< highlight html >}}
<div class="d-flex flex-wrap">
...
</div>
-{% endhighlight %}
+{{< /highlight >}}
<div class="bd-example">
<div class="d-flex flex-wrap-reverse bd-highlight">
@@ -376,37 +402,48 @@ Change how flex items wrap in a flex container. Choose from no wrapping at all (
</div>
</div>
-{% highlight html %}
+{{< highlight html >}}
<div class="d-flex flex-wrap-reverse">
...
</div>
-{% endhighlight %}
+{{< /highlight >}}
Responsive variations also exist for `flex-wrap`.
-{% for bp in site.data.breakpoints %}
-- `.flex{{ bp.abbr }}-nowrap`
-- `.flex{{ bp.abbr }}-wrap`
-- `.flex{{ bp.abbr }}-wrap-reverse`{% endfor %}
+{{< markdown >}}
+{{< flex.inline >}}
+{{- range $.Site.Data.breakpoints }}
+- `.flex{{ .abbr }}-nowrap`
+- `.flex{{ .abbr }}-wrap`
+- `.flex{{ .abbr }}-wrap-reverse`
+{{- end -}}
+{{< /flex.inline >}}
+{{< /markdown >}}
## Order
Change the _visual_ order of specific flex items with a handful of `order` utilities. We only provide options for making an item first or last, as well as a reset to use the DOM order. As `order` takes any integer value (e.g., `5`), add custom CSS for any additional values needed.
-{% capture example %}
+{{< example >}}
<div class="d-flex flex-nowrap bd-highlight">
<div class="order-3 p-2 bd-highlight">First flex item</div>
<div class="order-2 p-2 bd-highlight">Second flex item</div>
<div class="order-1 p-2 bd-highlight">Third flex item</div>
</div>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
Responsive variations also exist for `order`.
-{% for bp in site.data.breakpoints %}{% for i in (0..12) %}
-- `.order{{ bp.abbr }}-{{ i }}`{% endfor %}{% endfor %}
+{{< markdown >}}
+{{< flex.inline >}}
+{{- range $bp := $.Site.Data.breakpoints -}}
+{{- range $i, $num := seq 0 12 }}
+- `.order{{ $bp.abbr }}-{{ $i }}`
+{{- end -}}
+{{- end -}}
+{{< /flex.inline >}}
+{{< /markdown >}}
## Align content
@@ -434,11 +471,11 @@ Use `align-content` utilities on flexbox containers to align flex items *togethe
</div>
</div>
-{% highlight html %}
+{{< highlight html >}}
<div class="d-flex align-content-start flex-wrap">
...
</div>
-{% endhighlight %}
+{{< /highlight >}}
<div class="bd-example">
<div class="d-flex align-content-end flex-wrap bd-highlight mb-3" style="height: 200px">
@@ -460,9 +497,9 @@ Use `align-content` utilities on flexbox containers to align flex items *togethe
</div>
</div>
-{% highlight html %}
+{{< highlight html >}}
<div class="d-flex align-content-end flex-wrap">...</div>
-{% endhighlight %}
+{{< /highlight >}}
<div class="bd-example">
<div class="d-flex align-content-center flex-wrap bd-highlight mb-3" style="height: 200px">
@@ -484,9 +521,9 @@ Use `align-content` utilities on flexbox containers to align flex items *togethe
</div>
</div>
-{% highlight html %}
+{{< highlight html >}}
<div class="d-flex align-content-center flex-wrap">...</div>
-{% endhighlight %}
+{{< /highlight >}}
<div class="bd-example">
<div class="d-flex align-content-between flex-wrap bd-highlight mb-3" style="height: 200px">
@@ -508,9 +545,9 @@ Use `align-content` utilities on flexbox containers to align flex items *togethe
</div>
</div>
-{% highlight html %}
+{{< highlight html >}}
<div class="d-flex align-content-between flex-wrap">...</div>
-{% endhighlight %}
+{{< /highlight >}}
<div class="bd-example">
<div class="d-flex align-content-around flex-wrap bd-highlight mb-3" style="height: 200px">
@@ -532,9 +569,9 @@ Use `align-content` utilities on flexbox containers to align flex items *togethe
</div>
</div>
-{% highlight html %}
+{{< highlight html >}}
<div class="d-flex align-content-around flex-wrap">...</div>
-{% endhighlight %}
+{{< /highlight >}}
<div class="bd-example">
<div class="d-flex align-content-stretch flex-wrap bd-highlight mb-3" style="height: 200px">
@@ -556,15 +593,20 @@ Use `align-content` utilities on flexbox containers to align flex items *togethe
</div>
</div>
-{% highlight html %}
+{{< highlight html >}}
<div class="d-flex align-content-stretch flex-wrap">...</div>
-{% endhighlight %}
+{{< /highlight >}}
Responsive variations also exist for `align-content`.
-{% for bp in site.data.breakpoints %}
-- `.align-content{{ bp.abbr }}-start`
-- `.align-content{{ bp.abbr }}-end`
-- `.align-content{{ bp.abbr }}-center`
-- `.align-content{{ bp.abbr }}-around`
-- `.align-content{{ bp.abbr }}-stretch`{% endfor %}
+{{< markdown >}}
+{{< flex.inline >}}
+{{- range $.Site.Data.breakpoints }}
+- `.align-content{{ .abbr }}-start`
+- `.align-content{{ .abbr }}-end`
+- `.align-content{{ .abbr }}-center`
+- `.align-content{{ .abbr }}-around`
+- `.align-content{{ .abbr }}-stretch`
+{{- end -}}
+{{< /flex.inline >}}
+{{< /markdown >}}
diff --git a/site/docs/4.3/utilities/float.md b/site/content/docs/4.3/utilities/float.md
index ec05d3ec75..43464d614a 100644
--- a/site/docs/4.3/utilities/float.md
+++ b/site/content/docs/4.3/utilities/float.md
@@ -14,18 +14,17 @@ These utility classes float an element to the left or right, or disable floating
Toggle a float with a class:
-{% capture example %}
+{{< example >}}
<div class="float-left">Float left on all viewport sizes</div><br>
<div class="float-right">Float right on all viewport sizes</div><br>
<div class="float-none">Don't float on all viewport sizes</div>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
## Mixins
Or by Sass mixin:
-{% highlight scss %}
+{{< highlight scss >}}
.element {
@include float-left;
}
@@ -35,23 +34,27 @@ Or by Sass mixin:
.one-more {
@include float-none;
}
-{% endhighlight %}
+{{< /highlight >}}
## Responsive
Responsive variations also exist for each `float` value.
-{% capture example %}
+{{< example >}}
<div class="float-sm-left">Float left on viewports sized SM (small) or wider</div><br>
<div class="float-md-left">Float left on viewports sized MD (medium) or wider</div><br>
<div class="float-lg-left">Float left on viewports sized LG (large) or wider</div><br>
<div class="float-xl-left">Float left on viewports sized XL (extra-large) or wider</div><br>
-{% endcapture %}
-{% include example.html content=example %}
-
-Here are all the support classes;
-
-{% for bp in site.data.breakpoints %}
-- `.float{{ bp.abbr }}-left`
-- `.float{{ bp.abbr }}-right`
-- `.float{{ bp.abbr }}-none`{% endfor %}
+{{< /example >}}
+
+Here are all the support classes:
+
+{{< markdown >}}
+{{< float.inline >}}
+{{- range $.Site.Data.breakpoints }}
+- `.float{{ .abbr }}-left`
+- `.float{{ .abbr }}-right`
+- `.float{{ .abbr }}-none`
+{{- end -}}
+{{< /float.inline >}}
+{{< /markdown >}}
diff --git a/site/docs/4.3/utilities/image-replacement.md b/site/content/docs/4.3/utilities/image-replacement.md
index 4c7decac55..e172872fa1 100644
--- a/site/docs/4.3/utilities/image-replacement.md
+++ b/site/content/docs/4.3/utilities/image-replacement.md
@@ -5,32 +5,31 @@ description: Swap text for background images with the image replacement class.
group: utilities
---
-{% capture callout %}
+{{< callout warning >}}
##### Warning
The `text-hide()` class and mixin has been deprecated as of v4.1. It will be removed entirely in v5.
-{% endcapture %}
-{% include callout.html content=callout type="warning" %}
+{{< /callout >}}
Utilize the `.text-hide` class or mixin to help replace an element's text content with a background image.
-{% highlight html %}
+{{< highlight html >}}
<h1 class="text-hide">Custom heading</h1>
-{% endhighlight %}
+{{< /highlight >}}
-{% highlight scss %}
+{{< highlight scss >}}
// Usage as a mixin
.heading {
@include text-hide;
}
-{% endhighlight %}
+{{< /highlight >}}
Use the `.text-hide` class to maintain the accessibility and SEO benefits of heading tags, but want to utilize a `background-image` instead of text.
<div class="bd-example">
- <h1 class="text-hide" style="background-image: url('{{ site.baseurl }}/docs/{{ site.docs_version }}/assets/brand/bootstrap-solid.svg'); width: 50px; height: 50px;">Bootstrap</h1>
+ <h1 class="text-hide" style="background-image: url('/docs/{{< param docs_version >}}/assets/brand/bootstrap-solid.svg'); width: 50px; height: 50px;">Bootstrap</h1>
</div>
-{% highlight html %}
+{{< highlight html >}}
<h1 class="text-hide" style="background-image: url('...');">Bootstrap</h1>
-{% endhighlight %}
+{{< /highlight >}}
diff --git a/site/docs/4.3/utilities/overflow.md b/site/content/docs/4.3/utilities/overflow.md
index 2877c85b74..f8ae2f3248 100644
--- a/site/docs/4.3/utilities/overflow.md
+++ b/site/content/docs/4.3/utilities/overflow.md
@@ -16,9 +16,9 @@ Barebones `overflow` functionality is provided for two values by default, and th
</div>
</div>
-{% highlight html %}
+{{< highlight html >}}
<div class="overflow-auto">...</div>
<div class="overflow-hidden">...</div>
-{% endhighlight %}
+{{< /highlight >}}
Using Sass variables, you may customize the overflow utilities by changing the `$overflows` variable in `_variables.scss`.
diff --git a/site/docs/4.3/utilities/position.md b/site/content/docs/4.3/utilities/position.md
index c819df080d..1efaf4cf16 100644
--- a/site/docs/4.3/utilities/position.md
+++ b/site/content/docs/4.3/utilities/position.md
@@ -10,29 +10,29 @@ toc: true
Quick positioning classes are available, though they are not responsive.
-{% highlight html %}
+{{< highlight html >}}
<div class="position-static">...</div>
<div class="position-relative">...</div>
<div class="position-absolute">...</div>
<div class="position-fixed">...</div>
<div class="position-sticky">...</div>
-{% endhighlight %}
+{{< /highlight >}}
## Fixed top
Position an element at the top of the viewport, from edge to edge. Be sure you understand the ramifications of fixed position in your project; you may need to add additional CSS.
-{% highlight html %}
+{{< highlight html >}}
<div class="fixed-top">...</div>
-{% endhighlight %}
+{{< /highlight >}}
## Fixed bottom
Position an element at the bottom of the viewport, from edge to edge. Be sure you understand the ramifications of fixed position in your project; you may need to add additional CSS.
-{% highlight html %}
+{{< highlight html >}}
<div class="fixed-bottom">...</div>
-{% endhighlight %}
+{{< /highlight >}}
## Sticky top
@@ -40,6 +40,6 @@ Position an element at the top of the viewport, from edge to edge, but only afte
**IE11 and IE10 will render `position: sticky` as `position: relative`.** As such, we wrap the styles in a `@supports` query, limiting the stickiness to only browsers that can render it properly.
-{% highlight html %}
+{{< highlight html >}}
<div class="sticky-top">...</div>
-{% endhighlight %}
+{{< /highlight >}}
diff --git a/site/docs/4.3/utilities/screen-readers.md b/site/content/docs/4.3/utilities/screen-readers.md
index c38ba3e65e..7f6faaedbe 100644
--- a/site/docs/4.3/utilities/screen-readers.md
+++ b/site/content/docs/4.3/utilities/screen-readers.md
@@ -7,19 +7,14 @@ group: utilities
Hide an element to all devices **except screen readers** with `.sr-only`. Combine `.sr-only` with `.sr-only-focusable` to show the element again when it's focused (e.g. by a keyboard-only user). Can also be used as mixins.
-{%- comment -%}
-Necessary for following [accessibility best practices]({{ site.baseurl }}/docs/{{ site.docs_version }}/getting-started/#accessibility).
-{%- endcomment -%}
-
-{% capture example %}
+{{< example >}}
<a class="sr-only sr-only-focusable" href="#content">Skip to main content</a>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
-{% highlight scss %}
+{{< highlight scss >}}
// Usage as a mixin
.skip-navigation {
@include sr-only;
@include sr-only-focusable;
}
-{% endhighlight %}
+{{< /highlight >}}
diff --git a/site/docs/4.3/utilities/shadows.md b/site/content/docs/4.3/utilities/shadows.md
index 9c3e580440..2803031d66 100644
--- a/site/docs/4.3/utilities/shadows.md
+++ b/site/content/docs/4.3/utilities/shadows.md
@@ -9,10 +9,9 @@ group: utilities
While shadows on components are disabled by default in Bootstrap and can be enabled via `$enable-shadows`, you can also quickly add or remove a shadow with our `box-shadow` utility classes. Includes support for `.shadow-none` and three default sizes (which have associated variables to match).
-{% capture example %}
+{{< example >}}
<div class="shadow-none p-3 mb-5 bg-light rounded">No shadow</div>
<div class="shadow-sm p-3 mb-5 bg-white rounded">Small shadow</div>
<div class="shadow p-3 mb-5 bg-white rounded">Regular shadow</div>
<div class="shadow-lg p-3 mb-5 bg-white rounded">Larger shadow</div>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
diff --git a/site/docs/4.3/utilities/sizing.md b/site/content/docs/4.3/utilities/sizing.md
index 1b0acf07ac..838e9b7f76 100644
--- a/site/docs/4.3/utilities/sizing.md
+++ b/site/content/docs/4.3/utilities/sizing.md
@@ -10,16 +10,15 @@ toc: true
Width and height utilities are generated from the `$sizes` Sass map in `_variables.scss`. Includes support for `25%`, `50%`, `75%`, `100%`, and `auto` by default. Modify those values as you need to generate different utilities here.
-{% capture example %}
+{{< example >}}
<div class="w-25 p-3" style="background-color: #eee;">Width 25%</div>
<div class="w-50 p-3" style="background-color: #eee;">Width 50%</div>
<div class="w-75 p-3" style="background-color: #eee;">Width 75%</div>
<div class="w-100 p-3" style="background-color: #eee;">Width 100%</div>
<div class="w-auto p-3" style="background-color: #eee;">Width auto</div>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
-{% capture example %}
+{{< example >}}
<div style="height: 100px; background-color: rgba(255,0,0,0.1);">
<div class="h-25 d-inline-block" style="width: 120px; background-color: rgba(0,0,255,.1)">Height 25%</div>
<div class="h-50 d-inline-block" style="width: 120px; background-color: rgba(0,0,255,.1)">Height 50%</div>
@@ -27,30 +26,27 @@ Width and height utilities are generated from the `$sizes` Sass map in `_variabl
<div class="h-100 d-inline-block" style="width: 120px; background-color: rgba(0,0,255,.1)">Height 100%</div>
<div class="h-auto d-inline-block" style="width: 120px; background-color: rgba(0,0,255,.1)">Height auto</div>
</div>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
You can also use `max-width: 100%;` and `max-height: 100%;` utilities as needed.
-{% capture example %}
-{% include icons/placeholder.svg width="100%" height="100" class="mw-100" text="Max-width 100%" %}
-{% endcapture %}
-{% include example.html content=example %}
+{{< example >}}
+{{< placeholder width="100%" height="100" class="mw-100" text="Max-width 100%" >}}
+{{< /example >}}
-{% capture example %}
-<div style="height: 100px; background-color: rgba(255,0,0,0.1);">
- <div class="mh-100" style="width: 100px; height: 200px; background-color: rgba(0,0,255,0.1);">Max-height 100%</div>
+{{< example >}}
+<div style="height: 100px; background-color: rgba(255,0,0,.1);">
+ <div class="mh-100" style="width: 100px; height: 200px; background-color: rgba(0,0,255,.1);">Max-height 100%</div>
</div>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
## Relative to the viewport
You can also use utilities to set the width and height relative to the viewport.
-{% highlight html %}
+{{< highlight html >}}
<div class="min-vw-100">Min-width 100vw</div>
<div class="min-vh-100">Min-height 100vh</div>
<div class="vw-100">Width 100vw</div>
<div class="vh-100">Height 100vh</div>
-{% endhighlight %}
+{{< /highlight >}}
diff --git a/site/docs/4.3/utilities/spacing.md b/site/content/docs/4.3/utilities/spacing.md
index 09e17e0445..25e1579d68 100644
--- a/site/docs/4.3/utilities/spacing.md
+++ b/site/content/docs/4.3/utilities/spacing.md
@@ -47,7 +47,7 @@ Where *size* is one of:
Here are some representative examples of these classes:
-{% highlight scss %}
+{{< highlight scss >}}
.mt-0 {
margin-top: 0 !important;
}
@@ -64,7 +64,7 @@ Here are some representative examples of these classes:
.p-3 {
padding: $spacer !important;
}
-{% endhighlight %}
+{{< /highlight >}}
### Horizontal centering
@@ -76,11 +76,11 @@ Additionally, Bootstrap also includes an `.mx-auto` class for horizontally cente
</div>
</div>
-{% highlight html %}
+{{< highlight html >}}
<div class="mx-auto" style="width: 200px;">
Centered element
</div>
-{% endhighlight %}
+{{< /highlight >}}
### Negative margin
@@ -88,18 +88,17 @@ In CSS, `margin` properties can utilize negative values (`padding` cannot). As o
The syntax is nearly the same as the default, positive margin utilities, but with the addition of `n` before the requested size. Here's an example class that's the opposite of `.mt-1`:
-{% highlight scss %}
+{{< highlight scss >}}
.mt-n1 {
margin-top: -0.25rem !important;
}
-{% endhighlight %}
+{{< /highlight >}}
Here's an example of customizing the Bootstrap grid at the medium (`md`) breakpoint and above. We've increased the `.col` padding with `.px-md-5` and then counteracted that with `.mx-md-n5` on the parent `.row`.
-{% capture example %}
+{{< example >}}
<div class="row mx-md-n5">
<div class="col px-md-5"><div class="p-3 border bg-light">Custom column padding</div></div>
<div class="col px-md-5"><div class="p-3 border bg-light">Custom column padding</div></div>
</div>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
diff --git a/site/docs/4.3/utilities/stretched-link.md b/site/content/docs/4.3/utilities/stretched-link.md
index 1d4d2ad317..7207bcaf5a 100644
--- a/site/docs/4.3/utilities/stretched-link.md
+++ b/site/content/docs/4.3/utilities/stretched-link.md
@@ -11,38 +11,36 @@ Cards have `position: relative` by default in Bootstrap, so in this case you can
Multiple links and tap targets are not recommended with stretched links. However, some `position` and `z-index` styles can help should this be required.
-{% capture example %}
+{{< example >}}
<div class="card" style="width: 18rem;">
- {% include icons/placeholder.svg width="100%" height="180" class="card-img-top" text=" " title="Card image cap" %}
+ {{< placeholder width="100%" height="180" class="card-img-top" text="false" title="Card image cap" >}}
<div class="card-body">
<h5 class="card-title">Card with stretched link</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 stretched-link">Go somewhere</a>
</div>
</div>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
Media objects do not have `position: relative` by default, so we need to add the `.position-relative` here to prevent the link from stretching outside the media object.
-{% capture example %}
+{{< example >}}
<div class="media position-relative">
- {% include icons/placeholder.svg width="144" height="144" class="mr-3" text=" " title="Generic placeholder image" %}
+ {{< placeholder width="144" height="144" class="mr-3" text="false" title="Generic placeholder image" >}}
<div class="media-body">
<h5 class="mt-0">Media with stretched link</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>
<a href="#" class="stretched-link">Go somewhere</a>
</div>
</div>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
Columns are `position: relative` by default, so clickable columns only require the `.stretched-link` class on a link. However, stretching a link over an entire `.row` requires `.position-static` on the column and `.position-relative` on the row.
-{% capture example %}
+{{< example >}}
<div class="row no-gutters bg-light position-relative">
<div class="col-md-6 mb-md-0 p-md-4">
- {% include icons/placeholder.svg width="100%" height="200" class="w-100" text=" " title="Generic placeholder image" %}
+ {{< placeholder width="100%" height="200" class="w-100" text="false" title="Generic placeholder image" >}}
</div>
<div class="col-md-6 position-static p-4 pl-md-0">
<h5 class="mt-0">Columns with stretched link</h5>
@@ -50,8 +48,7 @@ Columns are `position: relative` by default, so clickable columns only require t
<a href="#" class="stretched-link">Go somewhere</a>
</div>
</div>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
## Identifying the containing block
@@ -62,9 +59,9 @@ If the stretched link doesn't seem to work, the [containing block](https://devel
- A `will-change` value of `transform` or `perspective`
- A `filter` value other than `none` or a `will-change` value of `filter` (only works on Firefox)
-{% capture example %}
+{{< example >}}
<div class="card" style="width: 18rem;">
- {% include icons/placeholder.svg width="100%" height="180" class="card-img-top" text=" " title="Card image cap" %}
+ {{< placeholder width="100%" height="180" class="card-img-top" text="false" title="Card image cap" >}}
<div class="card-body">
<h5 class="card-title">Card with stretched links</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>
@@ -76,5 +73,4 @@ If the stretched link doesn't seem to work, the [containing block](https://devel
</p>
</div>
</div>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
diff --git a/site/docs/4.3/utilities/text.md b/site/content/docs/4.3/utilities/text.md
index d25564a186..76708e8316 100644
--- a/site/docs/4.3/utilities/text.md
+++ b/site/content/docs/4.3/utilities/text.md
@@ -10,14 +10,13 @@ toc: true
Easily realign text to components with text alignment classes.
-{% capture example %}
+{{< example >}}
<p class="text-justify">Ambitioni dedisse scripsisse iudicaretur. Cras mattis iudicium purus sit amet fermentum. Donec sed odio operae, eu vulputate felis rhoncus. Praeterea iter est quasdam res quas ex communi. At nos hinc posthac, sitientis piros Afros. Petierunt uti sibi concilium totius Galliae in diem certam indicere. Cras mattis iudicium purus sit amet fermentum.</p>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
For left, right, and center alignment, responsive classes are available that use the same viewport width breakpoints as the grid system.
-{% capture example %}
+{{< example >}}
<p class="text-left">Left aligned text on all viewport sizes.</p>
<p class="text-center">Center aligned text on all viewport sizes.</p>
<p class="text-right">Right aligned text on all viewport sizes.</p>
@@ -26,32 +25,29 @@ For left, right, and center alignment, responsive classes are available that use
<p class="text-md-left">Left aligned text on viewports sized MD (medium) or wider.</p>
<p class="text-lg-left">Left aligned text on viewports sized LG (large) or wider.</p>
<p class="text-xl-left">Left aligned text on viewports sized XL (extra-large) or wider.</p>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
## Text wrapping and overflow
Wrap text with a `.text-wrap` class.
-{% capture example %}
+{{< example >}}
<div class="badge badge-primary text-wrap" style="width: 6rem;">
This text should wrap.
</div>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
Prevent text from wrapping with a `.text-nowrap` class.
-{% capture example %}
+{{< example >}}
<div class="text-nowrap bd-highlight" style="width: 8rem;">
This text should overflow the parent.
</div>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
For longer content, you can add a `.text-truncate` class to truncate the text with an ellipsis. **Requires `display: inline-block` or `display: block`.**
-{% capture example %}
+{{< example >}}
<!-- Block level -->
<div class="row">
<div class="col-2 text-truncate">
@@ -63,28 +59,25 @@ For longer content, you can add a `.text-truncate` class to truncate the text wi
<span class="d-inline-block text-truncate" style="max-width: 150px;">
Praeterea iter est quasdam res quas ex communi.
</span>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
## Word break
Prevent long strings of text from breaking your components' layout by using `.text-break` to set `overflow-wrap: break-word` (and `word-break: break-word` for IE & Edge compatibility).
-{% capture example %}
+{{< example >}}
<p class="text-break">mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm</p>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
## Text transform
Transform text in components with text capitalization classes.
-{% capture example %}
+{{< example >}}
<p class="text-lowercase">Lowercased text.</p>
<p class="text-uppercase">Uppercased text.</p>
<p class="text-capitalize">CapiTaliZed text.</p>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
Note how `.text-capitalize` only changes the first letter of each word, leaving the case of any other letters unaffected.
@@ -92,41 +85,37 @@ Note how `.text-capitalize` only changes the first letter of each word, leaving
Quickly change the weight (boldness) of text or italicize text.
-{% capture example %}
+{{< example >}}
<p class="font-weight-bold">Bold text.</p>
<p class="font-weight-bolder">Bolder weight text (relative to the parent element).</p>
<p class="font-weight-normal">Normal weight text.</p>
<p class="font-weight-light">Light weight text.</p>
<p class="font-weight-lighter">Lighter weight text (relative to the parent element).</p>
<p class="font-italic">Italic text.</p>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
## Monospace
Change a selection to our monospace font stack with `.text-monospace`.
-{% capture example %}
+{{< example >}}
<p class="text-monospace">This is in monospace</p>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
## Reset color
Reset a text or link's color with `.text-reset`, so that it inherits the color from its parent.
-{% capture example %}
+{{< example >}}
<p class="text-muted">
Muted text with a <a href="#" class="text-reset">reset link</a>.
</p>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
## Text decoration
Remove a text decoration with a `.text-decoration-none` class.
-{% capture example %}
+{{< example >}}
<a href="#" class="text-decoration-none">Non-underlined link</a>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
diff --git a/site/docs/4.3/utilities/vertical-align.md b/site/content/docs/4.3/utilities/vertical-align.md
index bc4f0b950a..b2c16b569c 100644
--- a/site/docs/4.3/utilities/vertical-align.md
+++ b/site/content/docs/4.3/utilities/vertical-align.md
@@ -11,19 +11,18 @@ Choose from `.align-baseline`, `.align-top`, `.align-middle`, `.align-bottom`, `
With inline elements:
-{% capture example %}
+{{< example >}}
<span class="align-baseline">baseline</span>
<span class="align-top">top</span>
<span class="align-middle">middle</span>
<span class="align-bottom">bottom</span>
<span class="align-text-top">text-top</span>
<span class="align-text-bottom">text-bottom</span>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
With table cells:
-{% capture example %}
+{{< example >}}
<table style="height: 100px;">
<tbody>
<tr>
@@ -36,5 +35,4 @@ With table cells:
</tr>
</tbody>
</table>
-{% endcapture %}
-{% include example.html content=example %}
+{{< /example >}}
diff --git a/site/docs/4.3/utilities/visibility.md b/site/content/docs/4.3/utilities/visibility.md
index bbfc0cbbc6..d7d76ecf13 100644
--- a/site/docs/4.3/utilities/visibility.md
+++ b/site/content/docs/4.3/utilities/visibility.md
@@ -9,12 +9,12 @@ Set the `visibility` of elements with our visibility utilities. These utility cl
Apply `.visible` or `.invisible` as needed.
-{% highlight html %}
+{{< highlight html >}}
<div class="visible">...</div>
<div class="invisible">...</div>
-{% endhighlight %}
+{{< /highlight >}}
-{% highlight scss %}
+{{< highlight scss >}}
// Class
.visible {
visibility: visible !important;
@@ -31,4 +31,4 @@ Apply `.visible` or `.invisible` as needed.
.element {
@include invisible(hidden);
}
-{% endhighlight %}
+{{< /highlight >}}
diff --git a/site/content/docs/versions.md b/site/content/docs/versions.md
new file mode 100644
index 0000000000..52940566b9
--- /dev/null
+++ b/site/content/docs/versions.md
@@ -0,0 +1,6 @@
+---
+title: Versions
+description: An appendix of hosted documentation for nearly every release of Bootstrap, from v1 through v4.
+---
+
+{{< list-versions >}}
diff --git a/site/_data/breakpoints.yml b/site/data/breakpoints.yml
index 3c8cfe293c..3c8cfe293c 100644
--- a/site/_data/breakpoints.yml
+++ b/site/data/breakpoints.yml
diff --git a/site/_data/browser-bugs.yml b/site/data/browser-bugs.yml
index 7138c75b42..c4fa93a1f1 100644
--- a/site/_data/browser-bugs.yml
+++ b/site/data/browser-bugs.yml
@@ -166,7 +166,7 @@
upstream_bug: >
Chromium#419108
origin: >
- Offshoot of Bootstrap#8350 & Chromium#337668
+ Bootstrap#8350, Chromium#337668
-
browser: >
diff --git a/site/_data/browser-features.yml b/site/data/browser-features.yml
index 6c8701f689..6c8701f689 100644
--- a/site/_data/browser-features.yml
+++ b/site/data/browser-features.yml
diff --git a/site/_data/colors.yml b/site/data/colors.yml
index 202270cdcb..202270cdcb 100644
--- a/site/_data/colors.yml
+++ b/site/data/colors.yml
diff --git a/site/_data/core-team.yml b/site/data/core-team.yml
index 096827f506..096827f506 100644
--- a/site/_data/core-team.yml
+++ b/site/data/core-team.yml
diff --git a/site/data/docs-versions.yml b/site/data/docs-versions.yml
new file mode 100644
index 0000000000..e48332cea3
--- /dev/null
+++ b/site/data/docs-versions.yml
@@ -0,0 +1,44 @@
+- 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"
diff --git a/site/_data/examples.yml b/site/data/examples.yml
index 673fde40b6..6fb65d7f6b 100644
--- a/site/_data/examples.yml
+++ b/site/data/examples.yml
@@ -1,4 +1,4 @@
-- category: Custom components
+- category: Custom Components
description: "Brand new components and templates to help folks quickly get started with Bootstrap and demonstrate best practices for adding onto the framework."
examples:
- name: Album
diff --git a/site/_data/grays.yml b/site/data/grays.yml
index d6e50f9e14..d6e50f9e14 100644
--- a/site/_data/grays.yml
+++ b/site/data/grays.yml
diff --git a/site/_data/nav.yml b/site/data/nav.yml
index 664be04dad..664be04dad 100644
--- a/site/_data/nav.yml
+++ b/site/data/nav.yml
diff --git a/site/_data/theme-colors.yml b/site/data/theme-colors.yml
index bef5002acd..bef5002acd 100644
--- a/site/_data/theme-colors.yml
+++ b/site/data/theme-colors.yml
diff --git a/site/_data/translations.yml b/site/data/translations.yml
index 030fa771ba..030fa771ba 100644
--- a/site/_data/translations.yml
+++ b/site/data/translations.yml
diff --git a/site/docs/4.3/about/team.md b/site/docs/4.3/about/team.md
deleted file mode 100644
index 93aecf882f..0000000000
--- a/site/docs/4.3/about/team.md
+++ /dev/null
@@ -1,21 +0,0 @@
----
-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.
-
-<div class="list-group mb-3">
- {% for member in site.data.core-team %}
- <a class="list-group-item list-group-item-action d-flex align-items-center" href="https://github.com/{{ member.user }}">
- <img src="https://github.com/{{ member.user }}.png" alt="@{{ member.user }}" width="32" height="32" class="rounded mr-2">
- <span>
- <strong>{{ member.name }}</strong> @{{ member.user }}
- </span>
- </a>
- {% endfor %}
-</div>
-
-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.
diff --git a/site/docs/4.3/content/figures.md b/site/docs/4.3/content/figures.md
deleted file mode 100644
index a647fc1d0b..0000000000
--- a/site/docs/4.3/content/figures.md
+++ /dev/null
@@ -1,28 +0,0 @@
----
-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.
-
-{% capture example %}
-<figure class="figure">
- {% include icons/placeholder.svg width="400" height="300" class="figure-img img-fluid rounded" %}
- <figcaption class="figure-caption">A caption for the above image.</figcaption>
-</figure>
-{% endcapture %}
-{% include example.html content=example %}
-
-Aligning the figure's caption is easy with our [text utilities]({{ site.baseurl }}/docs/{{ site.docs_version }}/utilities/text/#text-alignment).
-
-{% capture example %}
-<figure class="figure">
- {% include icons/placeholder.svg width="400" height="300" class="figure-img img-fluid rounded" %}
- <figcaption class="figure-caption text-right">A caption for the above image.</figcaption>
-</figure>
-{% endcapture %}
-{% include example.html content=example %}
diff --git a/site/docs/4.3/content/images.md b/site/docs/4.3/content/images.md
deleted file mode 100644
index fa18ec2583..0000000000
--- a/site/docs/4.3/content/images.md
+++ /dev/null
@@ -1,77 +0,0 @@
----
-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">
- {% include icons/placeholder.svg 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">
-{% endhighlight %}
-
-## Image thumbnails
-
-In addition to our [border-radius utilities]({{ site.baseurl }}/docs/{{ site.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">
- {% include icons/placeholder.svg 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">
-{% endhighlight %}
-
-## Aligning images
-
-Align images with the [helper float classes]({{ site.baseurl }}/docs/{{ site.docs_version }}/utilities/float/) or [text alignment classes]({{ site.baseurl }}/docs/{{ site.docs_version }}/utilities/text/#text-alignment). `block`-level images can be centered using [the `.mx-auto` margin utility class]({{ site.baseurl }}/docs/{{ site.docs_version }}/utilities/spacing/#horizontal-centering).
-
-<div class="bd-example bd-example-images">
- {% include icons/placeholder.svg width="200" height="200" class="rounded float-left" %}
- {% include icons/placeholder.svg 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="...">
-{% endhighlight %}
-
-<div class="bd-example bd-example-images">
- {% include icons/placeholder.svg width="200" height="200" class="rounded mx-auto d-block" %}
-</div>
-
-{% highlight html %}
-<img src="..." class="rounded mx-auto d-block" alt="...">
-{% endhighlight %}
-
-<div class="bd-example bd-example-images">
- <div class="text-center">
- {% include icons/placeholder.svg width="200" height="200" class="rounded" %}
- </div>
-</div>
-
-{% highlight html %}
-<div class="text-center">
- <img src="..." class="rounded" alt="...">
-</div>
-{% endhighlight %}
-
-
-## 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>
-{% endhighlight %}
diff --git a/site/docs/4.3/examples/index.html b/site/docs/4.3/examples/index.html
deleted file mode 100644
index 965c275646..0000000000
--- a/site/docs/4.3/examples/index.html
+++ /dev/null
@@ -1,24 +0,0 @@
----
-layout: simple
-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.
-redirect_from: "/examples/"
----
-
-{% for entry in site.data.examples %}
- <h2>{{ entry.category | capitalize }}</h2>
- <p>{{ entry.description }}</p>
- {% for example in entry.examples %}
- {% if forloop.first %}<div class="row">{% endif %}
- <div class="col-sm-6 col-md-4 col-xl-3 mb-3">
- <a href="{{ site.baseurl }}/docs/{{ site.docs_version }}/examples/{{ example.name | slugify }}/">
- <img class="img-thumbnail mb-3" srcset="{{ site.baseurl }}/docs/{{ site.docs_version }}/assets/img/examples/{{ example.name | slugify }}.png,
- {{ site.baseurl }}/docs/{{ site.docs_version }}/assets/img/examples/{{ example.name | slugify }}@2x.png 2x"
- src="{{ site.baseurl }}/docs/{{ site.docs_version }}/assets/img/examples/{{ example.name | slugify }}.png" alt="{{ example.name }} screenshot" width="480" height="300">
- <h5 class="mb-1">{{ example.name }}</h5>
- </a>
- <p class="text-muted">{{ example.description }}</p>
- </div>
- {% if forloop.last %}</div>{% endif %}
- {% endfor %}
-{% endfor %}
diff --git a/site/docs/4.3/layout/utilities-for-layout.md b/site/docs/4.3/layout/utilities-for-layout.md
deleted file mode 100644
index a62a5abe04..0000000000
--- a/site/docs/4.3/layout/utilities-for-layout.md
+++ /dev/null
@@ -1,25 +0,0 @@
----
-layout: docs
-title: Utilities for layout
-description: For faster mobile-friendly and responsive development, Bootstrap includes dozens of utility classes for showing, hiding, aligning, and spacing content.
-group: layout
-toc: true
----
-
-## Changing `display`
-
-Use our [display utilities]({{ site.baseurl }}/docs/{{ site.docs_version }}/utilities/display/) for responsively toggling common values of the `display` property. Mix it with our grid system, content, or components to show or hide them across specific viewports.
-
-## Flexbox options
-
-Bootstrap 4 is built with flexbox, but not every element's `display` has been changed to `display: flex` as this would add many unnecessary overrides and unexpectedly change key browser behaviors. Most of [our components]({{ site.baseurl }}/docs/{{ site.docs_version }}/components/alerts/) are built with flexbox enabled.
-
-Should you need to add `display: flex` to an element, do so with `.d-flex` or one of the responsive variants (e.g., `.d-sm-flex`). You'll need this class or `display` value to allow the use of our extra [flexbox utilities]({{ site.baseurl }}/docs/{{ site.docs_version }}/utilities/flex/) for sizing, alignment, spacing, and more.
-
-## Margin and padding
-
-Use the `margin` and `padding` [spacing utilities]({{ site.baseurl }}/docs/{{ site.docs_version }}/utilities/spacing/) to control how elements and components are spaced and sized. Bootstrap 4 includes a five-level scale for spacing utilities, based on a `1rem` value default `$spacer` variable. Choose values for all viewports (e.g., `.mr-3` for `margin-right: 1rem`), or pick responsive variants to target specific viewports (e.g., `.mr-md-3` for `margin-right: 1rem` starting at the `md` breakpoint).
-
-## Toggle `visibility`
-
-When toggling `display` isn't needed, you can toggle the `visibility` of an element with our [visibility utilities]({{ site.baseurl }}/docs/{{ site.docs_version }}/utilities/visibility/). Invisible elements will still affect the layout of the page, but are visually hidden from visitors.
diff --git a/site/docs/versions.html b/site/docs/versions.html
deleted file mode 100644
index 4f8f4ea3ac..0000000000
--- a/site/docs/versions.html
+++ /dev/null
@@ -1,29 +0,0 @@
----
-layout: simple
-title: Versions
-description: An appendix of hosted documentation for nearly every release of Bootstrap, from v1 through v4.
----
-
-<div class="row">
-{% for release in site.data.docs-versions %}
- <div class="col-md">
- <h2>{{ release.group }}</h2>
- <p>{{ release.description }}</p>
- {% assign versions = release.versions | reverse %}
- {% for version in versions %}
- {% if forloop.first %}<div class="list-group">{% endif %}
- {% if version.v == site.docs_version %}
- <a class="list-group-item list-group-item-action py-2 text-primary d-flex justify-content-between align-items-center" href="{{ release.baseurl }}/{{ version.v }}/">
- {{ version.v }}
- <span class="badge badge-primary">Latest</span>
- </a>
- {% else %}
- <a class="list-group-item list-group-item-action py-2 text-primary" href="{{ release.baseurl }}/{{ version.v }}/">
- {{ version.v }}
- </a>
- {% endif %}
- {% if forloop.last %}</div>{% endif %}
- {% endfor %}
- </div>
-{% endfor %}
-</div>
diff --git a/site/index.html b/site/index.html
deleted file mode 100644
index 661fc55ce2..0000000000
--- a/site/index.html
+++ /dev/null
@@ -1,88 +0,0 @@
----
-layout: home
----
-
-<main class="bd-masthead" id="content" role="main">
- <div class="container">
- <div class="row align-items-center">
- <div class="col-6 mx-auto col-md-6 order-md-2">
- {% include icons/bootstrap-stack.svg width="512" height="430" class="img-fluid mb-3 mb-md-0" %}
- </div>
- <div class="col-md-6 order-md-1 text-center text-md-left pr-md-5">
- <h1 class="mb-3 bd-text-purple-bright">Bootstrap</h1>
- <p class="lead">
- Build responsive, mobile-first projects on the web with the world’s most popular front-end component library.
- </p>
- <p class="lead mb-4">
- Bootstrap is an open source toolkit for developing with HTML, CSS, and JS. Quickly prototype your ideas or build your entire app with our Sass variables and mixins, responsive grid system, extensive prebuilt components, and powerful plugins built with VanillaJS.
- </p>
- <div class="row mx-n2">
- <div class="col-md px-2">
- <a href="{{ site.baseurl }}/docs/{{ site.docs_version }}/getting-started/introduction/" class="btn btn-lg btn-bd-primary w-100 mb-3" onclick="ga('send', 'event', 'Jumbotron actions', 'Get started', 'Get started');">Get started</a>
- </div>
- <div class="col-md px-2">
- <a href="{{ site.baseurl }}/docs/{{ site.docs_version }}/getting-started/download/" class="btn btn-lg btn-outline-secondary w-100 mb-3" onclick="ga('send', 'event', 'Jumbotron actions', 'Download', 'Download {{ site.current_version }}');">Download</a>
- </div>
- </div>
- <p class="text-muted mb-0">
- Currently v{{ site.current_version }}
- </p>
- </div>
- </div>
- {% include ads.html %}
- </div>
-</main>
-
-<div class="masthead-followup row m-0 border border-white">
- <div class="col-12 col-md-4 p-3 p-md-5 bg-light border border-white">
- <!-- Icon by Bytesize https://github.com/danklammer/bytesize-icons -->
- {% include icons/import.svg width="32" height="32" class="text-primary mb-2" %}
- <h3>Installation</h3>
- <p>Include Bootstrap’s source Sass and JavaScript files via npm, Composer or Meteor. Package managed installs don’t include documentation, but do include our build system and readme.</p>
-
-{% highlight sh %}
-npm install bootstrap
-{% endhighlight %}
-
-{% highlight sh %}
-gem install bootstrap -v {{ site.current_ruby_version }}
-{% endhighlight %}
-
- <hr class="half-rule">
- <a class="btn btn-outline-primary" href="{{ site.baseurl }}/docs/{{ site.docs_version }}/getting-started/download/">Read installation docs</a>
- </div>
-
- <div class="col-12 col-md-4 p-3 p-md-5 bg-light border border-white">
- <!-- Icon by Bytesize https://github.com/danklammer/bytesize-icons -->
- {% include icons/download.svg width="32" height="32" class="text-primary mb-2" %}
- <h3>BootstrapCDN</h3>
- <p>When you only need to include Bootstrap’s compiled CSS or JS, you can use <a href="https://www.bootstrapcdn.com/">BootstrapCDN</a>.</p>
-
-<h5>CSS only</h5>
-{% highlight html %}
-<link rel="stylesheet" href="{{ site.cdn.css }}" integrity="{{ site.cdn.css_hash }}" crossorigin="anonymous">
-{% endhighlight %}
-
-<h5>JS and Popper.js</h5>
-{% highlight html %}
-<script src="{{ site.cdn.popper }}" integrity="{{ site.cdn.popper_hash }}" crossorigin="anonymous"></script>
-<script src="{{ site.cdn.js }}" integrity="{{ site.cdn.js_hash }}" crossorigin="anonymous"></script>
-{% endhighlight %}
- <hr class="half-rule">
- <a class="btn btn-outline-primary" href="{{ site.baseurl }}/docs/{{ site.docs_version }}/layout/overview/">Explore the docs</a>
- </div>
-
- <div class="col-12 col-md-4 p-3 p-md-5 bg-light border border-white">
- <!-- Icon by Bytesize https://github.com/danklammer/bytesize-icons -->
- {% include icons/lightning.svg width="32" height="32" class="text-primary mb-2" %}
- <h3>Official Themes</h3>
- <p>
- Take Bootstrap 4 to the next level with official premium themes—toolkits built on Bootstrap with new components and plugins, docs, and build tools.
- </p>
- <img class="img-fluid mt-3 mx-auto" srcset="{{ site.baseurl }}/docs/{{ site.docs_version }}/assets/img/bootstrap-themes.png,
- {{ site.baseurl }}/docs/{{ site.docs_version }}/assets/img/bootstrap-themes@2x.png 2x"
- src="{{ site.baseurl }}/docs/{{ site.docs_version }}/assets/img/bootstrap-themes.png" alt="Bootstrap Themes" width="500" height="200">
- <hr class="half-rule">
- <a href="{{ site.themes }}/" class="btn btn-outline-primary">Browse themes</a>
- </div>
-</div>
diff --git a/site/layouts/_default/docs.html b/site/layouts/_default/docs.html
new file mode 100644
index 0000000000..7ef4925e1f
--- /dev/null
+++ b/site/layouts/_default/docs.html
@@ -0,0 +1,34 @@
+<!doctype html>
+<html lang="en">
+ <head>
+ {{ partial "header" . }}
+ </head>
+ <body>
+ {{ partial "skippy" . }}
+
+ {{ partial "docs-navbar" . }}
+
+ <div class="container-fluid">
+ <div class="row flex-xl-nowrap">
+ <div class="col-12 col-md-3 col-xl-2 bd-sidebar">
+ {{ partial "docs-sidebar" . }}
+ </div>
+
+ {{ if (eq .Page.Params.toc true) }}
+ <nav class="d-none d-xl-block col-xl-2 bd-toc" aria-label="Secondary navigation">
+ {{ .TableOfContents }}
+ </nav>
+ {{ end }}
+
+ <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">{{ .Title | markdownify }}</h1>
+ <p class="bd-lead">{{ .Page.Params.Description | markdownify }}</p>
+ {{ partial "ads" . }}
+ {{ .Content }}
+ </main>
+ </div>
+ </div>
+
+ {{ partial "scripts" . }}
+ </body>
+</html>
diff --git a/site/layouts/_default/examples.html b/site/layouts/_default/examples.html
new file mode 100644
index 0000000000..a62abad007
--- /dev/null
+++ b/site/layouts/_default/examples.html
@@ -0,0 +1,52 @@
+<!doctype html>
+<html lang="en"{{ with .Page.Params.html_class }} class="{{ . }}"{{ end }}>
+ <head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <meta name="description" content="">
+ <meta name="author" content="{{ .Site.Params.authors }}">
+ <meta name="generator" content="Hugo {{ .Hugo.Version }}">
+ <title>{{ .Page.Title | markdownify }} · {{ .Site.Title | markdownify }}</title>
+
+ <link rel="canonical" href="{{ .Permalink }}">
+
+ {{ partial "stylesheet" . }}
+
+ <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>
+
+ {{ range .Page.Params.extra_css }}
+ {{ "<!-- Custom styles for this template -->" | safeHTML }}
+ <link href="{{ . }}" rel="stylesheet">
+ {{- end }}
+ </head>
+ <body{{ with .Page.Params.body_class }} class="{{ . }}"{{ end }}>
+ {{ .Content }}
+
+ {{ if ne .Page.Params.include_js false }}
+ {{ if eq (getenv "HUGO_ENV") "production" }}
+ <script src="/docs/{{ .Site.Params.docs_version }}/dist/js/bootstrap.bundle.min.js" integrity="{{ .Site.Params.cdn.js_bundle_hash }}" crossorigin="anonymous"></script>
+ {{ else }}
+ <script src="/docs/{{ .Site.Params.docs_version }}/dist/js/bootstrap.bundle.js"></script>
+ {{ end }}
+
+ {{ range .Page.Params.extra_js }}
+ <script src="{{ . }}"></script>
+ {{- end }}
+ {{ end }}
+ </body>
+</html>
diff --git a/site/layouts/_default/home.html b/site/layouts/_default/home.html
new file mode 100644
index 0000000000..c03de11abb
--- /dev/null
+++ b/site/layouts/_default/home.html
@@ -0,0 +1,19 @@
+<!doctype html>
+<html lang="en">
+ <head>
+ {{ partial "header" . }}
+ </head>
+ <body>
+ {{ partial "skippy" . }}
+
+ {{ partial "docs-navbar" . }}
+
+ {{ partial "home/masthead" . }}
+ {{ partial "home/masthead-followup" . }}
+
+ {{ .Content }}
+
+ {{ partial "footer" . }}
+ {{ partial "scripts" . }}
+ </body>
+</html>
diff --git a/site/layouts/_default/single.html b/site/layouts/_default/single.html
new file mode 100644
index 0000000000..8f84570bc2
--- /dev/null
+++ b/site/layouts/_default/single.html
@@ -0,0 +1,29 @@
+<!doctype html>
+<html lang="en">
+ <head>
+ {{ partial "header" . }}
+ </head>
+ <body>
+ {{ partial "skippy" . }}
+
+ {{ partial "docs-navbar" . }}
+
+ <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">{{ .Title | markdownify }}</h1>
+ <p class="bd-lead">{{ .Page.Params.Description | markdownify }}</p>
+ {{ if eq .Title "Examples" }}
+ <a href="{{ .Site.Params.download.source }}" class="btn btn-lg btn-bd-primary" onclick="ga('send', 'event', 'Examples', 'Hero', 'Download');">Download source code</a>
+ {{ end }}
+ </div>
+ {{ partial "ads" . }}
+ </header>
+
+ <main class="bd-content p-5" id="content" role="main">
+ {{ .Content }}
+ </main>
+
+ {{ partial "footer" . }}
+ {{ partial "scripts" . }}
+ </body>
+</html>
diff --git a/site/layouts/alias.html b/site/layouts/alias.html
new file mode 100644
index 0000000000..4c4b4d87dd
--- /dev/null
+++ b/site/layouts/alias.html
@@ -0,0 +1,11 @@
+<!doctype html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>{{ .Permalink }}</title>
+ <link rel="canonical" href="{{ .Permalink }}">
+ <meta name="robots" content="noindex">
+ <meta http-equiv="refresh" content="0; url={{ .Permalink }}">
+ </head>
+</html>
diff --git a/site/_includes/ads.html b/site/layouts/partials/ads.html
index bbb9671417..bbb9671417 100644
--- a/site/_includes/ads.html
+++ b/site/layouts/partials/ads.html
diff --git a/site/_includes/analytics.html b/site/layouts/partials/analytics.html
index eeb57f9039..eeb57f9039 100644
--- a/site/_includes/analytics.html
+++ b/site/layouts/partials/analytics.html
diff --git a/site/_includes/callout-danger-async-methods.md b/site/layouts/partials/callout-danger-async-methods.md
index 083f28f238..4ac5b27b39 100644
--- a/site/_includes/callout-danger-async-methods.md
+++ b/site/layouts/partials/callout-danger-async-methods.md
@@ -1,8 +1,5 @@
-{% capture callout %}
#### Asynchronous methods and transitions
All API methods are **asynchronous** and start a **transition**. They return to the caller as soon as the transition is started but **before it ends**. In addition, a method call on a **transitioning component will be ignored**.
-[See our JavaScript documentation for more information]({{ site.baseurl }}/docs/{{ site.docs_version }}/getting-started/javascript/).
-{% endcapture %}
-{% include callout.html content=callout type="danger" %}
+[See our JavaScript documentation for more information](/docs/{{ .Site.Params.docs_version }}/getting-started/javascript/).
diff --git a/site/_includes/callout-info-mediaqueries-breakpoints.md b/site/layouts/partials/callout-info-mediaqueries-breakpoints.md
index d3988ce1a3..e3660e462a 100644
--- a/site/_includes/callout-info-mediaqueries-breakpoints.md
+++ b/site/layouts/partials/callout-info-mediaqueries-breakpoints.md
@@ -1,4 +1 @@
-{% capture callout %}
Note that since browsers do not currently support [range context queries](https://www.w3.org/TR/mediaqueries-4/#range-context), we work around the limitations of [`min-` and `max-` prefixes](https://www.w3.org/TR/mediaqueries-4/#mq-min-max) and viewports with fractional widths (which can occur under certain conditions on high-dpi devices, for instance) by using values with higher precision for these comparisons.
-{% endcapture %}
-{% include callout.html content=callout type="info" %}
diff --git a/site/layouts/partials/callout-info-prefersreducedmotion.md b/site/layouts/partials/callout-info-prefersreducedmotion.md
new file mode 100644
index 0000000000..d258fbe482
--- /dev/null
+++ b/site/layouts/partials/callout-info-prefersreducedmotion.md
@@ -0,0 +1 @@
+The animation effect of this component is dependent on the `prefers-reduced-motion` media query. See the [reduced motion section of our accessibility documentation](/docs/{{ .Site.Params.docs_version }}/getting-started/accessibility/#reduced-motion).
diff --git a/site/_includes/callout-warning-color-assistive-technologies.md b/site/layouts/partials/callout-warning-color-assistive-technologies.md
index 98214eb58d..f0c2e9de53 100644
--- a/site/_includes/callout-warning-color-assistive-technologies.md
+++ b/site/layouts/partials/callout-warning-color-assistive-technologies.md
@@ -1,6 +1,3 @@
-{% capture callout %}
##### Conveying meaning to assistive technologies
Using color to add meaning only provides a visual indication, which will not be conveyed to users of assistive technologies – such as screen readers. Ensure that information denoted by the color is either obvious from the content itself (e.g. the visible text), or is included through alternative means, such as additional text hidden with the `.sr-only` class.
-{% endcapture %}
-{% include callout.html content=callout type="warning" %}
diff --git a/site/layouts/partials/docs-navbar.html b/site/layouts/partials/docs-navbar.html
new file mode 100644
index 0000000000..4e340ec457
--- /dev/null
+++ b/site/layouts/partials/docs-navbar.html
@@ -0,0 +1,71 @@
+<header class="navbar navbar-expand navbar-dark flex-column flex-md-row bd-navbar">
+ <a class="navbar-brand mr-0 mr-md-2" href="/" aria-label="Bootstrap">
+ {{ partial "icons/bootstrap.svg" (dict "class" "d-block" "width" "36" "height" "36") }}
+ </a>
+
+ <div class="navbar-nav-scroll">
+ <ul class="navbar-nav bd-navbar-nav flex-row">
+ <li class="nav-item">
+ <a class="nav-link{{ if .IsHome }} active{{ end }}" href="/" onclick="ga('send', 'event', 'Navbar', 'Community links', 'Bootstrap');">Home</a>
+ </li>
+ <li class="nav-item">
+ <a class="nav-link{{ if eq .Page.Layout "docs" }} active{{ end }}" href="/docs/{{ .Site.Params.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 eq .Page.Title "Examples" }} active{{ end }}" href="/docs/{{ .Site.Params.docs_version }}/examples/" onclick="ga('send', 'event', 'Navbar', 'Community links', 'Examples');">Examples</a>
+ </li>
+ <li class="nav-item">
+ <a class="nav-link" href="{{ .Site.Params.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.Params.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.Params.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.Params.docs_version }}
+ </a>
+ <div class="dropdown-menu dropdown-menu-right" aria-labelledby="bd-versions">
+ <a class="dropdown-item active" href="/docs/{{ .Site.Params.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="/docs/versions/">All versions</a>
+ </div>
+ </li>
+
+ <li class="nav-item">
+ <a class="nav-link p-2" href="{{ .Site.Params.repo }}" target="_blank" rel="noopener" aria-label="GitHub">
+ {{ partial "icons/github.svg" (dict "class" "navbar-nav-svg" "width" "36" "height" "36") }}
+ </a>
+ </li>
+ <li class="nav-item">
+ <a class="nav-link p-2" href="https://twitter.com/{{ .Site.Params.twitter }}" target="_blank" rel="noopener" aria-label="Twitter">
+ {{ partial "icons/twitter.svg" (dict "class" "navbar-nav-svg" "width" "36" "height" "36") }}
+ </a>
+ </li>
+ <li class="nav-item">
+ <a class="nav-link p-2" href="{{ .Site.Params.slack }}/" target="_blank" rel="noopener" aria-label="Slack">
+ {{ partial "icons/slack.svg" (dict "class" "navbar-nav-svg" "width" "36" "height" "36") }}
+ </a>
+ </li>
+ <li class="nav-item">
+ <a class="nav-link p-2" href="{{ .Site.Params.opencollective }}/" target="_blank" rel="noopener" aria-label="Open Collective">
+ {{ partial "icons/opencollective.svg" (dict "class" "navbar-nav-svg" "width" "36" "height" "36") }}
+ </a>
+ </li>
+ </ul>
+
+ <a class="btn btn-bd-download d-none d-lg-inline-block mb-3 mb-md-0 ml-md-3" href="/docs/{{ .Site.Params.docs_version }}/getting-started/download/">Download</a>
+</header>
diff --git a/site/layouts/partials/docs-sidebar.html b/site/layouts/partials/docs-sidebar.html
new file mode 100644
index 0000000000..789b678a15
--- /dev/null
+++ b/site/layouts/partials/docs-sidebar.html
@@ -0,0 +1,43 @@
+<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.Params.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">
+ {{ partial "icons/menu.svg" (dict "width" "30" "height" "30") }}
+ </button>
+</form>
+
+<nav class="collapse bd-links" id="bd-docs-nav" aria-label="Main navigation">
+ {{- $url := split .URL "/" -}}
+ {{- $page_slug := index $url (sub (len $url) 2) -}}
+
+ {{- range $group := .Site.Data.nav -}}
+ {{- $link := $group.title -}}
+ {{- $link_slug := $link | urlize -}}
+
+ {{- if $group.pages -}}
+ {{- $link = index $group.pages 0 -}}
+ {{- $link_slug = $link.title | urlize -}}
+ {{- end -}}
+
+ {{- $group_slug := $group.title | urlize -}}
+ {{- $active_group := eq $.Page.Params.group $group_slug }}
+
+ <div class="bd-toc-item{{ if $active_group }} active{{ end }}">
+ <a class="bd-toc-link" href="/docs/{{ $.Site.Params.docs_version }}/{{ $group_slug }}/{{ if $group.pages }}{{ $link_slug }}/{{ end }}">
+ {{- $group.title -}}
+ </a>
+
+ {{- if and $active_group $group.pages }}
+ <ul class="nav bd-sidenav">
+ {{- range $doc := $group.pages -}}
+ {{- $doc_slug := $doc.title | urlize }}
+ <li{{ if and $active_group (eq $page_slug $doc_slug) }} class="active bd-sidenav-active"{{ end }}>
+ <a href="/docs/{{ $.Site.Params.docs_version }}/{{ $group_slug }}/{{ $doc_slug }}/">
+ {{- $doc.title -}}
+ </a>
+ </li>
+ {{- end }}
+ </ul>
+ {{- end }}
+ </div>
+ {{- end }}
+</nav>
diff --git a/site/layouts/partials/favicons.html b/site/layouts/partials/favicons.html
new file mode 100644
index 0000000000..61733e32db
--- /dev/null
+++ b/site/layouts/partials/favicons.html
@@ -0,0 +1,9 @@
+{{ "<!-- Favicons -->" | safeHTML }}
+<link rel="apple-touch-icon" href="/docs/{{ .Site.Params.docs_version }}/assets/img/favicons/apple-touch-icon.png" sizes="180x180">
+<link rel="icon" href="/docs/{{ .Site.Params.docs_version }}/assets/img/favicons/favicon-32x32.png" sizes="32x32" type="image/png">
+<link rel="icon" href="/docs/{{ .Site.Params.docs_version }}/assets/img/favicons/favicon-16x16.png" sizes="16x16" type="image/png">
+<link rel="manifest" href="/docs/{{ .Site.Params.docs_version }}/assets/img/favicons/manifest.json">
+<link rel="mask-icon" href="/docs/{{ .Site.Params.docs_version }}/assets/img/favicons/safari-pinned-tab.svg" color="#563d7c">
+<link rel="icon" href="/docs/{{ .Site.Params.docs_version }}/assets/img/favicons/favicon.ico">
+<meta name="msapplication-config" content="/docs/{{ .Site.Params.docs_version }}/assets/img/favicons/browserconfig.xml">
+<meta name="theme-color" content="#563d7c">
diff --git a/site/layouts/partials/footer.html b/site/layouts/partials/footer.html
new file mode 100644
index 0000000000..29e80d30f6
--- /dev/null
+++ b/site/layouts/partials/footer.html
@@ -0,0 +1,12 @@
+<footer class="bd-footer text-muted">
+ <div class="container-fluid p-3 p-md-5">
+ <ul class="bd-footer-links">
+ <li><a href="{{ .Site.Params.repo }}">GitHub</a></li>
+ <li><a href="https://twitter.com/{{ .Site.Params.twitter }}">Twitter</a></li>
+ <li><a href="/docs/{{ .Site.Params.docs_version }}/examples/">Examples</a></li>
+ <li><a href="/docs/{{ .Site.Params.docs_version }}/about/overview/">About</a></li>
+ </ul>
+ <p>Designed and built with all the love in the world by the <a href="/docs/{{ .Site.Params.docs_version }}/about/team/">Bootstrap team</a> with the help of <a href="{{ .Site.Params.repo }}/graphs/contributors">our contributors</a>.</p>
+ <p>Currently v{{ .Site.Params.current_version }}. Code licensed <a href="{{ .Site.Params.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>
diff --git a/site/layouts/partials/header.html b/site/layouts/partials/header.html
new file mode 100644
index 0000000000..c748fd82ee
--- /dev/null
+++ b/site/layouts/partials/header.html
@@ -0,0 +1,17 @@
+<meta charset="utf-8">
+<meta name="viewport" content="width=device-width, initial-scale=1">
+<meta name="description" content="{{ index .Page.Params "description" | default .Site.Params.description | markdownify }}">
+<meta name="author" content="{{ .Site.Params.authors }}">
+<meta name="generator" content="Hugo {{ .Hugo.Version }}">
+
+<meta name="docsearch:language" content="en">
+<meta name="docsearch:version" content="{{ .Site.Params.docs_version }}">
+
+<title>{{ if .IsHome }}{{ .Site.Title | markdownify }} · {{ .Site.Params.description | markdownify }}{{ else }}{{ .Title | markdownify }} · {{ .Site.Title | markdownify }}{{ end }}</title>
+
+<link rel="canonical" href="{{ .Permalink }}">
+
+{{ partial "stylesheet" . }}
+{{ partial "favicons" . }}
+{{ partial "social" . }}
+{{ partial "analytics" . }}
diff --git a/site/layouts/partials/home/masthead-followup.html b/site/layouts/partials/home/masthead-followup.html
new file mode 100644
index 0000000000..c852850658
--- /dev/null
+++ b/site/layouts/partials/home/masthead-followup.html
@@ -0,0 +1,46 @@
+<div class="masthead-followup row m-0 border border-white">
+ <div class="col-12 col-md-4 p-3 p-md-5 bg-light border border-white">
+ {{ "<!-- Icon by Bytesize https://github.com/danklammer/bytesize-icons -->" | safeHTML }}
+ {{ partial "icons/import.svg" (dict "class" "text-primary mb-2" "width" "32" "height" "32") }}
+ <h3>Installation</h3>
+ <p>Include Bootstrap’s source Sass and JavaScript files via npm, Composer or Meteor. Package managed installs don’t include documentation, but do include our build system and readme.</p>
+
+ {{ highlight "npm install bootstrap" "sh" "" }}
+
+ {{ highlight (printf ("gem install bootstrap -v %s") .Site.Params.current_ruby_version) "sh" "" }}
+
+ <hr class="half-rule">
+ <a class="btn btn-outline-primary" href="/docs/{{ .Site.Params.docs_version }}/getting-started/download/">Read installation docs</a>
+ </div>
+
+ <div class="col-12 col-md-4 p-3 p-md-5 bg-light border border-white">
+ {{ "<!-- Icon by Bytesize https://github.com/danklammer/bytesize-icons -->" | safeHTML }}
+ {{ partial "icons/download.svg" (dict "class" "text-primary mb-2" "width" "32" "height" "32") }}
+ <h3>BootstrapCDN</h3>
+ <p>When you only need to include Bootstrap’s compiled CSS or JS, you can use <a href="https://www.bootstrapcdn.com/">BootstrapCDN</a>.</p>
+
+ <h5>CSS only</h5>
+ {{ highlight (printf (`<link rel="stylesheet" href="%s" integrity="%s" crossorigin="anonymous">`) .Site.Params.cdn.css .Site.Params.cdn.css_hash) "html" "" }}
+
+ <h5>JS and Popper.js</h5>
+ {{ highlight (printf (`<script src="%s" integrity="%s" crossorigin="anonymous"></script>
+<script src="%s" integrity="%s" crossorigin="anonymous"></script>
+`) .Site.Params.cdn.popper .Site.Params.cdn.popper_hash .Site.Params.cdn.js .Site.Params.cdn.js_hash) "html" "" }}
+ <hr class="half-rule">
+ <a class="btn btn-outline-primary" href="/docs/{{ .Site.Params.docs_version }}/layout/overview/">Explore the docs</a>
+ </div>
+
+ <div class="col-12 col-md-4 p-3 p-md-5 bg-light border border-white">
+ {{ "<!-- Icon by Bytesize https://github.com/danklammer/bytesize-icons -->" | safeHTML }}
+ {{ partial "icons/lightning.svg" (dict "class" "text-primary mb-2" "width" "32" "height" "32") }}
+ <h3>Official Themes</h3>
+ <p>
+ Take Bootstrap 4 to the next level with official premium themes—toolkits built on Bootstrap with new components and plugins, docs, and build tools.
+ </p>
+ <img class="img-fluid mt-3 mx-auto" srcset="/docs/{{ .Site.Params.docs_version }}/assets/img/bootstrap-themes.png,
+ /docs/{{ .Site.Params.docs_version }}/assets/img/bootstrap-themes@2x.png 2x"
+ src="/docs/{{ .Site.Params.docs_version }}/assets/img/bootstrap-themes.png" alt="Bootstrap Themes" width="500" height="200">
+ <hr class="half-rule">
+ <a href="{{ .Site.Params.themes }}/" class="btn btn-outline-primary">Browse themes</a>
+ </div>
+</div>
diff --git a/site/layouts/partials/home/masthead.html b/site/layouts/partials/home/masthead.html
new file mode 100644
index 0000000000..4069d6378f
--- /dev/null
+++ b/site/layouts/partials/home/masthead.html
@@ -0,0 +1,30 @@
+<main class="bd-masthead" id="content" role="main">
+ <div class="container">
+ <div class="row align-items-center">
+ <div class="col-6 mx-auto col-md-6 order-md-2">
+ {{ partial "icons/bootstrap-stack.svg" (dict "class" "img-fluid mb-3 mb-md-0" "width" "512" "height" "430") }}
+ </div>
+ <div class="col-md-6 order-md-1 text-center text-md-left pr-md-5">
+ <h1 class="mb-3 bd-text-purple-bright">Bootstrap</h1>
+ <p class="lead">
+ Build responsive, mobile-first projects on the web with the world’s most popular front-end component library.
+ </p>
+ <p class="lead mb-4">
+ Bootstrap is an open source toolkit for developing with HTML, CSS, and JS. Quickly prototype your ideas or build your entire app with our Sass variables and mixins, responsive grid system, extensive prebuilt components, and powerful plugins built with VanillaJS.
+ </p>
+ <div class="row mx-n2">
+ <div class="col-md px-2">
+ <a href="/docs/{{ .Site.Params.docs_version }}/getting-started/introduction/" class="btn btn-lg btn-bd-primary w-100 mb-3" onclick="ga('send', 'event', 'Jumbotron actions', 'Get started', 'Get started');">Get started</a>
+ </div>
+ <div class="col-md px-2">
+ <a href="/docs/{{ .Site.Params.docs_version }}/getting-started/download/" class="btn btn-lg btn-outline-secondary w-100 mb-3" onclick="ga('send', 'event', 'Jumbotron actions', 'Download', 'Download {{ .Site.Params.current_version }}');">Download</a>
+ </div>
+ </div>
+ <p class="text-muted mb-0">
+ Currently v{{ .Site.Params.current_version }}
+ </p>
+ </div>
+ </div>
+ {{ partial "ads.html" . }}
+ </div>
+</main>
diff --git a/site/layouts/partials/icons/bootstrap-stack.svg b/site/layouts/partials/icons/bootstrap-stack.svg
new file mode 100644
index 0000000000..1e3913042e
--- /dev/null
+++ b/site/layouts/partials/icons/bootstrap-stack.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"{{ with .width }} width="{{ . }}"{{ end }}{{ with .height }} height="{{ . }}"{{ end }}{{ with .class }} class="{{ . }}"{{ end }} viewBox="0 0 1024 860" role="img"><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> \ No newline at end of file
diff --git a/site/layouts/partials/icons/bootstrap.svg b/site/layouts/partials/icons/bootstrap.svg
new file mode 100644
index 0000000000..0277389a6b
--- /dev/null
+++ b/site/layouts/partials/icons/bootstrap.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg"{{ with .width }} width="{{ . }}"{{ end }}{{ with .height }} height="{{ . }}"{{ end }}{{ with .class }} class="{{ . }}"{{ end }} 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> \ No newline at end of file
diff --git a/site/layouts/partials/icons/download.svg b/site/layouts/partials/icons/download.svg
new file mode 100644
index 0000000000..05385434de
--- /dev/null
+++ b/site/layouts/partials/icons/download.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg"{{ with .width }} width="{{ . }}"{{ end }}{{ with .height }} height="{{ . }}"{{ end }} fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" aria-hidden="true"{{ with .class }} class="{{ . }}"{{ end }} 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> \ No newline at end of file
diff --git a/site/layouts/partials/icons/github.svg b/site/layouts/partials/icons/github.svg
new file mode 100644
index 0000000000..cacd860c28
--- /dev/null
+++ b/site/layouts/partials/icons/github.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg"{{ with .width }} width="{{ . }}"{{ end }}{{ with .height }} height="{{ . }}"{{ end }}{{ with .class }} class="{{ . }}"{{ end }} 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> \ No newline at end of file
diff --git a/site/layouts/partials/icons/import.svg b/site/layouts/partials/icons/import.svg
new file mode 100644
index 0000000000..bc38ee57cb
--- /dev/null
+++ b/site/layouts/partials/icons/import.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg"{{ with .width }} width="{{ . }}"{{ end }}{{ with .height }} height="{{ . }}"{{ end }} fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" aria-hidden="true"{{ with .class }} class="{{ . }}"{{ end }} viewBox="0 0 32 32"><title>Import</title><path d="M28 22v8H4v-8M16 4v20m-8-8l8 8 8-8"/></svg> \ No newline at end of file
diff --git a/site/layouts/partials/icons/lightning.svg b/site/layouts/partials/icons/lightning.svg
new file mode 100644
index 0000000000..cd9138ad83
--- /dev/null
+++ b/site/layouts/partials/icons/lightning.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg"{{ with .width }} width="{{ . }}"{{ end }}{{ with .height }} height="{{ . }}"{{ end }} fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" aria-hidden="true"{{ with .class }} class="{{ . }}"{{ end }} viewBox="0 0 32 32"><title>Lightning</title><path d="M18 13l8-11L8 13l6 6-8 11 18-11z"/></svg> \ No newline at end of file
diff --git a/site/layouts/partials/icons/menu.svg b/site/layouts/partials/icons/menu.svg
new file mode 100644
index 0000000000..78c43d85c9
--- /dev/null
+++ b/site/layouts/partials/icons/menu.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg"{{ with .width }} width="{{ . }}"{{ end }}{{ with .height }} height="{{ . }}"{{ end }}{{ with .class }} class="{{ . }}"{{ end }} 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> \ No newline at end of file
diff --git a/site/layouts/partials/icons/opencollective.svg b/site/layouts/partials/icons/opencollective.svg
new file mode 100644
index 0000000000..4a477a4978
--- /dev/null
+++ b/site/layouts/partials/icons/opencollective.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg"{{ with .width }} width="{{ . }}"{{ end }}{{ with .height }} height="{{ . }}"{{ end }} fill="currentColor" fill-rule="evenodd"{{ with .class }} class="{{ . }}"{{ end }} 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> \ No newline at end of file
diff --git a/site/layouts/partials/icons/slack.svg b/site/layouts/partials/icons/slack.svg
new file mode 100644
index 0000000000..67b9c7f485
--- /dev/null
+++ b/site/layouts/partials/icons/slack.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg"{{ with .width }} width="{{ . }}"{{ end }}{{ with .height }} height="{{ . }}"{{ end }}{{ with .class }} class="{{ . }}"{{ end }} 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> \ No newline at end of file
diff --git a/site/layouts/partials/icons/twitter.svg b/site/layouts/partials/icons/twitter.svg
new file mode 100644
index 0000000000..b102181a5f
--- /dev/null
+++ b/site/layouts/partials/icons/twitter.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg"{{ with .width }} width="{{ . }}"{{ end }}{{ with .height }} height="{{ . }}"{{ end }}{{ with .class }} class="{{ . }}"{{ end }} 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> \ No newline at end of file
diff --git a/site/layouts/partials/scripts.html b/site/layouts/partials/scripts.html
new file mode 100644
index 0000000000..e2f9bc407e
--- /dev/null
+++ b/site/layouts/partials/scripts.html
@@ -0,0 +1,19 @@
+{{ if eq (getenv "HUGO_ENV") "production" -}}
+ <script src="/docs/{{ .Site.Params.docs_version }}/dist/js/bootstrap.bundle.min.js" integrity="{{ .Site.Params.cdn.js_bundle_hash }}" crossorigin="anonymous"></script>
+{{ else -}}
+ <script src="/docs/{{ .Site.Params.docs_version }}/dist/js/bootstrap.bundle.js"></script>
+{{- end }}
+
+{{ if eq .Page.Layout "docs" -}}
+<script src="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js"></script>
+{{- end }}
+
+{{- if eq (getenv "HUGO_ENV") "production" -}}
+ <script src="/docs/{{ .Site.Params.docs_version }}/assets/js/docs.min.js"></script>
+{{- else -}}
+ <script src="/docs/{{ .Site.Params.docs_version }}/assets/js/vendor/anchor.min.js"></script>
+ <script src="/docs/{{ .Site.Params.docs_version }}/assets/js/vendor/clipboard.min.js"></script>
+ <script src="/docs/{{ .Site.Params.docs_version }}/assets/js/vendor/bs-custom-file-input.min.js"></script>
+ <script src="/docs/{{ .Site.Params.docs_version }}/assets/js/src/application.js"></script>
+ <script src="/docs/{{ .Site.Params.docs_version }}/assets/js/src/search.js"></script>
+{{- end -}}
diff --git a/site/_includes/skippy.html b/site/layouts/partials/skippy.html
index ec7507d532..ec7507d532 100644
--- a/site/_includes/skippy.html
+++ b/site/layouts/partials/skippy.html
diff --git a/site/layouts/partials/social.html b/site/layouts/partials/social.html
new file mode 100644
index 0000000000..151a629945
--- /dev/null
+++ b/site/layouts/partials/social.html
@@ -0,0 +1,18 @@
+{{ "<!-- Twitter -->" | safeHTML }}
+<meta name="twitter:card" content="{{ if .IsHome }}summary_large_image{{ else }}summary{{ end }}">
+<meta name="twitter:site" content="@{{ .Site.Params.twitter }}">
+<meta name="twitter:creator" content="@{{ .Site.Params.twitter }}">
+<meta name="twitter:title" content="{{ .Title | markdownify }}">
+<meta name="twitter:description" content="{{ index .Page.Params "description" | default .Site.Params.description | markdownify }}">
+<meta name="twitter:image" content="{{ if .IsHome }}{{ .Site.BaseURL }}{{ .Site.Params.social_logo_path }}{{ else }}{{ .Site.BaseURL }}{{ .Site.Params.social_image_path }}{{ end }}">
+
+{{ "<!-- Facebook -->" | safeHTML }}
+<meta property="og:url" content="{{ .Permalink }}">
+<meta property="og:title" content="{{ .Title | markdownify }}">
+<meta property="og:description" content="{{ index .Page.Params "description" | default .Site.Params.description | markdownify }}">
+<meta property="og:type" content="website">
+<meta property="og:image" content="{{ replace .Site.BaseURL "https://" "http://" }}{{ .Site.Params.social_image_path }}">
+<meta property="og:image:secure_url" content="{{ .Site.BaseURL }}{{ .Site.Params.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">
diff --git a/site/layouts/partials/stylesheet.html b/site/layouts/partials/stylesheet.html
new file mode 100644
index 0000000000..749a3314e6
--- /dev/null
+++ b/site/layouts/partials/stylesheet.html
@@ -0,0 +1,16 @@
+{{- "<!-- Bootstrap core CSS -->" | safeHTML }}
+{{ if eq (getenv "HUGO_ENV") "production" -}}
+<link href="/docs/{{ .Site.Params.docs_version }}/dist/css/bootstrap.min.css" rel="stylesheet" integrity="{{ .Site.Params.cdn.css_hash }}" crossorigin="anonymous">
+{{- else -}}
+<link href="/docs/{{ .Site.Params.docs_version }}/dist/css/bootstrap.css" rel="stylesheet">
+{{- end }}
+
+{{ if (or (eq .Page.Layout "docs") (ne .Page.Layout "examples")) -}}
+{{- "<!-- Documentation extras -->" | safeHTML }}
+{{ if eq .Page.Layout "docs" -}}
+<link href="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css" rel="stylesheet">
+{{- end -}}
+{{- if (ne .Page.Layout "examples") }}
+<link href="/docs/{{ .Site.Params.docs_version }}/assets/css/docs.min.css" rel="stylesheet">
+{{- end -}}
+{{- end }}
diff --git a/site/layouts/robots.txt b/site/layouts/robots.txt
new file mode 100644
index 0000000000..e9d78f1aed
--- /dev/null
+++ b/site/layouts/robots.txt
@@ -0,0 +1,8 @@
+# www.robotstxt.org
+
+{{ if (eq (getenv "HUGO_ENV") "production") -}}
+# Allow crawling of all content
+{{- end }}
+User-agent: *
+Disallow:{{ if (ne (getenv "HUGO_ENV") "production") }} /{{ end }}
+Sitemap: {{ .Site.BaseURL }}/sitemap.xml
diff --git a/site/layouts/shortcodes/bugify.html b/site/layouts/shortcodes/bugify.html
new file mode 100644
index 0000000000..b064d29a5e
--- /dev/null
+++ b/site/layouts/shortcodes/bugify.html
@@ -0,0 +1,40 @@
+{{- $words := (split .Inner " ") -}}
+
+{{- range $word := $words -}}
+ {{- if (strings.Contains $word "#") -}}
+ {{- $separator := false -}}
+
+ {{- if (strings.Contains $word ",") -}}
+ {{- $separator = true -}}
+ {{- end -}}
+
+ {{- $data := split $word "#" -}}
+ {{- $bug_cat := replace (index $data 0) "\n" "" -}}
+ {{- $bug_id := replace (index $data 1) "\n" "" -}}
+ {{- $bug_id = replace $bug_id "," "" -}}
+
+ {{- if (eq $bug_cat "Bootstrap") -}}
+ <a href="https://github.com/twbs/bootstrap/issues/{{ $bug_id }}">#{{ $bug_id }}</a>
+ {{- else if (eq $bug_cat "Edge") -}}
+ <a href="https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/{{ $bug_id }}/">Edge issue #{{ $bug_id }}</a>
+ {{- else if (eq $bug_cat "A11yUserVoice") -}}
+ <a href="https://microsoftaccessibility.uservoice.com/forums/307429-microsoft-accessibility-feedback/suggestions/{{ $bug_id }}">Microsoft A11y UserVoice idea #{{ $bug_id }}</a>
+ {{- else if (eq $bug_cat "UserVoice") -}}
+ <a href="https://wpdev.uservoice.com/forums/257854-microsoft-edge-developer/suggestions/{{ $bug_id }}">Edge UserVoice idea #{{ $bug_id }}</a>
+ {{- else if (eq $bug_cat "Mozilla") -}}
+ <a href="https://bugzilla.mozilla.org/show_bug.cgi?id={{ $bug_id }}">Mozilla bug #{{ $bug_id }}</a>
+ {{- else if (eq $bug_cat "Chromium") -}}
+ <a href="https://bugs.chromium.org/p/chromium/issues/detail?id={{ $bug_id }}">Chromium issue #{{ $bug_id }}</a>
+ {{- else if (eq $bug_cat "WebKit") -}}
+ <a href="https://bugs.webkit.org/show_bug.cgi?id={{ $bug_id }}">WebKit bug #{{ $bug_id }}</a>
+ {{- else if (eq $bug_cat "Safari") -}}
+ <a href="https://openradar.appspot.com/{{ $bug_id }}">Apple Safari Radar #{{ $bug_id }}</a>
+ {{- else if (eq $bug_cat "Normalize") -}}
+ <a href="https://github.com/necolas/normalize.css/issues/{{ $bug_id }}">Normalize #{{ $bug_id }}</a>
+ {{- end -}}
+ {{- if (eq $separator true) }}, {{ end -}}
+
+ {{- else -}}
+ {{- $word -}}
+ {{- end -}}
+{{- end -}}
diff --git a/site/layouts/shortcodes/callout.html b/site/layouts/shortcodes/callout.html
new file mode 100644
index 0000000000..007f8a8e8e
--- /dev/null
+++ b/site/layouts/shortcodes/callout.html
@@ -0,0 +1,10 @@
+{{- /*
+ Usage: `callout "type"`,
+ where type is one of info (default), danger, warning
+*/ -}}
+
+{{- $css_class := .Get 0 | default "info" -}}
+
+<div class="bd-callout bd-callout-{{ $css_class }}">
+{{ .Inner | markdownify }}
+</div>
diff --git a/site/layouts/shortcodes/example.html b/site/layouts/shortcodes/example.html
new file mode 100644
index 0000000000..67813b70fe
--- /dev/null
+++ b/site/layouts/shortcodes/example.html
@@ -0,0 +1,53 @@
+{{- /*
+ Usage: `example [args]`
+
+ `args` are optional and can be one of the following:
+ id: the `div`'s id - default: ""
+ class: any extra class(es) to be added to the `div` - default ""
+ show_preview: if the preview should be output in the HTML - default: `true`
+ show_markup: if the markup should be output in the HTML - default: `true`
+*/ -}}
+
+{{- $show_preview := .Get "show_preview" | default true -}}
+{{- $show_markup := .Get "show_markup" | default true -}}
+{{- $input := .Inner -}}
+
+{{- if eq $show_preview true -}}
+<div{{ with .Get "id" }} id="{{ . }}"{{ end }} class="bd-example{{ with .Get "class" }} {{ . }}{{ end }}">
+ {{- $input -}}
+</div>
+{{- end -}}
+
+{{- if eq $show_markup true -}}
+ {{- $.Scratch.Set "highlight_content" $input -}}
+
+ {{- if (strings.Contains $input `<svg class="bd-placeholder-img`) -}}
+ {{- $.Scratch.Set "highlight_content" "" -}}
+ {{- $image_class := "" -}}
+
+ {{- $modified_content := replace $input `<svg class="bd-placeholder-img` `✂️<svg class="bd-placeholder-img` -}}
+ {{- $modified_content = replace $modified_content "</svg>\n" "</svg>✂️" -}}
+ {{- $modified_content = split $modified_content "✂️" -}}
+
+ {{- if (strings.Contains $input `<svg class="bd-placeholder-img `) -}}
+ {{- $image_class = replace $input "bd-placeholder-img " "bd-placeholder-img ✂️ " -}}
+ {{- $image_class = split (replace $image_class `" width="` `✂️" width="`) "✂️" -}}
+ {{- $image_class = replace (index $image_class 1) "bd-placeholder-img-lg" "" -}}
+ {{- $image_class = trim $image_class " " -}}
+ {{- end -}}
+
+ {{- range $i, $content_chunk := $modified_content -}}
+ {{- if (strings.Contains $content_chunk `<svg class="bd-placeholder-img`) -}}
+ {{- if $image_class -}}
+ {{- $.Scratch.Add "highlight_content" (printf `<img src="..." class="%s" alt="...">` $image_class) -}}
+ {{- else -}}
+ {{- $.Scratch.Add "highlight_content" `<img src="..." alt="...">` -}}
+ {{- end -}}
+ {{- else -}}
+ {{- $.Scratch.Add "highlight_content" $content_chunk -}}
+ {{- end -}}
+ {{- end -}}
+ {{- end -}}
+
+ {{- highlight (trim ($.Scratch.Get "highlight_content") "\n") "html" "" -}}
+{{- end -}}
diff --git a/site/layouts/shortcodes/list-examples.html b/site/layouts/shortcodes/list-examples.html
new file mode 100644
index 0000000000..33b3c33c7d
--- /dev/null
+++ b/site/layouts/shortcodes/list-examples.html
@@ -0,0 +1,19 @@
+{{ range $entry := $.Site.Data.examples -}}
+ <h2>{{ $entry.category }}</h2>
+ <p>{{ $entry.description }}</p>
+
+ {{ range $i, $example := $entry.examples -}}
+ {{- $len := len $entry.examples -}}
+ {{ if (eq $i 0) }}<div class="row">{{ end }}
+ <div class="col-sm-6 col-md-4 col-xl-3 mb-3">
+ <a href="/docs/{{ $.Site.Params.docs_version }}/examples/{{ $example.name | urlize }}/">
+ <img class="img-thumbnail mb-3" srcset="/docs/{{ $.Site.Params.docs_version }}/assets/img/examples/{{ $example.name | urlize }}.png,
+ /docs/{{ $.Site.Params.docs_version }}/assets/img/examples/{{ $example.name | urlize }}@2x.png 2x"
+ src="/docs/{{ $.Site.Params.docs_version }}/assets/img/examples/{{ $example.name | urlize }}.png" alt="{{ $example.name }} screenshot" width="480" height="300">
+ <h5 class="mb-1">{{ $example.name }}</h5>
+ </a>
+ <p class="text-muted">{{ $example.description }}</p>
+ </div>
+ {{ if (eq (add $i 1) $len) }}</div>{{ end }}
+ {{ end -}}
+{{ end -}}
diff --git a/site/layouts/shortcodes/list-versions.html b/site/layouts/shortcodes/list-versions.html
new file mode 100644
index 0000000000..5c7f0445a0
--- /dev/null
+++ b/site/layouts/shortcodes/list-versions.html
@@ -0,0 +1,20 @@
+<div class="row">
+ {{- range $release := (index $.Site.Data "docs-versions") }}
+ <div class="col-md">
+ <h2>{{ $release.group }}</h2>
+ <p>{{ $release.description }}</p>
+ {{- $versions := sort $release.versions "v" "desc" -}}
+ {{- range $i, $version := $versions }}
+ {{- $len := len $versions -}}
+ {{ if (eq $i 0) }}<div class="list-group">{{ end }}
+ <a class="list-group-item list-group-item-action py-2 text-primary{{ if (eq $version.v $.Site.Params.docs_version) }} d-flex justify-content-between align-items-center{{ end }}" href="{{ $release.baseurl }}/{{ $version.v }}/">
+ {{ $version.v }}
+ {{ if (eq $version.v $.Site.Params.docs_version) -}}
+ <span class="badge badge-primary">Latest</span>
+ {{- end }}
+ </a>
+ {{ if (eq (add $i 1) $len) }}</div>{{ end }}
+ {{ end -}}
+ </div>
+ {{ end -}}
+</div>
diff --git a/site/layouts/shortcodes/markdown.html b/site/layouts/shortcodes/markdown.html
new file mode 100644
index 0000000000..82107bcef9
--- /dev/null
+++ b/site/layouts/shortcodes/markdown.html
@@ -0,0 +1 @@
+{{- .Inner | markdownify -}}
diff --git a/site/layouts/shortcodes/partial.html b/site/layouts/shortcodes/partial.html
new file mode 100644
index 0000000000..c9d3496de7
--- /dev/null
+++ b/site/layouts/shortcodes/partial.html
@@ -0,0 +1 @@
+{{ partial (.Get 0) . }}
diff --git a/site/layouts/shortcodes/placeholder.html b/site/layouts/shortcodes/placeholder.html
new file mode 100644
index 0000000000..83f44aec9e
--- /dev/null
+++ b/site/layouts/shortcodes/placeholder.html
@@ -0,0 +1,30 @@
+{{- /*
+ Usage: `placeholder args`
+
+ args can be one of the following:
+ title: Used in the SVG `title` tag, default "Placeholder"
+ 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
+*/ -}}
+
+{{- $grays := $.Site.Data.grays -}}
+{{- $title := .Get "title" | default "Placeholder" -}}
+{{- $class := .Get "class" -}}
+{{- $color := .Get "color" | default (index $grays 2).hex -}}
+{{- $background := .Get "background" | default (index $grays 5).hex -}}
+{{- $width := .Get "width" | default "100%" -}}
+{{- $height := .Get "height" | default "180" -}}
+{{- $text := .Get "text" | default (printf "%sx%s" $width $height) -}}
+
+{{- $show_title := not (eq $title "false") -}}
+{{- $show_text := not (eq $text "false") -}}
+
+<svg class="bd-placeholder-img{{ with $class }} {{ . }}{{ end }}" width="{{ $width }}" height="{{ $height }}" xmlns="http://www.w3.org/2000/svg"{{ if (or $show_title $show_text) }} aria-label="{{ if $show_title }}{{ $title }}{{ if $show_text }}: {{ end }}{{ end }}{{ if ($show_text) }}{{ $text }}{{ end }}"{{ end }} preserveAspectRatio="xMidYMid slice" role="img">
+ {{- if $show_title -}}<title>{{ $title }}</title>{{- end -}}
+ <rect width="100%" height="100%" fill="{{ $background }}"/>
+ {{- if $show_text -}}<text x="50%" y="50%" fill="{{ $color }}" dy=".3em">{{ $text }}</text>{{- end -}}
+</svg>
diff --git a/site/layouts/shortcodes/year.html b/site/layouts/shortcodes/year.html
new file mode 100644
index 0000000000..bc9dd300d1
--- /dev/null
+++ b/site/layouts/shortcodes/year.html
@@ -0,0 +1,5 @@
+{{- /*
+ Output the current year
+*/ -}}
+
+{{- now.Format "2006" -}}
diff --git a/site/layouts/sitemap.xml b/site/layouts/sitemap.xml
new file mode 100644
index 0000000000..872ce44926
--- /dev/null
+++ b/site/layouts/sitemap.xml
@@ -0,0 +1,9 @@
+<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">
+ {{- range .Data.Pages -}}{{ if ne .Params.sitemap_exclude true }}
+ <url>
+ <loc>{{ .Permalink }}</loc>{{ if not .Lastmod.IsZero }}
+ <lastmod>{{ safeHTML (.Lastmod.Format "2006-01-02T15:04:05-07:00") }}</lastmod>{{ end }}{{ with .Sitemap.ChangeFreq }}
+ <changefreq>{{ . }}</changefreq>{{ end }}{{ if ge .Sitemap.Priority 0.0 }}
+ <priority>{{ .Sitemap.Priority }}</priority>{{ end }}
+ </url>{{ end }}{{ end }}
+</urlset>
diff --git a/site/robots.txt b/site/robots.txt
deleted file mode 100644
index d3ac12c646..0000000000
--- a/site/robots.txt
+++ /dev/null
@@ -1,9 +0,0 @@
----
----
-
-# www.robotstxt.org/
-
-# Allow crawling of all content
-User-agent: *
-Disallow:{% if jekyll.environment != "production" %} /{% endif %}
-Sitemap: {{ site.url }}/sitemap.xml
diff --git a/site/static/CNAME b/site/static/CNAME
new file mode 100644
index 0000000000..52c853392c
--- /dev/null
+++ b/site/static/CNAME
@@ -0,0 +1 @@
+getbootstrap.com
diff --git a/site/docs/4.3/assets/brand/bootstrap-outline.svg b/site/static/docs/4.3/assets/brand/bootstrap-outline.svg
index c7f00ecf34..c7f00ecf34 100644
--- a/site/docs/4.3/assets/brand/bootstrap-outline.svg
+++ b/site/static/docs/4.3/assets/brand/bootstrap-outline.svg
diff --git a/site/docs/4.3/assets/brand/bootstrap-punchout.svg b/site/static/docs/4.3/assets/brand/bootstrap-punchout.svg
index 005b7b13ca..005b7b13ca 100644
--- a/site/docs/4.3/assets/brand/bootstrap-punchout.svg
+++ b/site/static/docs/4.3/assets/brand/bootstrap-punchout.svg
diff --git a/site/docs/4.3/assets/brand/bootstrap-social-logo.png b/site/static/docs/4.3/assets/brand/bootstrap-social-logo.png
index fdd35e5d47..fdd35e5d47 100644
--- a/site/docs/4.3/assets/brand/bootstrap-social-logo.png
+++ b/site/static/docs/4.3/assets/brand/bootstrap-social-logo.png
Binary files differ
diff --git a/site/docs/4.3/assets/brand/bootstrap-social.png b/site/static/docs/4.3/assets/brand/bootstrap-social.png
index 468ab5b595..468ab5b595 100644
--- a/site/docs/4.3/assets/brand/bootstrap-social.png
+++ b/site/static/docs/4.3/assets/brand/bootstrap-social.png
Binary files differ
diff --git a/site/docs/4.3/assets/brand/bootstrap-solid.svg b/site/static/docs/4.3/assets/brand/bootstrap-solid.svg
index f59babfa50..f59babfa50 100644
--- a/site/docs/4.3/assets/brand/bootstrap-solid.svg
+++ b/site/static/docs/4.3/assets/brand/bootstrap-solid.svg
diff --git a/site/docs/4.3/assets/css/docs.min.css b/site/static/docs/4.3/assets/css/docs.min.css
index ac55cdc363..ac55cdc363 100644
--- a/site/docs/4.3/assets/css/docs.min.css
+++ b/site/static/docs/4.3/assets/css/docs.min.css
diff --git a/site/docs/4.3/assets/css/docs.min.css.map b/site/static/docs/4.3/assets/css/docs.min.css.map
index 02019a2329..02019a2329 100644
--- a/site/docs/4.3/assets/css/docs.min.css.map
+++ b/site/static/docs/4.3/assets/css/docs.min.css.map
diff --git a/site/docs/4.3/assets/img/bootstrap-themes.png b/site/static/docs/4.3/assets/img/bootstrap-themes.png
index 15f33f3f7b..15f33f3f7b 100644
--- a/site/docs/4.3/assets/img/bootstrap-themes.png
+++ b/site/static/docs/4.3/assets/img/bootstrap-themes.png
Binary files differ
diff --git a/site/docs/4.3/assets/img/bootstrap-themes@2x.png b/site/static/docs/4.3/assets/img/bootstrap-themes@2x.png
index 3876a18ee3..3876a18ee3 100644
--- a/site/docs/4.3/assets/img/bootstrap-themes@2x.png
+++ b/site/static/docs/4.3/assets/img/bootstrap-themes@2x.png
Binary files differ
diff --git a/site/docs/4.3/assets/img/examples/album.png b/site/static/docs/4.3/assets/img/examples/album.png
index 694b3b2d20..694b3b2d20 100644
--- a/site/docs/4.3/assets/img/examples/album.png
+++ b/site/static/docs/4.3/assets/img/examples/album.png
Binary files differ
diff --git a/site/docs/4.3/assets/img/examples/album@2x.png b/site/static/docs/4.3/assets/img/examples/album@2x.png
index 162269c461..162269c461 100644
--- a/site/docs/4.3/assets/img/examples/album@2x.png
+++ b/site/static/docs/4.3/assets/img/examples/album@2x.png
Binary files differ
diff --git a/site/docs/4.3/assets/img/examples/blog.png b/site/static/docs/4.3/assets/img/examples/blog.png
index 6d6c8356bc..6d6c8356bc 100644
--- a/site/docs/4.3/assets/img/examples/blog.png
+++ b/site/static/docs/4.3/assets/img/examples/blog.png
Binary files differ
diff --git a/site/docs/4.3/assets/img/examples/blog@2x.png b/site/static/docs/4.3/assets/img/examples/blog@2x.png
index f5480314b4..f5480314b4 100644
--- a/site/docs/4.3/assets/img/examples/blog@2x.png
+++ b/site/static/docs/4.3/assets/img/examples/blog@2x.png
Binary files differ
diff --git a/site/docs/4.3/assets/img/examples/carousel.png b/site/static/docs/4.3/assets/img/examples/carousel.png
index abca5b3db6..abca5b3db6 100644
--- a/site/docs/4.3/assets/img/examples/carousel.png
+++ b/site/static/docs/4.3/assets/img/examples/carousel.png
Binary files differ
diff --git a/site/docs/4.3/assets/img/examples/carousel@2x.png b/site/static/docs/4.3/assets/img/examples/carousel@2x.png
index 39df35930c..39df35930c 100644
--- a/site/docs/4.3/assets/img/examples/carousel@2x.png
+++ b/site/static/docs/4.3/assets/img/examples/carousel@2x.png
Binary files differ
diff --git a/site/docs/4.3/assets/img/examples/checkout.png b/site/static/docs/4.3/assets/img/examples/checkout.png
index 7af2e2efa8..7af2e2efa8 100644
--- a/site/docs/4.3/assets/img/examples/checkout.png
+++ b/site/static/docs/4.3/assets/img/examples/checkout.png
Binary files differ
diff --git a/site/docs/4.3/assets/img/examples/checkout@2x.png b/site/static/docs/4.3/assets/img/examples/checkout@2x.png
index 3e3c5af4b0..3e3c5af4b0 100644
--- a/site/docs/4.3/assets/img/examples/checkout@2x.png
+++ b/site/static/docs/4.3/assets/img/examples/checkout@2x.png
Binary files differ
diff --git a/site/docs/4.3/assets/img/examples/cover.png b/site/static/docs/4.3/assets/img/examples/cover.png
index 5458ff11d3..5458ff11d3 100644
--- a/site/docs/4.3/assets/img/examples/cover.png
+++ b/site/static/docs/4.3/assets/img/examples/cover.png
Binary files differ
diff --git a/site/docs/4.3/assets/img/examples/cover@2x.png b/site/static/docs/4.3/assets/img/examples/cover@2x.png
index 9d20fb2ed6..9d20fb2ed6 100644
--- a/site/docs/4.3/assets/img/examples/cover@2x.png
+++ b/site/static/docs/4.3/assets/img/examples/cover@2x.png
Binary files differ
diff --git a/site/docs/4.3/assets/img/examples/dashboard.png b/site/static/docs/4.3/assets/img/examples/dashboard.png
index 1ef0c39250..1ef0c39250 100644
--- a/site/docs/4.3/assets/img/examples/dashboard.png
+++ b/site/static/docs/4.3/assets/img/examples/dashboard.png
Binary files differ
diff --git a/site/docs/4.3/assets/img/examples/dashboard@2x.png b/site/static/docs/4.3/assets/img/examples/dashboard@2x.png
index 52b23dff69..52b23dff69 100644
--- a/site/docs/4.3/assets/img/examples/dashboard@2x.png
+++ b/site/static/docs/4.3/assets/img/examples/dashboard@2x.png
Binary files differ
diff --git a/site/docs/4.3/assets/img/examples/floating-labels.png b/site/static/docs/4.3/assets/img/examples/floating-labels.png
index c836eadbb8..c836eadbb8 100644
--- a/site/docs/4.3/assets/img/examples/floating-labels.png
+++ b/site/static/docs/4.3/assets/img/examples/floating-labels.png
Binary files differ
diff --git a/site/docs/4.3/assets/img/examples/floating-labels@2x.png b/site/static/docs/4.3/assets/img/examples/floating-labels@2x.png
index 5d284bfe04..5d284bfe04 100644
--- a/site/docs/4.3/assets/img/examples/floating-labels@2x.png
+++ b/site/static/docs/4.3/assets/img/examples/floating-labels@2x.png
Binary files differ
diff --git a/site/docs/4.3/assets/img/examples/grid.png b/site/static/docs/4.3/assets/img/examples/grid.png
index b3b5b35650..b3b5b35650 100644
--- a/site/docs/4.3/assets/img/examples/grid.png
+++ b/site/static/docs/4.3/assets/img/examples/grid.png
Binary files differ
diff --git a/site/docs/4.3/assets/img/examples/grid@2x.png b/site/static/docs/4.3/assets/img/examples/grid@2x.png
index e95c363658..e95c363658 100644
--- a/site/docs/4.3/assets/img/examples/grid@2x.png
+++ b/site/static/docs/4.3/assets/img/examples/grid@2x.png
Binary files differ
diff --git a/site/docs/4.3/assets/img/examples/jumbotron.png b/site/static/docs/4.3/assets/img/examples/jumbotron.png
index afca61a7c5..afca61a7c5 100644
--- a/site/docs/4.3/assets/img/examples/jumbotron.png
+++ b/site/static/docs/4.3/assets/img/examples/jumbotron.png
Binary files differ
diff --git a/site/docs/4.3/assets/img/examples/jumbotron@2x.png b/site/static/docs/4.3/assets/img/examples/jumbotron@2x.png
index 4d83dffa6f..4d83dffa6f 100644
--- a/site/docs/4.3/assets/img/examples/jumbotron@2x.png
+++ b/site/static/docs/4.3/assets/img/examples/jumbotron@2x.png
Binary files differ
diff --git a/site/docs/4.3/assets/img/examples/navbar-bottom.png b/site/static/docs/4.3/assets/img/examples/navbar-bottom.png
index e9f0abc952..e9f0abc952 100644
--- a/site/docs/4.3/assets/img/examples/navbar-bottom.png
+++ b/site/static/docs/4.3/assets/img/examples/navbar-bottom.png
Binary files differ
diff --git a/site/docs/4.3/assets/img/examples/navbar-bottom@2x.png b/site/static/docs/4.3/assets/img/examples/navbar-bottom@2x.png
index a62faa182e..a62faa182e 100644
--- a/site/docs/4.3/assets/img/examples/navbar-bottom@2x.png
+++ b/site/static/docs/4.3/assets/img/examples/navbar-bottom@2x.png
Binary files differ
diff --git a/site/docs/4.3/assets/img/examples/navbar-fixed.png b/site/static/docs/4.3/assets/img/examples/navbar-fixed.png
index c839602a7f..c839602a7f 100644
--- a/site/docs/4.3/assets/img/examples/navbar-fixed.png
+++ b/site/static/docs/4.3/assets/img/examples/navbar-fixed.png
Binary files differ
diff --git a/site/docs/4.3/assets/img/examples/navbar-fixed@2x.png b/site/static/docs/4.3/assets/img/examples/navbar-fixed@2x.png
index 1ce8ca576c..1ce8ca576c 100644
--- a/site/docs/4.3/assets/img/examples/navbar-fixed@2x.png
+++ b/site/static/docs/4.3/assets/img/examples/navbar-fixed@2x.png
Binary files differ
diff --git a/site/docs/4.3/assets/img/examples/navbar-static.png b/site/static/docs/4.3/assets/img/examples/navbar-static.png
index faebe34511..faebe34511 100644
--- a/site/docs/4.3/assets/img/examples/navbar-static.png
+++ b/site/static/docs/4.3/assets/img/examples/navbar-static.png
Binary files differ
diff --git a/site/docs/4.3/assets/img/examples/navbar-static@2x.png b/site/static/docs/4.3/assets/img/examples/navbar-static@2x.png
index 758aa61e8a..758aa61e8a 100644
--- a/site/docs/4.3/assets/img/examples/navbar-static@2x.png
+++ b/site/static/docs/4.3/assets/img/examples/navbar-static@2x.png
Binary files differ
diff --git a/site/docs/4.3/assets/img/examples/navbars.png b/site/static/docs/4.3/assets/img/examples/navbars.png
index 874f6d7525..874f6d7525 100644
--- a/site/docs/4.3/assets/img/examples/navbars.png
+++ b/site/static/docs/4.3/assets/img/examples/navbars.png
Binary files differ
diff --git a/site/docs/4.3/assets/img/examples/navbars@2x.png b/site/static/docs/4.3/assets/img/examples/navbars@2x.png
index ce11b8d2cd..ce11b8d2cd 100644
--- a/site/docs/4.3/assets/img/examples/navbars@2x.png
+++ b/site/static/docs/4.3/assets/img/examples/navbars@2x.png
Binary files differ
diff --git a/site/docs/4.3/assets/img/examples/offcanvas.png b/site/static/docs/4.3/assets/img/examples/offcanvas.png
index b5073eba40..b5073eba40 100644
--- a/site/docs/4.3/assets/img/examples/offcanvas.png
+++ b/site/static/docs/4.3/assets/img/examples/offcanvas.png
Binary files differ
diff --git a/site/docs/4.3/assets/img/examples/offcanvas@2x.png b/site/static/docs/4.3/assets/img/examples/offcanvas@2x.png
index e5287dde88..e5287dde88 100644
--- a/site/docs/4.3/assets/img/examples/offcanvas@2x.png
+++ b/site/static/docs/4.3/assets/img/examples/offcanvas@2x.png
Binary files differ
diff --git a/site/docs/4.3/assets/img/examples/pricing.png b/site/static/docs/4.3/assets/img/examples/pricing.png
index 3638c9ef3d..3638c9ef3d 100644
--- a/site/docs/4.3/assets/img/examples/pricing.png
+++ b/site/static/docs/4.3/assets/img/examples/pricing.png
Binary files differ
diff --git a/site/docs/4.3/assets/img/examples/pricing@2x.png b/site/static/docs/4.3/assets/img/examples/pricing@2x.png
index 9ddac54ea8..9ddac54ea8 100644
--- a/site/docs/4.3/assets/img/examples/pricing@2x.png
+++ b/site/static/docs/4.3/assets/img/examples/pricing@2x.png
Binary files differ
diff --git a/site/docs/4.3/assets/img/examples/product.png b/site/static/docs/4.3/assets/img/examples/product.png
index a8d3dcb8d4..a8d3dcb8d4 100644
--- a/site/docs/4.3/assets/img/examples/product.png
+++ b/site/static/docs/4.3/assets/img/examples/product.png
Binary files differ
diff --git a/site/docs/4.3/assets/img/examples/product@2x.png b/site/static/docs/4.3/assets/img/examples/product@2x.png
index 1dfe454821..1dfe454821 100644
--- a/site/docs/4.3/assets/img/examples/product@2x.png
+++ b/site/static/docs/4.3/assets/img/examples/product@2x.png
Binary files differ
diff --git a/site/docs/4.3/assets/img/examples/sign-in.png b/site/static/docs/4.3/assets/img/examples/sign-in.png
index 53aed97247..53aed97247 100644
--- a/site/docs/4.3/assets/img/examples/sign-in.png
+++ b/site/static/docs/4.3/assets/img/examples/sign-in.png
Binary files differ
diff --git a/site/docs/4.3/assets/img/examples/sign-in@2x.png b/site/static/docs/4.3/assets/img/examples/sign-in@2x.png
index 8b3431de9c..8b3431de9c 100644
--- a/site/docs/4.3/assets/img/examples/sign-in@2x.png
+++ b/site/static/docs/4.3/assets/img/examples/sign-in@2x.png
Binary files differ
diff --git a/site/docs/4.3/assets/img/examples/starter-template.png b/site/static/docs/4.3/assets/img/examples/starter-template.png
index 0cbcaa1eb0..0cbcaa1eb0 100644
--- a/site/docs/4.3/assets/img/examples/starter-template.png
+++ b/site/static/docs/4.3/assets/img/examples/starter-template.png
Binary files differ
diff --git a/site/docs/4.3/assets/img/examples/starter-template@2x.png b/site/static/docs/4.3/assets/img/examples/starter-template@2x.png
index 436c452de1..436c452de1 100644
--- a/site/docs/4.3/assets/img/examples/starter-template@2x.png
+++ b/site/static/docs/4.3/assets/img/examples/starter-template@2x.png
Binary files differ
diff --git a/site/docs/4.3/assets/img/examples/sticky-footer-navbar.png b/site/static/docs/4.3/assets/img/examples/sticky-footer-navbar.png
index f64d666387..f64d666387 100644
--- a/site/docs/4.3/assets/img/examples/sticky-footer-navbar.png
+++ b/site/static/docs/4.3/assets/img/examples/sticky-footer-navbar.png
Binary files differ
diff --git a/site/docs/4.3/assets/img/examples/sticky-footer-navbar@2x.png b/site/static/docs/4.3/assets/img/examples/sticky-footer-navbar@2x.png
index 9478901f6f..9478901f6f 100644
--- a/site/docs/4.3/assets/img/examples/sticky-footer-navbar@2x.png
+++ b/site/static/docs/4.3/assets/img/examples/sticky-footer-navbar@2x.png
Binary files differ
diff --git a/site/docs/4.3/assets/img/examples/sticky-footer.png b/site/static/docs/4.3/assets/img/examples/sticky-footer.png
index 203ed62f50..203ed62f50 100644
--- a/site/docs/4.3/assets/img/examples/sticky-footer.png
+++ b/site/static/docs/4.3/assets/img/examples/sticky-footer.png
Binary files differ
diff --git a/site/docs/4.3/assets/img/examples/sticky-footer@2x.png b/site/static/docs/4.3/assets/img/examples/sticky-footer@2x.png
index 5a008a0ac3..5a008a0ac3 100644
--- a/site/docs/4.3/assets/img/examples/sticky-footer@2x.png
+++ b/site/static/docs/4.3/assets/img/examples/sticky-footer@2x.png
Binary files differ
diff --git a/site/docs/4.3/assets/img/favicons/android-chrome-192x192.png b/site/static/docs/4.3/assets/img/favicons/android-chrome-192x192.png
index 547386f371..547386f371 100644
--- a/site/docs/4.3/assets/img/favicons/android-chrome-192x192.png
+++ b/site/static/docs/4.3/assets/img/favicons/android-chrome-192x192.png
Binary files differ
diff --git a/site/docs/4.3/assets/img/favicons/android-chrome-512x512.png b/site/static/docs/4.3/assets/img/favicons/android-chrome-512x512.png
index eae76488dc..eae76488dc 100644
--- a/site/docs/4.3/assets/img/favicons/android-chrome-512x512.png
+++ b/site/static/docs/4.3/assets/img/favicons/android-chrome-512x512.png
Binary files differ
diff --git a/site/docs/4.3/assets/img/favicons/apple-touch-icon.png b/site/static/docs/4.3/assets/img/favicons/apple-touch-icon.png
index 447cec2c47..447cec2c47 100644
--- a/site/docs/4.3/assets/img/favicons/apple-touch-icon.png
+++ b/site/static/docs/4.3/assets/img/favicons/apple-touch-icon.png
Binary files differ
diff --git a/site/docs/4.3/assets/img/favicons/browserconfig.xml b/site/static/docs/4.3/assets/img/favicons/browserconfig.xml
index 0d17d11d49..5f12a3e7dd 100644
--- a/site/docs/4.3/assets/img/favicons/browserconfig.xml
+++ b/site/static/docs/4.3/assets/img/favicons/browserconfig.xml
@@ -1,10 +1,8 @@
----
----
<?xml version="1.0" encoding="utf-8"?>
<browserconfig>
<msapplication>
<tile>
- <square150x150logo src="{{ site.baseurl }}/docs/{{ site.docs_version }}/assets/img/favicons/mstile-150x150.png"/>
+ <square150x150logo src="/docs/4.3/assets/img/favicons/mstile-150x150.png"/>
<TileColor>#563d7c</TileColor>
</tile>
</msapplication>
diff --git a/site/docs/4.3/assets/img/favicons/favicon-16x16.png b/site/static/docs/4.3/assets/img/favicons/favicon-16x16.png
index 5f7d11880f..5f7d11880f 100644
--- a/site/docs/4.3/assets/img/favicons/favicon-16x16.png
+++ b/site/static/docs/4.3/assets/img/favicons/favicon-16x16.png
Binary files differ
diff --git a/site/docs/4.3/assets/img/favicons/favicon-32x32.png b/site/static/docs/4.3/assets/img/favicons/favicon-32x32.png
index d752fd5d71..d752fd5d71 100644
--- a/site/docs/4.3/assets/img/favicons/favicon-32x32.png
+++ b/site/static/docs/4.3/assets/img/favicons/favicon-32x32.png
Binary files differ
diff --git a/site/favicon.ico b/site/static/docs/4.3/assets/img/favicons/favicon.ico
index b48b3442ad..b48b3442ad 100644
--- a/site/favicon.ico
+++ b/site/static/docs/4.3/assets/img/favicons/favicon.ico
Binary files differ
diff --git a/site/docs/4.3/assets/img/favicons/manifest.json b/site/static/docs/4.3/assets/img/favicons/manifest.json
index a92accba64..1d22e99213 100644
--- a/site/docs/4.3/assets/img/favicons/manifest.json
+++ b/site/static/docs/4.3/assets/img/favicons/manifest.json
@@ -1,16 +1,14 @@
----
----
{
"name": "Bootstrap",
"short_name": "Bootstrap",
"icons": [
{
- "src": "{{ site.baseurl }}/docs/{{ site.docs_version }}/assets/img/favicons/android-chrome-192x192.png",
+ "src": "/docs/4.3/assets/img/favicons/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
- "src": "{{ site.baseurl }}/docs/{{ site.docs_version }}/assets/img/favicons/android-chrome-512x512.png",
+ "src": "/docs/4.3/assets/img/favicons/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
diff --git a/site/docs/4.3/assets/img/favicons/mstile-144x144.png b/site/static/docs/4.3/assets/img/favicons/mstile-144x144.png
index 262a3c2e14..262a3c2e14 100644
--- a/site/docs/4.3/assets/img/favicons/mstile-144x144.png
+++ b/site/static/docs/4.3/assets/img/favicons/mstile-144x144.png
Binary files differ
diff --git a/site/docs/4.3/assets/img/favicons/mstile-150x150.png b/site/static/docs/4.3/assets/img/favicons/mstile-150x150.png
index bb87faf74f..bb87faf74f 100644
--- a/site/docs/4.3/assets/img/favicons/mstile-150x150.png
+++ b/site/static/docs/4.3/assets/img/favicons/mstile-150x150.png
Binary files differ
diff --git a/site/docs/4.3/assets/img/favicons/mstile-310x150.png b/site/static/docs/4.3/assets/img/favicons/mstile-310x150.png
index 2fc36a7268..2fc36a7268 100644
--- a/site/docs/4.3/assets/img/favicons/mstile-310x150.png
+++ b/site/static/docs/4.3/assets/img/favicons/mstile-310x150.png
Binary files differ
diff --git a/site/docs/4.3/assets/img/favicons/mstile-310x310.png b/site/static/docs/4.3/assets/img/favicons/mstile-310x310.png
index 7f00d0c66a..7f00d0c66a 100644
--- a/site/docs/4.3/assets/img/favicons/mstile-310x310.png
+++ b/site/static/docs/4.3/assets/img/favicons/mstile-310x310.png
Binary files differ
diff --git a/site/docs/4.3/assets/img/favicons/mstile-70x70.png b/site/static/docs/4.3/assets/img/favicons/mstile-70x70.png
index 4da2de9e36..4da2de9e36 100644
--- a/site/docs/4.3/assets/img/favicons/mstile-70x70.png
+++ b/site/static/docs/4.3/assets/img/favicons/mstile-70x70.png
Binary files differ
diff --git a/site/docs/4.3/assets/img/favicons/safari-pinned-tab.svg b/site/static/docs/4.3/assets/img/favicons/safari-pinned-tab.svg
index ddeeb53c91..ddeeb53c91 100644
--- a/site/docs/4.3/assets/img/favicons/safari-pinned-tab.svg
+++ b/site/static/docs/4.3/assets/img/favicons/safari-pinned-tab.svg
diff --git a/site/docs/4.3/assets/js/docs.min.js b/site/static/docs/4.3/assets/js/docs.min.js
index a48c8413d8..a48c8413d8 100644
--- a/site/docs/4.3/assets/js/docs.min.js
+++ b/site/static/docs/4.3/assets/js/docs.min.js
diff --git a/site/docs/4.3/assets/js/src/application.js b/site/static/docs/4.3/assets/js/src/application.js
index 66b1d09eb0..66b1d09eb0 100644
--- a/site/docs/4.3/assets/js/src/application.js
+++ b/site/static/docs/4.3/assets/js/src/application.js
diff --git a/site/docs/4.3/assets/js/src/search.js b/site/static/docs/4.3/assets/js/src/search.js
index dc222508d6..dc222508d6 100644
--- a/site/docs/4.3/assets/js/src/search.js
+++ b/site/static/docs/4.3/assets/js/src/search.js
diff --git a/site/docs/4.3/assets/js/vendor/anchor.min.js b/site/static/docs/4.3/assets/js/vendor/anchor.min.js
index 29a64acae6..29a64acae6 100644
--- a/site/docs/4.3/assets/js/vendor/anchor.min.js
+++ b/site/static/docs/4.3/assets/js/vendor/anchor.min.js
diff --git a/site/docs/4.3/assets/js/vendor/bs-custom-file-input.min.js b/site/static/docs/4.3/assets/js/vendor/bs-custom-file-input.min.js
index bdf7024911..bdf7024911 100644
--- a/site/docs/4.3/assets/js/vendor/bs-custom-file-input.min.js
+++ b/site/static/docs/4.3/assets/js/vendor/bs-custom-file-input.min.js
diff --git a/site/docs/4.3/assets/js/vendor/clipboard.min.js b/site/static/docs/4.3/assets/js/vendor/clipboard.min.js
index 02c549e35c..02c549e35c 100644
--- a/site/docs/4.3/assets/js/vendor/clipboard.min.js
+++ b/site/static/docs/4.3/assets/js/vendor/clipboard.min.js
diff --git a/site/docs/4.3/assets/scss/_ads.scss b/site/static/docs/4.3/assets/scss/_ads.scss
index 0c08025c25..0c08025c25 100644
--- a/site/docs/4.3/assets/scss/_ads.scss
+++ b/site/static/docs/4.3/assets/scss/_ads.scss
diff --git a/site/docs/4.3/assets/scss/_algolia.scss b/site/static/docs/4.3/assets/scss/_algolia.scss
index 23781da12a..23781da12a 100644
--- a/site/docs/4.3/assets/scss/_algolia.scss
+++ b/site/static/docs/4.3/assets/scss/_algolia.scss
diff --git a/site/docs/4.3/assets/scss/_anchor.scss b/site/static/docs/4.3/assets/scss/_anchor.scss
index a712a78cdc..a712a78cdc 100644
--- a/site/docs/4.3/assets/scss/_anchor.scss
+++ b/site/static/docs/4.3/assets/scss/_anchor.scss
diff --git a/site/docs/4.3/assets/scss/_brand.scss b/site/static/docs/4.3/assets/scss/_brand.scss
index 226d7db174..226d7db174 100644
--- a/site/docs/4.3/assets/scss/_brand.scss
+++ b/site/static/docs/4.3/assets/scss/_brand.scss
diff --git a/site/docs/4.3/assets/scss/_browser-bugs.scss b/site/static/docs/4.3/assets/scss/_browser-bugs.scss
index f42158b379..5ee1420e90 100644
--- a/site/docs/4.3/assets/scss/_browser-bugs.scss
+++ b/site/static/docs/4.3/assets/scss/_browser-bugs.scss
@@ -3,9 +3,6 @@
// Better display for the responsive table on the Wall of Browser Bugs.
.bd-browser-bugs {
- td p {
- margin-bottom: 0;
- }
th:first-child {
width: 18%;
}
diff --git a/site/docs/4.3/assets/scss/_buttons.scss b/site/static/docs/4.3/assets/scss/_buttons.scss
index 25bcbbd4b0..25bcbbd4b0 100644
--- a/site/docs/4.3/assets/scss/_buttons.scss
+++ b/site/static/docs/4.3/assets/scss/_buttons.scss
diff --git a/site/docs/4.3/assets/scss/_callouts.scss b/site/static/docs/4.3/assets/scss/_callouts.scss
index a10fc05b8d..a10fc05b8d 100644
--- a/site/docs/4.3/assets/scss/_callouts.scss
+++ b/site/static/docs/4.3/assets/scss/_callouts.scss
diff --git a/site/docs/4.3/assets/scss/_clipboard-js.scss b/site/static/docs/4.3/assets/scss/_clipboard-js.scss
index 6d4bfeea48..6d4bfeea48 100644
--- a/site/docs/4.3/assets/scss/_clipboard-js.scss
+++ b/site/static/docs/4.3/assets/scss/_clipboard-js.scss
diff --git a/site/docs/4.3/assets/scss/_colors.scss b/site/static/docs/4.3/assets/scss/_colors.scss
index 8d2825c570..8d2825c570 100644
--- a/site/docs/4.3/assets/scss/_colors.scss
+++ b/site/static/docs/4.3/assets/scss/_colors.scss
diff --git a/site/docs/4.3/assets/scss/_component-examples.scss b/site/static/docs/4.3/assets/scss/_component-examples.scss
index 62ebf6953b..62ebf6953b 100644
--- a/site/docs/4.3/assets/scss/_component-examples.scss
+++ b/site/static/docs/4.3/assets/scss/_component-examples.scss
diff --git a/site/docs/4.3/assets/scss/_content.scss b/site/static/docs/4.3/assets/scss/_content.scss
index 439601d1ec..439601d1ec 100644
--- a/site/docs/4.3/assets/scss/_content.scss
+++ b/site/static/docs/4.3/assets/scss/_content.scss
diff --git a/site/docs/4.3/assets/scss/_footer.scss b/site/static/docs/4.3/assets/scss/_footer.scss
index 29d31df3a2..29d31df3a2 100644
--- a/site/docs/4.3/assets/scss/_footer.scss
+++ b/site/static/docs/4.3/assets/scss/_footer.scss
diff --git a/site/docs/4.3/assets/scss/_masthead.scss b/site/static/docs/4.3/assets/scss/_masthead.scss
index f4e70a2cfb..f4e70a2cfb 100644
--- a/site/docs/4.3/assets/scss/_masthead.scss
+++ b/site/static/docs/4.3/assets/scss/_masthead.scss
diff --git a/site/docs/4.3/assets/scss/_nav.scss b/site/static/docs/4.3/assets/scss/_nav.scss
index c3fdc8e5f6..c3fdc8e5f6 100644
--- a/site/docs/4.3/assets/scss/_nav.scss
+++ b/site/static/docs/4.3/assets/scss/_nav.scss
diff --git a/site/docs/4.3/assets/scss/_placeholder-img.scss b/site/static/docs/4.3/assets/scss/_placeholder-img.scss
index 90a29544e7..90a29544e7 100644
--- a/site/docs/4.3/assets/scss/_placeholder-img.scss
+++ b/site/static/docs/4.3/assets/scss/_placeholder-img.scss
diff --git a/site/docs/4.3/assets/scss/_sidebar.scss b/site/static/docs/4.3/assets/scss/_sidebar.scss
index b302b22fea..7fd9e38422 100644
--- a/site/docs/4.3/assets/scss/_sidebar.scss
+++ b/site/static/docs/4.3/assets/scss/_sidebar.scss
@@ -17,29 +17,40 @@
@include font-size(.875rem);
}
-.section-nav {
+// stylelint-disable selector-max-id, selector-max-type, selector-max-compound-selectors
+#TableOfContents {
padding-left: 0;
border-left: 1px solid #eee;
- ul {
- padding-left: 1rem;
+ > ul,
+ > ul > li > ul {
+ padding: 0;
}
-}
-.toc-entry {
- display: block;
+ a code {
+ font: inherit;
+ }
- a {
+ li {
display: block;
- padding: .125rem 1.5rem;
- color: #77757a;
- &:hover {
- color: $blue;
- text-decoration: none;
+ ul li ul {
+ padding-left: 1rem;
+ }
+
+ a {
+ display: block;
+ padding: .125rem 1.5rem;
+ color: #77757a;
+
+ &:hover {
+ color: $blue;
+ text-decoration: none;
+ }
}
}
}
+// stylelint-enable selector-max-id, selector-max-type, selector-max-compound-selectors
//
// Left side navigation
diff --git a/site/docs/4.3/assets/scss/_skippy.scss b/site/static/docs/4.3/assets/scss/_skippy.scss
index db971d114c..db971d114c 100644
--- a/site/docs/4.3/assets/scss/_skippy.scss
+++ b/site/static/docs/4.3/assets/scss/_skippy.scss
diff --git a/site/docs/4.3/assets/scss/_syntax.scss b/site/static/docs/4.3/assets/scss/_syntax.scss
index c03e800f8a..c03e800f8a 100644
--- a/site/docs/4.3/assets/scss/_syntax.scss
+++ b/site/static/docs/4.3/assets/scss/_syntax.scss
diff --git a/site/docs/4.3/assets/scss/_variables.scss b/site/static/docs/4.3/assets/scss/_variables.scss
index e8bf3728db..e8bf3728db 100644
--- a/site/docs/4.3/assets/scss/_variables.scss
+++ b/site/static/docs/4.3/assets/scss/_variables.scss
diff --git a/site/docs/4.3/assets/scss/docs.scss b/site/static/docs/4.3/assets/scss/docs.scss
index 6b1814dc8a..171dd209fd 100644
--- a/site/docs/4.3/assets/scss/docs.scss
+++ b/site/static/docs/4.3/assets/scss/docs.scss
@@ -24,9 +24,9 @@
// Happy Bootstrapping!
// Load Bootstrap variables and mixins
-@import "../../../../../scss/functions";
-@import "../../../../../scss/variables";
-@import "../../../../../scss/mixins";
+@import "../../../../../../scss/functions";
+@import "../../../../../../scss/variables";
+@import "../../../../../../scss/mixins";
// Load docs components
@import "variables";
diff --git a/site/static/favicon.ico b/site/static/favicon.ico
new file mode 100644
index 0000000000..b48b3442ad
--- /dev/null
+++ b/site/static/favicon.ico
Binary files differ
diff --git a/site/sw.js b/site/static/sw.js
index 7d03d3b22a..7d03d3b22a 100644
--- a/site/sw.js
+++ b/site/static/sw.js