document.addEventListener('DOMContentLoaded', () => { // Set active menu item based on current page const currentPage = window.location.pathname.split('/').pop() || 'index.html'; const menuItems = document.querySelectorAll('custom-sidebar a.menu-item'); menuItems.forEach(item => { const href = item.getAttribute('href'); if (currentPage === href) { item.classList.add('active'); } else { item.classList.remove('active'); } }); // Initialize tooltips const tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]')); tooltipTriggerList.map(function (tooltipTriggerEl) { return new bootstrap.Tooltip(tooltipTriggerEl); }); });