X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=xonstat%2Ftemplates%2Fmain_index.mako;h=62d98872f7dce5e4b85886db6935c548aed85dff;hb=595d501589b7122ba382d9673c703740ec493998;hp=5c7353cbb4cceed224483371b2c09ac8de97b8f8;hpb=6e54cdc269e420ce6329cc7176abbb618baa75e8;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 5c7353c..62d9887
--- a/xonstat/templates/main_index.mako
+++ b/xonstat/templates/main_index.mako
@@ -1,251 +1,203 @@
-<%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 ${summary_stats.total_players} players, ${summary_stats.total_games} games (${summary_stats.duel_games} duel, ${summary_stats.ctf_games} ctf, ${summary_stats.dm_games} dm), and ${summary_stats.total_servers} servers since October 2011.
+ % endif
+
+%block>
+
+##### RANKS #####
+% if len(ranks) < 3:
+
+ % for rs in ranks[:3]:
+ % 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
+ % endif
+
+
+
+
+ # |
+ Nick |
+ Elo |
+
+
+
+ <% i = 1 %>
+ % for r in rs:
+
+ ${i} |
+ ${r.nick_html_colors()|n} |
+ ${round(r.elo, 3)} |
+
+ <% i = i+1 %>
+ % endfor
+
+
+
More...
+
+ % endif
+
+ % endfor
+
+% endif
+
+
+##### ACTIVE PLAYERS #####
+
+
+
Most Active Players
+
+
+
+ # |
+ Nick |
+ Play Time |
+
+
+
+ <% i = 1 %>
+ % for (player_id, nick, alivetime) in top_players:
+
+ ${i} |
+ % if player_id != '-':
+ ${nick|n} |
+ % else:
+ ${nick|n} |
+ % endif
+ ${alivetime} |
+
+ <% i = i+1 %>
+ % endfor
+
+
+
*Most active stats are from the past 7 days
+
+
+
+##### ACTIVE SERVERS #####
+
+
Most Active Servers
+
+
+
+ # |
+ Server |
+ Games |
+
+
+
+ <% i = 1 %>
+ % for (server_id, name, count) in top_servers:
+
+ ${i} |
+ % if server_id != '-':
+ ${name} |
+ % else:
+ ${name} |
+ % endif
+ ${count} |
+
+ <% i = i+1 %>
+ % endfor
+
+
+
+
+
+##### ACTIVE MAPS #####
+
+
Most Active Maps
+
+
+
+ # |
+ Map |
+ Games |
+
+
+
+ <% i = 1 %>
+ % for (map_id, name, count) in top_maps:
+
+ ${i} |
+ % if map_id != '-':
+ ${name} |
+ % else:
+ ${name} |
+ % endif
+ ${count} |
+
+ <% i = i+1 %>
+ % endfor
+
+
+
+
+
+
+##### RECENT GAMES #####
+% if len(recent_games) > 0:
+