X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=xonstat%2Ftemplates%2Fmain_index.mako;h=a35104e9366b9eef020848951517e6f1aa6716f3;hb=31cde11b854d03d176da91ede110196051507064;hp=f5b8abd710d001e108bee4294b63d8bc23ac91ad;hpb=b8bbf7db5f5546ab7260381ab2894dc1fcf930a1;p=xonotic%2Fxonstat.git
diff --git a/xonstat/templates/main_index.mako b/xonstat/templates/main_index.mako
old mode 100755
new mode 100644
index f5b8abd..a35104e
--- a/xonstat/templates/main_index.mako
+++ b/xonstat/templates/main_index.mako
@@ -1,251 +1,207 @@
-<%inherit file="base.mako"/>
-
-<%block name="title">
-Leaderboard
-%block>
-
-<%block name="hero_unit">
-
-%block>
-
-
+
+ % 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>
+
+##### RANKS #####
+% if len(ranks) < 4:
+
+ % 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
+
+
+
+
+ # |
+ Nick |
+ Elo |
+
+
+
+ <% i = 1 %>
+ % for r in rs:
+
+ ${i} |
+ ${r.nick_html_colors()|n} |
+ ${int(round(r.elo))} |
+
+ <% i = i+1 %>
+ % endfor
+
+
+
More...
+
+ % endif
+
+ % endfor
+
+% endif
+
+
+##### ACTIVE PLAYERS #####
+