diff options
| author | Julien Déramond <[email protected]> | 2022-06-20 16:19:47 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-06-20 07:19:47 -0700 |
| commit | cfabeb71fa41a7e4438a8f769cad5286f749d9a3 (patch) | |
| tree | 8f2a7061de5fdd9a715029e50c9293df2c78757b /site/layouts/shortcodes/example.html | |
| parent | 22503d6b21a3530d2f312c0a8c0ce1c2956fc146 (diff) | |
| download | bootstrap-cfabeb71fa41a7e4438a8f769cad5286f749d9a3.tar.xz bootstrap-cfabeb71fa41a7e4438a8f769cad5286f749d9a3.zip | |
Fix StackBlitz Popovers and Tooltips examples (#36449)
* Fix StackBlitz Popovers and Tooltips examples
* Rename shortcode example parameters
* Reorder example shortcode doc params + fix Cspell
* Remove 'stackblitz' param + use data-bs-title instead of title
* Update site/layouts/partials/callout-warning-data-bs-title-vs-title.md
Co-authored-by: Mark Otto <[email protected]>
Co-authored-by: Mark Otto <[email protected]>
Diffstat (limited to 'site/layouts/shortcodes/example.html')
| -rw-r--r-- | site/layouts/shortcodes/example.html | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/site/layouts/shortcodes/example.html b/site/layouts/shortcodes/example.html index a1685a0a6..3cbbd9fca 100644 --- a/site/layouts/shortcodes/example.html +++ b/site/layouts/shortcodes/example.html @@ -4,17 +4,18 @@ `args` are all optional and can be one of the following: * id: the `div`'s id - default: "" * class: any extra class(es) to be added to the `div` - default: "" - * js_snippet: add extra JS snippet to StackBlitz - default: `false` - * show_preview: if the preview should be output in the HTML - default: `true` + * lang: language used to display the code - default: "html" * show_markup: if the markup should be output in the HTML - default: `true` + * show_preview: if the preview should be output in the HTML - default: `true` + * stackblitz_add_js: if extra JS snippet shoud le added to StackBlitz - default: `false` */ -}} {{- $id := .Get "id" -}} {{- $class := .Get "class" -}} {{- $lang := .Get "lang" | default "html" -}} -{{- $show_preview := .Get "show_preview" | default true -}} +{{- $stackblitz_add_js := .Get "stackblitz_add_js" | default false -}} {{- $show_markup := .Get "show_markup" | default true -}} -{{- $js_snippet := .Get "js_snippet" | default false -}} +{{- $show_preview := .Get "show_preview" | default true -}} {{- $input := .Inner -}} <div class="bd-example-snippet bd-code-snippet"> @@ -29,7 +30,7 @@ <div class="d-flex align-items-center highlight-toolbar bg-light ps-3 pe-2 py-1"> <small class="font-monospace text-muted text-uppercase">{{- $lang -}}</small> <div class="d-flex ms-auto"> - <button type="button" class="btn-edit text-nowrap"{{ with $js_snippet }} data-js-snippet="{{ $js_snippet }}"{{ end }} title="Try it on StackBlitz"> + <button type="button" class="btn-edit text-nowrap"{{ with $stackblitz_add_js }} data-sb-js-snippet="{{ $stackblitz_add_js }}"{{ end }} title="Try it on StackBlitz"> <svg class="bi" role="img" aria-label="Try it"><use xlink:href="#lightning-charge-fill"/></svg> </button> <button type="button" class="btn-clipboard mt-0 me-0" title="Copy to clipboard"> |
