完成管理面板首页

This commit is contained in:
2023-12-17 13:59:39 +00:00
parent d5da269cdc
commit ff6a9a38a1
5 changed files with 37 additions and 27 deletions

View File

@ -5,34 +5,28 @@
<title>Admin Panel - ZYM's Book Store</title> <title>Admin Panel - ZYM's Book Store</title>
<link rel="stylesheet" href="basic.css"> <link rel="stylesheet" href="basic.css">
<style> <style>
.passwd-box { .admin-buttons {
width: 300px; display: flex;
flex-direction: column;
align-items: center;
margin-top: 20px;
}
.admin-buttons button {
width: 80%;
padding: 20px; padding: 20px;
border: 1px solid #ccc; margin: 10px 0;
background-color: #fff; font-size: 18px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); background-color: #3498db;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
input {
width: 100%;
padding: 10px;
margin-bottom: 10px;
box-sizing: border-box;
}
button {
width: 100%;
padding: 10px;
background-color: #4caf50;
color: #fff; color: #fff;
border: none; border: none;
cursor: pointer; cursor: pointer;
transition: background-color 0.3s;
} }
.admin-buttons button:hover {
background-color: #2980b9;
}
.info-box { .info-box {
width: 300px; width: 300px;
padding: 20px; padding: 20px;
@ -74,7 +68,11 @@
<a href="/buy">Purchase Books</a> <a href="/buy">Purchase Books</a>
</nav> </nav>
<div class="content"> <div class="content">
This is content. <div class="admin-buttons">
<button onclick="window.location.href='/user-management'">User Management System</button>
<button onclick="window.location.href='/book-management'">Book Information Management System</button>
<button onclick="window.location.href='/log-query'">Log Query System</button>
</div>
</div> </div>
</div> </div>

View File

View File

@ -203,6 +203,18 @@ app.get('/show', (req, res) => {
res.sendFile(join(__dirname, 'show.html')); res.sendFile(join(__dirname, 'show.html'));
}); });
app.get('/user-management', (req, res) => {
res.sendFile(join(__dirname, 'user-management.html'));
});
app.get('/book-management', (req, res) => {
res.sendFile(join(__dirname, 'book-management.html'));
});
app.get('/log-query', (req, res) => {
res.sendFile(join(__dirname, 'log-query.html'));
});
server.listen(3000, () => { server.listen(3000, () => {
console.log('server running at http://localhost:3000'); console.log('server running at http://localhost:3000');
}); });

View File

View File