diff options
| author | XhmikosR <[email protected]> | 2019-09-02 12:52:26 +0300 |
|---|---|---|
| committer | GitHub <[email protected]> | 2019-09-02 12:52:26 +0300 |
| commit | 88d7d8b8223911726d8a0aeed9a16010dca04287 (patch) | |
| tree | 175419340abb6266cbe5b1ca7684886fc75d9c17 | |
| parent | 6cb4ebc04870df30d5b6ec528ffcb84a07ab48c5 (diff) | |
| download | bootstrap-88d7d8b8223911726d8a0aeed9a16010dca04287.tar.xz bootstrap-88d7d8b8223911726d8a0aeed9a16010dca04287.zip | |
Use the example shortcode in more places. (#29346)
| -rw-r--r-- | site/content/docs/4.3/content/images.md | 54 | ||||
| -rw-r--r-- | site/content/docs/4.3/utilities/borders.md | 43 |
2 files changed, 30 insertions, 67 deletions
diff --git a/site/content/docs/4.3/content/images.md b/site/content/docs/4.3/content/images.md index a45e82ae3..3ed86786c 100644 --- a/site/content/docs/4.3/content/images.md +++ b/site/content/docs/4.3/content/images.md @@ -10,59 +10,37 @@ toc: true 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 >}} +{{< example >}} +{{< placeholder width="100%" height="250" class="bd-placeholder-img-lg img-fluid" text="Responsive image" >}} +{{< /example >}} ## Image thumbnails In addition to our [border-radius utilities]({{< docsref "/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 >}} +{{< example >}} +{{< 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" >}} +{{< /example >}} ## Aligning images Align images with the [helper float classes]({{< docsref "/utilities/float" >}}) or [text alignment classes]({{< docsref "/utilities/text#text-alignment" >}}). `block`-level images can be centered using [the `.mx-auto` margin utility class]({{< docsref "/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> +{{< example >}} +{{< placeholder width="200" height="200" class="rounded float-left" >}} +{{< placeholder width="200" height="200" class="rounded float-right" >}} +{{< /example >}} -{{< 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 >}} +{{< example >}} +{{< placeholder width="200" height="200" class="rounded mx-auto d-block" >}} +{{< /example >}} -<div class="bd-example bd-example-images"> - <div class="text-center"> - {{< placeholder width="200" height="200" class="rounded" >}} - </div> -</div> - -{{< highlight html >}} +{{< example >}} <div class="text-center"> - <img src="..." class="rounded" alt="..."> + {{< placeholder width="200" height="200" class="rounded" >}} </div> -{{< /highlight >}} +{{< /example >}} ## Picture diff --git a/site/content/docs/4.3/utilities/borders.md b/site/content/docs/4.3/utilities/borders.md index 9f082f76a..b2457353f 100644 --- a/site/content/docs/4.3/utilities/borders.md +++ b/site/content/docs/4.3/utilities/borders.md @@ -53,38 +53,23 @@ 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"> - {{< 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> +{{< example >}} +{{< 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)" >}} +{{< /example >}} -{{< highlight html >}} -<img src="..." alt="..." class="rounded"> -<img src="..." alt="..." class="rounded-top"> -<img src="..." alt="..." class="rounded-right"> -<img src="..." alt="..." class="rounded-bottom"> -<img src="..." alt="..." class="rounded-left"> -<img src="..." alt="..." class="rounded-circle"> -<img src="..." alt="..." class="rounded-pill"> -<img src="..." alt="..." class="rounded-0"> -{{< /highlight >}} ## Sizes Use `.rounded-lg` or `.rounded-sm` for larger or smaller border-radius. -<div class="bd-example bd-example-images"> - {{< 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 >}} -<img src="..." alt="..." class="rounded-sm"> -<img src="..." alt="..." class="rounded-lg"> -{{< /highlight >}} +{{< example >}} +{{< 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" >}} +{{< /example >}} |
