diff --git a/site/_includes/icons/placeholder.svg b/site/_includes/icons/placeholder.svg new file mode 100644 index 000000000..a6f835d8e --- /dev/null +++ b/site/_includes/icons/placeholder.svg @@ -0,0 +1,36 @@ +{%- if include.width -%} + {% assign width = include.width %} +{%- else -%} + {% assign width = '100%' %} +{%- endif -%} + +{%- if include.height -%} + {% assign height = include.height %} +{%- else -%} + {% assign height = 180 %} +{%- endif -%} + +{%- if include.text -%} + {% assign text = include.text %} +{%- else -%} + {% assign text = width | append: 'x' | append: height %} +{%- endif -%} + +{%- if include.class -%} + {% assign class = include.class| prepend: ' ' %} +{%- endif -%} + +{%- if include.color -%} + {% assign color = include.color %} +{%- else -%} + {% assign color = '#ddd' %} +{%- endif -%} + +{%- if include.background -%} + {% assign background = include.background %} +{%- else -%} + {% assign background = '#777' %} +{%- endif -%} + + +{{- '' -}} diff --git a/site/docs/4.1/assets/scss/_component-examples.scss b/site/docs/4.1/assets/scss/_component-examples.scss index 5bafcc423..1235695b2 100644 --- a/site/docs/4.1/assets/scss/_component-examples.scss +++ b/site/docs/4.1/assets/scss/_component-examples.scss @@ -212,8 +212,9 @@ } // Images -.bd-example > img { - + img { +.bd-example { + > svg + svg, + > img + img { margin-left: .5rem; } } diff --git a/site/docs/4.1/assets/scss/_placeholder-img.scss b/site/docs/4.1/assets/scss/_placeholder-img.scss new file mode 100644 index 000000000..c1ac5fee8 --- /dev/null +++ b/site/docs/4.1/assets/scss/_placeholder-img.scss @@ -0,0 +1,14 @@ +// +// Placeholder svg used in the docs. +// + +.bd-placeholder-img { + font-size: 1.125rem; + text-anchor: middle; +} + +.bd-placeholder-img-lg { + @include media-breakpoint-up(md) { + font-size: 3.5rem; + } +} diff --git a/site/docs/4.1/assets/scss/docs.scss b/site/docs/4.1/assets/scss/docs.scss index 046521f7f..4b6674ad0 100644 --- a/site/docs/4.1/assets/scss/docs.scss +++ b/site/docs/4.1/assets/scss/docs.scss @@ -44,6 +44,7 @@ @import "brand"; @import "colors"; @import "clipboard-js"; +@import "placeholder-img"; // Load docs dependencies @import "syntax"; diff --git a/site/docs/4.1/components/card.md b/site/docs/4.1/components/card.md index dfebf2297..3a090c657 100644 --- a/site/docs/4.1/components/card.md +++ b/site/docs/4.1/components/card.md @@ -18,7 +18,7 @@ Below is an example of a basic card with mixed content and a fixed width. Cards {% capture example %}
Some quick example text to build on the card title and make up the bulk of the card's content.
@@ -70,7 +70,7 @@ Subtitles are used by adding a `.card-subtitle` to a `Some quick example text to build on the card title and make up the bulk of the card's content.
Some quick example text to build on the card title and make up the bulk of the card's content.
@@ -358,7 +358,7 @@ Similar to headers and footers, cards can include top and bottom "image caps"— {% capture example %}This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.
@@ -371,7 +371,7 @@ Similar to headers and footers, cards can include top and bottom "image caps"—This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.
Last updated 3 mins ago