From 930867b09a75a7164f322f3e9d1d04683f173837 Mon Sep 17 00:00:00 2001 From: "louismaxime.piton" Date: Mon, 23 Oct 2023 17:06:39 +0200 Subject: [PATCH] Enhance the javascript --- site/assets/js/code-examples.js | 2 ++ site/assets/scss/_clipboard-js.scss | 3 ++- site/layouts/shortcodes/example.html | 9 ++----- site/static/docs/5.3/assets/js/color-modes.js | 24 ++++++++++--------- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/site/assets/js/code-examples.js b/site/assets/js/code-examples.js index 3b03b17c49ca..c1261899fda8 100644 --- a/site/assets/js/code-examples.js +++ b/site/assets/js/code-examples.js @@ -17,6 +17,7 @@ // Insert copy to clipboard button before .highlight const btnTitle = 'Copy to clipboard' const btnEdit = 'Edit on StackBlitz' + // const btnTheme = 'Toggle local theme' const btnHtml = [ '
', @@ -51,6 +52,7 @@ snippetButtonTooltip('.btn-clipboard', btnTitle) snippetButtonTooltip('.btn-edit', btnEdit) + // snippetButtonTooltip('.btn-theme', btnTheme) const clipboard = new ClipboardJS('.btn-clipboard', { target: trigger => trigger.closest('.bd-code-snippet').querySelector('.highlight'), diff --git a/site/assets/scss/_clipboard-js.scss b/site/assets/scss/_clipboard-js.scss index de709d09ba7f..f0ab74947100 100644 --- a/site/assets/scss/_clipboard-js.scss +++ b/site/assets/scss/_clipboard-js.scss @@ -18,7 +18,8 @@ } .btn-clipboard, -.btn-edit { +.btn-edit, +.btn-theme > .dropdown-toggle { display: block; padding: .5em; line-height: 1; diff --git a/site/layouts/shortcodes/example.html b/site/layouts/shortcodes/example.html index 96fbcfd117eb..ffb3400b56a8 100644 --- a/site/layouts/shortcodes/example.html +++ b/site/layouts/shortcodes/example.html @@ -31,13 +31,8 @@
{{- $lang -}}
-
-