diff --git a/assets/login-script.js b/assets/login-script.js new file mode 100644 index 0000000..afced83 --- /dev/null +++ b/assets/login-script.js @@ -0,0 +1,29 @@ +function login() { + var email = document.getElementById("email").value; + var password = document.getElementById("password").value; + + // Assuming you use fetch API to send data to the server + fetch('https://home.adlerka.top/account', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + body: JSON.stringify({ + action: 'login', + email: email, + password: password + }), + }) + .then(response => response.json()) + .then(data => { + if (data.status === 'success') { + document.getElementById("statusMessage").innerText = "Login successful!"; + // Redirect or perform other actions after successful login + } else { + document.getElementById("statusMessage").innerText = "Login failed. Please check your credentials."; + } + }) + .catch((error) => { + console.error('Error:', error); + }); +} diff --git a/templates/login.html b/templates/login.html index 305f9c6..45361bb 100644 --- a/templates/login.html +++ b/templates/login.html @@ -1,7 +1,15 @@ -
-
-
-
-
- -
\ No newline at end of file +
+

Login

+
+ + + + + + + +
+

+
+ + \ No newline at end of file