feat: Add own the dot copyright
All checks were successful
Build Docker / Build Image (push) Successful in 3m2s
All checks were successful
Build Docker / Build Image (push) Successful in 3m2s
This commit is contained in:
@@ -64,8 +64,32 @@
|
||||
element.setAttribute('aria-pressed', 'false');
|
||||
});
|
||||
|
||||
const iconTheme = theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme;
|
||||
|
||||
for (const themeSwitcher of themeSwitchers) {
|
||||
|
||||
const adaptIcon = !!themeSwitcher.dataset.bsAdaptIcon;
|
||||
|
||||
if (adaptIcon) {
|
||||
const btnIcon = themeSwitcher.querySelector('[data-bss-adaptable]');
|
||||
|
||||
try {
|
||||
const themeIcons = JSON.parse(themeSwitcher.dataset.bssIcons || "{}");
|
||||
const newIconMarkup = themeIcons[iconTheme];
|
||||
|
||||
const template = document.createElement("template");
|
||||
template.innerHTML = newIconMarkup;
|
||||
|
||||
const newIconFragment = template.content.cloneNode(true);
|
||||
|
||||
if (newIconFragment?.children?.length) {
|
||||
newIconFragment.children[0].dataset.bssAdaptable = true;
|
||||
}
|
||||
|
||||
btnIcon.replaceWith(newIconFragment);
|
||||
} catch (e) {}
|
||||
}
|
||||
|
||||
const btnToActivate = themeSwitcher.querySelector('[data-bs-theme-value="' + theme + '"]');
|
||||
|
||||
if (btnToActivate) {
|
||||
|
||||
Reference in New Issue
Block a user