aboutsummaryrefslogtreecommitdiff
path: root/site/layouts/shortcodes/example.html
diff options
context:
space:
mode:
authorPuru Vijay <[email protected]>2022-03-09 21:02:58 +0530
committerGitHub <[email protected]>2022-03-09 17:32:58 +0200
commit645f95584551409660fcd9b990fc24caa0327df5 (patch)
tree7c2e06398708c563cecd43c5b9df2d01188093fc /site/layouts/shortcodes/example.html
parent7e5a8016ba557641ee93b38aed4482a1360b64af (diff)
downloadbootstrap-645f95584551409660fcd9b990fc24caa0327df5.tar.xz
bootstrap-645f95584551409660fcd9b990fc24caa0327df5.zip
docs: add a StackBlitz "Try It" button in code examples (#35644)
Co-authored-by: GeoSot <[email protected]> Co-authored-by: XhmikosR <[email protected]>
Diffstat (limited to 'site/layouts/shortcodes/example.html')
-rw-r--r--site/layouts/shortcodes/example.html3
1 files changed, 3 insertions, 0 deletions
diff --git a/site/layouts/shortcodes/example.html b/site/layouts/shortcodes/example.html
index 0592adc6b..a808c2589 100644
--- a/site/layouts/shortcodes/example.html
+++ b/site/layouts/shortcodes/example.html
@@ -22,6 +22,9 @@
{{- end -}}
{{- if eq $show_markup true -}}
+ <div class="bd-edit">
+ <button type="button" class="btn-edit text-nowrap" title="Try it on StackBlitz">Try it</button>
+ </div>
{{- $content := replaceRE `<svg class="bd-placeholder-img(?:-lg)?(?: *?bd-placeholder-img-lg)? ?(.*?)".*?<\/svg>\n` `<img src="..." class="$1" alt="...">` $input -}}
{{- $content = replaceRE ` (class=" *?")` "" $content -}}
{{- highlight (trim $content "\n") $lang "" -}}