diff --git a/docs/assets/js/color-modes.js b/docs/assets/js/color-modes.js index 738d3641f0..2f2770b6ea 100644 --- a/docs/assets/js/color-modes.js +++ b/docs/assets/js/color-modes.js @@ -35,9 +35,9 @@ } const themeSwitcherText = document.querySelector('#bd-theme-text') - const activeThemeIcon = document.querySelector('.theme-icon-active use') - const btnToActive = document.querySelector(`[data-bs-theme-value="${theme}"]`) - const svgOfActiveBtn = btnToActive.querySelector('svg use').getAttribute('href') + const activeThemeIcon = document.querySelector('.theme-icon-active') + const btnToActive = document.querySelector(`[data-bs-theme-value="${theme}"] i`) + const initialIconOfActiveBtn = [...btnToActive.classList].find(cl => cl.startsWith('bi-')) document.querySelectorAll('[data-bs-theme-value]').forEach(element => { element.classList.remove('active') @@ -46,8 +46,9 @@ btnToActive.classList.add('active') btnToActive.setAttribute('aria-pressed', 'true') - activeThemeIcon.setAttribute('href', svgOfActiveBtn) - const themeSwitcherLabel = `${themeSwitcherText.textContent} (${btnToActive.dataset.bsThemeValue})` + const currentIconOfActiveBtn = [...activeThemeIcon.classList].find(cl => cl.startsWith('bi-')) + activeThemeIcon.classList.replace(currentIconOfActiveBtn, initialIconOfActiveBtn) + const themeSwitcherLabel = `${themeSwitcherText.textContent} (${btnToActive.parentElement.dataset.bsThemeValue})` themeSwitcher.setAttribute('aria-label', themeSwitcherLabel) if (focus) { diff --git a/docs/layouts/partials/icons/github.svg b/docs/layouts/partials/icons/github.svg deleted file mode 100644 index 6f06f7722b..0000000000 --- a/docs/layouts/partials/icons/github.svg +++ /dev/null @@ -1 +0,0 @@ -{{ with .title }}{{ . }}{{ else }}GitHub{{ end }} \ No newline at end of file diff --git a/docs/layouts/partials/icons/opencollective.svg b/docs/layouts/partials/icons/opencollective.svg deleted file mode 100644 index 2896ba50ce..0000000000 --- a/docs/layouts/partials/icons/opencollective.svg +++ /dev/null @@ -1 +0,0 @@ -{{ with .title }}{{ . }}{{ else }}Open Collective{{ end }} \ No newline at end of file diff --git a/docs/layouts/partials/icons/twitter.svg b/docs/layouts/partials/icons/twitter.svg deleted file mode 100644 index 7a7fcee28b..0000000000 --- a/docs/layouts/partials/icons/twitter.svg +++ /dev/null @@ -1 +0,0 @@ -{{ with .title }}{{ . }}{{ else }}Twitter{{ end }} \ No newline at end of file diff --git a/docs/layouts/partials/navbar.html b/docs/layouts/partials/navbar.html index fbfd2d3c95..18dffc21bc 100644 --- a/docs/layouts/partials/navbar.html +++ b/docs/layouts/partials/navbar.html @@ -41,19 +41,19 @@
Bootstrap
@@ -64,20 +64,6 @@
Bootstrap