diff --git a/site/layouts/_default/examples.html b/site/layouts/_default/examples.html
index d381a56df8..1c31c5aea9 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" . }}
-
-
- -
-
-
- -
-
-
- -
-
-
-
+ {{ partial "theme-toggler" . }}
{{ .Content }}
diff --git a/site/layouts/partials/docs-navbar.html b/site/layouts/partials/docs-navbar.html
index 10f3fba4c9..3576ef4a48 100644
--- a/site/layouts/partials/docs-navbar.html
+++ b/site/layouts/partials/docs-navbar.html
@@ -83,39 +83,7 @@
-
-
+ {{ partial "theme-toggler" . }}
diff --git a/site/layouts/partials/theme-toggler.html b/site/layouts/partials/theme-toggler.html
new file mode 100644
index 0000000000..05de756fd7
--- /dev/null
+++ b/site/layouts/partials/theme-toggler.html
@@ -0,0 +1,34 @@
+{{- $isExamples := eq .Layout "examples" -}}
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+