Files
astrbot_plugin_jx3/templates/zilipaixing.html
T
2026-07-23 13:40:50 +08:00

370 lines
7.1 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>资历排行</title>
<style>
* {
box-sizing: border-box;
}
body {
font-family: "Microsoft YaHei", Arial, sans-serif;
background: #f1f2f6;
margin: 0;
padding: 20px;
color: #2c2c33;
}
.container {
width: 100%;
max-width: 1040px;
margin: 0 auto;
}
h1 {
margin: 0 0 10px 0;
color: #222;
font-size: 38px;
font-weight: 800;
line-height: 1.3;
text-align: center;
}
.meta {
margin-bottom: 26px;
color: #7a7f99;
font-size: 18px;
text-align: center;
}
table {
width: 100%;
table-layout: fixed;
border-collapse: collapse;
overflow: hidden;
background: #fff;
border-radius: 12px;
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}
thead {
background: #d93939;
color: #fff;
}
th,
td {
height: 66px;
padding: 10px 8px;
border-bottom: 1px solid #eee;
font-size: 17px;
vertical-align: middle;
}
th {
height: 52px;
font-size: 18px;
font-weight: 700;
text-align: center;
white-space: nowrap;
}
tbody tr:nth-child(even) {
background: #fafafa;
}
tbody tr:hover {
background: #fff4f4;
}
tbody tr:last-child td {
border-bottom: none;
}
/*
* 列宽分配
*/
.rank-width {
width: 8%;
}
.avatar-width {
width: 9%;
}
.force-width {
width: 19%;
}
.role-width {
width: 25%;
}
.server-width {
width: 23%;
}
.score-width {
width: 16%;
}
/*
* 排名列
*/
.rank-col {
color: #d93939;
font-size: 18px;
font-weight: 800;
text-align: center;
white-space: nowrap;
}
/*
* 头像列
*/
.avatar-col {
padding-left: 4px;
padding-right: 4px;
text-align: center;
}
.avatar {
display: block;
width: 46px;
height: 46px;
margin: 0 auto;
border-radius: 50%;
object-fit: cover;
background: #eef2f8;
}
/*
* 职业列
*/
.force-col {
padding-left: 4px;
padding-right: 4px;
text-align: center;
}
.force {
display: flex;
align-items: center;
justify-content: center;
gap: 9px;
width: 100%;
min-width: 0;
color: #333;
font-size: 17px;
font-weight: 700;
white-space: nowrap;
}
.force-icon {
width: 40px;
height: 40px;
border-radius: 50%;
object-fit: contain;
flex: 0 0 auto;
background: #eef2f8;
}
.force-name {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/*
* 角色列
*/
.role-name-col {
padding-left: 10px;
padding-right: 10px;
color: #333;
font-size: 17px;
font-weight: 600;
text-align: center;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/*
* 服务器列
*/
.server-col {
padding-left: 8px;
padding-right: 8px;
color: #333;
font-size: 17px;
text-align: center;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/*
* 资历列
*/
.score-col {
padding-left: 6px;
padding-right: 10px;
color: #d93939;
font-size: 18px;
font-weight: 800;
text-align: center;
white-space: nowrap;
font-variant-numeric: tabular-nums;
}
/*
* 小尺寸页面适配
*/
@media screen and (max-width: 760px) {
body {
padding: 10px;
}
h1 {
font-size: 30px;
}
.meta {
margin-bottom: 18px;
font-size: 15px;
}
th,
td {
height: 58px;
padding: 8px 5px;
font-size: 15px;
}
th {
height: 46px;
font-size: 15px;
}
.avatar {
width: 40px;
height: 40px;
}
.force-icon {
width: 34px;
height: 34px;
}
.force {
gap: 6px;
font-size: 15px;
}
.rank-col,
.role-name-col,
.server-col {
font-size: 15px;
}
.score-col {
font-size: 16px;
}
}
</style>
</head>
<body>
<div class="container">
<h1>{{ school }} 资历排行</h1>
<div class="meta">
{{ server }} 更新时间:{{ update_time }}
</div>
<table>
<colgroup>
<col class="rank-width">
<col class="avatar-width">
<col class="force-width">
<col class="role-width">
<col class="server-width">
<col class="score-width">
</colgroup>
<thead>
<tr>
<th>排名</th>
<th>头像</th>
<th>职业</th>
<th>角色</th>
<th>服务器</th>
<th>资历</th>
</tr>
</thead>
<tbody>
{% for item in items %}
<tr>
<td class="rank-col">
{{ loop.index }}
</td>
<td class="avatar-col">
{% if item.avatarUrl %}
<img
class="avatar"
src="{{ item.avatarUrl }}"
alt="{{ item.roleName }}"
>
{% endif %}
</td>
<td class="force-col">
<div class="force">
{% set force_icon = item.forceIcon or icons.sect.get(item.forceName) %}
{% if force_icon %}
<img
class="force-icon"
src="{{ force_icon }}"
alt="{{ item.forceName }}"
>
{% endif %}
<span class="force-name">
{{ item.forceName }}
</span>
</div>
</td>
<td
class="role-name-col"
title="{{ item.roleName }}"
>
{{ item.roleName }}
</td>
<td
class="server-col"
title="{{ item.serverName }}"
>
{{ item.serverName }}
</td>
<td class="score-col">
{{ item.seniority }}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</body>
</html>