feat: expand struts demo lab
This commit is contained in:
@@ -1,54 +1,86 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||
<%@ taglib prefix="s" uri="/struts-tags" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>验证成功 - Struts2 Demo</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Validation Summary - Struts2 Demo Lab</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: 'Segoe UI', sans-serif;
|
||||
background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
|
||||
body {
|
||||
margin: 0;
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 24px;
|
||||
font-family: "Aptos", "Segoe UI", "Microsoft YaHei", sans-serif;
|
||||
background: linear-gradient(135deg, #db2777 0%, #f472b6 55%, #ffe4f1 100%);
|
||||
}
|
||||
.card {
|
||||
background: white;
|
||||
padding: 40px;
|
||||
border-radius: 15px;
|
||||
text-align: center;
|
||||
min-width: 400px;
|
||||
width: min(820px, 100%);
|
||||
background: rgba(255,255,255,0.95);
|
||||
border-radius: 28px;
|
||||
padding: 28px;
|
||||
box-shadow: 0 24px 60px rgba(0,0,0,0.18);
|
||||
}
|
||||
h1 { color: #11998e; margin-bottom: 20px; }
|
||||
.data {
|
||||
background: #f5f5f5;
|
||||
padding: 20px;
|
||||
border-radius: 8px;
|
||||
text-align: left;
|
||||
margin: 20px 0;
|
||||
.eyebrow {
|
||||
font-size: 12px;
|
||||
letter-spacing: 0.12em;
|
||||
text-transform: uppercase;
|
||||
color: #db2777;
|
||||
font-weight: 800;
|
||||
}
|
||||
.data p { margin: 10px 0; }
|
||||
.btn {
|
||||
display: inline-block;
|
||||
padding: 12px 30px;
|
||||
background: #11998e;
|
||||
color: white;
|
||||
h1 { margin: 10px 0 12px; }
|
||||
p { margin: 0; color: #6a5060; line-height: 1.85; }
|
||||
.stats {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 12px;
|
||||
margin-top: 18px;
|
||||
}
|
||||
.stat {
|
||||
padding: 16px;
|
||||
border-radius: 18px;
|
||||
background: #fff5fa;
|
||||
border: 1px solid #f1d8e5;
|
||||
}
|
||||
.stat span { display: block; font-size: 12px; color: #8a697b; margin-bottom: 6px; }
|
||||
.stat strong { font-size: 18px; }
|
||||
.links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
|
||||
.link-btn {
|
||||
display: inline-flex;
|
||||
padding: 10px 14px;
|
||||
border-radius: 999px;
|
||||
background: #fff0f7;
|
||||
color: #db2777;
|
||||
text-decoration: none;
|
||||
border-radius: 25px;
|
||||
font-weight: 700;
|
||||
}
|
||||
@media (max-width: 720px) {
|
||||
.stats { grid-template-columns: 1fr; }
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="card">
|
||||
<h1>✅ 验证通过!</h1>
|
||||
<div class="data">
|
||||
<p><strong>用户名:</strong> <s:property value="username"/></p>
|
||||
<p><strong>邮箱:</strong> <s:property value="email"/></p>
|
||||
<p><strong>年龄:</strong> <s:property value="age"/></p>
|
||||
<p><strong>简介:</strong> <s:property value="bio"/></p>
|
||||
<div class="eyebrow">Validation summary</div>
|
||||
<h1>Profile validation passed</h1>
|
||||
<p>The action accepted the submitted fields and calculated a simple profile band for the demo.</p>
|
||||
|
||||
<div class="stats">
|
||||
<div class="stat"><span>Username</span><strong><s:property value="username"/></strong></div>
|
||||
<div class="stat"><span>Email</span><strong><s:property value="email"/></strong></div>
|
||||
<div class="stat"><span>Age</span><strong><s:property value="age"/></strong></div>
|
||||
<div class="stat"><span>Profile band</span><strong><s:property value="scoreBand"/></strong></div>
|
||||
<div class="stat"><span>Submitted at</span><strong><s:property value="submittedAt"/></strong></div>
|
||||
<div class="stat"><span>Bio</span><strong><s:property value="bio" default="No bio submitted."/></strong></div>
|
||||
</div>
|
||||
|
||||
<div class="links">
|
||||
<a class="link-btn" href="form.jsp">Try validation again</a>
|
||||
<a class="link-btn" href="../index.jsp">Back to portal</a>
|
||||
</div>
|
||||
<a href="form.jsp" class="btn">继续测试</a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user