/** * Elementor Portfolio Standalone Script * Safe Entrance Animations + Interactive Filters & Tabs */ document.addEventListener('DOMContentLoaded', () => { // If editing inside Elementor Editor, skip entrance hiding if (document.body.classList.contains('elementor-editor-active')) { document.querySelectorAll('.ep-anim-trigger').forEach(el => { el.style.opacity = '1'; el.style.transform = 'none'; }); } else { initSectionAnimations(); } initElementorSkills(); initElementorFilters(); }); // Safe Section Entrance Animation function initSectionAnimations() { const triggers = document.querySelectorAll('.ep-anim-trigger'); if ('IntersectionObserver' in window) { const observer = new IntersectionObserver((entries) => { entries.forEach(entry => { if (entry.isIntersecting) { const el = entry.target; el.style.opacity = '1'; el.style.transform = 'none'; observer.unobserve(el); } }); }, { threshold: 0.1 }); triggers.forEach(el => observer.observe(el)); } else { triggers.forEach(el => { el.style.opacity = '1'; el.style.transform = 'none'; }); } } // Skill Progress Bar Trigger function initElementorSkills() { const skillBars = document.querySelectorAll('.ep-skill-progress'); skillBars.forEach(bar => { bar.style.width = '100%'; }); } // Portfolio Category Filter Tabs function initElementorFilters() { const filterBtns = document.querySelectorAll('.ep-filter-btn'); const projectCards = document.querySelectorAll('.ep-project-card'); filterBtns.forEach(btn => { btn.addEventListener('click', () => { filterBtns.forEach(b => b.classList.remove('active')); btn.classList.add('active'); const filter = btn.getAttribute('data-filter'); projectCards.forEach(card => { const category = card.getAttribute('data-category'); if (filter === 'all' || category === filter) { card.style.display = 'block'; } else { card.style.display = 'none'; } }); }); }); }
Something big is brewing! Our store is in the works and will be launching soon!