Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'site/layouts/shortcodes/list-examples.html')
-rw-r--r--site/layouts/shortcodes/list-examples.html19
1 files changed, 19 insertions, 0 deletions
diff --git a/site/layouts/shortcodes/list-examples.html b/site/layouts/shortcodes/list-examples.html
new file mode 100644
index 0000000000..33b3c33c7d
--- /dev/null
+++ b/site/layouts/shortcodes/list-examples.html
@@ -0,0 +1,19 @@
+{{ range $entry := $.Site.Data.examples -}}
+ <h2>{{ $entry.category }}</h2>
+ <p>{{ $entry.description }}</p>
+
+ {{ range $i, $example := $entry.examples -}}
+ {{- $len := len $entry.examples -}}
+ {{ if (eq $i 0) }}<div class="row">{{ end }}
+ <div class="col-sm-6 col-md-4 col-xl-3 mb-3">
+ <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">
+ <h5 class="mb-1">{{ $example.name }}</h5>
+ </a>
+ <p class="text-muted">{{ $example.description }}</p>
+ </div>
+ {{ if (eq (add $i 1) $len) }}</div>{{ end }}
+ {{ end -}}
+{{ end -}}