// Sample data for the gallery const samplePhotos = [ { id: 1, title: "The Phoenix Lights", date: "1997-03-13", location: "Phoenix, Arizona", image: "http://static.photos/technology/640x360/1", description: "One of the most famous mass UFO sightings in history. Thousands of people reported seeing a huge V-shaped object with lights silently gliding over the city.", type: "ufo", credibility: 8 }, { id: 2, title: "Roswell Incident", date: "1947-07-08", location: "Roswell, New Mexico", image: "http://static.photos/science/640x360/2", description: "The alleged crash of an extraterrestrial spacecraft and subsequent cover-up by the U.S. government. The debris field contained strange metallic fragments with unearthly properties.", type: "alien", credibility: 7 }, { id: 3, title: "Tic-Tac Encounter", date: "2004-11-14", location: "Pacific Ocean", image: "http://static.photos/aerial/640x360/3", description: "Navy pilots encountered a white, oblong object resembling a tic-tac candy that demonstrated impossible flight characteristics, captured on FLIR video.", type: "ufo", credibility: 9 } ]; // Load gallery with sample data function loadGallery() { const gallery = document.getElementById('gallery'); if (!gallery) return; gallery.innerHTML = ''; samplePhotos.forEach(photo => { const photoCard = document.createElement('custom-photo-card'); photoCard.setAttribute('data-id', photo.id); photoCard.setAttribute('data-title', photo.title); photoCard.setAttribute('data-date', photo.date); photoCard.setAttribute('data-location', photo.location); photoCard.setAttribute('data-image', photo.image); photoCard.setAttribute('data-description', photo.description); photoCard.setAttribute('data-type', photo.type); photoCard.setAttribute('data-credibility', photo.credibility); gallery.appendChild(photoCard); }); feather.replace(); } // Handle form submission for new sightings document.getElementById('photo-form')?.addEventListener('submit', function(e) { e.preventDefault(); // In a real app, you would save to a database // For now, we'll just redirect to the gallery alert('Sighting saved successfully!'); window.location.href = 'index.html'; }); // Initialize the app document.addEventListener('DOMContentLoaded', () => { feather.replace(); });