diff --git a/js/theme.js b/js/theme.js index a9534f5..bf2688c 100644 --- a/js/theme.js +++ b/js/theme.js @@ -11,6 +11,10 @@ export const theme = (() => { theme.set('active', THEME_LIGHT); document.documentElement.setAttribute('data-bs-theme', THEME_LIGHT); + // --bs-gray-100 + document.querySelector('meta[name="theme-color"]').setAttribute('content', '#f8f9fa'); + document.querySelector('meta[name="color-scheme"]').setAttribute('content', THEME_LIGHT); + const elements = document.querySelectorAll('.text-light, .btn-theme-light, .bg-dark, .bg-black, .bg-theme-dark, .color-theme-black, .btn-outline-light, .bg-cover-black'); elements.forEach((element) => { if (element.classList.contains('text-light')) { @@ -59,6 +63,10 @@ export const theme = (() => { theme.set('active', THEME_DARK); document.documentElement.setAttribute('data-bs-theme', THEME_DARK); + // --bs-gray-800 + document.querySelector('meta[name="theme-color"]').setAttribute('content', '#343a40'); + document.querySelector('meta[name="color-scheme"]').setAttribute('content', THEME_DARK); + const elements = document.querySelectorAll('.text-dark, .btn-theme-dark, .bg-light, .bg-white, .bg-theme-light, .color-theme-white, .btn-outline-dark, .bg-cover-white'); elements.forEach((element) => { if (element.classList.contains('text-dark')) {