aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXhmikosR <[email protected]>2019-09-02 12:31:02 +0300
committerGitHub <[email protected]>2019-09-02 12:31:02 +0300
commit6f1eb110e7c39dc2fb7e2126248b320519ae037a (patch)
tree738c558086231e6b9fffa1761b7cb90c8e6dfbcc
parentedf7923c8f04b436291c0c2b8e405be7ae3f6ab1 (diff)
downloadbootstrap-6f1eb110e7c39dc2fb7e2126248b320519ae037a.tar.xz
bootstrap-6f1eb110e7c39dc2fb7e2126248b320519ae037a.zip
Docs: simplify a few Hugo `range`s. (#29333)
-rw-r--r--site/content/docs/4.3/content/tables.md12
-rw-r--r--site/content/docs/4.3/utilities/flex.md8
-rw-r--r--site/layouts/shortcodes/example.html2
3 files changed, 11 insertions, 11 deletions
diff --git a/site/content/docs/4.3/content/tables.md b/site/content/docs/4.3/content/tables.md
index c79cb81d2..e508d517d 100644
--- a/site/content/docs/4.3/content/tables.md
+++ b/site/content/docs/4.3/content/tables.md
@@ -770,10 +770,10 @@ Use `.table-responsive{-sm|-md|-lg|-xl}` as needed to create responsive tables u
**These tables may appear broken until their responsive styles apply at specific viewport widths.**
{{< tables.inline >}}
-{{ range $bp := $.Site.Data.breakpoints }}
-{{ if not (eq $bp "xs") }}
+{{ range $.Site.Data.breakpoints }}
+{{ if not (eq . "xs") }}
<div class="bd-example">
- <div class="table-responsive{{ $bp.abbr }}">
+ <div class="table-responsive{{ .abbr }}">
<table class="table">
<thead>
<tr>
@@ -832,9 +832,9 @@ Use `.table-responsive{-sm|-md|-lg|-xl}` as needed to create responsive tables u
{{< highlight html >}}
{{< tables.inline >}}
-{{- range $bp := $.Site.Data.breakpoints -}}
-{{- if not (eq $bp "xs") }}
-<div class="table-responsive{{ $bp.abbr }}">
+{{- range $.Site.Data.breakpoints -}}
+{{- if not (eq . "xs") }}
+<div class="table-responsive{{ .abbr }}">
<table class="table">
...
</table>
diff --git a/site/content/docs/4.3/utilities/flex.md b/site/content/docs/4.3/utilities/flex.md
index 948dfe061..9ce4f27c5 100644
--- a/site/content/docs/4.3/utilities/flex.md
+++ b/site/content/docs/4.3/utilities/flex.md
@@ -438,8 +438,8 @@ Responsive variations also exist for `order`.
{{< markdown >}}
{{< flex.inline >}}
{{- range $bp := $.Site.Data.breakpoints -}}
-{{- range $i, $num := seq 0 5 }}
-- `.order{{ $bp.abbr }}-{{ $i }}`
+{{- range (seq 0 5) }}
+- `.order{{ $bp.abbr }}-{{ . }}`
{{- end -}}
{{- end -}}
{{< /flex.inline >}}
@@ -450,8 +450,8 @@ Additionally there are also responsive `.order-first` and `.order-last` classes
{{< markdown >}}
{{< flex.inline >}}
{{- range $bp := $.Site.Data.breakpoints -}}
-{{- range $i := slice "first" "last" }}
-- `.order{{ $bp.abbr }}-{{ $i }}`
+{{- range (slice "first" "last") }}
+- `.order{{ $bp.abbr }}-{{ . }}`
{{- end -}}
{{- end -}}
{{< /flex.inline >}}
diff --git a/site/layouts/shortcodes/example.html b/site/layouts/shortcodes/example.html
index bea1d9416..a13cccca4 100644
--- a/site/layouts/shortcodes/example.html
+++ b/site/layouts/shortcodes/example.html
@@ -28,7 +28,7 @@
{{- $modified_content = replace $modified_content "</svg>\n" "</svg>✂️" -}}
{{- $modified_content = split $modified_content "✂️" -}}
- {{- range $i, $content_chunk := $modified_content -}}
+ {{- range $content_chunk := $modified_content -}}
{{- $image_class := "" -}}
{{- if (strings.Contains $content_chunk `<svg class="bd-placeholder-img `) -}}