Spaces:
Running
Running
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Modern Landing Page</title> | |
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> | |
| <style> | |
| :root { | |
| --primary-color: #667eea; | |
| --secondary-color: #764ba2; | |
| --accent-color: #f093fb; | |
| --dark-color: #2d3748; | |
| --light-color: #f7fafc; | |
| --text-color: #4a5568; | |
| --white: #ffffff; | |
| --gradient: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%); | |
| --shadow: 0 10px 30px rgba(0, 0, 0, 0.1); | |
| --transition: all 0.3s ease; | |
| } | |
| * { | |
| margin: 0; | |
| padding: 0; | |
| box-sizing: border-box; | |
| } | |
| body { | |
| font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; | |
| line-height: 1.6; | |
| color: var(--text-color); | |
| overflow-x: hidden; | |
| } | |
| /* Header Styles */ | |
| header { | |
| position: fixed; | |
| top: 0; | |
| width: 100%; | |
| background: rgba(255, 255, 255, 0.95); | |
| backdrop-filter: blur(10px); | |
| box-shadow: var(--shadow); | |
| z-index: 1000; | |
| transition: var(--transition); | |
| } | |
| .container { | |
| max-width: 1200px; | |
| margin: 0 auto; | |
| padding: 0 20px; | |
| } | |
| .header-content { | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| padding: 1rem 0; | |
| } | |
| .logo { | |
| font-size: 1.5rem; | |
| font-weight: 700; | |
| color: var(--primary-color); | |
| text-decoration: none; | |
| } | |
| .nav-links { | |
| display: flex; | |
| list-style: none; | |
| } | |
| .nav-links li { | |
| margin-left: 2rem; | |
| } | |
| .nav-links a { | |
| text-decoration: none; | |
| color: var(--dark-color); | |
| font-weight: 500; | |
| transition: var(--transition); | |
| position: relative; | |
| } | |
| .nav-links a:hover { | |
| color: var(--primary-color); | |
| } | |
| .nav-links a::after { | |
| content: ''; | |
| position: absolute; | |
| bottom: -5px; | |
| left: 0; | |
| width: 0; | |
| height: 2px; | |
| background: var(--primary-color); | |
| transition: var(--transition); | |
| } | |
| .nav-links a:hover::after { | |
| width: 100%; | |
| } | |
| .mobile-menu { | |
| display: none; | |
| font-size: 1.5rem; | |
| cursor: pointer; | |
| } | |
| /* Hero Section */ | |
| .hero { | |
| height: 100vh; | |
| background: var(--gradient); | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| text-align: center; | |
| color: var(--white); | |
| padding: 0 20px; | |
| position: relative; | |
| overflow: hidden; | |
| } | |
| .hero::before { | |
| content: ''; | |
| position: absolute; | |
| top: 0; | |
| left: 0; | |
| width: 100%; | |
| height: 100%; | |
| background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.1)" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,138.7C960,139,1056,117,1152,117.3C1248,117,1344,139,1392,149.3L1440,160L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom; | |
| background-size: cover; | |
| } | |
| .hero-content { | |
| position: relative; | |
| z-index: 1; | |
| max-width: 800px; | |
| } | |
| .hero h1 { | |
| font-size: 4rem; | |
| margin-bottom: 1rem; | |
| animation: fadeInUp 1s ease; | |
| } | |
| .hero p { | |
| font-size: 1.5rem; | |
| margin-bottom: 2rem; | |
| animation: fadeInUp 1s ease 0.2s; | |
| opacity: 0.9; | |
| } | |
| .btn-group { | |
| display: flex; | |
| justify-content: center; | |
| gap: 1rem; | |
| animation: fadeInUp 1s ease 0.4s; | |
| } | |
| .btn { | |
| padding: 1rem 2rem; | |
| border-radius: 50px; | |
| text-decoration: none; | |
| font-weight: 600; | |
| transition: var(--transition); | |
| display: inline-flex; | |
| align-items: center; | |
| gap: 0.5rem; | |
| } | |
| .btn-primary { | |
| background: var(--white); | |
| color: var(--primary-color); | |
| } | |
| .btn-primary:hover { | |
| transform: translateY(-3px); | |
| box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2); | |
| } | |
| .btn-secondary { | |
| background: transparent; | |
| color: var(--white); | |
| border: 2px solid var(--white); | |
| } | |
| .btn-secondary:hover { | |
| background: var(--white); | |
| color: var(--primary-color); | |
| } | |
| /* Features Section */ | |
| .features { | |
| padding: 5rem 0; | |
| background: var(--light-color); | |
| } | |
| .section-title { | |
| text-align: center; | |
| margin-bottom: 4rem; | |
| } | |
| .section-title h2 { | |
| font-size: 2.5rem; | |
| color: var(--dark-color); | |
| margin-bottom: 1rem; | |
| } | |
| .section-title p { | |
| font-size: 1.1rem; | |
| color: var(--text-color); | |
| max-width: 600px; | |
| margin: 0 auto; | |
| } | |
| .features-grid { | |
| display: grid; | |
| grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); | |
| gap: 2rem; | |
| max-width: 1200px; | |
| margin: 0 auto; | |
| } | |
| .feature-card { | |
| background: var(--white); | |
| padding: 2rem; | |
| border-radius: 15px; | |
| box-shadow: var(--shadow); | |
| transition: var(--transition); | |
| text-align: center; | |
| } | |
| .feature-card:hover { | |
| transform: translateY(-10px); | |
| box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1); | |
| } | |
| .feature-icon { | |
| font-size: 3rem; | |
| color: var(--primary-color); | |
| margin-bottom: 1rem; | |
| } | |
| .feature-card h3 { | |
| font-size: 1.5rem; | |
| margin-bottom: 1rem; | |
| color: var(--dark-color); | |
| } | |
| .feature-card p { | |
| color: var(--text-color); | |
| } | |
| /* About Section */ | |
| .about { | |
| padding: 5rem 0; | |
| background: var(--white); | |
| } | |
| .about-content { | |
| display: grid; | |
| grid-template-columns: 1fr 1fr; | |
| gap: 4rem; | |
| align-items: center; | |
| max-width: 1200px; | |
| margin: 0 auto; | |
| } | |
| .about-text h2 { | |
| font-size: 2.5rem; | |
| color: var(--dark-color); | |
| margin-bottom: 1.5rem; | |
| } | |
| .about-text p { | |
| font-size: 1.1rem; | |
| line-height: 1.8; | |
| margin-bottom: 1.5rem; | |
| color: var(--text-color); | |
| } | |
| .about-image { | |
| position: relative; | |
| border-radius: 15px; | |
| overflow: hidden; | |
| box-shadow: var(--shadow); | |
| } | |
| .about-image img { | |
| width: 100%; | |
| height: auto; | |
| display: block; | |
| transition: var(--transition); | |
| } | |
| .about-image:hover img { | |
| transform: scale(1.05); | |
| } | |
| /* Testimonials Section */ | |
| .testimonials { | |
| padding: 5rem 0; | |
| background: var(--light-color); | |
| } | |
| .testimonials-grid { | |
| display: grid; | |
| grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); | |
| gap: 2rem; | |
| max-width: 1200px; | |
| margin: 0 auto; | |
| } | |
| .testimonial-card { | |
| background: var(--white); | |
| padding: 2rem; | |
| border-radius: 15px; | |
| box-shadow: var(--shadow); | |
| position: relative; | |
| } | |
| .testimonial-card::before { | |
| content: '"'; | |
| position: absolute; | |
| top: 1rem; | |
| left: 1rem; | |
| font-size: 4rem; | |
| color: var(--accent-color); | |
| opacity: 0.2; | |
| } | |
| .testimonial-card p { | |
| font-size: 1.1rem; | |
| line-height: 1.8; | |
| margin-bottom: 1.5rem; | |
| position: relative; | |
| z-index: 1; | |
| } | |
| .testimonial-author { | |
| display: flex; | |
| align-items: center; | |
| gap: 1rem; | |
| } | |
| .author-avatar { | |
| width: 50px; | |
| height: 50px; | |
| border-radius: 50%; | |
| overflow: hidden; | |
| } | |
| .author-info h4 { | |
| font-size: 1.1rem; | |
| color: var(--dark-color); | |
| } | |
| .author-info p { | |
| font-size: 0.9rem; | |
| color: var(--text-color); | |
| } | |
| /* CTA Section */ | |
| .cta { | |
| padding: 5rem 0; | |
| background: var(--gradient); | |
| text-align: center; | |
| color: var(--white); | |
| } | |
| .cta-content { | |
| max-width: 800px; | |
| margin: 0 auto; | |
| } | |
| .cta h2 { | |
| font-size: 2.5rem; | |
| margin-bottom: 1rem; | |
| } | |
| .cta p { | |
| font-size: 1.2rem; | |
| margin-bottom: 2rem; | |
| opacity: 0.9; | |
| } | |
| /* Footer */ | |
| footer { | |
| background: var(--dark-color); | |
| color: var(--light-color); | |
| padding: 3rem 0; | |
| } | |
| .footer-content { | |
| display: grid; | |
| grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); | |
| gap: 2rem; | |
| max-width: 1200px; | |
| margin: 0 auto; | |
| padding: 0 20px; | |
| } | |
| .footer-section h3 { | |
| font-size: 1.2rem; | |
| margin-bottom: 1rem; | |
| } | |
| .footer-section ul { | |
| list-style: none; | |
| } | |
| .footer-section ul li { | |
| margin-bottom: 0.5rem; | |
| } | |
| .footer-section ul li a { | |
| color: var(--light-color); | |
| text-decoration: none; | |
| opacity: 0.8; | |
| transition: var(--transition); | |
| } | |
| .footer-section ul li a:hover { | |
| opacity: 1; | |
| } | |
| .social-links { | |
| display: flex; | |
| gap: 1rem; | |
| margin-top: 1rem; | |
| } | |
| .social-links a { | |
| width: 40px; | |
| height: 40px; | |
| border-radius: 50%; | |
| background: rgba(255, 255, 255, 0.1); | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| color: var(--white); | |
| text-decoration: none; | |
| transition: var(--transition); | |
| } | |
| .social-links a:hover { | |
| background: var(--primary-color); | |
| transform: translateY(-3px); | |
| } | |
| .copyright { | |
| text-align: center; | |
| padding: 2rem 0; | |
| border-top: 1px solid rgba(255, 255, 255, 0.1); | |
| margin-top: 2rem; | |
| } | |
| /* Animations */ | |
| @keyframes fadeInUp { | |
| from { | |
| opacity: 0; | |
| transform: translateY(30px); | |
| } | |
| to { | |
| opacity: 1; | |
| transform: translateY(0); | |
| } | |
| } | |
| @keyframes float { | |
| 0% { | |
| transform: translateY(0); | |
| } | |
| 50% { | |
| transform: translateY(-20px); | |
| } | |
| 100% { | |
| transform: translateY(0); | |
| } | |
| } | |
| /* Responsive Design */ | |
| @media (max-width: 768px) { | |
| .nav-links { | |
| display: none; | |
| } | |
| .mobile-menu { | |
| display: block; | |
| } | |
| .hero h1 { | |
| font-size: 2.5rem; | |
| } | |
| .hero p { | |
| font-size: 1.2rem; | |
| } | |
| .about-content { | |
| grid-template-columns: 1fr; | |
| } | |
| .header-content { | |
| padding: 1rem; | |
| } | |
| .nav-links { | |
| position: absolute; | |
| top: 100%; | |
| left: 0; | |
| width: 100%; | |
| background: var(--white); | |
| flex-direction: column; | |
| padding: 2rem; | |
| box-shadow: var(--shadow); | |
| } | |
| .nav-links li { | |
| margin: 1rem 0; | |
| } | |
| .mobile-menu.active + .nav-links { | |
| display: flex; | |
| } | |
| } | |
| /* Scroll to top button */ | |
| .scroll-top { | |
| position: fixed; | |
| bottom: 2rem; | |
| right: 2rem; | |
| width: 50px; | |
| height: 50px; | |
| background: var(--primary-color); | |
| color: var(--white); | |
| border: none; | |
| border-radius: 50%; | |
| cursor: pointer; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| opacity: 0; | |
| transition: var(--transition); | |
| z-index: 999; | |
| } | |
| .scroll-top.show { | |
| opacity: 1; | |
| } | |
| .scroll-top:hover { | |
| background: var(--secondary-color); | |
| transform: translateY(-3px); | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <!-- Header --> | |
| <header> | |
| <div class="container"> | |
| <div class="header-content"> | |
| <a href="#" class="logo">Built with anycoder</a> | |
| <nav> | |
| <div class="mobile-menu"> | |
| <i class="fas fa-bars"></i> | |
| </div> | |
| <ul class="nav-links"> | |
| <li><a href="#home">Home</a></li> | |
| <li><a href="#features">Features</a></li> | |
| <li><a href="#about">About</a></li> | |
| <li><a href="#testimonials">Testimonials</a></li> | |
| <li><a href="#cta">Contact</a></li> | |
| </ul> | |
| </nav> | |
| </div> | |
| </div> | |
| </header> | |
| <!-- Hero Section --> | |
| <section class="hero" id="home"> | |
| <div class="hero-content"> | |
| <h1>Discover the Future of Innovation</h1> | |
| <p>Experience cutting-edge technology that transforms your digital journey with seamless integration and exceptional performance.</p> | |
| <div class="btn-group"> | |
| <a href="#cta" class="btn btn-primary"> | |
| <i class="fas fa-rocket"></i> | |
| Get Started | |
| </a> | |
| <a href="#features" class="btn btn-secondary"> | |
| <i class="fas fa-play"></i> | |
| Watch Demo | |
| </a> | |
| </div> | |
| </div> | |
| </section> | |
| <!-- Features Section --> | |
| <section class="features" id="features"> | |
| <div class="container"> | |
| <div class="section-title"> | |
| <h2>Powerful Features</h2> | |
| <p>Everything you need to build amazing digital experiences</p> | |
| </div> | |
| <div class="features-grid"> | |
| <div class="feature-card"> | |
| <div class="feature-icon"> | |
| <i class="fas fa-bolt"></i> | |
| </div> | |
| <h3>Lightning Fast</h3> | |
| <p>Experience blazing fast performance with optimized code and efficient algorithms that deliver results in milliseconds.</p> | |
| </div> | |
| <div class="feature-card"> | |
| <div class="feature-icon"> | |
| <i class="fas fa-shield-alt"></i> | |
| </div> | |
| <h3>Secure & Reliable</h3> | |
| <p>Built with security in mind, our platform ensures your data is protected with enterprise-grade encryption and protocols.</p> | |
| </div> | |
| <div class="feature-card"> | |
| <div class="feature-icon"> | |
| <i class="fas fa-palette"></i> | |
| </div> | |
| <h3>Beautiful Design</h3> | |
| <p>Crafted with modern UI/UX principles, our designs are not just beautiful but also intuitive and user-friendly.</p> | |
| </div> | |
| <div class="feature-card"> | |
| <div class="feature-icon"> | |
| <i class="fas fa-mobile-alt"></i> | |
| </div> | |
| <h3>Mobile First</h3> | |
| <p>Responsive design that looks perfect on any device, from smartphones to desktops, ensuring optimal user experience.</p> | |
| </div> | |
| <div class="feature-card"> | |
| <div class="feature-icon"> | |
| <i class="fas fa-cogs"></i> | |
| </div> | |
| <h3>Customizable</h3> | |
| <p> Tailor the platform to your needs with extensive customization options and flexible configurations.</p> | |
| </div> | |
| <div class="feature-card"> | |
| <div class="feature-icon"> | |
| <i class="fas fa-headset"></i> | |
| </div> | |
| <h3>24/7 Support</h3> | |
| <p>Our dedicated support team is always ready to help you with any questions or issues you might encounter.</p> | |
| </div> | |
| </div> | |
| </div> | |
| </section> | |
| <!-- About Section --> | |
| <section class="about" id="about"> | |
| <div class="container"> | |
| <div class="about-content"> | |
| <div class="about-text"> | |
| <h2>About Our Platform</h2> | |
| <p>We are a team of passionate developers and designers committed to creating innovative solutions that push the boundaries of what's possible. Our platform combines cutting-edge technology with user-centric design to deliver exceptional digital experiences.</p> | |
| <p>With years of experience in the industry, we understand the challenges businesses face and have developed a comprehensive solution that addresses those needs. Whether you're a startup or an enterprise, our platform scales with your requirements.</p> | |
| </div> | |
| <div class="about-image"> | |
| <img src="https://picsum.photos/seed/tech/600/400" alt="Technology"> | |
| </div> | |
| </div> | |
| </div> | |
| </section> | |
| <!-- Testimonials Section --> | |
| <section class="testimonials" id="testimonials"> | |
| <div class="container"> | |
| <div class="section-title"> | |
| <h2>What Our Users Say</h2> | |
| <p>Hear from satisfied customers who have transformed their businesses</p> | |
| </div> | |
| <div class="testimonials-grid"> | |
| <div class="testimonial-card"> | |
| <p>"This platform has completely revolutionized how we operate. The speed and reliability are unmatched in the industry."</p> | |
| <div class="testimonial-author"> | |
| <div class="author-avatar"> | |
| <img src="https://picsum.photos/seed/user1/50/50" alt="User"> | |
| </div> | |
| <div class="author-info"> | |
| <h4>Sarah Johnson</h4> | |
| <p>CEO, TechCorp</p> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="testimonial-card"> | |
| <p>"The level of customization and support we received was exceptional. This is definitely the best investment we've made this year."</p> | |
| <div class="testimonial-author"> | |
| <div class="author-avatar"> | |
| <img src="https://picsum.photos/seed/user2/50/50" alt="User"> | |
| </div> | |
| <div class="author-info"> | |
| <h4>Michael Chen</h4> | |
| <p>CTO, Innovate Labs</p> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="testimonial-card"> | |
| <p>"From implementation to daily use, everything has been smooth and intuitive. The team's dedication to excellence is evident."</p> | |
| <div class="testimonial-author"> | |
| <div class="author-avatar"> | |
| <img src="https://picsum.photos/seed/user3/50/50" alt="User"> | |
| </div> | |
| <div class="author-info"> | |
| <h4>Emily Rodriguez</h4> | |
| <p>Founder, Startup Hub</p> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </section> | |
| <!-- CTA Section --> | |
| <section class="cta" id="cta"> | |
| <div class="container"> | |
| <div class="cta-content"> | |
| <h2>Ready to Transform Your Business?</h2> | |
| <p>Join thousands of satisfied customers who have already made the switch. Start your free trial today and experience the difference.</p> | |
| <div class="btn-group"> | |
| <a href="#" class="btn btn-primary"> | |
| <i class="fas fa-download"></i> | |
| Start Free Trial | |
| </a> | |
| <a href="#" class="btn btn-secondary"> | |
| <i class="fas fa-calendar"></i> | |
| Schedule Demo | |
| </a> | |
| </div> | |
| </div> | |
| </div> | |
| </section> | |
| <!-- Footer --> | |
| <footer> | |
| <div class="container"> | |
| <div class="footer-content"> | |
| <div class="footer-section"> | |
| <h3>About Us</h3> | |
| <p>We create innovative digital solutions that empower businesses to reach their full potential.</p> | |
| </div> | |
| <div class="footer-section"> | |
| <h3>Quick Links</h3> | |
| <ul> | |
| <li><a href="#home">Home</a></li> | |
| <li><a href="#features">Features</a></li> | |
| <li><a href="#about">About</a></li> | |
| <li><a href="#testimonials">Testimonials</a></li> | |
| </ul> | |
| </div> | |
| <div class="footer-section"> | |
| <h3>Contact</h3> | |
| <ul> | |
| <li><a href="#">support@example.com</a></li> | |
| <li><a href="#">+1 (555) 123-4567</a></li> | |
| <li><a href="#">123 Business St</a></li> | |
| </ul> | |
| </div> | |
| <div class="footer-section"> | |
| <h3>Follow Us</h3> | |
| <div class="social-links"> | |
| <a href="#"><i class="fab fa-twitter"></i></a> | |
| <a href="#"><i class="fab fa-facebook"></i></a> | |
| <a href="#"><i class="fab fa-instagram"></i></a> | |
| <a href="#"><i class="fab fa-linkedin"></i></a> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="copyright"> | |
| <p>© 2023 Your Company. All rights reserved.</p> | |
| </div> | |
| </div> | |
| </footer> | |
| <!-- Scroll to Top Button --> | |
| <button class="scroll-top"> | |
| <i class="fas fa-arrow-up"></i> | |
| </button> | |
| <script> | |
| // Mobile menu toggle | |
| const mobileMenu = document.querySelector('.mobile-menu'); | |
| const navLinks = document.querySelector('.nav-links'); | |
| mobileMenu.addEventListener('click', () => { | |
| mobileMenu.classList.toggle('active'); | |
| navLinks.classList.toggle('active'); | |
| }); | |
| // Smooth scrolling for navigation links | |
| document.querySelectorAll('a[href^="#"]').forEach(anchor => { | |
| anchor.addEventListener('click', function (e) { | |
| e.preventDefault(); | |
| const target = document.querySelector(this.getAttribute('href')); | |
| if (target) { | |
| target.scrollIntoView({ | |
| behavior: 'smooth', | |
| block: 'start' | |
| }); | |
| // Close mobile menu if open | |
| mobileMenu.classList.remove('active'); | |
| navLinks.classList.remove('active'); | |
| } | |
| }); | |
| }); | |
| // Scroll to top button | |
| const scrollTopBtn = document.querySelector('.scroll-top'); | |
| window.addEventListener('scroll', () => { | |
| if (window.pageYOffset > 300) { | |
| scrollTopBtn.classList.add('show'); | |
| } else { | |
| scrollTopBtn.classList.remove('show'); | |
| } | |
| }); | |
| scrollTopBtn.addEventListener('click', () => { | |
| window.scrollTo({ | |
| top: 0, | |
| behavior: 'smooth' | |
| }); | |
| }); | |
| // Add animation on scroll | |
| const observerOptions = { | |
| threshold: 0.1, | |
| rootMargin: '0px 0px -50px 0px' | |
| }; | |
| const observer = new IntersectionObserver((entries) => { | |
| entries.forEach(entry => { | |
| if (entry.isIntersecting) { | |
| entry.target.style.animation = 'fadeInUp 0.6s ease forwards'; | |
| } | |
| }); | |
| }, observerOptions); | |
| // Observe all feature cards and testimonial cards | |
| document.querySelectorAll('.feature-card, .testimonial-card').forEach(el => { | |
| observer.observe(el); | |
| }); | |
| // Add hover effect to cards | |
| document.querySelectorAll('.feature-card, .testimonial-card').forEach(card => { | |
| card.addEventListener('mouseenter', () => { | |
| card.style.transform = 'translateY(-10px)'; | |
| }); | |
| card.addEventListener('mouseleave', () => { | |
| card.style.transform = 'translateY(0)'; | |
| }); | |
| }); | |
| // Animate numbers on scroll (if you had numbers to animate) | |
| // This is a placeholder for potential number animations | |
| function animateValue(id, start, end, duration) { | |
| const obj = document.getElementById(id); | |
| if (!obj) return; | |
| let startTimestamp = null; | |
| const step = (timestamp) => { | |
| if (!startTimestamp) startTimestamp = timestamp; | |
| const progress = Math.min((timestamp - startTimestamp) / duration, 1); | |
| obj.innerHTML = Math.floor(progress * (end - start) + start); | |
| if (progress < 1) { | |
| window.requestAnimationFrame(step); | |
| } | |
| }; | |
| window.requestAnimationFrame(step); | |
| } | |
| // Initialize animations when elements are in view | |
| const animateOnScroll = (entries, observer) => { | |
| entries.forEach(entry => { | |
| if (entry.isIntersecting) { | |
| // You can add number animations here | |
| observer.unobserve(entry.target); | |
| } | |
| }); | |
| }; | |
| const statsObserver = new IntersectionObserver(animateOnScroll, observerOptions); | |
| document.querySelectorAll('.feature-card').forEach(el => { | |
| statsObserver.observe(el); | |
| }); | |
| </script> | |
| </body> | |
| </html> |