Lifesoft

login.html

코드 1
<!DOCTYPE html>
<html>

<head>
<meta charset="UTF-8">
<title>로그인</title>
<style>
body {
margin: 40px;
}

form {
max-width: 350px;
margin: auto;
}

.row {
display: flex;
margin-bottom: 8px;
}

label {
width: 90px;
text-align: right;
margin-right: 8px;
}

input {
flex: 1;
}

.btns {
text-align: right;
margin-top: 10px;
}
</style>
</head>

<body>
<h2 style="text-align:center;">로그인</h2>

<div th:if="${error}" style="color:red; text-align:center;" th:text="${error}"></div>

<form th:action="@{/login}" method="post">
<div class="row">
<label for="id">ID:</label>
<input type="text" id="id" name="id" required>
</div>

<div class="row">
<label for="password">비밀번호:</label>
<input type="password" id="password" name="password" required>
</div>

<div class="btns">
<button type="submit">로그인</button>
<button type="button" onclick="location.href='/register'">회원가입</button>
</div>
</form>
</body>

</html>