diff options
| author | XhmikosR <[email protected]> | 2018-11-14 15:52:02 +0200 |
|---|---|---|
| committer | XhmikosR <[email protected]> | 2018-11-20 21:31:28 +0200 |
| commit | 369f03fbc5081abfc1f8b519726674a8311459d7 (patch) | |
| tree | 646e2053050cf4c89aea8c8b5f0dcb8fa282d900 | |
| parent | 6163533d84b98e04880ebe05aa5c2e37b2d77b18 (diff) | |
| download | bootstrap-369f03fbc5081abfc1f8b519726674a8311459d7.tar.xz bootstrap-369f03fbc5081abfc1f8b519726674a8311459d7.zip | |
Use the new include in examples too.
| -rw-r--r-- | site/_layouts/examples.html | 13 | ||||
| -rw-r--r-- | site/docs/4.1/assets/scss/_placeholder-img.scss | 2 | ||||
| -rw-r--r-- | site/docs/4.1/examples/album/index.html | 19 | ||||
| -rw-r--r-- | site/docs/4.1/examples/blog/index.html | 5 | ||||
| -rw-r--r-- | site/docs/4.1/examples/carousel/carousel.css | 1 | ||||
| -rw-r--r-- | site/docs/4.1/examples/carousel/index.html | 19 | ||||
| -rw-r--r-- | site/docs/4.1/examples/offcanvas/index.html | 13 |
7 files changed, 41 insertions, 31 deletions
diff --git a/site/_layouts/examples.html b/site/_layouts/examples.html index 257b36df1..429b824d7 100644 --- a/site/_layouts/examples.html +++ b/site/_layouts/examples.html @@ -10,6 +10,19 @@ {% include stylesheet.html %} + <style> + .bd-placeholder-img { + font-size: 1.125rem; + text-anchor: middle; + } + + @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"> diff --git a/site/docs/4.1/assets/scss/_placeholder-img.scss b/site/docs/4.1/assets/scss/_placeholder-img.scss index c1ac5fee8..a9f8a41cb 100644 --- a/site/docs/4.1/assets/scss/_placeholder-img.scss +++ b/site/docs/4.1/assets/scss/_placeholder-img.scss @@ -2,6 +2,8 @@ // Placeholder svg used in the docs. // +// Remember to update `site/_layouts/examples.html` too if this changes! + .bd-placeholder-img { font-size: 1.125rem; text-anchor: middle; diff --git a/site/docs/4.1/examples/album/index.html b/site/docs/4.1/examples/album/index.html index 96dac0caa..1e41de0f2 100644 --- a/site/docs/4.1/examples/album/index.html +++ b/site/docs/4.1/examples/album/index.html @@ -2,7 +2,6 @@ layout: examples title: Album example extra_css: "album.css" -include_holder: true --- <header> @@ -56,7 +55,7 @@ include_holder: true <div class="row"> <div class="col-md-4"> <div class="card mb-4 shadow-sm"> - <img class="card-img-top" data-src="holder.js/100px225?theme=thumb&bg=55595c&fg=eceeef&text=Thumbnail" alt="Card image cap"> + {% include icons/placeholder.svg 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"> @@ -71,7 +70,7 @@ include_holder: true </div> <div class="col-md-4"> <div class="card mb-4 shadow-sm"> - <img class="card-img-top" data-src="holder.js/100px225?theme=thumb&bg=55595c&fg=eceeef&text=Thumbnail" alt="Card image cap"> + {% include icons/placeholder.svg 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"> @@ -86,7 +85,7 @@ include_holder: true </div> <div class="col-md-4"> <div class="card mb-4 shadow-sm"> - <img class="card-img-top" data-src="holder.js/100px225?theme=thumb&bg=55595c&fg=eceeef&text=Thumbnail" alt="Card image cap"> + {% include icons/placeholder.svg 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"> @@ -102,7 +101,7 @@ include_holder: true <div class="col-md-4"> <div class="card mb-4 shadow-sm"> - <img class="card-img-top" data-src="holder.js/100px225?theme=thumb&bg=55595c&fg=eceeef&text=Thumbnail" alt="Card image cap"> + {% include icons/placeholder.svg 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"> @@ -117,7 +116,7 @@ include_holder: true </div> <div class="col-md-4"> <div class="card mb-4 shadow-sm"> - <img class="card-img-top" data-src="holder.js/100px225?theme=thumb&bg=55595c&fg=eceeef&text=Thumbnail" alt="Card image cap"> + {% include icons/placeholder.svg 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"> @@ -132,7 +131,7 @@ include_holder: true </div> <div class="col-md-4"> <div class="card mb-4 shadow-sm"> - <img class="card-img-top" data-src="holder.js/100px225?theme=thumb&bg=55595c&fg=eceeef&text=Thumbnail" alt="Card image cap"> + {% include icons/placeholder.svg 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"> @@ -148,7 +147,7 @@ include_holder: true <div class="col-md-4"> <div class="card mb-4 shadow-sm"> - <img class="card-img-top" data-src="holder.js/100px225?theme=thumb&bg=55595c&fg=eceeef&text=Thumbnail" alt="Card image cap"> + {% include icons/placeholder.svg 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"> @@ -163,7 +162,7 @@ include_holder: true </div> <div class="col-md-4"> <div class="card mb-4 shadow-sm"> - <img class="card-img-top" data-src="holder.js/100px225?theme=thumb&bg=55595c&fg=eceeef&text=Thumbnail" alt="Card image cap"> + {% include icons/placeholder.svg 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"> @@ -178,7 +177,7 @@ include_holder: true </div> <div class="col-md-4"> <div class="card mb-4 shadow-sm"> - <img class="card-img-top" data-src="holder.js/100px225?theme=thumb&bg=55595c&fg=eceeef&text=Thumbnail" alt="Card image cap"> + {% include icons/placeholder.svg 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"> diff --git a/site/docs/4.1/examples/blog/index.html b/site/docs/4.1/examples/blog/index.html index 61ee8fa35..8c8417aca 100644 --- a/site/docs/4.1/examples/blog/index.html +++ b/site/docs/4.1/examples/blog/index.html @@ -4,7 +4,6 @@ title: Blog Template extra_css: - "https://fonts.googleapis.com/css?family=Playfair+Display:700,900" - "blog.css" -include_holder: true --- <div class="container"> @@ -62,7 +61,7 @@ include_holder: true <p class="card-text mb-auto">This is a wider card with supporting text below as a natural lead-in to additional content.</p> <a href="#">Continue reading</a> </div> - <img class="card-img-right flex-auto d-none d-lg-block" data-src="holder.js/200x250?theme=thumb&bg=55595c&fg=eceeef&text=Thumbnail" alt="Card image cap"> + {% include icons/placeholder.svg width="200" height="250" background="#55595c" color="#eceeef" class="card-img-right flex-auto d-none d-lg-block" text="Thumbnail" title="Card image cap" %} </div> </div> <div class="col-md-6"> @@ -76,7 +75,7 @@ include_holder: true <p class="card-text mb-auto">This is a wider card with supporting text below as a natural lead-in to additional content.</p> <a href="#">Continue reading</a> </div> - <img class="card-img-right flex-auto d-none d-lg-block" data-src="holder.js/200x250?theme=thumb&bg=55595c&fg=eceeef&text=Thumbnail" alt="Card image cap"> + {% include icons/placeholder.svg width="200" height="250" background="#55595c" color="#eceeef" class="card-img-right flex-auto d-none d-lg-block" text="Thumbnail" title="Card image cap" %} </div> </div> </div> diff --git a/site/docs/4.1/examples/carousel/carousel.css b/site/docs/4.1/examples/carousel/carousel.css index f9b5a7e49..20300e90c 100644 --- a/site/docs/4.1/examples/carousel/carousel.css +++ b/site/docs/4.1/examples/carousel/carousel.css @@ -25,7 +25,6 @@ body { /* Declare heights because of positioning of img element */ .carousel-item { height: 32rem; - background-color: #777; } .carousel-item > img { position: absolute; diff --git a/site/docs/4.1/examples/carousel/index.html b/site/docs/4.1/examples/carousel/index.html index 058496b4e..3c0379b2a 100644 --- a/site/docs/4.1/examples/carousel/index.html +++ b/site/docs/4.1/examples/carousel/index.html @@ -2,7 +2,6 @@ layout: examples title: Carousel Template extra_css: "carousel.css" -include_holder: true --- <header> @@ -41,7 +40,7 @@ include_holder: true </ol> <div class="carousel-inner"> <div class="carousel-item active"> - <img class="first-slide" src="data:image/gif;base64,R0lGODlhAQABAIAAAHd3dwAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==" alt="First slide"> + {% include icons/placeholder.svg width="100%" height="100%" background="#777" color="#777" text=" " title=" " %} <div class="container"> <div class="carousel-caption text-left"> <h1>Example headline.</h1> @@ -51,7 +50,7 @@ include_holder: true </div> </div> <div class="carousel-item"> - <img class="second-slide" src="data:image/gif;base64,R0lGODlhAQABAIAAAHd3dwAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==" alt="Second slide"> + {% include icons/placeholder.svg width="100%" height="100%" background="#777" color="#777" text=" " title=" " %} <div class="container"> <div class="carousel-caption"> <h1>Another example headline.</h1> @@ -61,7 +60,7 @@ include_holder: true </div> </div> <div class="carousel-item"> - <img class="third-slide" src="data:image/gif;base64,R0lGODlhAQABAIAAAHd3dwAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==" alt="Third slide"> + {% include icons/placeholder.svg width="100%" height="100%" background="#777" color="#777" text=" " title=" " %} <div class="container"> <div class="carousel-caption text-right"> <h1>One more for good measure.</h1> @@ -91,19 +90,19 @@ include_holder: true <!-- Three columns of text below the carousel --> <div class="row"> <div class="col-lg-4"> - <img class="rounded-circle" src="data:image/gif;base64,R0lGODlhAQABAIAAAHd3dwAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==" alt="Generic placeholder image" width="140" height="140"> + {% include icons/placeholder.svg width="140" height="140" background="#777" color="#777" class="rounded-circle" text=" " title="Generic placeholder image" %} <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 »</a></p> </div><!-- /.col-lg-4 --> <div class="col-lg-4"> - <img class="rounded-circle" src="data:image/gif;base64,R0lGODlhAQABAIAAAHd3dwAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==" alt="Generic placeholder image" width="140" height="140"> + {% include icons/placeholder.svg width="140" height="140" background="#777" color="#777" class="rounded-circle" text=" " title="Generic placeholder image" %} <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 »</a></p> </div><!-- /.col-lg-4 --> <div class="col-lg-4"> - <img class="rounded-circle" src="data:image/gif;base64,R0lGODlhAQABAIAAAHd3dwAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==" alt="Generic placeholder image" width="140" height="140"> + {% include icons/placeholder.svg width="140" height="140" background="#777" color="#777" class="rounded-circle" text=" " title="Generic placeholder image" %} <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 »</a></p> @@ -121,7 +120,7 @@ include_holder: true <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"> - <img class="featurette-image img-fluid mx-auto" data-src="holder.js/500x500/auto" alt="Generic placeholder image"> + {% include icons/placeholder.svg width="500" height="500" background="#eee" color="#aaa" class="bd-placeholder-img-lg featurette-image img-fluid mx-auto" title="Generic placeholder image" %} </div> </div> @@ -133,7 +132,7 @@ include_holder: true <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"> - <img class="featurette-image img-fluid mx-auto" data-src="holder.js/500x500/auto" alt="Generic placeholder image"> + {% include icons/placeholder.svg width="500" height="500" background="#eee" color="#aaa" class="bd-placeholder-img-lg featurette-image img-fluid mx-auto" title="Generic placeholder image" %} </div> </div> @@ -145,7 +144,7 @@ include_holder: true <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"> - <img class="featurette-image img-fluid mx-auto" data-src="holder.js/500x500/auto" alt="Generic placeholder image"> + {% include icons/placeholder.svg width="500" height="500" background="#eee" color="#aaa" class="bd-placeholder-img-lg featurette-image img-fluid mx-auto" title="Generic placeholder image" %} </div> </div> diff --git a/site/docs/4.1/examples/offcanvas/index.html b/site/docs/4.1/examples/offcanvas/index.html index 7f6fffe90..015d1df32 100644 --- a/site/docs/4.1/examples/offcanvas/index.html +++ b/site/docs/4.1/examples/offcanvas/index.html @@ -4,7 +4,6 @@ title: Offcanvas template extra_css: "offcanvas.css" extra_js: "offcanvas.js" body_class: "bg-light" -include_holder: true --- <nav class="navbar navbar-expand-lg fixed-top navbar-dark bg-dark"> @@ -72,21 +71,21 @@ include_holder: true <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"> - <img data-src="holder.js/32x32?theme=thumb&bg=007bff&fg=007bff&size=1" alt="" class="mr-2 rounded"> + {% include icons/placeholder.svg 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"> - <img data-src="holder.js/32x32?theme=thumb&bg=e83e8c&fg=e83e8c&size=1" alt="" class="mr-2 rounded"> + {% include icons/placeholder.svg 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"> - <img data-src="holder.js/32x32?theme=thumb&bg=6f42c1&fg=6f42c1&size=1" alt="" class="mr-2 rounded"> + {% include icons/placeholder.svg 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. @@ -100,7 +99,7 @@ include_holder: true <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"> - <img data-src="holder.js/32x32?theme=thumb&bg=007bff&fg=007bff&size=1" alt="" class="mr-2 rounded"> + {% include icons/placeholder.svg 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> @@ -110,7 +109,7 @@ include_holder: true </div> </div> <div class="media text-muted pt-3"> - <img data-src="holder.js/32x32?theme=thumb&bg=007bff&fg=007bff&size=1" alt="" class="mr-2 rounded"> + {% include icons/placeholder.svg 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> @@ -120,7 +119,7 @@ include_holder: true </div> </div> <div class="media text-muted pt-3"> - <img data-src="holder.js/32x32?theme=thumb&bg=007bff&fg=007bff&size=1" alt="" class="mr-2 rounded"> + {% include icons/placeholder.svg 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> |
