mirror of
https://github.com/twbs/bootstrap.git
synced 2022-11-09 12:25:43 -05:00
Merge branch 'patrickhlauke-docs-carousel-rewrite' of https://github.com/twbs/bootstrap into patrickhlauke-docs-carousel-rewrite
This commit is contained in:
commit
33c4abced2
18 changed files with 522 additions and 375 deletions
|
@ -26,7 +26,7 @@
|
|||
},
|
||||
{
|
||||
"path": "./dist/css/bootstrap.css",
|
||||
"maxSize": "29.5 kB"
|
||||
"maxSize": "29.75 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/css/bootstrap.min.css",
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
}
|
||||
|
||||
.table-group-divider {
|
||||
border-top: ($table-border-width * 2) solid $table-group-separator-color;
|
||||
border-top: calc($table-border-width * 2) solid $table-group-separator-color; // stylelint-disable-line function-disallowed-list
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
@ -703,8 +703,13 @@ $utilities: map-merge(
|
|||
visible: visible,
|
||||
invisible: hidden,
|
||||
)
|
||||
)
|
||||
),
|
||||
// scss-docs-end utils-visibility
|
||||
"z-index": (
|
||||
property: z-index,
|
||||
class: z,
|
||||
values: $zindex-levels,
|
||||
)
|
||||
),
|
||||
$utilities
|
||||
);
|
||||
|
|
|
@ -637,7 +637,7 @@ $hr-height: null !default; // Deprecated in v5.2.0
|
|||
// fusv-enable
|
||||
|
||||
$hr-border-color: null !default; // Allows for inherited colors
|
||||
$hr-border-width: $border-width !default;
|
||||
$hr-border-width: var(--#{$prefix}border-width) !default;
|
||||
$hr-opacity: .25 !default;
|
||||
|
||||
$legend-margin-bottom: .5rem !default;
|
||||
|
@ -684,7 +684,7 @@ $table-hover-bg-factor: .075 !default;
|
|||
$table-hover-bg: rgba($black, $table-hover-bg-factor) !default;
|
||||
|
||||
$table-border-factor: .1 !default;
|
||||
$table-border-width: $border-width !default;
|
||||
$table-border-width: var(--#{$prefix}border-width) !default;
|
||||
$table-border-color: var(--#{$prefix}border-color) !default;
|
||||
|
||||
$table-striped-order: odd !default;
|
||||
|
@ -736,7 +736,7 @@ $input-btn-padding-y-lg: .5rem !default;
|
|||
$input-btn-padding-x-lg: 1rem !default;
|
||||
$input-btn-font-size-lg: $font-size-lg !default;
|
||||
|
||||
$input-btn-border-width: $border-width !default;
|
||||
$input-btn-border-width: var(--#{$prefix}border-width) !default;
|
||||
// scss-docs-end input-btn-variables
|
||||
|
||||
|
||||
|
@ -848,7 +848,7 @@ $input-focus-box-shadow: $input-btn-focus-box-shadow !default;
|
|||
$input-placeholder-color: $gray-600 !default;
|
||||
$input-plaintext-color: $body-color !default;
|
||||
|
||||
$input-height-border: $input-border-width * 2 !default;
|
||||
$input-height-border: calc($input-border-width * 2) !default; // stylelint-disable-line function-disallowed-list
|
||||
|
||||
$input-height-inner: add($input-line-height * 1em, $input-padding-y * 2) !default;
|
||||
$input-height-inner-half: add($input-line-height * .5em, $input-padding-y) !default;
|
||||
|
@ -1054,6 +1054,16 @@ $zindex-tooltip: 1080 !default;
|
|||
$zindex-toast: 1090 !default;
|
||||
// scss-docs-end zindex-stack
|
||||
|
||||
// scss-docs-start zindex-levels-map
|
||||
$zindex-levels: (
|
||||
n1: -1,
|
||||
0: 0,
|
||||
1: 1,
|
||||
2: 2,
|
||||
3: 3
|
||||
) !default;
|
||||
// scss-docs-end zindex-levels-map
|
||||
|
||||
|
||||
// Navs
|
||||
|
||||
|
@ -1068,7 +1078,7 @@ $nav-link-transition: color .15s ease-in-out, background-color .15
|
|||
$nav-link-disabled-color: $gray-600 !default;
|
||||
|
||||
$nav-tabs-border-color: $gray-300 !default;
|
||||
$nav-tabs-border-width: $border-width !default;
|
||||
$nav-tabs-border-width: var(--#{$prefix}border-width) !default;
|
||||
$nav-tabs-border-radius: $border-radius !default;
|
||||
$nav-tabs-link-hover-border-color: $gray-200 $gray-200 $nav-tabs-border-color !default;
|
||||
$nav-tabs-link-active-color: $gray-700 !default;
|
||||
|
@ -1139,8 +1149,8 @@ $dropdown-color: $body-color !default;
|
|||
$dropdown-bg: $white !default;
|
||||
$dropdown-border-color: var(--#{$prefix}border-color-translucent) !default;
|
||||
$dropdown-border-radius: $border-radius !default;
|
||||
$dropdown-border-width: $border-width !default;
|
||||
$dropdown-inner-border-radius: subtract($dropdown-border-radius, $dropdown-border-width) !default;
|
||||
$dropdown-border-width: var(--#{$prefix}border-width) !default;
|
||||
$dropdown-inner-border-radius: calc($dropdown-border-radius - $dropdown-border-width) !default; // stylelint-disable-line function-disallowed-list
|
||||
$dropdown-divider-bg: $dropdown-border-color !default;
|
||||
$dropdown-divider-margin-y: $spacer * .5 !default;
|
||||
$dropdown-box-shadow: $box-shadow !default;
|
||||
|
@ -1237,7 +1247,7 @@ $placeholder-opacity-min: .2 !default;
|
|||
$card-spacer-y: $spacer !default;
|
||||
$card-spacer-x: $spacer !default;
|
||||
$card-title-spacer-y: $spacer * .5 !default;
|
||||
$card-border-width: $border-width !default;
|
||||
$card-border-width: var(--#{$prefix}border-width) !default;
|
||||
$card-border-color: var(--#{$prefix}border-color-translucent) !default;
|
||||
$card-border-radius: $border-radius !default;
|
||||
$card-box-shadow: null !default;
|
||||
|
@ -1260,7 +1270,7 @@ $accordion-padding-y: 1rem !default;
|
|||
$accordion-padding-x: 1.25rem !default;
|
||||
$accordion-color: $body-color !default; // Sass variable because of $accordion-button-icon
|
||||
$accordion-bg: $body-bg !default;
|
||||
$accordion-border-width: $border-width !default;
|
||||
$accordion-border-width: var(--#{$prefix}border-width) !default;
|
||||
$accordion-border-color: var(--#{$prefix}border-color) !default;
|
||||
$accordion-border-radius: $border-radius !default;
|
||||
$accordion-inner-border-radius: subtract($accordion-border-radius, $accordion-border-width) !default;
|
||||
|
@ -1326,7 +1336,7 @@ $form-feedback-tooltip-border-radius: $tooltip-border-radius !default;
|
|||
$popover-font-size: $font-size-sm !default;
|
||||
$popover-bg: $white !default;
|
||||
$popover-max-width: 276px !default;
|
||||
$popover-border-width: $border-width !default;
|
||||
$popover-border-width: var(--#{$prefix}border-width) !default;
|
||||
$popover-border-color: var(--#{$prefix}border-color-translucent) !default;
|
||||
$popover-border-radius: $border-radius-lg !default;
|
||||
$popover-inner-border-radius: subtract($popover-border-radius, $popover-border-width) !default;
|
||||
|
@ -1362,7 +1372,7 @@ $toast-padding-y: .5rem !default;
|
|||
$toast-font-size: .875rem !default;
|
||||
$toast-color: null !default;
|
||||
$toast-background-color: rgba($white, .85) !default;
|
||||
$toast-border-width: $border-width !default;
|
||||
$toast-border-width: var(--#{$prefix}border-width) !default;
|
||||
$toast-border-color: var(--#{$prefix}border-color-translucent) !default;
|
||||
$toast-border-radius: $border-radius !default;
|
||||
$toast-box-shadow: $box-shadow !default;
|
||||
|
@ -1401,7 +1411,7 @@ $modal-title-line-height: $line-height-base !default;
|
|||
$modal-content-color: null !default;
|
||||
$modal-content-bg: $white !default;
|
||||
$modal-content-border-color: var(--#{$prefix}border-color-translucent) !default;
|
||||
$modal-content-border-width: $border-width !default;
|
||||
$modal-content-border-width: var(--#{$prefix}border-width) !default;
|
||||
$modal-content-border-radius: $border-radius-lg !default;
|
||||
$modal-content-inner-border-radius: subtract($modal-content-border-radius, $modal-content-border-width) !default;
|
||||
$modal-content-box-shadow-xs: $box-shadow-sm !default;
|
||||
|
@ -1442,7 +1452,7 @@ $alert-padding-x: $spacer !default;
|
|||
$alert-margin-bottom: 1rem !default;
|
||||
$alert-border-radius: $border-radius !default;
|
||||
$alert-link-font-weight: $font-weight-bold !default;
|
||||
$alert-border-width: $border-width !default;
|
||||
$alert-border-width: var(--#{$prefix}border-width) !default;
|
||||
$alert-bg-scale: -80% !default;
|
||||
$alert-border-scale: -70% !default;
|
||||
$alert-color-scale: 40% !default;
|
||||
|
@ -1471,7 +1481,7 @@ $progress-bar-transition: width .6s ease !default;
|
|||
$list-group-color: $gray-900 !default;
|
||||
$list-group-bg: $white !default;
|
||||
$list-group-border-color: rgba($black, .125) !default;
|
||||
$list-group-border-width: $border-width !default;
|
||||
$list-group-border-width: var(--#{$prefix}border-width) !default;
|
||||
$list-group-border-radius: $border-radius !default;
|
||||
|
||||
$list-group-item-padding-y: $spacer * .5 !default;
|
||||
|
@ -1500,7 +1510,7 @@ $list-group-action-active-bg: $gray-200 !default;
|
|||
// scss-docs-start thumbnail-variables
|
||||
$thumbnail-padding: .25rem !default;
|
||||
$thumbnail-bg: $body-bg !default;
|
||||
$thumbnail-border-width: $border-width !default;
|
||||
$thumbnail-border-width: var(--#{$prefix}border-width) !default;
|
||||
$thumbnail-border-color: var(--#{$prefix}border-color) !default;
|
||||
$thumbnail-border-radius: $border-radius !default;
|
||||
$thumbnail-box-shadow: $box-shadow-sm !default;
|
||||
|
|
|
@ -302,6 +302,32 @@
|
|||
min-height: 240px;
|
||||
}
|
||||
|
||||
.bd-example-zindex-levels {
|
||||
min-height: 15rem;
|
||||
|
||||
> div {
|
||||
background-color: tint-color($bd-violet, 75%);
|
||||
border: 1px solid tint-color($bd-violet, 50%);
|
||||
}
|
||||
|
||||
> :nth-child(2) {
|
||||
top: 3rem;
|
||||
left: 3rem;
|
||||
}
|
||||
> :nth-child(3) {
|
||||
top: 4.5rem;
|
||||
left: 4.5rem;
|
||||
}
|
||||
> :nth-child(4) {
|
||||
top: 6rem;
|
||||
left: 6rem;
|
||||
}
|
||||
> :nth-child(5) {
|
||||
top: 7.5rem;
|
||||
left: 7.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Code snippets
|
||||
//
|
||||
|
|
|
@ -94,3 +94,13 @@
|
|||
background-color: var(--bd-accent);
|
||||
box-shadow: inset 0 -1px 1px rgba(var(--bs-body-color-rgb), .15), 0 .25rem 1.5rem rgba(var(--bs-body-bg-rgb), .75);
|
||||
}
|
||||
|
||||
.animate-img {
|
||||
> img {
|
||||
transition: .2s ease-in-out transform; // stylelint-disable-line property-disallowed-list
|
||||
}
|
||||
|
||||
&:hover > img {
|
||||
transform: scale(1.1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -400,6 +400,40 @@ extra_css:
|
|||
</div>
|
||||
</nav>
|
||||
|
||||
<nav class="navbar navbar-expand-lg bg-light rounded" aria-label="Thirtheenth navbar example">
|
||||
<div class="container-fluid">
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarsExample11" aria-controls="navbarsExample11" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
|
||||
<div class="collapse navbar-collapse d-lg-flex" id="navbarsExample11">
|
||||
<a class="navbar-brand col-lg-3 me-0" href="#">Centered nav</a>
|
||||
<ul class="navbar-nav col-lg-6 justify-content-lg-center">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" aria-current="page" href="#">Home</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="#">Link</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link disabled">Disabled</a>
|
||||
</li>
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" data-bs-toggle="dropdown" aria-expanded="false">Dropdown</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a class="dropdown-item" href="#">Action</a></li>
|
||||
<li><a class="dropdown-item" href="#">Another action</a></li>
|
||||
<li><a class="dropdown-item" href="#">Something else here</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="d-lg-flex col-lg-3 justify-content-lg-end">
|
||||
<button class="btn btn-primary">Button</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div>
|
||||
<div class="bg-light p-5 rounded">
|
||||
<div class="col-sm-8 mx-auto">
|
||||
|
|
46
site/content/docs/5.2/utilities/z-index.md
Normal file
46
site/content/docs/5.2/utilities/z-index.md
Normal file
|
@ -0,0 +1,46 @@
|
|||
---
|
||||
layout: docs
|
||||
title: Z-index
|
||||
description: Use our low-level `z-index` utilities to quickly change the stack level of an element or component.
|
||||
group: utilities
|
||||
toc: true
|
||||
---
|
||||
|
||||
## Example
|
||||
|
||||
{{< added-in "5.3.0" >}}
|
||||
|
||||
Use `z-index` utilities to stack elements on top of one another. Requires a `position` value other than `static`, which can be set with custom styles or using our [position utilities]({{< docsref "/utilities/position/" >}}).
|
||||
|
||||
{{< callout >}}
|
||||
We call these "low-level" `z-index` utilities because of their default values of `-1` through `3`, which we use for the layout of overlapping components. High-level `z-index` values are used for overlay components like modals and tooltips.
|
||||
{{< /callout >}}
|
||||
|
||||
{{< example class="bd-example-zindex-levels position-relative" >}}
|
||||
<div class="z-n1 position-absolute p-5 rounded-3"></div>
|
||||
<div class="z-0 position-absolute p-5 rounded-3"></div>
|
||||
<div class="z-1 position-absolute p-5 rounded-3"></div>
|
||||
<div class="z-2 position-absolute p-5 rounded-3"></div>
|
||||
<div class="z-3 position-absolute p-5 rounded-3"></div>
|
||||
{{< /example >}}
|
||||
|
||||
## Overlays
|
||||
|
||||
Bootstrap overlay components—dropdown, modal, offcanvas, popover, toast, and tooltip—all have their own `z-index` values to ensure a usable experience with competing "layers" of an interface.
|
||||
|
||||
Read about them in the [`z-index` layout page]({{< docsref "/layout/z-index" >}}).
|
||||
|
||||
## Component approach
|
||||
|
||||
On some components, we use our low-level `z-index` values to manage repeating elements that overlap one another (like buttons in a button group or items in a list group).
|
||||
|
||||
Learn about our [`z-index` approach]({{< docsref "/extend/approach#z-index-scales" >}}).
|
||||
|
||||
## CSS
|
||||
|
||||
### Sass map
|
||||
|
||||
Customize this Sass map to change the available values and generated utilities.
|
||||
|
||||
{{< scss-docs name="zindex-levels-map" file="scss/_variables.scss" >}}
|
||||
|
|
@ -133,6 +133,7 @@
|
|||
- title: Text
|
||||
- title: Vertical align
|
||||
- title: Visibility
|
||||
- title: Z-index
|
||||
|
||||
- title: Extend
|
||||
icon: tools
|
||||
|
|
|
@ -1,7 +1,15 @@
|
|||
{{ define "main" }}
|
||||
<main>
|
||||
{{ partial "home/masthead" . }}
|
||||
{{ partial "home/masthead-followup" . }}
|
||||
<div class="container-xxl bd-gutter masthead-followup">
|
||||
{{ partial "home/get-started" . }}
|
||||
{{ partial "home/customize" . }}
|
||||
{{ partial "home/css-variables" . }}
|
||||
{{ partial "home/components-utilities" . }}
|
||||
{{ partial "home/plugins" . }}
|
||||
{{ partial "home/icons" . }}
|
||||
{{ partial "home/themes" . }}
|
||||
</div>
|
||||
</main>
|
||||
|
||||
{{ .Content }}
|
||||
|
|
88
site/layouts/partials/home/components-utilities.html
Normal file
88
site/layouts/partials/home/components-utilities.html
Normal file
|
@ -0,0 +1,88 @@
|
|||
<section class="pb-md-5 mb-5">
|
||||
<div class="col-lg-8 mb-5">
|
||||
<div class="masthead-followup-icon d-inline-block mb-3 me-2" style="--bg-rgb: var(--bs-danger-rgb);">
|
||||
<svg class="bi fs-1"><use xlink:href="#menu-button-wide-fill"></use></svg>
|
||||
</div>
|
||||
<svg class="bi me-2 fs-2 text-muted"><use xlink:href="#plus"></use></svg>
|
||||
<div class="masthead-followup-icon d-inline-block mb-3" style="--bg-rgb: var(--bs-info-rgb);">
|
||||
<svg class="bi fs-1"><use xlink:href="#braces-asterisk"></use></svg>
|
||||
</div>
|
||||
<h2 class="display-5 mb-3 fw-semibold lh-sm">Components, meet the Utility API</h2>
|
||||
<p class="lead fw-normal">
|
||||
New in Bootstrap 5, our utilities are now generated by our <a href="/docs/{{ .Site.Params.docs_version }}/utilities/api/">Utility API</a>. We built it as a feature-packed Sass map that can be quickly and easily customized. It's never been easier to add, remove, or modify any utility classes. Make utilities responsive, add pseudo-class variants, and give them custom names.
|
||||
</p>
|
||||
</div>
|
||||
<div class="row gx-md-5">
|
||||
<div class="col-lg-6">
|
||||
<h3 class="fw-semibold">Quickly customize components</h3>
|
||||
<p>Apply any of our included utility classes to our components to customize their appearance, like the navigation example below. There are hundreds of classes available—from <a href="/docs/{{ .Site.Params.docs_version }}/utilities/position/">positioning</a> and <a href="/docs/{{ .Site.Params.docs_version }}/utilities/sizing/">sizing</a> to <a href="/docs/{{ .Site.Params.docs_version }}/utilities/colors/">colors</a> and <a href="/docs/{{ .Site.Params.docs_version }}/utilities/shadows/">effects</a>. Mix them with CSS variable overrides for even more control.</p>
|
||||
<div class="p-4 border rounded-3 mb-4">
|
||||
<ul class="nav nav-pills mb-4" id="pillNav" role="tablist">
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link active" id="home-tab" data-bs-toggle="tab" type="button" role="tab" aria-selected="true">Home</button>
|
||||
</li>
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link" id="profile-tab" data-bs-toggle="tab" type="button" role="tab" aria-selected="false">Profile</button>
|
||||
</li>
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link" id="contact-tab" data-bs-toggle="tab" type="button" role="tab" aria-selected="false">Contact</button>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="nav nav-pills nav-fill gap-2 p-1 small bg-primary rounded-5 shadow-sm" id="pillNav2" role="tablist" style="--bs-nav-link-color: rgba(255, 255, 255, .75); --bs-nav-link-hover-color: #fff; --bs-nav-pills-link-active-color: var(--bs-primary); --bs-nav-pills-link-active-bg: var(--bs-white);">
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link active rounded-5" id="home-tab2" data-bs-toggle="tab" type="button" role="tab" aria-selected="true">Home</button>
|
||||
</li>
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link rounded-5" id="profile-tab2" data-bs-toggle="tab" type="button" role="tab" aria-selected="false">Profile</button>
|
||||
</li>
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link rounded-5" id="contact-tab2" data-bs-toggle="tab" type="button" role="tab" aria-selected="false">Contact</button>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
{{ highlight (printf `<ul class="nav nav-pills nav-fill gap-2 p-1 small bg-primary rounded-5 shadow-sm" id="pillNav2" role="tablist" style="--bs-nav-link-color: var(--bs-white); --bs-nav-pills-link-active-color: var(--bs-primary); --bs-nav-pills-link-active-bg: var(--bs-white);">
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link active rounded-5" id="home-tab2" data-bs-toggle="tab" type="button" role="tab" aria-selected="true">Home</button>
|
||||
</li>
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link rounded-5" id="profile-tab2" data-bs-toggle="tab" type="button" role="tab" aria-selected="false">Profile</button>
|
||||
</li>
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link rounded-5" id="contact-tab2" data-bs-toggle="tab" type="button" role="tab" aria-selected="false">Contact</button>
|
||||
</li>
|
||||
</ul>
|
||||
`) "html" "" }}
|
||||
<p class="d-flex justify-content-start mb-md-0">
|
||||
<a href="/docs/{{ .Site.Params.docs_version }}/examples#snippets" class="icon-link fw-semibold">
|
||||
Explore customized components
|
||||
<svg class="bi"><use xlink:href="#arrow-right-short"></use></svg>
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<h3 class="fw-semibold">Create and extend utilities</h3>
|
||||
<p>Use Bootstrap's utility API to modify any of our included utilities or create your own custom utilities for any project. Import Bootstrap first, then use Sass map functions to modify, add, or remove utilities.</p>
|
||||
{{ highlight (printf `@import "bootstrap/scss/bootstrap";
|
||||
|
||||
$utilities: map-merge(
|
||||
$utilities,
|
||||
(
|
||||
"cursor": (
|
||||
property: cursor,
|
||||
class: cursor,
|
||||
responsive: true,
|
||||
values: auto pointer grab,
|
||||
)
|
||||
)
|
||||
);
|
||||
`) "scss" "" }}
|
||||
|
||||
<p class="d-flex justify-content-start mb-md-0">
|
||||
<a href="/docs/{{ .Site.Params.docs_version }}/utilities/api/" class="icon-link fw-semibold mb-3">
|
||||
Explore the utility API
|
||||
<svg class="bi"><use xlink:href="#arrow-right-short"></use></svg>
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
48
site/layouts/partials/home/css-variables.html
Normal file
48
site/layouts/partials/home/css-variables.html
Normal file
|
@ -0,0 +1,48 @@
|
|||
<section class="row g-md-5 pb-md-5 mb-5 align-items-center">
|
||||
<div class="col-lg-8 mb-5">
|
||||
<div class="masthead-followup-icon d-inline-block mb-3" style="--bg-rgb: var(--bd-pink-rgb);">
|
||||
<svg class="bi fs-1"><use xlink:href="#braces"></use></svg>
|
||||
</div>
|
||||
<h2 class="display-5 mb-3 fw-semibold lh-sm">Build and extend in real-time with CSS variables</h2>
|
||||
<p class="lead fw-normal">
|
||||
Bootstrap 5 is evolving with each release to better utilize CSS variables for global theme styles, individual components, and even utilities. We provide dozens of variables for colors, font styles, and more at a <code>:root</code> level for use anywhere. On components and utilities, CSS variables are scoped to the relevant class and can easily be modified.
|
||||
</p>
|
||||
<p class="d-flex align-items-start flex-column lead fw-normal mb-0">
|
||||
<a href="/docs/{{ .Site.Params.docs_version }}/customize/css-variables/" class="icon-link fw-semibold mb-3">
|
||||
Learn more about CSS variables
|
||||
<svg class="bi"><use xlink:href="#arrow-right-short"></use></svg>
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="row gx-md-5">
|
||||
<div class="col-lg-6 mb-3">
|
||||
<h3 class="fw-semibold">Using CSS variables</h3>
|
||||
<p>Use any of our <a href="/docs/{{ .Site.Params.docs_version }}/customize/css-variables/#root-variables">global <code>:root</code> variables</a> to write new styles. CSS variables use the <code>var(--bs-variableName)</code> syntax and can be inherited by children elements.</p>
|
||||
{{ highlight (printf `.component {
|
||||
color: var(--bs-gray-800);
|
||||
background-color: var(--bs-gray-100);
|
||||
border: 1px solid var(--bs-gray-200);
|
||||
border-radius: .25rem;
|
||||
}
|
||||
|
||||
.component-header {
|
||||
color: var(--bs-purple);
|
||||
}`) "scss" "" }}
|
||||
</div>
|
||||
<div class="col-lg-6 mb-3">
|
||||
<h3 class="fw-semibold">Customizing via CSS variables</h3>
|
||||
<p>Override global, component, or utility class variables to customize Bootstrap just how you like. No need to redeclare each rule, just a new variable value.</p>
|
||||
{{ highlight (printf `body {
|
||||
--bs-body-font-family: var(--bs-font-monospace);
|
||||
--bs-body-line-height: 1.4;
|
||||
--bs-body-bg: var(--bs-gray-100);
|
||||
}
|
||||
|
||||
.table {
|
||||
--bs-table-color: var(--bs-gray-600);
|
||||
--bs-table-bg: var(--bs-gray-100);
|
||||
--bs-table-border-color: transparent;
|
||||
}`) "scss" "" }}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
58
site/layouts/partials/home/customize.html
Normal file
58
site/layouts/partials/home/customize.html
Normal file
|
@ -0,0 +1,58 @@
|
|||
<section class="col-lg-7 mb-5">
|
||||
<div class="masthead-followup-icon d-inline-block mb-3" style="--bg-rgb: var(--bs-primary-rgb);">
|
||||
<svg class="bi fs-1"><use xlink:href="#palette2"></use></svg>
|
||||
</div>
|
||||
<h2 class="display-5 mb-3 fw-semibold lh-sm">Customize everything with Sass</h2>
|
||||
<p class="lead fw-normal">
|
||||
Bootstrap utilizes Sass for a modular and customizable architecture. Import only the components you need, enable global options like gradients and shadows, and write your own CSS with our variables, maps, functions, and mixins.
|
||||
</p>
|
||||
<p class="d-flex justify-content-start lead fw-normal">
|
||||
<a href="/docs/{{ .Site.Params.docs_version }}/customize/overview/" class="icon-link fw-semibold">
|
||||
Learn more about customizing
|
||||
<svg class="bi"><use xlink:href="#arrow-right-short"></use></svg>
|
||||
</a>
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<section class="row g-md-5 mb-5 pb-md-5">
|
||||
<div class="col-lg-6">
|
||||
<h3>Include all of Bootstrap’s Sass</h3>
|
||||
<p>Import one stylesheet and you're off to the races with every feature of our CSS.</p>
|
||||
{{ highlight (printf `// Variable overrides first
|
||||
$primary: #900;
|
||||
$enable-shadows: true;
|
||||
$prefix: "mo-";
|
||||
|
||||
// Then import Bootstrap
|
||||
@import "../node_modules/bootstrap/scss/bootstrap";
|
||||
`) "scss" "" }}
|
||||
<p>Learn more about our <a href="/docs/{{ .Site.Params.docs_version }}/customize/options/">global Sass options</a>.</p>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<h3>Include what you need</h3>
|
||||
<p>The easiest way to customize Bootstrap—include only the CSS you need.</p>
|
||||
{{ highlight (printf `// Functions first
|
||||
@import "../node_modules/bootstrap/scss/functions";
|
||||
|
||||
// Variable overrides second
|
||||
$primary: #900;
|
||||
$enable-shadows: true;
|
||||
$prefix: "mo-";
|
||||
|
||||
// Required Bootstrap imports
|
||||
@import "../node_modules/bootstrap/scss/variables";
|
||||
@import "../node_modules/bootstrap/scss/maps";
|
||||
@import "../node_modules/bootstrap/scss/mixins";
|
||||
@import "../node_modules/bootstrap/scss/root";
|
||||
|
||||
// Optional components
|
||||
@import "../node_modules/bootstrap/scss/utilities";
|
||||
@import "../node_modules/bootstrap/scss/reboot";
|
||||
@import "../node_modules/bootstrap/scss/containers";
|
||||
@import "../node_modules/bootstrap/scss/grid";
|
||||
@import "../node_modules/bootstrap/scss/helpers";
|
||||
@import "../node_modules/bootstrap/scss/utilities/api";
|
||||
`) "scss" "" }}
|
||||
<p>Learn more about <a href="/docs/{{ .Site.Params.docs_version }}/customize/sass/">using Bootstrap with Sass</a>.</p>
|
||||
</div>
|
||||
</section>
|
58
site/layouts/partials/home/get-started.html
Normal file
58
site/layouts/partials/home/get-started.html
Normal file
|
@ -0,0 +1,58 @@
|
|||
<div class="col-lg-7 mx-auto pb-3 mb-3 mb-md-5 text-md-center">
|
||||
<div class="masthead-followup-icon d-inline-block mb-3" style="--bg-rgb: var(--bd-violet-rgb);">
|
||||
<svg class="bi fs-1"><use xlink:href="#code"></use></svg>
|
||||
</div>
|
||||
<h2 class="display-5 mb-3 fw-semibold lh-sm">Get started any way you want</h2>
|
||||
<p class="lead fw-normal">
|
||||
Jump right into building with Bootstrap—use the CDN, install it via package manager, or download the source code.
|
||||
</p>
|
||||
<p class="d-flex justify-content-md-start justify-content-md-center lead fw-normal">
|
||||
<a href="/docs/{{ .Site.Params.docs_version }}/getting-started/download/" class="icon-link fw-semibold justify-content-center ps-md-4">
|
||||
Read installation docs
|
||||
<svg class="bi"><use xlink:href="#arrow-right-short"></use></svg>
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<section class="row g-3 g-md-5 mb-5 pb-5 justify-content-center">
|
||||
<div class="col-lg-6 py-lg-4 pe-lg-5">
|
||||
<svg class="bi mb-2 fs-2 text-muted"><use xlink:href="#box-seam"></use></svg>
|
||||
<h3 class="fw-semibold">Install via package manager</h3>
|
||||
<p class="pe-lg-5">
|
||||
Install Bootstrap’s source Sass and JavaScript files via npm, RubyGems, Composer, or Meteor. Package managed installs don’t include documentation or our full build scripts. You can also <a href="https://github.com/twbs/bootstrap-npm-starter">use our npm template repo</a> to quickly generate a Bootstrap project via npm.
|
||||
</p>
|
||||
{{ highlight (printf ("npm install bootstrap@%s") .Site.Params.current_version) "sh" "" }}
|
||||
{{ highlight (printf ("gem install bootstrap -v %s") .Site.Params.current_ruby_version) "sh" "" }}
|
||||
<p>
|
||||
<a href="/docs/{{ .Site.Params.docs_version }}/getting-started/download/">Read our installation docs</a> for more info and additional package managers.
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-lg-6 py-lg-4 ps-lg-5 border-lg-start">
|
||||
<svg class="bi mb-2 fs-2 text-muted"><use xlink:href="#globe2"></use></svg>
|
||||
<h3 class="fw-semibold">Include via CDN</h3>
|
||||
<p class="pe-lg-5">
|
||||
When you only need to include Bootstrap’s compiled CSS or JS, you can use <a href="https://www.jsdelivr.com/package/npm/bootstrap">jsDelivr</a>. See it in action with our simple <a href="/docs/{{ .Site.Params.docs_version }}/getting-started/introduction/#quick-start">quick start</a>, or <a href="/docs/{{ .Site.Params.docs_version }}/examples/">browse the examples</a> to jumpstart your next project. You can also choose to include Popper and our JS <a href="/docs/{{ .Site.Params.docs_version }}/getting-started/introduction/#separate">separately</a>.
|
||||
</p>
|
||||
{{ highlight (printf (`<link href="%s" rel="stylesheet" integrity=%q crossorigin="anonymous">`) .Site.Params.cdn.css (.Site.Params.cdn.css_hash | safeHTMLAttr)) "html" "" }}
|
||||
{{ highlight (printf (`<script src="%s" integrity=%q crossorigin="anonymous"></script>`) .Site.Params.cdn.js_bundle (.Site.Params.cdn.js_bundle_hash | safeHTMLAttr)) "html" "" }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-8 mx-auto text-center">
|
||||
<h4 class="fw-semibold">Read our getting started guides</h4>
|
||||
<p>Get a jump on including Bootstrap's source files in a new project with our official guides.</p>
|
||||
<div class="d-flex flex-wrap align-items-center justify-content-center gap-4 mt-4">
|
||||
<a class="d-flex flex-column align-items-center text-decoration-none animate-img" href="/docs/{{ .Site.Params.docs_version }}/getting-started/webpack">
|
||||
<img class="d-block mb-2" src="/docs/{{ .Site.Params.docs_version }}/assets/img/webpack.svg" alt="" width="72" height="72" loading="lazy">
|
||||
<span class="text-muted">Webpack</span>
|
||||
</a>
|
||||
<a class="d-flex flex-column align-items-center text-decoration-none animate-img" href="/docs/{{ .Site.Params.docs_version }}/getting-started/parcel">
|
||||
<img class="d-block mb-2" src="/docs/{{ .Site.Params.docs_version }}/assets/img/parcel.png" alt="" width="72" height="72" loading="lazy">
|
||||
<span class="text-muted">Parcel</span>
|
||||
</a>
|
||||
<a class="d-flex flex-column align-items-center text-decoration-none animate-img" href="/docs/{{ .Site.Params.docs_version }}/getting-started/vite">
|
||||
<img class="d-block mb-2" src="/docs/{{ .Site.Params.docs_version }}/assets/img/vite.svg" alt="" width="72" height="72" loading="lazy">
|
||||
<span class="text-muted">Vite</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
23
site/layouts/partials/home/icons.html
Normal file
23
site/layouts/partials/home/icons.html
Normal file
|
@ -0,0 +1,23 @@
|
|||
<section class="row g-3 g-md-5 pb-md-5 mb-5 align-items-center">
|
||||
<div class="col-lg-6">
|
||||
<div class="masthead-followup-icon d-inline-block mb-3" style="--bg-rgb: var(--bd-teal-rgb);">
|
||||
{{ partial "icons/circle-square.svg" (dict "width" "32" "height" "32") }}
|
||||
</div>
|
||||
<h2 class="display-5 mb-3 fw-semibold lh-sm">Personalize it with Bootstrap Icons</h2>
|
||||
<p class="lead fw-normal">
|
||||
<a href="{{ .Site.Params.icons }}">Bootstrap Icons</a> is an open source SVG icon library featuring over 1,800 glyphs, with more added every release. They're designed to work in any project, whether you use Bootstrap itself or not. Use them as SVGs or icon fonts—both options give you vector scaling and easy customization via CSS.
|
||||
</p>
|
||||
<p class="d-flex justify-content-start lead fw-normal mb-md-0">
|
||||
<a href="{{ .Site.Params.icons }}" class="icon-link fw-semibold">
|
||||
Get Bootstrap Icons
|
||||
<svg class="bi"><use xlink:href="#arrow-right-short"></use></svg>
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<img class="img-fluid mt-3 mx-auto" srcset="/docs/{{ .Site.Params.docs_version }}/assets/img/bootstrap-icons.png,
|
||||
/docs/{{ .Site.Params.docs_version }}/assets/img/bootstrap-icons@2x.png 2x"
|
||||
src="/docs/{{ .Site.Params.docs_version }}/assets/img/bootstrap-icons.png"
|
||||
alt="Bootstrap Icons" width="700" height="425" loading="lazy">
|
||||
</div>
|
||||
</section>
|
|
@ -1,356 +0,0 @@
|
|||
<div class="container-xxl bd-gutter masthead-followup">
|
||||
<div class="col-lg-7 mx-auto pb-3 mb-3 mb-md-5 text-md-center">
|
||||
<div class="masthead-followup-icon d-inline-block mb-3" style="--bg-rgb: var(--bd-violet-rgb);">
|
||||
<svg class="bi fs-1"><use xlink:href="#code"></use></svg>
|
||||
</div>
|
||||
<h2 class="display-5 mb-3 fw-semibold lh-sm">Get started any way you want</h2>
|
||||
<p class="lead fw-normal">
|
||||
Jump right into building with Bootstrap—use the CDN, install it via package manager, or download the source code.
|
||||
</p>
|
||||
<p class="d-flex justify-content-md-start justify-content-md-center lead fw-normal">
|
||||
<a href="/docs/{{ .Site.Params.docs_version }}/getting-started/download/" class="icon-link fw-semibold justify-content-center ps-md-4">
|
||||
Read installation docs
|
||||
<svg class="bi"><use xlink:href="#arrow-right-short"></use></svg>
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<section class="row g-3 g-md-5 mb-5 pb-5 justify-content-center">
|
||||
<div class="col-lg-6 py-lg-4 pe-lg-5">
|
||||
<svg class="bi mb-2 fs-2 text-muted"><use xlink:href="#box-seam"></use></svg>
|
||||
<h3 class="fw-semibold">Install via package manager</h3>
|
||||
<p class="pe-lg-5">
|
||||
Install Bootstrap’s source Sass and JavaScript files via npm, RubyGems, Composer, or Meteor. Package managed installs don’t include documentation or our full build scripts. You can also <a href="https://github.com/twbs/bootstrap-npm-starter">use our npm template repo</a> to quickly generate a Bootstrap project via npm.
|
||||
</p>
|
||||
{{ highlight (printf ("npm install bootstrap@%s") .Site.Params.current_version) "sh" "" }}
|
||||
{{ highlight (printf ("gem install bootstrap -v %s") .Site.Params.current_ruby_version) "sh" "" }}
|
||||
<p>
|
||||
<a href="/docs/{{ .Site.Params.docs_version }}/getting-started/download/">Read our installation docs</a> for more info and additional package managers.
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-lg-6 py-lg-4 ps-lg-5 border-lg-start">
|
||||
<svg class="bi mb-2 fs-2 text-muted"><use xlink:href="#globe2"></use></svg>
|
||||
<h3 class="fw-semibold">Include via CDN</h3>
|
||||
<p class="pe-lg-5">
|
||||
When you only need to include Bootstrap’s compiled CSS or JS, you can use <a href="https://www.jsdelivr.com/package/npm/bootstrap">jsDelivr</a>. See it in action with our simple <a href="/docs/{{ .Site.Params.docs_version }}/getting-started/introduction/#quick-start">quick start</a>, or <a href="/docs/{{ .Site.Params.docs_version }}/examples/">browse the examples</a> to jumpstart your next project. You can also choose to include Popper and our JS <a href="/docs/{{ .Site.Params.docs_version }}/getting-started/introduction/#separate">separately</a>.
|
||||
</p>
|
||||
{{ highlight (printf (`<!-- CSS only -->
|
||||
<link href="%s" rel="stylesheet" integrity=%q crossorigin="anonymous">
|
||||
`) .Site.Params.cdn.css (.Site.Params.cdn.css_hash | safeHTMLAttr)) "html" "" }}
|
||||
{{ highlight (printf (`<!-- JavaScript Bundle with Popper -->
|
||||
<script src="%s" integrity=%q crossorigin="anonymous"></script>
|
||||
`) .Site.Params.cdn.js_bundle (.Site.Params.cdn.js_bundle_hash | safeHTMLAttr)) "html" "" }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-8 mx-auto text-center">
|
||||
<h4 class="fw-semibold">Read our getting started guides</h4>
|
||||
<p>Get a jump on including Bootstrap's source files in a new project with our official guides.</p>
|
||||
<div class="d-flex flex-wrap align-items-center justify-content-center gap-4 mt-4">
|
||||
<a class="d-flex flex-column align-items-center text-decoration-none" href="/docs/{{ .Site.Params.docs_version }}/getting-started/webpack">
|
||||
<img class="d-block mb-2" src="/docs/{{ .Site.Params.docs_version }}/assets/img/webpack.svg" alt="" width="72" height="72" loading="lazy">
|
||||
<span class="text-muted">Webpack</span>
|
||||
</a>
|
||||
<a class="d-flex flex-column align-items-center text-decoration-none" href="/docs/{{ .Site.Params.docs_version }}/getting-started/parcel">
|
||||
<img class="d-block mb-2" src="/docs/{{ .Site.Params.docs_version }}/assets/img/parcel.png" alt="" width="72" height="72" loading="lazy">
|
||||
<span class="text-muted">Parcel</span>
|
||||
</a>
|
||||
<a class="d-flex flex-column align-items-center text-decoration-none" href="/docs/{{ .Site.Params.docs_version }}/getting-started/vite">
|
||||
<img class="d-block mb-2" src="/docs/{{ .Site.Params.docs_version }}/assets/img/vite.svg" alt="" width="72" height="72" loading="lazy">
|
||||
<span class="text-muted">Vite</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="col-lg-7 mb-5">
|
||||
<div class="masthead-followup-icon d-inline-block mb-3" style="--bg-rgb: var(--bs-primary-rgb);">
|
||||
<svg class="bi fs-1"><use xlink:href="#palette2"></use></svg>
|
||||
</div>
|
||||
<h2 class="display-5 mb-3 fw-semibold lh-sm">Customize everything with Sass</h2>
|
||||
<p class="lead fw-normal">
|
||||
Bootstrap utilizes Sass for a modular and customizable architecture. Import only the components you need, enable global options like gradients and shadows, and write your own CSS with our variables, maps, functions, and mixins.
|
||||
</p>
|
||||
<p class="d-flex justify-content-start lead fw-normal">
|
||||
<a href="/docs/{{ .Site.Params.docs_version }}/customize/overview/" class="icon-link fw-semibold">
|
||||
Learn more about customizing
|
||||
<svg class="bi"><use xlink:href="#arrow-right-short"></use></svg>
|
||||
</a>
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<section class="row g-md-5 mb-5 pb-md-5">
|
||||
<div class="col-lg-6">
|
||||
<h3>Include all of Bootstrap’s Sass</h3>
|
||||
<p>Import one stylesheet and you're off to the races with every feature of our CSS.</p>
|
||||
{{ highlight (printf `// Variable overrides first
|
||||
$primary: #900;
|
||||
$enable-shadows: true;
|
||||
$prefix: "mo-";
|
||||
|
||||
// Then import Bootstrap
|
||||
@import "../node_modules/bootstrap/scss/bootstrap";
|
||||
`) "scss" "" }}
|
||||
<p>Learn more about our <a href="/docs/{{ .Site.Params.docs_version }}/customize/options/">global Sass options</a>.</p>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<h3>Include what you need</h3>
|
||||
<p>The easiest way to customize Bootstrap—include only the CSS you need.</p>
|
||||
{{ highlight (printf `// Functions first
|
||||
@import "../node_modules/bootstrap/scss/functions";
|
||||
|
||||
// Variable overrides second
|
||||
$primary: #900;
|
||||
$enable-shadows: true;
|
||||
$prefix: "mo-";
|
||||
|
||||
// Required Bootstrap imports
|
||||
@import "../node_modules/bootstrap/scss/variables";
|
||||
@import "../node_modules/bootstrap/scss/maps";
|
||||
@import "../node_modules/bootstrap/scss/mixins";
|
||||
@import "../node_modules/bootstrap/scss/root";
|
||||
|
||||
// Optional components
|
||||
@import "../node_modules/bootstrap/scss/utilities";
|
||||
@import "../node_modules/bootstrap/scss/reboot";
|
||||
@import "../node_modules/bootstrap/scss/containers";
|
||||
@import "../node_modules/bootstrap/scss/grid";
|
||||
@import "../node_modules/bootstrap/scss/helpers";
|
||||
@import "../node_modules/bootstrap/scss/utilities/api";
|
||||
`) "scss" "" }}
|
||||
<p>Learn more about <a href="/docs/{{ .Site.Params.docs_version }}/customize/sass/">using Bootstrap with Sass</a>.</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="row g-md-5 pb-md-5 mb-5 align-items-center">
|
||||
<div class="col-lg-8 mb-5">
|
||||
<div class="masthead-followup-icon d-inline-block mb-3" style="--bg-rgb: var(--bd-pink-rgb);">
|
||||
<svg class="bi fs-1"><use xlink:href="#braces"></use></svg>
|
||||
</div>
|
||||
<h2 class="display-5 mb-3 fw-semibold lh-sm">Build and extend in real-time with CSS variables</h2>
|
||||
<p class="lead fw-normal">
|
||||
Bootstrap 5 is evolving with each release to better utilize CSS variables for global theme styles, individual components, and even utilities. We provide dozens of variables for colors, font styles, and more at a <code>:root</code> level for use anywhere. On components and utilities, CSS variables are scoped to the relevant class and can easily be modified.
|
||||
</p>
|
||||
<p class="d-flex align-items-start flex-column lead fw-normal mb-0">
|
||||
<a href="/docs/{{ .Site.Params.docs_version }}/customize/css-variables/" class="icon-link fw-semibold mb-3">
|
||||
Learn more about CSS variables
|
||||
<svg class="bi"><use xlink:href="#arrow-right-short"></use></svg>
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="row gx-md-5">
|
||||
<div class="col-lg-6 mb-3">
|
||||
<h3 class="fw-semibold">Using CSS variables</h3>
|
||||
<p>Use any of our <a href="/docs/{{ .Site.Params.docs_version }}/customize/css-variables/#root-variables">global <code>:root</code> variables</a> to write new styles. CSS variables use the <code>var(--bs-variableName)</code> syntax and can be inherited by children elements.</p>
|
||||
{{ highlight (printf `.component {
|
||||
color: var(--bs-gray-800);
|
||||
background-color: var(--bs-gray-100);
|
||||
border: 1px solid var(--bs-gray-200);
|
||||
border-radius: .25rem;
|
||||
}
|
||||
|
||||
.component-header {
|
||||
color: var(--bs-purple);
|
||||
}`) "scss" "" }}
|
||||
</div>
|
||||
<div class="col-lg-6 mb-3">
|
||||
<h3 class="fw-semibold">Customizing via CSS variables</h3>
|
||||
<p>Override global, component, or utility class variables to customize Bootstrap just how you like. No need to redeclare each rule, just a new variable value.</p>
|
||||
{{ highlight (printf `body {
|
||||
--bs-body-font-family: var(--bs-font-monospace);
|
||||
--bs-body-line-height: 1.4;
|
||||
--bs-body-bg: var(--bs-gray-100);
|
||||
}
|
||||
|
||||
.table {
|
||||
--bs-table-color: var(--bs-gray-600);
|
||||
--bs-table-bg: var(--bs-gray-100);
|
||||
--bs-table-border-color: transparent;
|
||||
}`) "scss" "" }}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="row g-md-5 pb-md-5 mb-5 align-items-center">
|
||||
<div class="col-lg-6 mb-5 mb-md-0">
|
||||
<div class="masthead-followup-icon d-inline-block mb-3 me-2" style="--bg-rgb: var(--bs-danger-rgb);">
|
||||
<svg class="bi fs-1"><use xlink:href="#menu-button-wide-fill"></use></svg>
|
||||
</div>
|
||||
<svg class="bi me-2 fs-2 text-muted"><use xlink:href="#plus"></use></svg>
|
||||
<div class="masthead-followup-icon d-inline-block mb-3" style="--bg-rgb: var(--bs-info-rgb);">
|
||||
<svg class="bi fs-1"><use xlink:href="#braces-asterisk"></use></svg>
|
||||
</div>
|
||||
<h2 class="display-5 mb-3 fw-semibold lh-sm">Components, meet the Utility API</h2>
|
||||
<p class="lead fw-normal">
|
||||
New in Bootstrap 5, our utilities are now generated by our <a href="/docs/{{ .Site.Params.docs_version }}/utilities/api/">Utility API</a>. We built it as a feature-packed Sass map that can be quickly and easily customized. It's never been easier to add, remove, or modify any utility classes. Make utilities responsive, add pseudo-class variants, and give them custom names.
|
||||
</p>
|
||||
<p class="d-flex align-items-start flex-column lead fw-normal mb-0">
|
||||
<a href="/docs/{{ .Site.Params.docs_version }}/utilities/api/" class="icon-link fw-semibold mb-3">
|
||||
Learn more about utilities
|
||||
<svg class="bi"><use xlink:href="#arrow-right-short"></use></svg>
|
||||
</a>
|
||||
<a href="/docs/{{ .Site.Params.docs_version }}/examples#snippets" class="icon-link fw-semibold">
|
||||
Explore customized components
|
||||
<svg class="bi"><use xlink:href="#arrow-right-short"></use></svg>
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<div class="p-4 border rounded-3 mb-4">
|
||||
<h6>Quickly customize components</h6>
|
||||
<hr class="mb-4">
|
||||
<ul class="nav nav-pills mb-4" id="pillNav" role="tablist">
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link active" id="home-tab" data-bs-toggle="tab" type="button" role="tab" aria-selected="true">Home</button>
|
||||
</li>
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link" id="profile-tab" data-bs-toggle="tab" type="button" role="tab" aria-selected="false">Profile</button>
|
||||
</li>
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link" id="contact-tab" data-bs-toggle="tab" type="button" role="tab" aria-selected="false">Contact</button>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="nav nav-pills nav-fill gap-2 p-1 small bg-white border rounded-5 shadow-sm" id="pillNav2" role="tablist">
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link active rounded-5" id="home-tab2" data-bs-toggle="tab" type="button" role="tab" aria-selected="true">Home</button>
|
||||
</li>
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link rounded-5" id="profile-tab2" data-bs-toggle="tab" type="button" role="tab" aria-selected="false">Profile</button>
|
||||
</li>
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link rounded-5" id="contact-tab2" data-bs-toggle="tab" type="button" role="tab" aria-selected="false">Contact</button>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
{{ highlight (printf `// Create and extend utilities with the Utility API
|
||||
|
||||
@import "bootstrap/scss/bootstrap";
|
||||
|
||||
$utilities: map-merge(
|
||||
$utilities,
|
||||
(
|
||||
"cursor": (
|
||||
property: cursor,
|
||||
class: cursor,
|
||||
responsive: true,
|
||||
values: auto pointer grab,
|
||||
)
|
||||
)
|
||||
);
|
||||
`) "scss" "" }}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="pb-md-5 mb-5">
|
||||
<div class="col-lg-8 mb-5">
|
||||
<div class="masthead-followup-icon d-inline-block mb-3" style="--bg-rgb: var(--bs-warning-rgb);">
|
||||
<svg class="bi fs-1"><use xlink:href="#plugin"></use></svg>
|
||||
</div>
|
||||
<h2 class="display-5 mb-3 fw-semibold lh-sm">Powerful JavaScript plugins without jQuery</h2>
|
||||
<p class="lead fw-normal">
|
||||
Easily add toggleable hidden elements, modals and offcanvas menus, popovers and tooltips, and so much more—all without jQuery. JavaScript in Bootstrap is HTML-first, which means adding plugins is as easy as adding <code>data</code> attributes. Need more control? Include individual plugins programmatically.
|
||||
</p>
|
||||
<p class="d-flex justify-content-start lead fw-normal mb-md-0">
|
||||
<a href="/docs/{{ .Site.Params.docs_version }}/getting-started/javascript/" class="icon-link fw-semibold">
|
||||
Learn more about Bootstrap JavaScript
|
||||
<svg class="bi"><use xlink:href="#arrow-right-short"></use></svg>
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="row gx-md-5">
|
||||
<div class="col-lg-6 mb-3">
|
||||
<h3 class="fw-semibold">Data attribute API</h3>
|
||||
<p>Why write more JavaScript when you can write HTML? Nearly all of Bootstrap's JavaScript plugins feature a first-class data API, allowing you to use JavaScript just by adding <code>data</code> attributes.</p>
|
||||
<div class="p-4 mb-3 border rounded-3">
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-primary dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
Dropdown
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a class="dropdown-item" href="#">Dropdown item</a></li>
|
||||
<li><a class="dropdown-item" href="#">Dropdown item</a></li>
|
||||
<li><a class="dropdown-item" href="#">Dropdown item</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ highlight (printf `<div class="dropdown">
|
||||
<button class="btn btn-primary dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
Dropdown
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a class="dropdown-item" href="#">Dropdown item</a></li>
|
||||
<li><a class="dropdown-item" href="#">Dropdown item</a></li>
|
||||
<li><a class="dropdown-item" href="#">Dropdown item</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
`) "html" "" }}
|
||||
<p>Learn more about <a href="/docs/{{ .Site.Params.docs_version }}/getting-started/javascript/#using-bootstrap-as-a-module">our JavaScript as modules</a> and <a href="/docs/{{ .Site.Params.docs_version }}/getting-started/javascript/#programmatic-api">using the programmatic API</a>.</p>
|
||||
</div>
|
||||
<div class="col-lg-6 mb-3">
|
||||
<h3 class="fw-semibold">Comprehensive set of plugins</h3>
|
||||
<p>Bootstrap features a dozen plugins that you can drop into any project. Drop them in all at once, or choose just the ones you need.</p>
|
||||
<hr class="my-4">
|
||||
<div class="row g-3">
|
||||
{{- range $plugin := .Site.Data.plugins -}}
|
||||
{{- $href := printf "/docs/%s/%s" $.Site.Params.docs_version $plugin.link }}
|
||||
<div class="col-sm-6 mb-2">
|
||||
<a class="d-block pe-lg-4 text-decoration-none lh-sm" href="{{ $href }}">
|
||||
<h4 class="mb-0 fs-5 fw-semibold">{{ $plugin.name }}</h4>
|
||||
<small class="text-muted">{{ $plugin.description }}</small>
|
||||
</a>
|
||||
</div>
|
||||
{{- end }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
<section class="row g-3 g-md-5 pb-md-5 mb-5 align-items-center">
|
||||
<div class="col-lg-6">
|
||||
<div class="masthead-followup-icon d-inline-block mb-3" style="--bg-rgb: var(--bd-teal-rgb);">
|
||||
{{ partial "icons/circle-square.svg" (dict "width" "32" "height" "32") }}
|
||||
</div>
|
||||
<h2 class="display-5 mb-3 fw-semibold lh-sm">Personalize it with Bootstrap Icons</h2>
|
||||
<p class="lead fw-normal">
|
||||
<a href="{{ .Site.Params.icons }}">Bootstrap Icons</a> is an open source SVG icon library featuring over 1,500 glyphs, with more added every release. They're designed to work in any project, whether you use Bootstrap itself or not. Use them as SVGs or icon fonts—both options give you vector scaling and easy customization via CSS.
|
||||
</p>
|
||||
<p class="d-flex justify-content-start lead fw-normal mb-md-0">
|
||||
<a href="{{ .Site.Params.icons }}" class="icon-link fw-semibold">
|
||||
Get Bootstrap Icons
|
||||
<svg class="bi"><use xlink:href="#arrow-right-short"></use></svg>
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<img class="img-fluid mt-3 mx-auto" srcset="/docs/{{ .Site.Params.docs_version }}/assets/img/bootstrap-icons.png,
|
||||
/docs/{{ .Site.Params.docs_version }}/assets/img/bootstrap-icons@2x.png 2x"
|
||||
src="/docs/{{ .Site.Params.docs_version }}/assets/img/bootstrap-icons.png"
|
||||
alt="Bootstrap Icons" width="700" height="425" loading="lazy">
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="row g-3 g-md-5 pb-md-5 mb-5 align-items-center">
|
||||
<div class="col-lg-6">
|
||||
<div class="masthead-followup-icon d-inline-block mb-3" style="--bg-rgb: var(--bd-violet-rgb);">
|
||||
{{ partial "icons/droplet-fill.svg" (dict "width" "32" "height" "32") }}
|
||||
</div>
|
||||
<h2 class="display-5 mb-3 fw-semibold lh-sm">Make it yours with official Bootstrap Themes</h2>
|
||||
<p class="lead fw-normal">
|
||||
Take Bootstrap to the next level with premium themes from the <a href="{{ .Site.Params.themes }}">official Bootstrap Themes marketplace</a>. Themes are built on Bootstrap as their own extended frameworks, rich with new components and plugins, documentation, and powerful build tools.
|
||||
</p>
|
||||
<p class="d-flex justify-content-start lead fw-normal mb-md-0">
|
||||
<a href="{{ .Site.Params.themes }}" class="icon-link fw-semibold">
|
||||
Browse Bootstrap Themes
|
||||
<svg class="bi"><use xlink:href="#arrow-right-short"></use></svg>
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<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="700" height="500" loading="lazy">
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
65
site/layouts/partials/home/plugins.html
Normal file
65
site/layouts/partials/home/plugins.html
Normal file
|
@ -0,0 +1,65 @@
|
|||
<section class="pb-md-5 mb-5">
|
||||
<div class="col-lg-8 mb-5">
|
||||
<div class="masthead-followup-icon d-inline-block mb-3" style="--bg-rgb: var(--bs-warning-rgb);">
|
||||
<svg class="bi fs-1"><use xlink:href="#plugin"></use></svg>
|
||||
</div>
|
||||
<h2 class="display-5 mb-3 fw-semibold lh-sm">Powerful JavaScript plugins without jQuery</h2>
|
||||
<p class="lead fw-normal">
|
||||
Add toggleable hidden elements, modals and offcanvas menus, popovers and tooltips, and so much more—all without jQuery. Bootstrap's JavaScript is HTML-first, meaning most plugins are added with <code>data</code> attributes in your HTML. Need more control? Include individual plugins programmatically.
|
||||
</p>
|
||||
<p class="d-flex justify-content-start lead fw-normal mb-md-0">
|
||||
<a href="/docs/{{ .Site.Params.docs_version }}/getting-started/javascript/" class="icon-link fw-semibold">
|
||||
Learn more about Bootstrap JavaScript
|
||||
<svg class="bi"><use xlink:href="#arrow-right-short"></use></svg>
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="row gx-md-5">
|
||||
<div class="col-lg-6 mb-3">
|
||||
<h3 class="fw-semibold">Data attribute API</h3>
|
||||
<p>Why write more JavaScript when you can write HTML? Nearly all of Bootstrap's JavaScript plugins feature a first-class data API, allowing you to use JavaScript just by adding <code>data</code> attributes.</p>
|
||||
<div class="p-4 mb-3 border rounded-3">
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-primary dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
Dropdown
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><button class="dropdown-item" type="button">Dropdown item</button></li>
|
||||
<li><button class="dropdown-item" type="button">Dropdown item</button></li>
|
||||
<li><button class="dropdown-item" type="button">Dropdown item</button></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ highlight (printf `<div class="dropdown">
|
||||
<button class="btn btn-primary dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
Dropdown
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><button class="dropdown-item" type="button">Dropdown item</button></li>
|
||||
<li><button class="dropdown-item" type="button">Dropdown item</button></li>
|
||||
<li><button class="dropdown-item" type="button">Dropdown item</button></li>
|
||||
</ul>
|
||||
</div>
|
||||
`) "html" "" }}
|
||||
<p>Learn more about <a href="/docs/{{ .Site.Params.docs_version }}/getting-started/javascript/#using-bootstrap-as-a-module">our JavaScript as modules</a> and <a href="/docs/{{ .Site.Params.docs_version }}/getting-started/javascript/#programmatic-api">using the programmatic API</a>.</p>
|
||||
</div>
|
||||
<div class="col-lg-6 mb-3">
|
||||
<h3 class="fw-semibold">Comprehensive set of plugins</h3>
|
||||
<p>Bootstrap features a dozen plugins that you can drop into any project. Drop them in all at once, or choose just the ones you need.</p>
|
||||
<hr class="my-4">
|
||||
<div class="row g-3">
|
||||
{{- range $plugin := .Site.Data.plugins -}}
|
||||
{{- $href := printf "/docs/%s/%s" $.Site.Params.docs_version $plugin.link }}
|
||||
<div class="col-sm-6 mb-2">
|
||||
<a class="d-block pe-lg-4 text-decoration-none lh-sm" href="{{ $href }}">
|
||||
<h4 class="mb-0 fs-5 fw-semibold">{{ $plugin.name }}</h4>
|
||||
<small class="text-muted">{{ $plugin.description }}</small>
|
||||
</a>
|
||||
</div>
|
||||
{{- end }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
23
site/layouts/partials/home/themes.html
Normal file
23
site/layouts/partials/home/themes.html
Normal file
|
@ -0,0 +1,23 @@
|
|||
<section class="row g-3 g-md-5 pb-md-5 mb-5 align-items-center">
|
||||
<div class="col-lg-6">
|
||||
<div class="masthead-followup-icon d-inline-block mb-3" style="--bg-rgb: var(--bd-violet-rgb);">
|
||||
{{ partial "icons/droplet-fill.svg" (dict "width" "32" "height" "32") }}
|
||||
</div>
|
||||
<h2 class="display-5 mb-3 fw-semibold lh-sm">Make it yours with official Bootstrap Themes</h2>
|
||||
<p class="lead fw-normal">
|
||||
Take Bootstrap to the next level with premium themes from the <a href="{{ .Site.Params.themes }}">official Bootstrap Themes marketplace</a>. Themes are built on Bootstrap as their own extended frameworks, rich with new components and plugins, documentation, and powerful build tools.
|
||||
</p>
|
||||
<p class="d-flex justify-content-start lead fw-normal mb-md-0">
|
||||
<a href="{{ .Site.Params.themes }}" class="icon-link fw-semibold">
|
||||
Browse Bootstrap Themes
|
||||
<svg class="bi"><use xlink:href="#arrow-right-short"></use></svg>
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<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="700" height="500" loading="lazy">
|
||||
</div>
|
||||
</section>
|
Loading…
Reference in a new issue