aboutsummaryrefslogtreecommitdiff
path: root/site/layouts/_default/examples.html
diff options
context:
space:
mode:
authorJulien Déramond <[email protected]>2022-12-29 07:58:35 +0100
committerGitHub <[email protected]>2022-12-28 22:58:35 -0800
commit8befabbde90e8ee19f8bf9196840e25c07130710 (patch)
treecc61fe7c9285769c7f4c81aed11197102aefd642 /site/layouts/_default/examples.html
parentbaf5d4c4c110c9ab86ea32381714fdba995c75d1 (diff)
downloadbootstrap-8befabbde90e8ee19f8bf9196840e25c07130710.tar.xz
bootstrap-8befabbde90e8ee19f8bf9196840e25c07130710.zip
Docs: display examples based on the docs current color mode (#37562)
* Docs: display examples based on the docs current color mode * Fix _default/examples.html
Diffstat (limited to 'site/layouts/_default/examples.html')
-rw-r--r--site/layouts/_default/examples.html5
1 files changed, 4 insertions, 1 deletions
diff --git a/site/layouts/_default/examples.html b/site/layouts/_default/examples.html
index f70f859a6..2700bcc0c 100644
--- a/site/layouts/_default/examples.html
+++ b/site/layouts/_default/examples.html
@@ -1,6 +1,9 @@
<!doctype html>
-<html {{ if eq .Page.Params.direction "rtl" }}lang="ar" dir="rtl"{{ else }}lang="en"{{ end }}{{ with .Page.Params.html_class }} class="{{ . }}"{{ end }}>
+<html {{ if eq .Page.Params.direction "rtl" }}lang="ar" dir="rtl"{{ else }}lang="en"{{ end }}{{ with .Page.Params.html_class }} class="{{ . }}"{{ end }} data-bs-theme="auto">
<head>
+ {{- $colorModeJS := printf "/docs/%s/assets/js/color-modes.js" $.Site.Params.docs_version -}}
+ <script src="{{ $colorModeJS | relURL }}"></script>
+
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">