diff options
author | Julien Déramond <julien.deramond@orange.com> | 2022-06-28 08:31:47 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-28 08:31:47 +0300 |
commit | 9cf0e9b7355e337f76fccf9eafc2f3232f09f357 (patch) | |
tree | bcc4babd8267e1b1a05715f7ac98cee2c140a66c /site/layouts/partials/scripts.html | |
parent | 4f4b42dd14dd9a59df6536585142864eea4383b9 (diff) |
Fix StackBlitz examples needing docs CSS (#36637)
Diffstat (limited to 'site/layouts/partials/scripts.html')
-rw-r--r-- | site/layouts/partials/scripts.html | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/site/layouts/partials/scripts.html b/site/layouts/partials/scripts.html index 477ba76e58..3378a230e9 100644 --- a/site/layouts/partials/scripts.html +++ b/site/layouts/partials/scripts.html @@ -27,8 +27,8 @@ btn.addEventListener('click', event => { const htmlSnippet = event.target.closest('.bd-code-snippet').querySelector('.bd-example').innerHTML - // Get extra classes for this example except '.bd-example' - const classes = Array.from(event.target.closest('.bd-code-snippet').querySelector('.bd-example').classList).filter(x => x !== 'bd-example').join(' ') + // Get extra classes for this example + const classes = Array.from(event.target.closest('.bd-code-snippet').querySelector('.bd-example').classList).join(' ') const jsSnippet = event.target.closest('.bd-code-snippet').querySelector('.btn-edit').getAttribute('data-sb-js-snippet') StackBlitzSDK.openBootstrapSnippet(htmlSnippet, jsSnippet, classes) @@ -42,10 +42,11 @@ <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link href="{{ .Site.Params.cdn.css }}" rel="stylesheet"> + <link href="https://getbootstrap.com/docs/{{ .Site.Params.docs_version }}/assets/css/docs.css" rel="stylesheet"> <title>Bootstrap Example</title> <${'script'} src="{{ .Site.Params.cdn.js_bundle }}"></${'script'}> </head> - <body class="p-3 ${classes}"> + <body class="p-3 m-0 border-0 ${classes}"> <!-- Example Code --> ${htmlSnippet.replace(/^/gm, ' ')} |