diff --git a/login.js b/login.js index fab96e16..962f83fd 100644 --- a/login.js +++ b/login.js @@ -11,67 +11,82 @@ sign_in_btn.addEventListener("click", () => { }); // Sign in form submission -document.querySelector(".sign-in-form").addEventListener('submit', function(event) { - event.preventDefault(); - - // Get the input values - const username = document.querySelector(".sign-in-form input[type='text']").value; - const password = document.querySelector(".sign-in-form input[type='password']").value; - - // Dummy login logic for demo purposes - if (username === 'admin' && password === 'password') { - alert('Login successful!'); - // Redirect to dashboard page - window.location.href = 'index.html'; - } else { - alert('Invalid username or password'); - } -}); +document + .querySelector(".sign-in-form") + .addEventListener("submit", function (event) { + event.preventDefault(); + // Get the input values + const username = document.querySelector( + ".sign-in-form input[type='text']" + ).value; + const password = document.querySelector( + ".sign-in-form input[type='password']" + ).value; + + // Dummy login logic for demo purposes + if (username === "admin" && password === "password") { + alert("Login successful!"); + // Redirect to dashboard page + window.location.href = "index.html"; + } else { + alert("Invalid username or password"); + } + }); // Sign up form submission -document.querySelector(".sign-up-form").addEventListener('submit', function(event) { - event.preventDefault(); - - // Get the input values - const username = document.querySelector(".sign-up-form input[type='text']").value; - const email = document.querySelector(".sign-up-form input[type='email']").value; - const password = document.querySelector(".sign-up-form input[type='password']").value; - - if (username === '' || email === '' || password === '') { - alert('Please fill in all fields'); - return; - } - - // Dummy signup logic for demo purposes - localStorage.setItem('username', username); - localStorage.setItem('email', email); - localStorage.setItem('password', password); - localStorage.setItem('isLoggedIn', 'true'); - - alert('Signup successful!'); - // Redirect to dashboard page - window.location.href = 'index.html'; -}); +document + .querySelector(".sign-up-form") + .addEventListener("submit", function (event) { + event.preventDefault(); + + // Get the input values + const username = document.querySelector( + ".sign-up-form input[type='text']" + ).value; + const email = document.querySelector( + ".sign-up-form input[type='email']" + ).value; + const password = document.querySelector( + ".sign-up-form input[type='password']" + ).value; + + if (username === "" || email === "" || password === "") { + alert("Please fill in all fields"); + return; + } + + // Dummy signup logic for demo purposes + localStorage.setItem("username", username); + localStorage.setItem("email", email); + localStorage.setItem("password", password); + localStorage.setItem("isLoggedIn", "true"); + + alert("Signup successful!"); + // Redirect to dashboard page + window.location.href = "index.html"; + }); // Toggle password visibility function togglePassword(fieldId, icon) { const field = document.getElementById(fieldId); - const isPassword = field.type === 'password'; + const isPassword = field.type === "password"; // Toggle between 'password' and 'text' - field.type = isPassword ? 'text' : 'password'; + field.type = isPassword ? "text" : "password"; // Change the icon class between eye and eye-slash - icon.classList.toggle('fa-eye-slash', isPassword); - icon.classList.toggle('fa-eye', !isPassword); + icon.classList.toggle("fa-eye-slash", isPassword); + icon.classList.toggle("fa-eye", !isPassword); } // Check password strength function checkPasswordStrength() { - const password = document.querySelector(".sign-up-form input[type='password']").value; - const strengthWeak = document.getElementById('strength-weak'); - const strengthMedium = document.getElementById('strength-medium'); - const strengthStrong = document.getElementById('strength-strong'); + const password = document.querySelector( + ".sign-up-form input[type='password']" + ).value; + const strengthWeak = document.getElementById("strength-weak"); + const strengthMedium = document.getElementById("strength-medium"); + const strengthStrong = document.getElementById("strength-strong"); let strength = 0; @@ -81,14 +96,16 @@ function checkPasswordStrength() { if (password.match(/[0-9]/)) strength++; if (password.match(/[^a-zA-Z0-9]/)) strength++; - strengthWeak.className = ''; - strengthMedium.className = ''; - strengthStrong.className = ''; + strengthWeak.className = ""; + strengthMedium.className = ""; + strengthStrong.className = ""; - if (strength >= 1) strengthWeak.className = 'weak'; - if (strength >= 3) strengthMedium.className = 'medium'; - if (strength >= 5) strengthStrong.className = 'strong'; + if (strength >= 1) strengthWeak.className = "weak"; + if (strength >= 3) strengthMedium.className = "medium"; + if (strength >= 5) strengthStrong.className = "strong"; } // Call the checkPasswordStrength function on password input -document.querySelector(".sign-up-form input[type='password']").addEventListener('input', checkPasswordStrength); \ No newline at end of file +document + .querySelector(".sign-up-form input[type='password']") + .addEventListener("input", checkPasswordStrength); diff --git a/privacy.html b/privacy.html new file mode 100644 index 00000000..1bd5fd5e --- /dev/null +++ b/privacy.html @@ -0,0 +1,261 @@ + + + + + + + + + + + + + + + Privacy Policy - AmbuFlow + + + + + + + + + +
+
+ + + + +
+

