document.addEventListener('DOMContentLoaded', function() { // Tab switching functionality for code preview const tabs = document.querySelectorAll('custom-code-preview .tab'); tabs.forEach(tab => { tab.addEventListener('click', function() { tabs.forEach(t => t.classList.remove('active')); this.classList.add('active'); }); }); // Sidebar navigation const logo = document.querySelector('custom-sidebar .logo'); if (logo) { logo.addEventListener('click', function() { window.location.href = '/'; }); } });