67 lines
4.3 KiB
HTML
67 lines
4.3 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block title %}战队荣誉 - YRTV{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="space-y-8 px-4 sm:px-0">
|
|
<div>
|
|
<p class="text-xs font-bold uppercase tracking-widest text-amber-600">YRTV Awards · {{ brand.primary }}</p>
|
|
<h1 class="mt-1 text-3xl font-black text-gray-900 dark:text-white">周期最佳与荣誉榜</h1>
|
|
<p class="mt-2 text-sm text-gray-500">完全基于已导入比赛。月、季度和年度奖项设有最低场次门槛。</p>
|
|
</div>
|
|
|
|
<div class="flex flex-wrap gap-2">
|
|
<a href="{{ url_for('awards.index') }}" class="rounded-full px-4 py-2 text-sm font-bold {% if not award_type %}bg-amber-500 text-white{% else %}bg-white text-gray-600 dark:bg-slate-800 dark:text-gray-300{% endif %}">全部</a>
|
|
{% for key, label in award_types.items() %}
|
|
<a href="{{ url_for('awards.index', type=key) }}" class="rounded-full px-4 py-2 text-sm font-bold {% if award_type == key %}bg-amber-500 text-white{% else %}bg-white text-gray-600 dark:bg-slate-800 dark:text-gray-300{% endif %}">{{ label }}</a>
|
|
{% endfor %}
|
|
</div>
|
|
|
|
<div class="grid grid-cols-1 gap-8 xl:grid-cols-3">
|
|
<section class="rounded-2xl bg-gradient-to-br from-amber-500 to-orange-600 p-6 text-white shadow-xl">
|
|
<h2 class="text-xl font-black">荣誉榜</h2>
|
|
<div class="mt-5 space-y-3">
|
|
{% for player in leaderboard[:10] %}
|
|
<a href="{{ url_for('players.detail', steam_id=player.steam_id_64) }}" class="flex items-center justify-between rounded-xl bg-white/10 p-3 hover:bg-white/20">
|
|
<div>
|
|
<div class="font-bold">{{ loop.index }}. {{ player.identity.username or player.steam_id_64 }}</div>
|
|
<div class="text-xs text-amber-100">
|
|
年 {{ player.yearly }} · 季 {{ player.quarterly }} · 月 {{ player.monthly }} · 周 {{ player.weekly }} · 日 {{ player.daily }}
|
|
</div>
|
|
</div>
|
|
<div class="text-2xl font-black">{{ player.awards }}</div>
|
|
</a>
|
|
{% else %}
|
|
<div class="py-8 text-center text-amber-100">暂无奖项</div>
|
|
{% endfor %}
|
|
</div>
|
|
</section>
|
|
|
|
<section class="space-y-4 xl:col-span-2">
|
|
{% for award in awards %}
|
|
<article class="rounded-2xl border border-gray-100 bg-white p-5 shadow dark:border-slate-700 dark:bg-slate-800">
|
|
<div class="flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between">
|
|
<div class="flex items-center gap-4">
|
|
<div class="flex h-14 w-14 items-center justify-center rounded-2xl bg-amber-100 text-2xl text-amber-700">🏆</div>
|
|
<div>
|
|
<div class="text-xs font-bold uppercase tracking-wider text-amber-600">{{ award.award_label }}</div>
|
|
<a href="{{ url_for('players.detail', steam_id=award.steam_id_64) }}" class="text-xl font-black text-gray-900 hover:text-yrtv-600 dark:text-white">{{ award.identity.username or award.steam_id_64 }}</a>
|
|
<div class="text-xs text-gray-400">{{ award.period_key }} · {{ award.matches }} 场</div>
|
|
</div>
|
|
</div>
|
|
<div class="grid grid-cols-4 gap-4 text-center">
|
|
<div><div class="text-[10px] uppercase text-gray-400">Rating</div><div class="font-black">{{ '%.2f'|format(award.avg_rating) }}</div></div>
|
|
<div><div class="text-[10px] uppercase text-gray-400">K/D</div><div class="font-black">{{ '%.2f'|format(award.avg_kd) }}</div></div>
|
|
<div><div class="text-[10px] uppercase text-gray-400">ADR</div><div class="font-black">{{ '%.1f'|format(award.avg_adr) }}</div></div>
|
|
<div><div class="text-[10px] uppercase text-gray-400">Win</div><div class="font-black">{{ '%.0f%%'|format(award.win_rate * 100) }}</div></div>
|
|
</div>
|
|
</div>
|
|
</article>
|
|
{% else %}
|
|
<div class="rounded-2xl bg-white py-16 text-center text-gray-400 dark:bg-slate-800">当前筛选没有满足最低场次的奖项。</div>
|
|
{% endfor %}
|
|
</section>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|