Privacy Policy AmbuFlow

+
+ +
+

Intro

+

+ At + AmbuFlow ,we are committed to protecting your privacy. This Privacy Policy outlines how we collect, use, disclose, and safeguard your information when you use our services. By using our ambulance services, you consent to the practices described in this policy. +

+ +

+ We value your privacy. This policy explains what information we collect, how we use it, and how we protect it to ensure your safety and privacy. +

+ +

Information We Collect

+

+ We may collect various types of information, including: + +

+

+ +

How We Use Your Information

+ + +

Sharing Your Information

+ + +

How We Protect Your Information:

+

+ We may update this Privacy Policy from time to time. We will notify you of any changes by posting the new policy on our website with an updated effective date. Your continued use of our services after changes constitutes your acceptance of the updated policy. +

+

Changes to this Policy

+

+ We implement a variety of security measures to protect your personal information. However, no method of transmission over the internet or electronic storage is 100% secure. We strive to use commercially acceptable means to protect your information but cannot guarantee its absolute security. +

+ Contribute on GitHub +
+ + + + diff --git a/script.js b/script.js index dbef7cc8..418d2a71 100644 --- a/script.js +++ b/script.js @@ -1,9 +1,11 @@ // Newsletter form submission handler -document.getElementById('newsletter-form').addEventListener('submit', function(event) { +document + .getElementById("newsletter-form") + .addEventListener("submit", function (event) { event.preventDefault(); // Prevent the form from submitting normally - const emailInput = document.getElementById('email'); - const confirmationMessage = document.getElementById('confirmation-message'); + const emailInput = document.getElementById("email"); + const confirmationMessage = document.getElementById("confirmation-message"); // Optionally send the email to your backend const email = emailInput.value; @@ -12,37 +14,36 @@ document.getElementById('newsletter-form').addEventListener('submit', function(e console.log(`Email submitted: ${email}`); // For debugging // Display the confirmation message - confirmationMessage.textContent = 'Thank you for subscribing! Please check your email for further instructions.'; - confirmationMessage.classList.remove('hidden'); + confirmationMessage.textContent = + "Thank you for subscribing! Please check your email for further instructions."; + confirmationMessage.classList.remove("hidden"); // Clear the form - emailInput.value = ''; -}); + emailInput.value = ""; + }); // Accordion functionality const accordions = document.querySelectorAll(".accordion"); accordions.forEach((accordion, index) => { - const header = accordion.querySelector(".accordion__header"); - const content = accordion.querySelector(".accordion__content"); - const icon = accordion.querySelector(".accordion__icon i"); - - header.addEventListener("click", () => { - const isOpen = content.style.height === `${content.scrollHeight}px`; - - accordions.forEach((a, i) => { - const c = a.querySelector(".accordion__content"); - const ic = a.querySelector(".accordion__icon i"); - - if (i === index) { - c.style.height = isOpen ? "0px" : `${c.scrollHeight}px`; - ic.classList.toggle("ri-add-line", isOpen); - ic.classList.toggle("ri-subtract-fill", !isOpen); - } else { - c.style.height = "0px"; - ic.classList.add("ri-add-line"); - ic.classList.remove("ri-subtract-fill"); - } - }); + const header = accordion.querySelector(".accordion__header"); + const content = accordion.querySelector(".accordion__content"); + const icon = accordion.querySelector(".accordion__icon i"); + + header.addEventListener("click", () => { + const isOpen = content.style.height === `${content.scrollHeight}px`; + + accordions.forEach((a, i) => { + const c = a.querySelector(".accordion__content"); + const ic = a.querySelector(".accordion__icon i"); + + if (i === index) { + c.style.height = isOpen ? "0px" : `${c.scrollHeight}px`; + ic.classList.toggle("ri-add-line", isOpen); + ic.classList.toggle("ri-subtract-fill", !isOpen); + } else { + c.style.height = "0px"; + ic.classList.add("ri-add-line"); + ic.classList.remove("ri-subtract-fill"); + } }); -}); \ No newline at end of file