<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>🔬 Aropha AI Biodegradation Prediction Platform</title> <style> /* General Styles */ body { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; margin: 0; padding: 0; background-color: #2C4555; /* Matching background */ color: #ffffff; display: flex; flex-direction: column; justify-content: center; align-items: center; height: 100vh; } .container { background: #1E2A34; padding: 30px; border-radius: 10px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5); width: 90%; max-width: 400px; text-align: center; } /* Logo */ .logo { width: 200px; margin-bottom: 20px; } h2 { margin-bottom: 20px; font-size: 24px; color: #ffffff; } label { display: block; margin: 10px 0 5px; text-align: left; font-weight: bold; color: #ffffff; } input { width: 100%; padding: 10px; margin-bottom: 10px; border: 1px solid #ccc; border-radius: 5px; background: #24343D; color: #ffffff; border: none; outline: none; } input::placeholder { color: #b0b8bf; } .error { color: red; font-size: 14px; display: none; } button[type="submit"] { width: 100%; background-color: #007BFF; color: white; border: none; padding: 12px; border-radius: 5px; cursor: pointer; font-size: 16px; } button[type="submit"]:hover { background-color: #0056b3; } /* Modal Styles */ .modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.6); display: none; justify-content: center; align-items: center; z-index: 1000; } .modal-content { background: #1E2A34; padding: 20px; border-radius: 8px; max-width: 500px; width: 90%; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5); text-align: center; color: #ffffff; } .close-button { margin-top: 20px; padding: 10px 20px; border: none; background: #007BFF; color: white; border-radius: 5px; cursor: pointer; } .close-button:hover { background: #0056b3; } /* Additional Info */ .info { text-align: center; margin-top: 20px; font-size: 14px; color: #b0b8bf; } .info a { color: #007BFF; text-decoration: none; } .info a:hover { text-decoration: underline; } /* Footer Styles */ footer { text-align: center; padding: 10px; color: #b0b8bf; font-size: 14px; } footer a { color: #ffffff; text-decoration: underline; } </style> </head> <body> <div class="container"> <img src="https://www.users.aropha.com/static/assets/img/logo-rectangular.png" alt="Aropha Logo" class="logo"> <h2>Create an Account</h2> <form id="signup-form"> <label for="first_name">First Name</label> <input type="text" id="first_name" name="first_name" placeholder="Optional"> <label for="last_name">Last Name</label> <input type="text" id="last_name" name="last_name" placeholder="Optional"> <label for="email">Email</label> <input type="email" id="email" name="email" required> <label for="password">Password</label> <input type="password" id="password" name="password" required> <label for="confirm_password">Re-enter Password</label> <input type="password" id="confirm_password" name="confirm_password" required> <p class="error" id="error-message">Passwords do not match.</p> <button type="submit">Sign Up</button> </form> <!-- Additional Info for Password Reset --> <div class="info"> <p> Forgot your password? Reset it <a href="https://www.users.aropha.com/login.html" target="_blank">here</a>. </p> </div> </div> <!-- Modal for displaying messages from your endpoint --> <div id="messageModal" class="modal"> <div class="modal-content"> <p id="modalMessage"></p> <button class="close-button" id="closeModal">Close</button> </div> </div> <footer> <p> Follow us on <a href="https://www.linkedin.com/company/aropha/">LinkedIn</a> | © 2025 Aropha Inc. All Rights Reserved. </p> </footer> <script> document.getElementById("signup-form").addEventListener("submit", function(event) { event.preventDefault(); // Prevent default form submission var password = document.getElementById("password").value; var confirmPassword = document.getElementById("confirm_password").value; var errorMessage = document.getElementById("error-message"); if (password !== confirmPassword) { errorMessage.style.display = "block"; return; } else { errorMessage.style.display = "none"; } let formData = new FormData(document.getElementById("signup-form")); fetch('https://modelserver.aropha.com/register', { method: 'POST', body: formData }) .then(async response => { let responseData; try { responseData = await response.json(); // Try parsing as JSON } catch (error) { responseData = await response.text(); // Fallback for non-JSON responses } console.log("Server response:", responseData); // Debugging log let message = ""; if (typeof responseData === "object") { message = responseData.detail || responseData.message || JSON.stringify(responseData, null, 2); } else { message = responseData; } document.getElementById("modalMessage").textContent = message; document.getElementById("messageModal").style.display = "flex"; }) .catch(error => { console.error("Fetch error:", error); document.getElementById("modalMessage").textContent = "An error occurred. Please try again."; document.getElementById("messageModal").style.display = "flex"; }); }); // Close modal document.getElementById("closeModal").addEventListener("click", function() { document.getElementById("messageModal").style.display = "none"; }); </script> </body> </html>
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter