// Universal JS file targeting interactions on multiple pages document.addEventListener("DOMContentLoaded", () => { // --- 1. Interaction for Home Page (index.html) --- const welcomeBtn = document.getElementById("welcomeBtn"); const welcomeOutput = document.getElementById("welcomeOutput"); if (welcomeBtn && welcomeOutput) { welcomeBtn.addEventListener("click", () => { welcomeOutput.innerHTML = "
Hello! This verification proves that custom dynamic scripts are running properly directly from Hugging Face Cloud Infrastructure.
"; welcomeOutput.style.borderLeft = "4px solid #10b981"; }); } // --- 2. Interaction for Skills Page (skills.html) --- const skillsBtn = document.getElementById("skillsBtn"); const countText = document.getElementById("countText"); let count = 0; if (skillsBtn && countText) { skillsBtn.addEventListener("click", () => { count++; countText.textContent = count; countText.style.color = "#2563eb"; countText.style.fontWeight = "bold"; }); } // --- 3. Interaction for Contact Page (contact.html) --- const submitBtn = document.getElementById("submitBtn"); const formFeedback = document.getElementById("formFeedback"); const inputName = document.getElementById("name"); if (submitBtn && formFeedback) { submitBtn.addEventListener("click", () => { if (inputName && inputName.value.trim() !== "") { formFeedback.innerHTML = `✔️ Thank you, ${inputName.value}! Your submission data was processed successfully by local client execution script.
`; } else { formFeedback.innerHTML = `❌ Please fill out the required form parameters first.
`; } }); } });