]> de.git.xonotic.org Git - xonotic/xonstat.git/blob - xonstat/batch/badges/templates/badge.mako
Fixed bug in "total wins" query - NOTE: other queries (e.g. duel wins) are still...
[xonotic/xonstat.git] / xonstat / batch / badges / templates / badge.mako
1 <html>
2   <head>
3     <link href="../css/style.css" rel="stylesheet">
4   </head>
5   <body>
6     <div id="badge">
7       <div id="nick">
8         <b>
9           ${player.nick_html_colors()|n}
10         </b>
11       </div>
12
13       <div id="games_played">
14         <% games_breakdown_str = ', '.join(["{0} {1}".format(ng, gt) for (gt, ng) in games_breakdown]) %>
15         ${total_games} (${games_breakdown_str})
16       </div>
17
18       <div id="win_percentage">
19         % if total_games > 0 and total_stats['wins'] is not None:
20           ${total_stats['wins']} wins, ${total_games - total_stats['wins']} losses (${round(float(total_stats['wins'])/total_games * 100, 2)}%)
21         % endif
22       </div>
23
24       <div id="kill_ratio">
25         % if total_stats['kills'] > 0 and total_stats['deaths'] > 0:
26           ${total_stats['kills']} kills, ${total_stats['deaths']} deaths (${round(float(total_stats['kills'])/total_stats['deaths'], 3)})
27         % endif
28       </div>
29
30       <div id="elo">
31         % if elos_display is not None and len(elos_display) > 0:
32          Elo: ${', '.join(elos_display[0:2])}
33        % endif
34       </div>
35
36     </div>
37
38   </body>
39 </html>