Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add loading="lazy" in images #30199

Merged
merged 2 commits into from
Mar 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 5 additions & 5 deletions site/content/docs/4.3/about/brand.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ Use either the Bootstrap mark (a capital **B**) or the standard logo (just **Boo

<div class="bd-brand-logos d-sm-flex text-center bg-light rounded overflow-hidden w-100 mb-3">
<div class="bd-brand-item">
<img src="/docs/{{< param docs_version >}}/assets/brand/bootstrap-solid.svg" alt="Bootstrap" width="144" height="144">
<img src="/docs/{{< param docs_version >}}/assets/brand/bootstrap-solid.svg" alt="Bootstrap" width="144" height="144" loading="lazy">
</div>
<div class="bd-brand-item inverse">
<img src="/docs/{{< param docs_version >}}/assets/brand/bootstrap-outline.svg" alt="Bootstrap" width="144" height="144">
<img src="/docs/{{< param docs_version >}}/assets/brand/bootstrap-outline.svg" alt="Bootstrap" width="144" height="144" loading="lazy">
</div>
</div>
<div class="bd-brand-logos d-sm-flex text-center bg-light rounded overflow-hidden w-100 mb-3">
Expand All @@ -35,13 +35,13 @@ Download the Bootstrap mark in one of three styles, each available as an SVG fil

<div class="bd-brand-logos d-sm-flex text-center bg-light rounded overflow-hidden w-100 mb-3">
<a href="/docs/{{< param docs_version >}}/assets/brand/bootstrap-solid.svg" download class="bd-brand-item" title="Download solid logo">
<img src="/docs/{{< param docs_version >}}/assets/brand/bootstrap-solid.svg" alt="Bootstrap" width="144" height="144">
<img src="/docs/{{< param docs_version >}}/assets/brand/bootstrap-solid.svg" alt="Bootstrap" width="144" height="144" loading="lazy">
</a>
<a href="/docs/{{< param docs_version >}}/assets/brand/bootstrap-outline.svg" download class="bd-brand-item inverse" title="Download outlined logo">
<img src="/docs/{{< param docs_version >}}/assets/brand/bootstrap-outline.svg" alt="Bootstrap" width="144" height="144">
<img src="/docs/{{< param docs_version >}}/assets/brand/bootstrap-outline.svg" alt="Bootstrap" width="144" height="144" loading="lazy">
</a>
<a href="/docs/{{< param docs_version >}}/assets/brand/bootstrap-punchout.svg" download class="bd-brand-item inverse" title="Download inverted logo">
<img src="/docs/{{< param docs_version >}}/assets/brand/bootstrap-punchout.svg" alt="Bootstrap" width="144" height="144">
<img src="/docs/{{< param docs_version >}}/assets/brand/bootstrap-punchout.svg" alt="Bootstrap" width="144" height="144" loading="lazy">
</a>
</div>

Expand Down
2 changes: 1 addition & 1 deletion site/content/docs/4.3/about/team.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Bootstrap is maintained by the founding team and a small group of invaluable cor
<div class="list-group mb-3">
{{- range (index $.Site.Data "core-team") }}
<a class="list-group-item list-group-item-action d-flex align-items-center" href="https://github.com/{{ .user }}">
<img src="https://github.com/{{ .user }}.png" alt="@{{ .user }}" width="32" height="32" class="rounded mr-2">
<img src="https://github.com/{{ .user }}.png" alt="@{{ .user }}" width="32" height="32" class="rounded mr-2" loading="lazy">
<span>
<strong>{{ .name }}</strong> @{{ .user }}
</span>
Expand Down
4 changes: 2 additions & 2 deletions site/content/docs/4.3/components/navbar.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ Adding images to the `.navbar-brand` will likely always require custom styles or
<nav class="navbar navbar-light bg-light">
<div class="container">
<a class="navbar-brand" href="#">
<img src="/docs/{{< param docs_version >}}/assets/brand/bootstrap-solid.svg" width="30" height="30" alt="">
<img src="/docs/{{< param docs_version >}}/assets/brand/bootstrap-solid.svg" width="30" height="30" alt="" loading="lazy">
</a>
</div>
</nav>
Expand All @@ -116,7 +116,7 @@ Adding images to the `.navbar-brand` will likely always require custom styles or
<nav class="navbar navbar-light bg-light">
<div class="container-fluid">
<a class="navbar-brand" href="#">
<img src="/docs/{{< param docs_version >}}/assets/brand/bootstrap-solid.svg" width="30" height="30" class="d-inline-block align-top" alt="">
<img src="/docs/{{< param docs_version >}}/assets/brand/bootstrap-solid.svg" width="30" height="30" class="d-inline-block align-top" alt="" loading="lazy">
Bootstrap
</a>
</div>
Expand Down
5 changes: 4 additions & 1 deletion site/content/docs/4.3/examples/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ aliases: "/examples/"
<a href="/docs/{{ $.Site.Params.docs_version }}/examples/{{ $example.name | urlize }}/">
<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" alt="{{ $example.name }} screenshot" width="480" height="300">
src="/docs/{{ $.Site.Params.docs_version }}/assets/img/examples/{{ $example.name | urlize }}.png"
alt="{{ $example.name }} screenshot"
width="480" height="300"
loading="lazy">
<h5 class="mb-1">{{ $example.name }}</h5>
</a>
<p class="text-muted">{{ $example.description }}</p>
Expand Down
5 changes: 4 additions & 1 deletion site/layouts/partials/home/masthead-followup.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ <h2 class="display-4">Official Themes</h2>
<div class="mx-5 border-bottom">
<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="500" height="200">
src="/docs/{{ .Site.Params.docs_version }}/assets/img/bootstrap-themes.png"
alt="Bootstrap Themes"
width="500" height="200"
loading="lazy">
</div>
</div>