diff --git a/main.py b/main.py index 6463d92..d46ca37 100644 --- a/main.py +++ b/main.py @@ -18,7 +18,7 @@ from .core.fun_basic import load_as_base64 "fxdyz", "通过调用剑网三API接口获取游戏数据,处理发送。", "2.8", - "https://git.fxdyz.com/qsc20001102/astrbot_plugin_jx3" + "https://github.com/qsc20001102/astrbot_plugin_jx3" ) class Jx3ApiPlugin(Star): def __init__(self, context: Context, config: AstrBotConfig): diff --git a/metadata.yaml b/metadata.yaml index 539d3cf..a3c6332 100644 --- a/metadata.yaml +++ b/metadata.yaml @@ -3,7 +3,7 @@ display_name: 剑网三游戏数据查询工具 desc: 通过接口调用剑网三API接口获取游戏数据,处理发送。 version: v2.8 author: 飞翔大野猪 -repo: https://git.fxdyz.com/qsc20001102/astrbot_plugin_jx3 +repo: https://github.com/qsc20001102/astrbot_plugin_jx3 astrbot_version: ">=4.11.0" support_platforms: - aiocqhttp diff --git a/templates/zilipaixing.html b/templates/zilipaixing.html index 73457eb..44e3c3a 100644 --- a/templates/zilipaixing.html +++ b/templates/zilipaixing.html @@ -14,53 +14,98 @@ } .container { - max-width: 1040px; + max-width: 1200px; margin: 0 auto; } h1 { - font-size: 32px; - margin: 0 0 8px 0; + font-size: 38px; + margin: 0 0 10px 0; color: #222; font-weight: 800; text-align: center; } .meta { - margin-bottom: 24px; + margin-bottom: 26px; color: #7a7f99; - font-size: 16px; + font-size: 18px; text-align: center; } table { width: 100%; + table-layout: fixed; border-collapse: collapse; background: white; border-radius: 12px; overflow: hidden; - box-shadow: 0 4px 16px rgba(0,0,0,0.08); + box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08); text-align: left; } thead { background: #d93939; color: white; - font-size: 17px; } - th, td { - padding: 12px 10px; + th, + td { + padding: 14px 10px; border-bottom: 1px solid #eee; - font-size: 15px; + font-size: 17px; vertical-align: middle; } + th { + font-size: 18px; + font-weight: 700; + text-align: center; + } + tbody tr:nth-child(even) { background: #fafafa; } + tbody tr:hover { + background: #fff4f4; + } + + tbody tr:last-child td { + border-bottom: none; + } + + /* + * 各列宽度 + * 第二列头像宽度较小,使头像和职业列靠近 + */ + .rank-width { + width: 70px; + } + + .avatar-width { + width: 72px; + } + + .force-width { + width: 170px; + } + + .role-width { + width: auto; + } + + .server-width { + width: 180px; + } + + .score-width { + width: 130px; + } + .rank-col, + .avatar-col, + .role-name-col, .server-col, .score-col { white-space: nowrap; @@ -68,67 +113,110 @@ } .rank-col { - width: 56px; color: #d93939; + font-size: 18px; font-weight: 800; } - .role, - .force { - display: flex; - align-items: center; - gap: 8px; - min-width: 150px; - font-weight: 700; - color: #333; - white-space: nowrap; + /* + * 第二列只显示头像 + */ + .avatar-col { + padding-left: 4px; + padding-right: 4px; } .avatar { - width: 34px; - height: 34px; + display: block; + width: 46px; + height: 46px; + margin: 0 auto; border-radius: 50%; object-fit: cover; - flex: 0 0 auto; background: #eef2f8; } + /* + * 职业列 + * 取消原来的 min-width,避免第二列和第三列间隔过大 + */ + .force-col { + padding-left: 4px; + padding-right: 8px; + } + + .force { + display: flex; + align-items: center; + justify-content: flex-start; + gap: 10px; + min-width: 0; + color: #333; + font-size: 17px; + font-weight: 700; + white-space: nowrap; + } + .force-icon { - width: 30px; - height: 30px; + width: 40px; + height: 40px; border-radius: 50%; object-fit: contain; flex: 0 0 auto; background: #eef2f8; } + .force-name { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + + .role-name-col { + color: #333; + font-size: 17px; + font-weight: 600; + overflow: hidden; + text-overflow: ellipsis; + } + .server-col { color: #333; + font-size: 17px; } .score-col { color: #d93939; + font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; } - - .avatar-col { - width: 70px; - text-align: center; - } +

{{ school }} 资历排行

-
{{ server }} | 更新时间:{{ update_time }}
+ +
+ {{ server }} | 更新时间:{{ update_time }} +
+ + + + + + + + + - + @@ -139,24 +227,49 @@ {% for item in items %} - + + - - - - + + + + + + {% endfor %} @@ -164,4 +277,4 @@ - + \ No newline at end of file
排名推栏用户头像 职业 角色 服务器
{{ loop.index }} + {{ loop.index }} + {% if item.avatarUrl %} - {{ item.roleName }} + {{ item.roleName }} {% endif %} + +
{% set force_icon = item.forceIcon or icons.sect.get(item.forceName) %} + {% if force_icon %} - {{ item.forceName }} + {{ item.forceName }} {% endif %} - {{ item.forceName }} + + + {{ item.forceName }} +
{{ item.roleName }}{{ item.serverName }}{{ item.seniority }} + {{ item.roleName }} + + {{ item.serverName }} + + {{ item.seniority }} +