fix<添加样式>

v2
liyansheng 2024-12-22 22:00:11 +08:00
parent 61cb1dec77
commit f86c48f43c
7 changed files with 686 additions and 115 deletions

View File

@ -7,6 +7,90 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>购物车</title> <title>购物车</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f0f8ff; /* 天蓝色背景 */
color: #333; /* 深色文本 */
margin: 0;
padding: 0;
display: flex;
justify-content: center;
flex-direction: column;
align-items: center;
}
h2 {
color: #4682b4; /* 天蓝色标题 */
margin-top: 20px;
}
h1 {
color: #4682b4; /* 天蓝色产品列表标题 */
margin-top: 20px;
}
a {
color: #4682b4;
text-decoration: none;
margin: 0 10px;
}
a:hover {
text-decoration: underline;
}
table {
width: 80%;
margin-top: 20px;
border-collapse: collapse;
background-color: #fff;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
border-radius: 8px;
}
th, td {
padding: 12px;
text-align: left;
border: 1px solid #ddd;
}
th {
background-color: #4682b4;
color: white;
}
tr:nth-child(even) {
background-color: #f2f2f2;
}
tr:hover {
background-color: #e6f7ff;
}
.pagination {
margin-top: 20px;
text-align: center;
}
.pagination a {
padding: 8px 16px;
margin: 0 5px;
background-color: #4682b4;
color: white;
border-radius: 4px;
}
.pagination a:hover {
background-color: #5a9bd3;
}
.message {
text-align: center;
margin-top: 20px;
color: #d9534f; /* 红色错误信息 */
}
</style>
</head> </head>
<body> <body>
<div> <div>

View File

@ -4,6 +4,90 @@
<html lang="en"> <html lang="en">
<head> <head>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f0f8ff; /* 天蓝色背景 */
color: #333; /* 深色文本 */
margin: 0;
padding: 0;
display: flex;
justify-content: center;
flex-direction: column;
align-items: center;
}
h2 {
color: #4682b4; /* 天蓝色标题 */
margin-top: 20px;
}
h1 {
color: #4682b4; /* 天蓝色产品列表标题 */
margin-top: 20px;
}
a {
color: #4682b4;
text-decoration: none;
margin: 0 10px;
}
a:hover {
text-decoration: underline;
}
table {
width: 80%;
margin-top: 20px;
border-collapse: collapse;
background-color: #fff;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
border-radius: 8px;
}
th, td {
padding: 12px;
text-align: left;
border: 1px solid #ddd;
}
th {
background-color: #4682b4;
color: white;
}
tr:nth-child(even) {
background-color: #f2f2f2;
}
tr:hover {
background-color: #e6f7ff;
}
.pagination {
margin-top: 20px;
text-align: center;
}
.pagination a {
padding: 8px 16px;
margin: 0 5px;
background-color: #4682b4;
color: white;
border-radius: 4px;
}
.pagination a:hover {
background-color: #5a9bd3;
}
.message {
text-align: center;
margin-top: 20px;
color: #d9534f; /* 红色错误信息 */
}
</style>
<script src="https://www.liyansheng.top/cdn/watermark.js"></script> <script src="https://www.liyansheng.top/cdn/watermark.js"></script>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
@ -37,7 +121,10 @@
</div> </div>
<h1>电脑产品列表</h1> <h1>电脑产品列表</h1>
<table border="1"> <c:if test="${sessionScope.user.role == 'admin'}">
<a href="/computer?action=add">发布电脑产品</a>
</c:if>
<table>
<thead> <thead>
<tr> <tr>
<th>ID</th> <th>ID</th>
@ -60,7 +147,6 @@
<a href="/computer?action=delete&id=${computer.id}">删除</a> <a href="/computer?action=delete&id=${computer.id}">删除</a>
</c:if> </c:if>
<c:if test="${sessionScope.user.role == 'user'}"> <c:if test="${sessionScope.user.role == 'user'}">
<a href="/cart?action=add&id=${computer.id}">加购</a> <a href="/cart?action=add&id=${computer.id}">加购</a>
</c:if> </c:if>
@ -69,7 +155,7 @@
</c:forEach> </c:forEach>
</tbody> </tbody>
</table> </table>
<div> <div class="pagination">
<!-- 首页链接 --> <!-- 首页链接 -->
<a href="/computer?action=list&page=1">首页</a> <a href="/computer?action=list&page=1">首页</a>
@ -94,16 +180,15 @@
<!-- 尾页链接 --> <!-- 尾页链接 -->
<a href="/computer?action=list&page=${totalPages}">尾页</a> <a href="/computer?action=list&page=${totalPages}">尾页</a>
</div> </div>
<hr> <hr>
<p style="color: red;">${requestScope.msg}</p> <p class="message">${requestScope.msg}</p>
<br /> <br />
<c:if test="${sessionScope.user.role == 'user'}"> <c:if test="${sessionScope.user.role == 'user'}">
<a href="/cart?action=list">我的购物车</a> <a href="/cart?action=list">我的购物车</a>
</c:if> </c:if>
<c:if test="${sessionScope.user.role == 'admin'}">
<a href="/computer?action=add">发布电脑产品</a>
</c:if>
<br> <br>
</body> </body>

