Fill out to connect - + Full Name @@ -91,7 +92,7 @@ Send Message - This is a static form prepared for backend connection later. Current validation runs entirely in the browser. + Replace the placeholder Formspree action with your real form ID to enable live submissions. diff --git a/css/style.css b/css/style.css index 16160c8..d495561 100644 --- a/css/style.css +++ b/css/style.css @@ -71,6 +71,8 @@ body { body.menu-open { overflow: hidden; + height: 100vh; + touch-action: none; } img { @@ -1541,7 +1543,7 @@ textarea { color: var(--color-text-soft); } -[data-animate] { +.js-enabled [data-animate] { opacity: 0; transform: translateY(18px); transition: opacity 520ms ease, transform 520ms ease; diff --git a/cv/index.html b/cv/index.html index 0a39b18..bb38cb5 100644 --- a/cv/index.html +++ b/cv/index.html @@ -9,6 +9,7 @@ + diff --git a/index.html b/index.html index 5647316..7055d21 100644 --- a/index.html +++ b/index.html @@ -10,6 +10,7 @@ + @@ -271,7 +272,10 @@ Start a conversation. Whether it is a strategic partnership, a governance initiative, or a project that needs measured leadership, the next step can start here. - Email + + + Email Me + LinkedIn @@ -288,7 +292,7 @@ diff --git a/js/script.js b/js/script.js index bbf60ec..904a4ea 100644 --- a/js/script.js +++ b/js/script.js @@ -136,6 +136,9 @@ function setupContactForm() { const fields = Array.from(form.querySelectorAll("[data-required], [type='email']")); const status = form.querySelector("[data-form-status]"); + const action = (form.getAttribute("action") || "").trim(); + const hasExternalEndpoint = /^https?:\/\//i.test(action); + const hasPlaceholderEndpoint = action.includes("YOUR_ID_HERE"); const validators = { email: (value) => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(value) @@ -209,14 +212,30 @@ function setupContactForm() { return; } - event.preventDefault(); - if (status) { - status.textContent = "Thanks. Your message structure is validated and ready for backend integration."; - status.classList.add("is-success"); + status.classList.remove("is-success"); } - form.reset(); - fields.forEach((field) => setFieldError(field, "")); + if (!hasExternalEndpoint || hasPlaceholderEndpoint) { + event.preventDefault(); + + if (status) { + status.textContent = hasPlaceholderEndpoint + ? "Replace the Formspree form ID to enable live message delivery." + : "Thanks. Your message structure is validated and ready for backend integration."; + status.classList.toggle("is-success", !hasPlaceholderEndpoint); + } + + if (!hasPlaceholderEndpoint) { + form.reset(); + fields.forEach((field) => setFieldError(field, "")); + } + + return; + } + + if (status) { + status.textContent = "Submitting your message..."; + } }); } diff --git a/projects/index.html b/projects/index.html index 93c8a2b..922de96 100644 --- a/projects/index.html +++ b/projects/index.html @@ -9,6 +9,7 @@ +