Spaces:
Running
Running
| class CustomFooter extends HTMLElement { | |
| connectedCallback() { | |
| this.attachShadow({ mode: 'open' }); | |
| this.shadowRoot.innerHTML = ` | |
| <style> | |
| :host { | |
| display: block; | |
| width: 100%; | |
| font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; | |
| } | |
| .footer { | |
| background: linear-gradient(135deg, #1F2937 0%, #111827 100%); | |
| color: white; | |
| padding: 3rem 1rem; | |
| margin-top: auto; | |
| } | |
| .footer-container { | |
| max-width: 1280px; | |
| margin: 0 auto; | |
| } | |
| .footer-content { | |
| display: grid; | |
| grid-template-columns: repeat(1, 1fr); | |
| gap: 3rem; | |
| } | |
| @media (min-width: 768px) { | |
| .footer-content { | |
| grid-template-columns: repeat(2, 1fr); | |
| } | |
| } | |
| @media (min-width: 1024px) { | |
| .footer-content { | |
| grid-template-columns: repeat(4, 1fr); | |
| } | |
| } | |
| .footer-section { | |
| display: flex; | |
| flex-direction: column; | |
| gap: 1rem; | |
| } | |
| .footer-logo { | |
| display: flex; | |
| align-items: center; | |
| gap: 10px; | |
| text-decoration: none; | |
| margin-bottom: 1rem; | |
| } | |
| .logo-icon { | |
| background: linear-gradient(135deg, #8B5CF6 0%, #F59E0B 100%); | |
| width: 36px; | |
| height: 36px; | |
| border-radius: 10px; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| color: white; | |
| font-weight: bold; | |
| font-size: 18px; | |
| } | |
| .logo-text { | |
| font-size: 1.5rem; | |
| font-weight: 700; | |
| background: linear-gradient(135deg, #8B5CF6 0%, #F59E0B 100%); | |
| -webkit-background-clip: text; | |
| -webkit-text-fill-color: transparent; | |
| background-clip: text; | |
| font-family: 'Poppins', sans-serif; | |
| } | |
| .footer-description { | |
| color: #9CA3AF; | |
| line-height: 1.6; | |
| font-size: 0.95rem; | |
| } | |
| .section-title { | |
| font-size: 1.125rem; | |
| font-weight: 600; | |
| margin-bottom: 0.5rem; | |
| color: white; | |
| font-family: 'Poppins', sans-serif; | |
| } | |
| .footer-links { | |
| display: flex; | |
| flex-direction: column; | |
| gap: 0.75rem; | |
| } | |
| .footer-link { | |
| color: #9CA3AF; | |
| text-decoration: none; | |
| font-size: 0.95rem; | |
| transition: color 0.3s ease; | |
| display: flex; | |
| align-items: center; | |
| gap: 0.5rem; | |
| } | |
| .footer-link:hover { | |
| color: #8B5CF6; | |
| } | |
| .social-links { | |
| display: flex; | |
| gap: 1rem; | |
| margin-top: 1rem; | |
| } | |
| .social-link { | |
| width: 40px; | |
| height: 40px; | |
| border-radius: 50%; | |
| background: rgba(255, 255, 255, 0.1); | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| color: white; | |
| text-decoration: none; | |
| transition: all 0.3s ease; | |
| } | |
| .social-link:hover { | |
| background: #8B5CF6; | |
| transform: translateY(-3px); | |
| } | |
| .newsletter-form { | |
| display: flex; | |
| flex-direction: column; | |
| gap: 1rem; | |
| margin-top: 1rem; | |
| } | |
| .newsletter-input { | |
| padding: 0.75rem 1rem; | |
| border-radius: 0.5rem; | |
| border: 1px solid #4B5563; | |
| background: rgba(255, 255, 255, 0.05); | |
| color: white; | |
| font-size: 0.95rem; | |
| outline: none; | |
| transition: border-color 0.3s ease; | |
| } | |
| .newsletter-input:focus { | |
| border-color: #8B5CF6; | |
| } | |
| .newsletter-input::placeholder { | |
| color: #9CA3AF; | |
| } | |
| .newsletter-button { | |
| padding: 0.75rem 1.5rem; | |
| border-radius: 0.5rem; | |
| background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%); | |
| color: white; | |
| border: none; | |
| font-weight: 500; | |
| cursor: pointer; | |
| transition: all 0.3s ease; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| gap: 0.5rem; | |
| } | |
| .newsletter-button:hover { | |
| transform: translateY(-2px); | |
| box-shadow: 0 8px 20px rgba(139, 92, 246, 0.3); | |
| } | |
| .footer-bottom { | |
| margin-top: 3rem; | |
| padding-top: 2rem; | |
| border-top: 1px solid #374151; | |
| display: flex; | |
| flex-direction: column; | |
| align-items: center; | |
| gap: 1rem; | |
| text-align: center; | |
| } | |
| @media (min-width: 768px) { | |
| .footer-bottom { | |
| flex-direction: row; | |
| justify-content: space-between; | |
| text-align: left; | |
| } | |
| } | |
| .copyright { | |
| color: #9CA3AF; | |
| font-size: 0.9rem; | |
| } | |
| .legal-links { | |
| display: flex; | |
| gap: 1.5rem; | |
| flex-wrap: wrap; | |
| justify-content: center; | |
| } | |
| .legal-link { | |
| color: #9CA3AF; | |
| text-decoration: none; | |
| font-size: 0.9rem; | |
| transition: color 0.3s ease; | |
| } | |
| .legal-link:hover { | |
| color: #8B5CF6; | |
| } | |
| .back-to-top { | |
| position: fixed; | |
| bottom: 2rem; | |
| right: 2rem; | |
| width: 50px; | |
| height: 50px; | |
| border-radius: 50%; | |
| background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%); | |
| color: white; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| text-decoration: none; | |
| box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4); | |
| transition: all 0.3s ease; | |
| z-index: 999; | |
| opacity: 0; | |
| transform: translateY(20px); | |
| pointer-events: none; | |
| } | |
| .back-to-top.visible { | |
| opacity: 1; | |
| transform: translateY(0); | |
| pointer-events: auto; | |
| } | |
| .back-to-top:hover { | |
| transform: translateY(-3px); | |
| box-shadow: 0 8px 25px rgba(139, 92, 246, 0.5); | |
| } | |
| @media (max-width: 768px) { | |
| .back-to-top { | |
| bottom: 1rem; | |
| right: 1rem; | |
| width: 45px; | |
| height: 45px; | |
| } | |
| } | |
| </style> | |
| <footer class="footer"> | |
| <div class="footer-container"> | |
| <div class="footer-content"> | |
| <!-- Company Info --> | |
| <div class="footer-section"> | |
| <a href="index.html" class="footer-logo"> | |
| <div class="logo-icon">FS</div> | |
| <div class="logo-text">FaceSwap Magic</div> | |
| </a> | |
| <p class="footer-description"> | |
| Transformez les visages avec la magie de l'IA. Créez des mèmes hilarants, des transformations de personnages et des montages créatifs avec notre technologie avancée d'échange de visage. | |
| </p> | |
| <div class="social-links"> | |
| <a href="https://twitter.com" class="social-link" target="_blank" rel="noopener noreferrer"> | |
| <i data-feather="twitter"></i> | |
| </a> | |
| <a href="https://instagram.com" class="social-link" target="_blank" rel="noopener noreferrer"> | |
| <i data-feather="instagram"></i> | |
| </a> | |
| <a href="https://github.com" class="social-link" target="_blank" rel="noopener noreferrer"> | |
| <i data-feather="github"></i> | |
| </a> | |
| <a href="https://discord.com" class="social-link" target="_blank" rel="noopener noreferrer"> | |
| <i data-feather="message-circle"></i> | |
| </a> | |
| </div> | |
| </div> | |
| <!-- Quick Links --> | |
| <div class="footer-section"> | |
| <h3 class="section-title">Liens Rapides</h3> | |
| <div class="footer-links"> | |
| <a href="index.html" class="footer-link"> | |
| <i data-feather="home"></i> | |
| Accueil | |
| </a> | |
| <a href="#features" class="footer-link"> | |
| <i data-feather="zap"></i> | |
| Fonctionnalités | |
| </a> | |
| <a href="gallery.html" class="footer-link"> | |
| <i data-feather="image"></i> | |
| Galerie | |
| </a> | |
| <a href="pricing.html" class="footer-link"> | |
| <i data-feather="dollar-sign"></i> | |
| Tarifs | |
| </a> | |
| <a href="about.html" class="footer-link"> | |
| <i data-feather="info"></i> | |
| À Propos | |
| </a> | |
| </div> | |
| </div> | |
| <!-- Legal --> | |
| <div class="footer-section"> | |
| <h3 class="section-title">Légal</h3> | |
| <div class="footer-links"> | |
| <a href="privacy.html" class="footer-link"> | |
| <i data-feather="shield"></i> | |
| Politique de Confidentialité | |
| </a> | |
| <a href="terms.html" class="footer-link"> | |
| <i data-feather="file-text"></i> | |
| Conditions d'Utilisation | |
| </a> | |
| <a href="cookies.html" class="footer-link"> | |
| <i data-feather="cookie"></i> | |
| Politique des Cookies | |
| </a> | |
| <a href="guidelines.html" class="footer-link"> | |
| <i data-feather="check-circle"></i> | |
| Règles de la Communauté | |
| </a> | |
| <a href="contact.html" class="footer-link"> | |
| <i data-feather="mail"></i> | |
| Nous Contacter | |
| </a> | |
| </div> | |
| </div> | |
| <!-- Newsletter --> | |
| <div class="footer-section"> | |
| <h3 class="section-title">Restez Informé</h3> | |
| <p class="footer-description"> | |
| Abonnez-vous à notre newsletter pour les dernières fonctionnalités, mises à jour et conseils d'échange de visage. | |
| </p> | |
| <form class="newsletter-form" id="newsletterForm"> | |
| <input type="email" class="newsletter-input" placeholder="Votre adresse e-mail" required> | |
| <button type="submit" class="newsletter-button"> | |
| <i data-feather="send"></i> | |
| S'abonner | |
| </button> | |
| </form> | |
| </div> | |
| </div> | |
| <div class="footer-bottom"> | |
| <div class="copyright"> | |
| © 2024 FaceSwap Magic. Tous droits réservés. | |
| </div> | |
| <div class="legal-links"> | |
| <a href="privacy.html" class="legal-link">Politique de Confidentialité</a> | |
| <a href="terms.html" class="legal-link">Conditions d'Utilisation</a> | |
| <a href="cookies.html" class="legal-link">Politique des Cookies</a> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Back to Top Button --> | |
| <a href="#" class="back-to-top" id="backToTop"> | |
| <i data-feather="arrow-up"></i> | |
| </a> | |
| </footer> | |
| `; | |
| // Initialize newsletter form | |
| this.initializeNewsletterForm(); | |
| // Initialize back to top button | |
| this.initializeBackToTop(); | |
| } | |
| initializeNewsletterForm() { | |
| const form = this.shadowRoot.getElementById('newsletterForm'); | |
| if (form) { | |
| form.addEventListener('submit', (e) => { | |
| e.preventDefault(); | |
| const input = form.querySelector('input[type="email"]'); | |
| const email = input.value.trim(); | |
| if (email && this.validateEmail(email)) { | |
| // In a real app, this would send to your backend | |
| console.log('Newsletter subscription:', email); | |
| // Show success message | |
| alert('Merci de vous être abonné à notre newsletter !'); | |
| // Reset form | |
| form.reset(); | |
| } else { | |
| alert('Veuillez saisir une adresse e-mail valide.'); | |
| } | |
| }); | |
| } | |
| } | |
| validateEmail(email) { | |
| const re = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; | |
| return re.test(email); | |
| } | |
| initializeBackToTop() { | |
| const backToTop = this.shadowRoot.getElementById('backToTop'); | |
| if (backToTop) { | |
| // Show/hide button based on scroll position | |
| window.addEventListener('scroll', () => { | |
| if (window.scrollY > 300) { | |
| backToTop.classList.add('visible'); | |
| } else { | |
| backToTop.classList.remove('visible'); | |
| } | |
| }); | |
| // Smooth scroll to top | |
| backToTop.addEventListener('click', (e) => { | |
| e.preventDefault(); | |
| window.scrollTo({ | |
| top: 0, | |
| behavior: 'smooth' | |
| }); | |
| }); | |
| } | |
| } | |
| } | |
| customElements.define('custom-footer', CustomFooter); |