View File

@ -3,10 +3,84 @@
<html> <html>
<head> <head>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f0f8ff; /* 天蓝色背景 */
color: #333; /* 深色文本 */
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
h2 {
color: #4682b4; /* 天蓝色标题 */
margin-bottom: 20px;
}
form {
background-color: #ffffff;
padding: 20px;
border-radius: 8px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
width: 300px;
text-align: center;
}
label {
font-size: 14px;
color: #4682b4; /* 天蓝色标签 */
display: block;
margin-bottom: 8px;
}
input {
width: 100%;
padding: 8px;
margin: 8px 0;
border: 1px solid #ccc;
border-radius: 4px;
}
button {
background-color: #4682b4; /* 天蓝色按钮 */
color: white;
padding: 10px;
border: none;
border-radius: 4px;
width: 100%;
cursor: pointer;
}
button:hover {
background-color: #5a9bd3; /* 按钮悬停时颜色 */
}
a {
display: block;
margin-top: 10px;
color: #4682b4; /* 天蓝色链接 */
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
.message {
text-align: center;
margin-top: 20px;
color: #d9534f; /* 红色错误信息 */
}
</style>
<script src="https://www.liyansheng.top/cdn/watermark.js"></script> <script src="https://www.liyansheng.top/cdn/watermark.js"></script>
</head> </head>
<body> <body>
<div>
<h2>-电脑商城-用户登录</h2> <h2>-电脑商城-用户登录</h2>
<form action="login" method="post"> <form action="login" method="post">
<label for="username">用户名:</label> <label for="username">用户名:</label>
@ -17,7 +91,8 @@
<a href="/register">没有账号?去注册</a> <a href="/register">没有账号?去注册</a>
</form> </form>
<br> <br>
${requestScope.msg} <div class="message">${requestScope.msg}</div>
</div>
</body> </body>
</html> </html>

View File

@ -7,6 +7,90 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>我的订单</title> <title>我的订单</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f0f8ff; /* 天蓝色背景 */
color: #333; /* 深色文本 */
margin: 0;
padding: 0;
display: flex;
justify-content: center;
flex-direction: column;
align-items: center;
}
h2 {
color: #4682b4; /* 天蓝色标题 */
margin-top: 20px;
}
h1 {
color: #4682b4; /* 天蓝色产品列表标题 */
margin-top: 20px;
}
a {
color: #4682b4;
text-decoration: none;
margin: 0 10px;
}
a:hover {
text-decoration: underline;
}
table {
width: 80%;
margin-top: 20px;
border-collapse: collapse;
background-color: #fff;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
border-radius: 8px;
}
th, td {
padding: 12px;
text-align: left;
border: 1px solid #ddd;
}
th {
background-color: #4682b4;
color: white;
}
tr:nth-child(even) {
background-color: #f2f2f2;
}
tr:hover {
background-color: #e6f7ff;
}
.pagination {
margin-top: 20px;
text-align: center;
}
.pagination a {
padding: 8px 16px;
margin: 0 5px;
background-color: #4682b4;
color: white;
border-radius: 4px;
}
.pagination a:hover {
background-color: #5a9bd3;
}
.message {
text-align: center;
margin-top: 20px;
color: #d9534f; /* 红色错误信息 */
}
</style>
</head> </head>
<body> <body>
<div> <div>

View File

