1.2.2: Profile Upgraded
This commit is contained in:
@@ -64,13 +64,13 @@
|
||||
{{ icon }} {{ label }}
|
||||
</div>
|
||||
{% if dist %}
|
||||
<span class="inline-flex items-center px-1.5 py-0.5 rounded text-[10px] font-bold
|
||||
{% if dist.rank == 1 %}bg-yellow-100 text-yellow-800 border border-yellow-200
|
||||
{% elif dist.rank <= 3 %}bg-gray-100 text-gray-800 border border-gray-200
|
||||
{% else %}bg-slate-100 text-slate-600 border border-slate-200{% endif %}">
|
||||
Rank #{{ dist.rank }}
|
||||
</span>
|
||||
{% endif %}
|
||||
<span class="inline-flex items-center px-2 py-0.5 rounded text-xs font-bold
|
||||
{% if dist.rank == 1 %}bg-yellow-100 text-yellow-800 border border-yellow-200
|
||||
{% elif dist.rank <= 3 %}bg-gray-100 text-gray-800 border border-gray-200
|
||||
{% else %}bg-slate-100 text-slate-600 border border-slate-200{% endif %}">
|
||||
Rank #{{ dist.rank }}
|
||||
</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="text-3xl font-black text-gray-900 dark:text-white mb-3">
|
||||
@@ -153,7 +153,7 @@
|
||||
<div class="flex justify-between items-center mb-1">
|
||||
<span class="text-xs font-bold text-gray-400 uppercase tracking-wider">{{ label }}</span>
|
||||
{% if dist %}
|
||||
<span class="inline-flex items-center px-1 py-0.5 rounded text-[9px] font-bold
|
||||
<span class="inline-flex items-center px-1.5 py-0.5 rounded text-xs font-bold
|
||||
{% if dist.rank == 1 %}bg-yellow-50 text-yellow-700 border border-yellow-100
|
||||
{% elif dist.rank <= 3 %}bg-gray-50 text-gray-600 border border-gray-100
|
||||
{% else %}text-gray-300{% endif %}">
|
||||
@@ -232,7 +232,7 @@
|
||||
<!-- 2.6 Advanced Dimensions Breakdown -->
|
||||
<div class="bg-white dark:bg-slate-800 shadow-lg rounded-2xl p-6 border border-gray-100 dark:border-slate-700">
|
||||
<h3 class="text-lg font-bold text-gray-900 dark:text-white mb-6 flex items-center gap-2">
|
||||
<span>🔬</span> 进阶能力分析 (Capabilities Breakdown)
|
||||
<span>🔬</span> 深层能力维度 (Deep Capabilities Breakdown)
|
||||
</h3>
|
||||
|
||||
<!-- Reusing detail_item macro, but with a different grid if needed -->
|
||||
@@ -266,31 +266,111 @@
|
||||
{{ detail_item('Match Pt Win% (赛点胜率)', features['hps_match_point_win_rate'], 'hps_match_point_win_rate', '{:.1%}') }}
|
||||
{{ detail_item('Pressure Entry (逆风首杀)', features['hps_pressure_entry_rate'], 'hps_pressure_entry_rate', '{:.1%}') }}
|
||||
{{ detail_item('Comeback KD (翻盘KD)', features['hps_comeback_kd_diff'], 'hps_comeback_kd_diff') }}
|
||||
{{ detail_item('Loss Streak KD (连败KD)', features['hps_losing_streak_kd_diff'], 'hps_losing_streak_kd_diff') }}
|
||||
|
||||
{{ detail_item('Pistol Kills (手枪击杀)', features['ptl_pistol_kills'], 'ptl_pistol_kills') }}
|
||||
{{ detail_item('Pistol Win% (手枪胜率)', features['ptl_pistol_win_rate'], 'ptl_pistol_win_rate', '{:.1%}') }}
|
||||
{{ detail_item('Pistol KD (手枪KD)', features['ptl_pistol_kd'], 'ptl_pistol_kd') }}
|
||||
{{ detail_item('Pistol Util Eff (手枪道具)', features['ptl_pistol_util_efficiency'], 'ptl_pistol_util_efficiency', '{:.1%}') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Group 3: SIDE & UTIL -->
|
||||
<!-- Group 3: UTIL (Utility) -->
|
||||
<div>
|
||||
<h4 class="text-xs font-black text-gray-400 uppercase tracking-widest mb-4 border-b border-gray-100 dark:border-slate-700 pb-2">
|
||||
SIDE (T/CT Preference) & UTIL (Utility)
|
||||
UTIL (Utility Usage)
|
||||
</h4>
|
||||
<div class="grid grid-cols-2 md:grid-cols-3 lg:grid-cols-5 gap-y-6 gap-x-4">
|
||||
{{ detail_item('CT Rating (CT评分)', features['side_rating_ct'], 'side_rating_ct') }}
|
||||
{{ detail_item('T Rating (T评分)', features['side_rating_t'], 'side_rating_t') }}
|
||||
{{ detail_item('CT FK Rate (CT首杀)', features['side_first_kill_rate_ct'], 'side_first_kill_rate_ct', '{:.1%}') }}
|
||||
{{ detail_item('T FK Rate (T首杀)', features['side_first_kill_rate_t'], 'side_first_kill_rate_t', '{:.1%}') }}
|
||||
{{ detail_item('Side KD Diff (攻防差)', features['side_kd_diff_ct_t'], 'side_kd_diff_ct_t') }}
|
||||
|
||||
{{ detail_item('Usage Rate (道具频率)', features['util_usage_rate'], 'util_usage_rate') }}
|
||||
{{ detail_item('Nade Dmg (雷火伤)', features['util_avg_nade_dmg'], 'util_avg_nade_dmg', '{:.1f}') }}
|
||||
{{ detail_item('Flash Time (致盲时间)', features['util_avg_flash_time'], 'util_avg_flash_time', '{:.2f}s') }}
|
||||
{{ detail_item('Flash Enemy (致盲人数)', features['util_avg_flash_enemy'], 'util_avg_flash_enemy') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Group 4: SIDE (T/CT Preference) -->
|
||||
<div>
|
||||
<h4 class="text-xs font-black text-gray-400 uppercase tracking-widest mb-4 border-b border-gray-100 dark:border-slate-700 pb-2">
|
||||
SIDE (T/CT Preference)
|
||||
</h4>
|
||||
|
||||
{% macro vs_item(label, t_key, ct_key, format_str='{:.2f}') %}
|
||||
{% set t_val = features[t_key] or 0 %}
|
||||
{% set ct_val = features[ct_key] or 0 %}
|
||||
{% set diff = ct_val - t_val %}
|
||||
|
||||
{# Dynamic Sizing #}
|
||||
{% set t_size = 'text-2xl' if t_val > ct_val else 'text-sm text-gray-500 dark:text-gray-400' %}
|
||||
{% set ct_size = 'text-2xl' if ct_val > t_val else 'text-sm text-gray-500 dark:text-gray-400' %}
|
||||
{% if t_val == ct_val %}
|
||||
{% set t_size = 'text-lg' %}
|
||||
{% set ct_size = 'text-lg' %}
|
||||
{% endif %}
|
||||
|
||||
<div class="bg-gray-50 dark:bg-slate-700/30 rounded-xl p-4 border border-gray-100 dark:border-slate-600 relative overflow-hidden group hover:shadow-md transition-all">
|
||||
<!-- Header with Diff -->
|
||||
<div class="flex justify-between items-start mb-3">
|
||||
<span class="text-xs font-bold text-gray-400 uppercase tracking-wider">{{ label }}</span>
|
||||
|
||||
{% if diff|abs > 0.001 %}
|
||||
<span class="inline-flex items-center px-1.5 py-0.5 rounded text-[10px] font-black tracking-wide
|
||||
{% if diff > 0 %}bg-blue-100 text-blue-700 border border-blue-200
|
||||
{% else %}bg-amber-100 text-amber-700 border border-amber-200{% endif %}">
|
||||
{% if diff > 0 %}CT +{{ format_str.format(diff) }}
|
||||
{% else %}T +{{ format_str.format(diff|abs) }}{% endif %}
|
||||
</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<!-- Values -->
|
||||
<div class="flex items-end justify-between gap-2">
|
||||
<!-- T Side -->
|
||||
<div class="flex flex-col items-start">
|
||||
<span class="text-xs font-bold text-amber-600/80 dark:text-amber-500 mb-0.5">T-Side</span>
|
||||
<span class="{{ t_size }} font-black font-mono leading-none transition-all">
|
||||
{{ format_str.format(t_val) }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- VS Divider -->
|
||||
<div class="h-8 w-px bg-gray-200 dark:bg-slate-600 mx-1"></div>
|
||||
|
||||
<!-- CT Side -->
|
||||
<div class="flex flex-col items-end">
|
||||
<span class="text-xs font-bold text-blue-600/80 dark:text-blue-400 mb-0.5">CT-Side</span>
|
||||
<span class="{{ ct_size }} font-black font-mono leading-none transition-all">
|
||||
{{ format_str.format(ct_val) }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Mini Bar for visual comparison -->
|
||||
<div class="mt-3 flex h-1.5 w-full rounded-full overflow-hidden bg-gray-200 dark:bg-slate-600">
|
||||
{% set total = t_val + ct_val %}
|
||||
{% if total > 0 %}
|
||||
{% set t_pct = (t_val / total) * 100 %}
|
||||
<div class="h-full bg-amber-500" style="width: {{ t_pct }}%"></div>
|
||||
<div class="h-full bg-blue-500 flex-1"></div>
|
||||
{% else %}
|
||||
<div class="h-full w-1/2 bg-gray-300"></div>
|
||||
<div class="h-full w-1/2 bg-gray-400"></div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
|
||||
{{ vs_item('Rating (Rating/KD)', 'side_rating_t', 'side_rating_ct') }}
|
||||
{{ vs_item('KD Ratio', 'side_kd_t', 'side_kd_ct') }}
|
||||
{{ vs_item('Win Rate (胜率)', 'side_win_rate_t', 'side_win_rate_ct', '{:.1%}') }}
|
||||
{{ vs_item('First Kill Rate (首杀率)', 'side_first_kill_rate_t', 'side_first_kill_rate_ct', '{:.1%}') }}
|
||||
{{ vs_item('First Death Rate (首死率)', 'side_first_death_rate_t', 'side_first_death_rate_ct', '{:.1%}') }}
|
||||
{{ vs_item('KAST (贡献率)', 'side_kast_t', 'side_kast_ct', '{:.1%}') }}
|
||||
{{ vs_item('RWS (Round Win Share)', 'side_rws_t', 'side_rws_ct') }}
|
||||
{{ vs_item('Multi-Kill Rate (多杀率)', 'side_multikill_rate_t', 'side_multikill_rate_ct', '{:.1%}') }}
|
||||
{{ vs_item('Headshot Rate (爆头率)', 'side_headshot_rate_t', 'side_headshot_rate_ct', '{:.1%}') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -376,11 +456,46 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Reviews / Comments -->
|
||||
<div class="bg-white dark:bg-slate-800 shadow-lg rounded-2xl p-6 border border-gray-100 dark:border-slate-700">
|
||||
<h3 class="text-lg font-bold text-gray-900 dark:text-white mb-6">留言板 (Comments)</h3>
|
||||
|
||||
<form action="{{ url_for('players.detail', steam_id=player.steam_id_64) }}" method="POST" class="mb-8 relative">
|
||||
<!-- Right Column: Map Stats & Comments -->
|
||||
<div class="space-y-8">
|
||||
<!-- Map Stats -->
|
||||
<div class="bg-white dark:bg-slate-800 shadow-lg rounded-2xl p-6 border border-gray-100 dark:border-slate-700">
|
||||
<h3 class="text-lg font-bold text-gray-900 dark:text-white mb-4">地图数据 (Map Stats)</h3>
|
||||
<div class="space-y-3 max-h-[400px] overflow-y-auto custom-scroll pr-1">
|
||||
{% for m in map_stats %}
|
||||
<div class="flex items-center justify-between p-3 bg-gray-50 dark:bg-slate-700/30 rounded-xl hover:bg-gray-100 transition-colors">
|
||||
<div class="flex items-center gap-3">
|
||||
<!-- Map Icon/Name -->
|
||||
<div class="w-10 h-10 rounded-lg bg-gray-200 dark:bg-slate-600 flex items-center justify-center text-xs font-black text-gray-500 uppercase">
|
||||
{{ m.map_name[:3] }}
|
||||
</div>
|
||||
<div>
|
||||
<div class="text-sm font-bold text-gray-900 dark:text-white">{{ m.map_name }}</div>
|
||||
<div class="text-xs text-gray-500 font-mono">{{ m.matches }} matches</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="text-right">
|
||||
<div class="text-sm font-black font-mono {% if m.rating >= 1.1 %}text-green-600{% elif m.rating < 0.9 %}text-red-500{% else %}text-gray-700 dark:text-gray-300{% endif %}">
|
||||
{{ "%.2f"|format(m.rating) }}
|
||||
</div>
|
||||
<div class="flex items-center justify-end gap-2 text-[10px] text-gray-400 font-mono">
|
||||
<span class="{% if m.win_rate >= 0.5 %}text-green-600{% else %}text-red-500{% endif %}">{{ "%.0f"|format(m.win_rate * 100) }}% Win</span>
|
||||
<span>{{ "%.1f"|format(m.adr) }} ADR</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="text-center py-4 text-gray-400 text-sm">No map data available.</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Reviews / Comments -->
|
||||
<div class="bg-white dark:bg-slate-800 shadow-lg rounded-2xl p-6 border border-gray-100 dark:border-slate-700">
|
||||
<h3 class="text-lg font-bold text-gray-900 dark:text-white mb-6">留言板 (Comments)</h3>
|
||||
|
||||
<form action="{{ url_for('players.detail', steam_id=player.steam_id_64) }}" method="POST" class="mb-8 relative">
|
||||
<input type="text" name="username" class="absolute top-2 left-2 text-xs border-none bg-transparent focus:ring-0 text-gray-500 w-full" placeholder="Name (Optional)">
|
||||
<textarea name="content" rows="3" required class="block w-full pt-8 pb-2 px-3 border border-gray-200 dark:border-slate-600 rounded-xl bg-gray-50 dark:bg-slate-700/50 focus:ring-2 focus:ring-yrtv-500 focus:bg-white dark:focus:bg-slate-700 transition" placeholder="Write a comment..."></textarea>
|
||||
<button type="submit" class="absolute bottom-2 right-2 px-3 py-1 bg-yrtv-600 text-white text-xs font-bold rounded-lg hover:bg-yrtv-700 transition shadow-sm">Post</button>
|
||||
@@ -441,6 +556,7 @@
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block scripts %}
|
||||
|
||||
Reference in New Issue
Block a user