mirror of
https://github.com/twbs/bootstrap.git
synced 2025-09-03 02:13:01 +02:00
docs: add a new partial for responsive images and use imageConfig
(#39779)
This way the dimensions are not hardcoded
This commit is contained in:
@@ -15,9 +15,9 @@
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<img class="img-fluid mt-3 mx-auto" srcset="/docs/{{ .Site.Params.docs_version }}/assets/img/bootstrap-icons.png,
|
||||
/docs/{{ .Site.Params.docs_version }}/assets/img/bootstrap-icons@2x.png 2x"
|
||||
src="/docs/{{ .Site.Params.docs_version }}/assets/img/bootstrap-icons.png"
|
||||
alt="Bootstrap Icons" width="700" height="425" loading="lazy">
|
||||
{{ partial "responsive-img" (dict "context" .
|
||||
"imgPath" "/assets/img/bootstrap-icons.png"
|
||||
"alt" "Bootstrap Icons"
|
||||
"classes" "d-block mt-3") }}
|
||||
</div>
|
||||
</section>
|
||||
|
@@ -10,13 +10,11 @@
|
||||
<svg class="bi" style="width: 20px; height: 20px;"><use xlink:href="#arrow-right-short"></use></svg>
|
||||
</span>
|
||||
</a>
|
||||
<img class="d-none d-sm-block mx-auto mb-3"
|
||||
srcset="/docs/{{ .Site.Params.docs_version }}/assets/brand/bootstrap-logo-shadow.png,
|
||||
/docs/{{ .Site.Params.docs_version }}/assets/brand/bootstrap-logo-shadow@2x.png 2x"
|
||||
src="/docs/{{ .Site.Params.docs_version }}/assets/brand/bootstrap-logo-shadow.png"
|
||||
alt="Bootstrap"
|
||||
width="200"
|
||||
height="165">
|
||||
{{ partial "responsive-img" (dict "context" .
|
||||
"imgPath" "/assets/brand/bootstrap-logo-shadow.png"
|
||||
"alt" "Bootstrap"
|
||||
"classes" "d-none d-sm-block mb-3"
|
||||
"lazyload" false) }}
|
||||
<h1 class="mb-3 fw-semibold lh-1">Build fast, responsive sites with Bootstrap</h1>
|
||||
<p class="lead mb-4">
|
||||
Powerful, extensible, and feature-packed frontend toolkit. Build and customize with Sass, utilize prebuilt grid system and components, and bring projects to life with powerful JavaScript plugins.
|
||||
|
@@ -15,9 +15,9 @@
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<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="700" height="500" loading="lazy">
|
||||
{{ partial "responsive-img" (dict "context" .
|
||||
"imgPath" "/assets/img/bootstrap-themes.png"
|
||||
"alt" "Bootstrap Themes"
|
||||
"classes" "d-block mt-3") }}
|
||||
</div>
|
||||
</section>
|
||||
|
Reference in New Issue
Block a user