Files
JKTV-online/web/templates/matches/_post_match_report.html
T

69 lines
5.1 KiB
HTML

{% if post_match_report %}
<section class="rounded-2xl border border-gray-100 bg-white p-6 shadow dark:border-slate-700 dark:bg-slate-800">
<div class="flex flex-col gap-5 lg:flex-row lg:items-start lg:justify-between">
<div>
<div class="flex items-center gap-3">
<span class="rounded-lg px-3 py-1 text-xs font-black {% if post_match_report.is_win %}bg-green-100 text-green-700{% else %}bg-red-100 text-red-600{% endif %}">
{{ 'VICTORY' if post_match_report.is_win else 'DEFEAT' }}
</span>
<h2 class="text-xl font-black text-gray-900 dark:text-white">赛后报告 <span class="ml-2 text-[10px] uppercase tracking-wider text-slate-400">by {{ brand.primary }}</span></h2>
</div>
<p class="mt-3 max-w-3xl text-sm text-gray-600 dark:text-gray-300">{{ post_match_report.summary_text }}</p>
</div>
<div class="grid grid-cols-3 gap-5 text-center">
<div><div class="text-2xl font-black text-yrtv-600">{{ '%.2f'|format(post_match_report.team_avg_rating) }}</div><div class="text-[10px] uppercase text-gray-400">Team Rating</div></div>
<div><div class="text-2xl font-black text-gray-900 dark:text-white">{{ '%.1f'|format(post_match_report.team_avg_adr) }}</div><div class="text-[10px] uppercase text-gray-400">Team ADR</div></div>
<div><div class="text-2xl font-black text-amber-600">{{ post_match_report.record_break_count }}</div><div class="text-[10px] uppercase text-gray-400">Records</div></div>
</div>
</div>
<div class="mt-6 grid grid-cols-1 gap-4 md:grid-cols-3">
<div class="rounded-xl bg-amber-50 p-4 dark:bg-amber-900/20">
<div class="text-xs font-bold uppercase text-amber-600">Match MVP</div>
<a href="{{ url_for('players.detail', steam_id=post_match_report.mvp_steam_id) }}" class="mt-1 block text-lg font-black text-gray-900 dark:text-white">{{ post_match_report.mvp.username or post_match_report.mvp_steam_id }}</a>
<div class="text-sm text-gray-500">Rating {{ '%.2f'|format(post_match_report.mvp_rating) }}</div>
</div>
<div class="rounded-xl bg-green-50 p-4 dark:bg-green-900/20">
<div class="text-xs font-bold uppercase text-green-600">Form Improver</div>
{% if post_match_report.improver_steam_id %}
<a href="{{ url_for('players.detail', steam_id=post_match_report.improver_steam_id) }}" class="mt-1 block text-lg font-black text-gray-900 dark:text-white">{{ post_match_report.improver.username or post_match_report.improver_steam_id }}</a>
<div class="text-sm text-green-600">Rating {{ '%+.2f'|format(post_match_report.improver_delta) }}</div>
{% else %}
<div class="mt-1 text-sm text-gray-400">近期样本不足</div>
{% endif %}
</div>
<div class="rounded-xl bg-yrtv-50 p-4 dark:bg-yrtv-900/20">
<div class="text-xs font-bold uppercase text-yrtv-600">Strongest Duo</div>
{% if post_match_report.strongest_duo %}
<div class="mt-1 text-lg font-black text-gray-900 dark:text-white">
{% for player in post_match_report.strongest_duo.players %}
{{ player.username }}{% if not loop.last %} + {% endif %}
{% endfor %}
</div>
<div class="text-sm text-gray-500">Rating {{ '%.2f'|format(post_match_report.strongest_duo.avg_rating) }}</div>
{% else %}
<div class="mt-1 text-sm text-gray-400">本场无二人组</div>
{% endif %}
</div>
</div>
<div class="mt-6 overflow-x-auto">
<table class="min-w-full divide-y divide-gray-200 text-sm dark:divide-slate-700">
<thead><tr class="text-left text-xs uppercase text-gray-400"><th class="py-2">Player</th><th>Rating</th><th>vs Prior 20</th><th>ADR Δ</th><th>Status</th><th>Record</th></tr></thead>
<tbody class="divide-y divide-gray-100 dark:divide-slate-700">
{% for player in post_match_report.players %}
<tr>
<td class="py-3 font-bold"><a href="{{ url_for('players.detail', steam_id=player.steam_id_64) }}" class="hover:text-yrtv-600">{{ player.identity.username or player.steam_id_64 }}</a></td>
<td class="font-mono">{{ '%.2f'|format(player.rating or 0) }}</td>
<td class="font-mono {% if (player.rating_delta or 0) > 0 %}text-green-600{% elif (player.rating_delta or 0) < 0 %}text-red-500{% endif %}">{{ '%+.2f'|format(player.rating_delta) if player.rating_delta is not none else 'N/A' }}</td>
<td class="font-mono">{{ '%+.1f'|format(player.adr_delta) if player.adr_delta is not none else 'N/A' }}</td>
<td>{{ player.performance_text }}</td>
<td>{% for label in player.record_labels %}<span class="mr-1 rounded bg-amber-100 px-2 py-1 text-[10px] font-bold text-amber-700">{{ label }}</span>{% else %}<span class="text-gray-300">-</span>{% endfor %}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</section>
{% endif %}