PamGram/resources/starrail/avatar_list/main.html

103 lines
3.8 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Avatar List</title>
<link type="text/css" href="./style.css" rel="stylesheet"/>
<link type="text/css" href="../../styles/public.css" rel="stylesheet"/>
<style>
.avatar > div::after {
background-position: center center;
background-size: cover;
background-image: url("../../background/rarity/half/{{ rarity }}.png");
}
</style>
</head>
<body>
<div class="container">
<div class="head">
<div class="player">
<div>
<div class="nickname">{{ nickname }}</div>
<div class="uid">UID: {{ uid }}</div>
</div>
</div>
<div class="logo"></div>
</div>
<div class="content">
<div class="row">
<div>#</div>
<div style="flex: 4">角色</div>
<div>等级</div>
<div>星魂</div>
<div style="flex: 8">光锥</div>
</div>
{% for avatar_data in avatar_datas %}
{% set equipment = avatar_data.equipment %}
{% if avatar_data.rarity == 5 %}
{% set row_bg = 'rgb(240 226 179)' %}
{% else %}
{% set row_bg = 'rgb(229 171 229/70%)' %}
{% endif %}
{% if equipment != none %}
{% set equip_star = equipment.rarity %}
{% else %}
{% set equip_star = '' %}
{% endif %}
<div
{% if loop.index is even %}
class="row second-row"
{% else %}
class="row"
{% endif %}
>
<div style="background-color: {{ row_bg }}">{{ loop.index }}</div>
<div class="role" style="flex: 4;background-color: {{ row_bg }}">
<div class="role-icon" style="flex: 1.5;">
<img src="{{ avatar_data.icon }}" alt="side icon"/>
</div>
<div class="role-name">
{{ avatar_data.name }}
</div>
</div>
<div>{{ avatar_data.level }}</div>
<div
{% set constellation = avatar_data.eidolon %}
{% if constellation != 0 %}
class="color {{ ['green', 'cyan', 'blue', 'purple', 'pink', 'red'][constellation - 1] }}"
{% endif %}
>
<div class="number">{{ constellation }}</div>
</div>
<div class="weapon weapon-{{ equip_star }}-star" style="flex: 8">
{% if equipment != none %}
<div>
{% if equipment.level < 10 %}
Lv.{{ equipment.level }}&nbsp;&nbsp;
{% else %}
Lv.{{ equipment.level }}
{% endif %}
</div>
<div class="color {{ ['green', 'cyan', 'blue', 'purple', 'red'][equipment.eidolon - 1] }}">
<div class="number">{{ equipment.eidolon }}</div>
</div>
<div><img src="{{ equipment.icon }}" alt="weapon"></div>
<div>{{ equipment.name }}</div>
{% endif %}
</div>
</div>
{% endfor %}
<div class="notice">
{% if has_more %}
<div>
*想查看完整数据请在指令中加上<code>all</code>或者<code>全部</code>: <code>/avatars all</code><code>全部练度统计</code>
</div>
{% endif %}
</div>
</div>
</div>
</body>
</html>