Skip to content

Commit

Permalink
Update examples (twbs#33214)
Browse files Browse the repository at this point in the history
* Add updated Jumbotron example made from utilities

* Update starter template example with new design and links

* Update some existing examples and their screenshots

* Add four new snippet-based examples

* Update layout to improve things a bit

* WIP

* Add d-block to images

* Fix horizontal scroll

* move d-block to the anchor

Co-authored-by: XhmikosR <[email protected]>
  • Loading branch information
mdo and XhmikosR authored Mar 22, 2021
1 parent e775c49 commit a3ad732
Show file tree
Hide file tree
Showing 50 changed files with 1,573 additions and 140 deletions.
2 changes: 1 addition & 1 deletion site/content/docs/5.0/examples/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ aliases: "/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 }}/"{{ if in $example.name "RTL" }} hreflang="ar"{{ end }}>
<a class="d-block" href="/docs/{{ $.Site.Params.docs_version }}/examples/{{ $example.name | urlize }}/"{{ if in $example.name "RTL" }} hreflang="ar"{{ end }}>
<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"
Expand Down
6 changes: 3 additions & 3 deletions site/content/docs/5.0/examples/checkout/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ <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>

<div class="row g-3">
<div class="row g-5">
<div class="col-md-5 col-lg-4 order-md-last">
<h4 class="d-flex justify-content-between align-items-center mb-3">
<span class="text-muted">Your cart</span>
<span class="badge bg-secondary rounded-pill">3</span>
<span class="text-primary">Your cart</span>
<span class="badge bg-primary rounded-pill">3</span>
</h4>
<ul class="list-group mb-3">
<li class="list-group-item d-flex justify-content-between lh-sm">
Expand Down
61 changes: 61 additions & 0 deletions site/content/docs/5.0/examples/features/features.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
.b-example-divider {
height: 3rem;
background-color: rgba(0, 0, 0, .1);
border: solid rgba(0, 0, 0, .15);
border-width: 1px 0;
box-shadow: inset 0 .5em 1.5em rgba(0, 0, 0, .1), inset 0 .125em .5em rgba(0, 0, 0, .15);
}

.bi {
vertical-align: -.125em;
fill: currentColor;
}

.feature-icon {
display: inline-flex;
align-items: center;
justify-content: center;
width: 4rem;
height: 4rem;
margin-bottom: 1rem;
font-size: 2rem;
color: #fff;
border-radius: .75rem;
}

.icon-link {
display: inline-flex;
align-items: center;
}
.icon-link > .bi {
margin-top: .125rem;
margin-left: .125rem;
transition: transform .25s ease-in-out;
fill: currentColor;
}
.icon-link:hover > .bi {
transform: translate(.25rem);
}

.icon-square {
display: inline-flex;
align-items: center;
justify-content: center;
width: 3rem;
height: 3rem;
font-size: 1.5rem;
border-radius: .75rem;
}

.rounded-4 { border-radius: .5rem; }
.rounded-5 { border-radius: 1rem; }

.text-shadow-1 { text-shadow: 0 .125rem .25rem rgba(0, 0, 0, .25); }
.text-shadow-2 { text-shadow: 0 .25rem .5rem rgba(0, 0, 0, .25); }
.text-shadow-3 { text-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .25); }

.card-cover {
background-repeat: no-repeat;
background-position: center center;
background-size: cover;
}
285 changes: 285 additions & 0 deletions site/content/docs/5.0/examples/features/index.html

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 32 additions & 0 deletions site/content/docs/5.0/examples/headers/headers.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
.b-example-divider {
height: 3rem;
background-color: rgba(0, 0, 0, .1);
border: solid rgba(0, 0, 0, .15);
border-width: 1px 0;
box-shadow: inset 0 .5em 1.5em rgba(0, 0, 0, .1), inset 0 .125em .5em rgba(0, 0, 0, .15);
}

.form-control-dark {
color: #fff;
background-color: var(--bs-dark);
border-color: var(--bs-gray);
}
.form-control-dark:focus {
color: #fff;
background-color: var(--bs-dark);
border-color: #fff;
box-shadow: 0 0 0 .25rem rgba(255, 255, 255, .25);
}

.bi {
vertical-align: -.125em;
fill: currentColor;
}

.text-small {
font-size: 85%;
}

.dropdown-toggle {
outline: 0;
}
Loading

0 comments on commit a3ad732

Please sign in to comment.