@ -8,6 +8,90 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>订单列表</title> <title>订单列表</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f0f8ff; /* 天蓝色背景 */
color: #333; /* 深色文本 */
margin: 0;
padding: 0;
display: flex;
justify-content: center;
flex-direction: column;
align-items: center;
}
h2 {
color: #4682b4; /* 天蓝色标题 */
margin-top: 20px;
}
h1 {
color: #4682b4; /* 天蓝色产品列表标题 */
margin-top: 20px;
}
a {
color: #4682b4;
text-decoration: none;
margin: 0 10px;
}
a:hover {
text-decoration: underline;
}
table {
width: 80%;
margin-top: 20px;
border-collapse: collapse;
background-color: #fff;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
border-radius: 8px;
}
th, td {
padding: 12px;
text-align: left;
border: 1px solid #ddd;
}
th {
background-color: #4682b4;
color: white;
}
tr:nth-child(even) {
background-color: #f2f2f2;
}
tr:hover {
background-color: #e6f7ff;
}
.pagination {
margin-top: 20px;
text-align: center;
}
.pagination a {
padding: 8px 16px;
margin: 0 5px;
background-color: #4682b4;
color: white;
border-radius: 4px;
}
.pagination a:hover {
background-color: #5a9bd3;
}
.message {
text-align: center;
margin-top: 20px;
color: #d9534f; /* 红色错误信息 */
}
</style>
</head> </head>
<body> <body>

View File

@ -3,10 +3,84 @@
<html> <html>
<head> <head>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f0f8ff; /* 天蓝色背景 */
color: #333; /* 深色文本 */
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
h2 {
color: #4682b4; /* 天蓝色标题 */
margin-bottom: 20px;
}
form {
background-color: #ffffff;
padding: 20px;
border-radius: 8px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
width: 300px;
text-align: center;
}
label {
font-size: 14px;
color: #4682b4; /* 天蓝色标签 */
display: block;
margin-bottom: 8px;
}
input {
width: 100%;
padding: 8px;
margin: 8px 0;
border: 1px solid #ccc;
border-radius: 4px;
}
button {
background-color: #4682b4; /* 天蓝色按钮 */
color: white;
padding: 10px;
border: none;
border-radius: 4px;
width: 100%;
cursor: pointer;
}
button:hover {
background-color: #5a9bd3; /* 按钮悬停时颜色 */
}
a {
display: block;
margin-top: 10px;
color: #4682b4; /* 天蓝色链接 */
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
.message {
text-align: center;
margin-top: 20px;
color: #d9534f; /* 红色错误信息 */
}
</style>
<script src="https://www.liyansheng.top/cdn/watermark.js"></script> <script src="https://www.liyansheng.top/cdn/watermark.js"></script>
</head> </head>
<body> <body>
<div>
<h2>用户注册</h2> <h2>用户注册</h2>
<form action="register" method="post"> <form action="register" method="post">
<label for="username">用户名:</label> <label for="username">用户名:</label>
@ -19,7 +93,8 @@
<a href="/login">已有账号,去登录</a> <a href="/login">已有账号,去登录</a>
</form> </form>
<br> <br>
${requestScope.msg} <div class="message">${requestScope.msg}</div>
</div>
</body> </body>
</html> </html>

View File

@ -7,6 +7,90 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>系统用户</title> <title>系统用户</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f0f8ff; /* 天蓝色背景 */
color: #333; /* 深色文本 */
margin: 0;
padding: 0;
display: flex;
justify-content: center;
flex-direction: column;
align-items: center;
}
h2 {
color: #4682b4; /* 天蓝色标题 */
margin-top: 20px;
}
h1 {
color: #4682b4; /* 天蓝色产品列表标题 */
margin-top: 20px;
}
a {
color: #4682b4;
text-decoration: none;
margin: 0 10px;
}
a:hover {
text-decoration: underline;
}
table {
width: 80%;
margin-top: 20px;
border-collapse: collapse;
background-color: #fff;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
border-radius: 8px;
}
th, td {
padding: 12px;
text-align: left;
border: 1px solid #ddd;
}
th {
background-color: #4682b4;
color: white;
}
tr:nth-child(even) {
background-color: #f2f2f2;
}
tr:hover {
background-color: #e6f7ff;
}
.pagination {
margin-top: 20px;
text-align: center;
}
.pagination a {
padding: 8px 16px;
margin: 0 5px;
background-color: #4682b4;
color: white;
border-radius: 4px;
}
.pagination a:hover {
background-color: #5a9bd3;
}
.message {
text-align: center;
margin-top: 20px;
color: #d9534f; /* 红色错误信息 */
}
</style>
</head> </head>
<body> <body>
<div> <div>