diff options
| author | Mark Otto <[email protected]> | 2022-12-29 13:59:33 -0800 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2023-01-04 09:56:11 -0800 |
| commit | 846d6606ec4eabe585dd0240e3d1b56256cfc8a6 (patch) | |
| tree | 04ff562af88b353fbe9b4c2b32e2445ab0949277 /site/content/docs | |
| parent | 803d9d405c9d1d79f4810725668bdf2f2614ded2 (diff) | |
| download | bootstrap-846d6606ec4eabe585dd0240e3d1b56256cfc8a6.tar.xz bootstrap-846d6606ec4eabe585dd0240e3d1b56256cfc8a6.zip | |
Include twbs/examples in the Examples page
Diffstat (limited to 'site/content/docs')
| -rw-r--r-- | site/content/docs/5.3/examples/_index.md | 61 |
1 files changed, 38 insertions, 23 deletions
diff --git a/site/content/docs/5.3/examples/_index.md b/site/content/docs/5.3/examples/_index.md index d46e38f25..9c9cdd07e 100644 --- a/site/content/docs/5.3/examples/_index.md +++ b/site/content/docs/5.3/examples/_index.md @@ -7,26 +7,41 @@ aliases: "/examples/" {{< list-examples.inline >}} {{ range $entry := $.Site.Data.examples -}} -<div class="row g-lg-5 mb-5"> - <div class="bd-content col-lg-3"> - <h2 id="{{ $entry.category | urlize }}">{{ $entry.category }}</h2> - <p>{{ $entry.description }}</p> - {{ if eq $entry.category "RTL" -}} - <div class="bd-callout bd-callout-warning small"> - <p> - <strong>RTL is still experimental</strong> and will evolve with feedback. Spotted something or have an improvement to suggest? - </p> - <p><a href="{{ $.Site.Params.repo }}/issues/new/choose">Please open an issue.</a></p> - </div> - {{ end -}} - </div> - - <div class="col-lg-9"> - {{ 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 mb-3"> - <a class="d-block" href="/docs/{{ $.Site.Params.docs_version }}/examples/{{ $example.name | urlize }}/"{{ if in $example.name "RTL" }} hreflang="ar"{{ end }}> +<div class="bd-content"> + <h2 id="{{ $entry.category | urlize }}">{{ $entry.category }}</h2> + <p>{{ $entry.description }}</p> + {{ if eq $entry.category "RTL" -}} + <div class="bd-callout bd-callout-warning small"> + <p> + <strong>RTL is still experimental</strong> and will evolve with feedback. Spotted something or have an improvement to suggest? + </p> + <p><a href="{{ $.Site.Params.repo }}/issues/new/choose">Please open an issue.</a></p> + </div> + {{ end -}} + {{ range $i, $example := $entry.examples -}} + {{- $len := len $entry.examples -}} + {{ if (eq $i 0) }}<div class="row">{{ end }} + {{ if $entry.external }} + <div class="col-md-6 col-lg-4 mb-3 d-flex gap-3"> + <svg class="bi fs-5 flex-shrink-0"><use xlink:href="#box-seam"></use></svg> + <div> + <h3 class="h5 mb-1"> + <a class="d-block link-offset-1" href="{{ $.Site.Params.github_org }}{{ $example.url }}/" target="_blank"> + {{ $example.name }} + </a> + </h3> + <p class="text-muted">{{ $example.description }}</p> + <p> + <a class="icon-link small link-secondary link-offset-1" href="https://stackblitz.com/github/twbs{{ $example.url }}?file=index.html" target="_blank"> + <svg class="bi flex-shrink-0"><use xlink:href="#lightning-charge-fill"></use></svg> + Edit in StackBlitz + </a> + </p> + </div> + </div> + {{ else }} + <div class="col-sm-6 col-md-3 mb-3"> + <a class="d-block link-offset-1" href="/docs/{{ $.Site.Params.docs_version }}/examples/{{ $example.name | urlize }}/"{{ if in $example.name "RTL" }} hreflang="ar"{{ end }}> <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" @@ -39,9 +54,9 @@ aliases: "/examples/" </a> <p class="text-muted">{{ $example.description }}</p> </div> - {{ if (eq (add $i 1) $len) }}</div>{{ end }} - {{ end -}} - </div> + {{ end }} + {{ if (eq (add $i 1) $len) }}</div>{{ end }} + {{ end -}} </div> {{ end -}} {{< /list-examples.inline >}} |
