update with pass hashing and login

This commit is contained in:
BIG2EYEZ
2023-12-19 21:43:07 +08:00
parent 6fcf603603
commit 1cd8d62469
4 changed files with 275 additions and 130 deletions

View File

@@ -55,19 +55,33 @@
button:hover {
background-color: #45a049;
}
.error-message {
color: red;
margin-top: 10px;
}
</style>
</head>
<body>
<form action="/login" method="post">
<h1>Admin Login</h1>
<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="loginForm" class="user-creation-container">
<div class="title">Login</div>
<div class="content">
<form action="/login" method="post">
<% if (error) { %>
<div class="error-message"><%= error %></div>
<% } %>
<div class="input-box">
<span class="details">Username</span>
<input type="text" name="username" placeholder="Enter your username" required>
</div>
<div class="input-box">
<span class="details">Password</span>
<input type="password" name="password" placeholder="Enter your password" required>
</div>
<div class="button">
<input type="submit" value="Login">
</div>
</form>
</div>
</div>
</body>
</html>