Spaces:
Running
Running
| // Initialize feather icons | |
| document.addEventListener('DOMContentLoaded', function() { | |
| feather.replace(); | |
| }); | |
| // Simple animation for feature cards on scroll | |
| const observerOptions = { | |
| root: null, | |
| rootMargin: '0px', | |
| threshold: 0.1 | |
| }; | |
| const observer = new IntersectionObserver((entries) => { | |
| entries.forEach(entry => { | |
| if (entry.isIntersecting) { | |
| entry.target.style.opacity = 1; | |
| entry.target.style.transform = 'translateY(0)'; | |
| } | |
| }); | |
| }, observerOptions); | |
| // Apply animation to feature cards | |
| document.querySelectorAll('.bg-gray-800').forEach(card => { | |
| card.style.opacity = 0; | |
| card.style.transform = 'translateY(20px)'; | |
| card.style.transition = 'opacity 0.5s ease, transform 0.5s ease'; | |
| observer.observe(card); | |
| }); | |
| // Simulate unlock process | |
| document.querySelectorAll('button').forEach(button => { | |
| button.addEventListener('click', function() { | |
| const originalText = this.textContent; | |
| this.innerHTML = '<i data-feather="loader" class="animate-spin"></i> Processing...'; | |
| feather.replace(); | |
| setTimeout(() => { | |
| this.innerHTML = '<i data-feather="check-circle"></i> Success!'; | |
| feather.replace(); | |
| setTimeout(() => { | |
| this.textContent = originalText; | |
| }, 2000); | |
| }, 3000); | |
| }); | |
| }); |