(feat): Init concept of coming soon landing page

This commit is contained in:
Blake Ridgway 2025-01-05 21:03:42 -06:00
parent 18bcafe29b
commit f8f8c773cc
9 changed files with 179 additions and 77 deletions

18
static/js/main.js Normal file
View file

@ -0,0 +1,18 @@
document.getElementById("notify-button").addEventListener("click", async () => {
const emailInput = document.getElementById("email-input");
const email = emailInput.value;
if (email) {
const response = await fetch("/subscribe", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ email }),
});
const result = await response.json();
alert(result.message || result.error);
emailInput.value = ""; // Clear input field
} else {
alert("Please enter a valid email.");
}
});