diff --git a/.changeset/rare-pumpkins-pull.md b/.changeset/rare-pumpkins-pull.md new file mode 100644 index 000000000..9d6514ef5 --- /dev/null +++ b/.changeset/rare-pumpkins-pull.md @@ -0,0 +1,5 @@ +--- +"@tabler/core": minor +--- + +Unify dark mode with latest Bootstrap API and improve dark mode elements diff --git a/src/js/demo-theme.js b/src/js/demo-theme.js index e2479d8e6..bc258915e 100644 --- a/src/js/demo-theme.js +++ b/src/js/demo-theme.js @@ -21,5 +21,8 @@ if (!!params.theme) { selectedTheme = storedTheme ? storedTheme : defaultTheme } -document.body.classList.remove("theme-dark", "theme-light") -document.body.classList.add(`theme-${selectedTheme}`) +if (selectedTheme === 'dark') { + document.body.setAttribute("data-bs-theme", selectedTheme) +} else { + document.body.removeAttribute("data-bs-theme") +} \ No newline at end of file diff --git a/src/pages/_includes/layout/navbar-logo.html b/src/pages/_includes/layout/navbar-logo.html index 5d355e28f..84074cf41 100644 --- a/src/pages/_includes/layout/navbar-logo.html +++ b/src/pages/_includes/layout/navbar-logo.html @@ -11,9 +11,9 @@ {% endif %} {% unless include.hide-logo %} {% if include.small-logo %} - {{ site.title }} + {{ site.title }} {% else %} - {{ site.title }} + {{ site.title }} {% endif %} {% endunless %} diff --git a/src/pages/_includes/layout/navbar-search.html b/src/pages/_includes/layout/navbar-search.html index a3054a468..4db5c325f 100644 --- a/src/pages/_includes/layout/navbar-search.html +++ b/src/pages/_includes/layout/navbar-search.html @@ -2,6 +2,6 @@
- {% include ui/form/input-icon.html prepend=true dark=include.dark rounded=include.rounded aria-label="Search in website" %} + {% include ui/form/input-icon.html prepend=true rounded=include.rounded aria-label="Search in website" %}
diff --git a/src/pages/_includes/layout/navbar-side.html b/src/pages/_includes/layout/navbar-side.html index 53c8de0f6..2deff258e 100644 --- a/src/pages/_includes/layout/navbar-side.html +++ b/src/pages/_includes/layout/navbar-side.html @@ -5,17 +5,10 @@ {% unless include.condensed %} {% endunless %} diff --git a/src/pages/_includes/layout/navbar.html b/src/pages/_includes/layout/navbar.html index 7c380fc68..805708924 100644 --- a/src/pages/_includes/layout/navbar.html +++ b/src/pages/_includes/layout/navbar.html @@ -5,22 +5,22 @@
{% endif %} -