Untitled
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Login</title> <link rel="stylesheet" href="/css/styles.css"> <!-- Inserisci qui il tuo foglio di stile --> <style> body { font-family: Arial, sans-serif; display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; background-color: #f4f4f4; } .login-container { background: white; padding: 20px; border-radius: 8px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); } .login-container h2 { margin-top: 0; } .login-container form { display: flex; flex-direction: column; } .login-container label { margin-bottom: 5px; } .login-container input { margin-bottom: 10px; padding: 8px; border: 1px solid #ccc; border-radius: 4px; } .login-container button { padding: 10px; border: none; background-color: #007bff; color: white; border-radius: 4px; cursor: pointer; } .login-container button:hover { background-color: #0056b3; } </style> </head> <body> <div class="login-container"> <h2>Login</h2> <form action="/login" method="post"> <label for="username">Username:</label> <input type="text" id="username" name="username" required> <label for="password">Password:</label> <input type="password" id="password" name="password" required> <button type="submit">Login</button> </form> <div id="error" style="color: red;"> <!-- Messaggio di errore, se presente --> <script> const urlParams = new URLSearchParams(window.location.search); if (urlParams.has('error')) { document.getElementById('error').innerText = 'Invalid username or password.'; } if (urlParams.has('logout')) { document.getElementById('error').innerText = 'You have been logged out.'; } </script> </div> </div> </body> </html>
Leave a Comment