answer/templates/login.html

83 lines
2.2 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>登录</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f4f4f9;
margin: 0;
padding: 0;
}
.container {
width: 100%;
max-width: 400px;
margin: 50px auto;
padding: 20px;
background-color: #fff;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
border-radius: 8px;
}
h1 {
text-align: center;
color: #333;
}
form {
display: flex;
flex-direction: column;
}
label {
font-size: 16px;
color: #555;
margin-bottom: 5px;
}
input[type="text"],
input[type="password"] {
padding: 10px;
margin-bottom: 20px;
border: 1px solid #ddd;
border-radius: 4px;
font-size: 16px;
width: 100%;
box-sizing: border-box;
}
input[type="submit"] {
padding: 10px;
background-color: #4CAF50;
color: white;
font-size: 16px;
border: none;
border-radius: 4px;
cursor: pointer;
transition: background-color 0.3s;
}
input[type="submit"]:hover {
background-color: #45a049;
}
.footer {
text-align: center;
margin-top: 20px;
font-size: 14px;
color: #777;
}
</style>
</head>
<body>
<div class="container">
<h1>登录</h1>
<form action="{{ url_for('login') }}" method="POST">
<label for="name">用户名:</label>
<input type="text" id="name" name="name" required><br><br>
<label for="password">密码:</label>
<input type="password" id="password" name="password" required><br><br>
<input type="submit" value="登录">
</form>
<div class="footer">
<p>&copy; 2024 答题系统</p>
</div>
</div>
</body>
</html>