Create a professional startup landing page with animated hero section, problem-solution showcase, feature highlights with screenshots, team members grid, investor logos, press mentions, and email signup form.
d605954 verified Download script.js from Mark575377/startupspark-launchpad: direct link, hf CLI and curl.
- Browser
- Download file 2.02 kB
-
https://huggingface.co/spaces/Mark575377/startupspark-launchpad/resolve/main/script.js
- Command line
-
hf download hf://spaces/Mark575377/startupspark-launchpad/script.js
-
curl -L -o script.js https://huggingface.co/spaces/Mark575377/startupspark-launchpad/resolve/main/script.js
2.02 kB
| // Main JavaScript file for shared functionality | |
| // Initialize animations when elements come into view | |
| document.addEventListener('DOMContentLoaded', function() { | |
| // Intersection Observer for scroll animations | |
| const observerOptions = { | |
| root: null, | |
| rootMargin: '0px', | |
| threshold: 0.1 | |
| }; | |
| const observer = new IntersectionObserver((entries, observer) => { | |
| entries.forEach(entry => { | |
| if (entry.isIntersecting) { | |
| entry.target.classList.add('animate-fadeInUp'); | |
| observer.unobserve(entry.target); | |
| } | |
| }); | |
| }, observerOptions); | |
| // Observe all elements with the animate-on-scroll class | |
| document.querySelectorAll('.animate-on-scroll').forEach(el => { | |
| observer.observe(el); | |
| }); | |
| // Smooth scrolling for anchor links | |
| document.querySelectorAll('a[href^="#"]').forEach(anchor => { | |
| anchor.addEventListener('click', function(e) { | |
| e.preventDefault(); | |
| const targetId = this.getAttribute('href'); | |
| const targetElement = document.querySelector(targetId); | |
| if (targetElement) { | |
| window.scrollTo({ | |
| top: targetElement.offsetTop - 100, | |
| behavior: 'smooth' | |
| }); | |
| } | |
| }); | |
| }); | |
| }); | |
| // Form submission handler | |
| function handleFormSubmission(formId, successMessage) { | |
| const form = document.getElementById(formId); | |
| if (form) { | |
| form.addEventListener('submit', function(e) { | |
| e.preventDefault(); | |
| // Here you would typically send the form data to your server | |
| // For demo purposes, we'll just show an alert | |
| alert(successMessage || 'Thank you for your submission!'); | |
| form.reset(); | |
| }); | |
| } | |
| } | |
| // Initialize all forms | |
| document.addEventListener('DOMContentLoaded', function() { | |
| handleFormSubmission('signup-form', 'Thanks for signing up! We\'ll be in touch soon.'); | |
| }); |