X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=xonstat%2Ftemplates%2Fmain_index.mako;h=7e7b0d86a5777462e78d56c2fcb493a529ab4ff4;hb=a9267693af6c042bee22cae3ccd1f0f2307b58d0;hp=a31aef98b515b2d331f66335099347c05d4908ab;hpb=ac38d75ec6bb0a221c1ea3563966b58860c378e5;p=xonotic%2Fxonstat.git
diff --git a/xonstat/templates/main_index.mako b/xonstat/templates/main_index.mako
index a31aef9..7e7b0d8 100644
--- a/xonstat/templates/main_index.mako
+++ b/xonstat/templates/main_index.mako
@@ -5,126 +5,78 @@ Leaderboard
%block>
<%block name="css">
- ${parent.css()}
-
+ ${parent.css()}
+
%block>
<%block name="hero_unit">
-
-
- #####
Tracking 12345 players, 12345 games (123 duels, 123 ctfs, 123 dms), 12345 servers, and 12345 maps since November 2011.
-
Tracking Xonotic statistics since October 2011.
-
+
+
+ % if summary_stats is None:
+
Tracking Xonotic statistics since October 2011.
+ % else:
+
Tracking ${'{:2,d}'.format(summary_stats.total_players)} players, ${'{:2,d}'.format(summary_stats.total_games)} games (${'{:2,d}'.format(summary_stats.duel_games)} duel; ${'{:2,d}'.format(summary_stats.ctf_games)} ctf; ${'{:2,d}'.format(summary_stats.dm_games)} dm) and ${'{:2,d}'.format(summary_stats.total_servers)} servers since October 2011.
+ % endif
+
%block>
-
-
- ##### DUEL RANKS #####
-
Duel Ranks
-
-
-
- # |
- Nick |
- Elo |
-
-
-
- <% i = 1 %>
- % for (player_id, nick, elo) in duel_ranks:
-
- ${i} |
- % if player_id != '-':
- ${nick|n} |
- % else:
- ${nick|n} |
- % endif
- % if elo != '-':
- ${round(elo, 3)} |
- % else:
- ${elo} |
- % endif
-
- <% i = i+1 %>
- % endfor
-
-
-
More...
-
+##### RANKS #####
+% if len(ranks) < 4:
+
+
+
You don't seem to have any ranks yet.
+
+
-
- ##### CTF RANKS #####
-
CTF Ranks
-
-
-
- # |
- Nick |
- Elo |
-
-
-
- <% i = 1 %>
- % for (player_id, nick, elo) in ctf_ranks:
-
- ${i} |
- % if player_id != '-':
- ${nick|n} |
- % else:
- ${nick|n} |
- % endif
- % if elo != '-':
- ${round(elo, 3)} |
- % else:
- ${elo} |
- % endif
-
- <% i = i+1 %>
- % endfor
-
-
-
More...
-
+% else:
+
+ % for rs in ranks[:4]:
+ % if len(rs) > 0:
+
+ % if rs[0].game_type_cd == 'duel':
+
Duel Ranks
+ % elif rs[0].game_type_cd == 'ctf':
+
CTF Ranks
+ % elif rs[0].game_type_cd == 'dm':
+
DM Ranks
+ % elif rs[0].game_type_cd == 'tdm':
+
TDM Ranks
+ % endif
-
- ##### DM RANKS #####
-
DM Ranks
-
-
-
- # |
- Nick |
- Elo |
-
-
-
- <% i = 1 %>
- % for (player_id, nick, elo) in dm_ranks:
+
+
+
+ # |
+ Nick |
+ Elo |
+
+
+
+ <% i = 1 %>
+ % for r in rs:
${i} |
- % if player_id != '-':
- ${nick|n} |
- % else:
- ${nick|n} |
- % endif
- % if elo != '-':
- ${round(elo, 3)} |
- % else:
- ${elo} |
- % endif
+ ${r.nick_html_colors()|n} |
+ ${round(r.elo, 3)} |
<% i = i+1 %>
- % endfor
-
-
- More...
-
-
+ % endfor
+
+
+
More...
+
+ % endif
+
+ % endfor
+
+% endif
+
+##### ACTIVE PLAYERS #####
Most Active Players
-
+
# |
@@ -138,7 +90,7 @@ Leaderboard
${i} |
% if player_id != '-':
- ${nick|n} |
+ ${nick|n} |
% else:
${nick|n} |
% endif
@@ -151,9 +103,11 @@ Leaderboard
*Most active stats are from the past 7 days
+
+##### ACTIVE SERVERS #####
Most Active Servers
-
+
# |
@@ -179,9 +133,11 @@ Leaderboard
+
+##### ACTIVE MAPS #####
Most Active Maps
-
+
# |
@@ -208,10 +164,13 @@ Leaderboard
+
+##### RECENT GAMES #####
+% if len(recent_games) > 0: