X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=xonstat%2Ftemplates%2Fmain_index.mako;h=7e7b0d86a5777462e78d56c2fcb493a529ab4ff4;hb=a9267693af6c042bee22cae3ccd1f0f2307b58d0;hp=132a943cd7705ce60a8a3b0d0c5385f2f8a23d35;hpb=a569d9befba46987606acadd7e73cbebc647ffa1;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 132a943..7e7b0d8
--- a/xonstat/templates/main_index.mako
+++ b/xonstat/templates/main_index.mako
@@ -1,144 +1,205 @@
-<%inherit file="base.mako"/>
-
-<%block name="title">
-Main Page - ${parent.title()}
-%block>
-
-
-##### RECENT GAMES #####
-
+
+ % 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} |
+ ${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:
+