From d1636a7540ae935ddd27462333c2bdf5a6eadef0 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Wed, 20 Mar 2024 19:05:43 +0200 Subject: [PATCH] Move theme toggler to a partial (#39807) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --------- Co-authored-by: Julien Déramond --- site/layouts/_default/examples.html | 40 +++++------------------- site/layouts/partials/docs-navbar.html | 34 +------------------- site/layouts/partials/theme-toggler.html | 34 ++++++++++++++++++++ 3 files changed, 42 insertions(+), 66 deletions(-) create mode 100644 site/layouts/partials/theme-toggler.html diff --git a/site/layouts/_default/examples.html b/site/layouts/_default/examples.html index d381a56df869..1c31c5aea91a 100644 --- a/site/layouts/_default/examples.html +++ b/site/layouts/_default/examples.html @@ -94,12 +94,17 @@ z-index: 1500; } + .bd-mode-toggle .bi { + width: 1em; + height: 1em; + } + .bd-mode-toggle .dropdown-menu .active .bi { display: block !important; } - {{ range .Page.Params.extra_css }} + {{ range .Page.Params.extra_css -}} {{ "" | safeHTML }} {{- end }} @@ -108,38 +113,7 @@ {{ partial "examples/icons" . }} {{ .Content }} diff --git a/site/layouts/partials/docs-navbar.html b/site/layouts/partials/docs-navbar.html index 10f3fba4c92a..3576ef4a48d0 100644 --- a/site/layouts/partials/docs-navbar.html +++ b/site/layouts/partials/docs-navbar.html @@ -83,39 +83,7 @@
Bootstrap
diff --git a/site/layouts/partials/theme-toggler.html b/site/layouts/partials/theme-toggler.html new file mode 100644 index 000000000000..05de756fd763 --- /dev/null +++ b/site/layouts/partials/theme-toggler.html @@ -0,0 +1,34 @@ +{{- $isExamples := eq .Layout "examples" -}} + +