diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-08-06 07:58:36 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-08-06 07:58:36 +0000 |
commit | 548342184e2173d6f39aba2462196ff8b397db8f (patch) | |
tree | 995bd2844c5f4e453bdd21d27ff0417af1c910c5 /site/assets/js/code-examples.js | |
parent | Adding upstream version 5.3.0+dfsg. (diff) | |
download | bootstrap-html-548342184e2173d6f39aba2462196ff8b397db8f.tar.xz bootstrap-html-548342184e2173d6f39aba2462196ff8b397db8f.zip |
Adding upstream version 5.3.1+dfsg.upstream/5.3.1+dfsg
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | site/assets/js/code-examples.js | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/site/assets/js/code-examples.js b/site/assets/js/code-examples.js index e1f680e..3b03b17 100644 --- a/site/assets/js/code-examples.js +++ b/site/assets/js/code-examples.js @@ -20,18 +20,19 @@ const btnHtml = [ '<div class="bd-code-snippet">', - ' <div class="bd-clipboard">', - ' <button type="button" class="btn-clipboard">', - ' <svg class="bi" role="img" aria-label="Copy"><use xlink:href="#clipboard"/></svg>', - ' </button>', - ' </div>', + ' <div class="bd-clipboard">', + ' <button type="button" class="btn-clipboard">', + ' <svg class="bi" role="img" aria-label="Copy"><use xlink:href="#clipboard"/></svg>', + ' </button>', + ' </div>', '</div>' ].join('') // Wrap programmatically code blocks and add copy btn. document.querySelectorAll('.highlight') .forEach(element => { - if (!element.closest('.bd-example-snippet')) { // Ignore examples made be shortcode + // Ignore examples made by shortcode + if (!element.closest('.bd-example-snippet')) { element.insertAdjacentHTML('beforebegin', btnHtml) element.previousElementSibling.append(element) } |