Skip to content

Commit b282a2f

Browse files
KingPrimesKingPrimes
authored andcommitted
feat.Template: 添加遗物数据展示页面
- 新增遗物数据展示页面模板 - 优化页面样式,增加表格布局 - 添加遗物名称和奖励信息显示 - 处理遗物数据为空的情况 - 调整页面宽度和背景样式
1 parent 414da35 commit b282a2f

File tree

1 file changed

+38
-68
lines changed

1 file changed

+38
-68
lines changed

Template/html/relics.html

Lines changed: 38 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,50 @@
11
<!DOCTYPE html>
2-
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
2+
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
3+
34
<head>
45
<meta charset="UTF-8"/>
6+
<title>遗物</title>
57
<link th:href="@{css/index.css}" rel="stylesheet"/>
68
<link th:href="@{css/fonts.css}" rel="stylesheet"/>
7-
<title>紫卡分析</title>
8-
<style>
9-
body{
10-
text-align: center;
11-
}
12-
.weapons_name {
13-
color: #CC99CC;
14-
}
15-
16-
.trend_old {
17-
color: #FFFFCC;
18-
}
19-
20-
.trend {
21-
color: #FFFF66;
22-
}
23-
24-
.weapons_type {
25-
color: #CC3366;
26-
}
27-
28-
.attribute {
29-
color: #FF9933;
30-
}
31-
32-
html {
33-
background-color: #4D3D54;
34-
}
35-
36-
p {
37-
color: #CC9966;
38-
}
39-
40-
.diff-high {
41-
color: red;
42-
}
43-
44-
.diff-flat {
45-
color: green;
46-
}
47-
48-
.diff-low {
49-
color: #1c84c6;
50-
}
51-
52-
</style>
9+
<link th:href="@{css/rarityType.css}" rel="stylesheet"/>
5310
</head>
11+
5412
<body>
55-
<w>1500</w>
56-
<div th:each="r:${data}">
57-
<div th:each="tm:${r}">
58-
<div>
59-
<h3 th:text="${tm.weaponName}"
60-
class="weapons_name"></h3>
61-
<p>
62-
倾向:
63-
<span th:text="${tm.newDot + '('+ tm.newNum + ')' }" class="trend"></span>
64-
</p>
65-
<p>此前版本倾向:<span th:text="${tm.oldDot + '('+ tm.oldNum + ')' }" class="trend_old"></span></p>
66-
<p>武器类型:<span th:text="${tm.weaponType}" class="weapons_type"></span></p>
67-
<p>具体分析结果:</p>
68-
<div th:each="ats:${tm.attributes}">
69-
<p class="attribute">
70-
<span th:text="${ats.attributeName}"></span>
71-
<span th:utext="${'('+ ats.lowAttr + '% - ' + ats.highAttr+ '%) | ' + ats.attrDiff}"
72-
style="color: #CC99CC;"></span>
73-
</p>
13+
<!-- 生成图片的宽度 -->
14+
<w>3072</w>
15+
<div>
16+
<div class="card">
17+
<div class="relics-backcolor">
18+
<div th:if="${relics != null and not relics.isEmpty()}">
19+
<table class="table-css syndicate relics-color"
20+
th:with="colSize=4,
21+
rowSize=${relics.size()/colSize},
22+
rowSize=${(relics.size()%colSize==0 ? rowSize : rowSize+1)}">
23+
<tr th:each="rowIdx: ${#numbers.sequence(0, rowSize-1)}">
24+
<td th:each="colIdx: ${#numbers.sequence(0, colSize-1)}"
25+
th:with="idx=${rowIdx * colSize + colIdx}">
26+
<th:block th:if="${idx lt relics.size()}">
27+
<table class="relics" th:object="${relics[idx]}">
28+
<caption about="top"
29+
th:text=" '[' + *{name} + ']'">
30+
</caption>
31+
<tr th:each="reward: *{relicRewards}">
32+
<td th:class="${reward.rarity.name()}"
33+
th:text="${reward.rewardName} + ' (' + ${reward.rarity.name} + ')'">
34+
</td>
35+
</tr>
36+
</table>
37+
</th:block>
38+
</td>
39+
</tr>
40+
</table>
41+
</div>
42+
<div th:if="${relics == null or relics.isEmpty()}" class="no-data">
43+
没有找到相关遗物数据
7444
</div>
7545
</div>
76-
<p>--------------------------------------------------------</p>
7746
</div>
7847
</div>
48+
7949
</body>
80-
</html>
50+
</html>

0 commit comments

Comments
 (0)