From d7517d0c13b6ac3de5d7dcc6204a68553f034d34 Mon Sep 17 00:00:00 2001 From: Ant Zucaro Date: Tue, 21 Jun 2011 12:13:04 -0400 Subject: [PATCH 1/1] Clean up main page, remove centering and generally remove style where appropriate. --- xonstat/templates/accuracy.mako | 2 +- xonstat/templates/game_index.mako | 2 -- xonstat/templates/game_info.mako | 4 +--- xonstat/templates/main_index.mako | 35 +++++++++++++++++++----------- xonstat/templates/player_info.mako | 4 ++-- xonstat/templates/scoreboard.mako | 2 +- 6 files changed, 27 insertions(+), 22 deletions(-) diff --git a/xonstat/templates/accuracy.mako b/xonstat/templates/accuracy.mako index a540023..2f07cc3 100755 --- a/xonstat/templates/accuracy.mako +++ b/xonstat/templates/accuracy.mako @@ -11,7 +11,7 @@ ## [4] = Hit ## [5] = Fired - +
diff --git a/xonstat/templates/game_index.mako b/xonstat/templates/game_index.mako index 1dcfd02..9c04c9c 100755 --- a/xonstat/templates/game_index.mako +++ b/xonstat/templates/game_index.mako @@ -23,10 +23,8 @@ $(document).ready(function() { $('.scoreboard').dataTable(); } );

${map.name} on ${server.name} (permalink for this game) -

## show scoreboard using a def from another file ${scoreboard(game.game_type_cd, pgstats[game.game_id])} -
% endfor % endif diff --git a/xonstat/templates/game_info.mako b/xonstat/templates/game_info.mako index 4d5b807..fb15492 100755 --- a/xonstat/templates/game_info.mako +++ b/xonstat/templates/game_info.mako @@ -22,15 +22,13 @@ Map: Accuracy for ${pgstat.nick_html_colors()}: +Accuracy for ${pgstat.nick_html_colors()}: ${accuracy(pwstats[pgstat.player_game_stat_id][0:5])}

diff --git a/xonstat/templates/main_index.mako b/xonstat/templates/main_index.mako index 0571483..24eb827 100755 --- a/xonstat/templates/main_index.mako +++ b/xonstat/templates/main_index.mako @@ -16,16 +16,18 @@ Main Page - ${parent.title()} +<% i = 1 %> % for (player_id, nick, score) in top_players: + % if player_id != '-': - + % else: - - % endif + % endif + <% i = i+1 %> % endfor
Weapon Nick Score
${i}${player_id}${nick}${player_id}${nick}${score}
@@ -39,16 +41,18 @@ Main Page - ${parent.title()} Server Games +<% i = 1 %> % for (server_id, name, count) in top_servers: + ${i} % if server_id != '-': - ${server_id} + ${name} % else: - ${server_id} - % endif ${name} + % endif ${count} + <% i = i+1 %> % endfor @@ -62,16 +66,18 @@ Main Page - ${parent.title()} Map Times Played +<% i = 1 %> % for (map_id, name, count) in top_maps: + ${i} % if map_id != '-': - ${map_id} + ${name} % else: - ${map_id} - % endif ${name} + % endif ${count} + <% i = i+1 %> % endfor @@ -85,6 +91,7 @@ Main Page - ${parent.title()} Game # + Type Server Map Time @@ -93,10 +100,11 @@ Main Page - ${parent.title()} % for (game, server, map) in recent_games: % if game != '-': - ${game.game_id} - ${server.name} - ${map.name} - ${game.start_dt} + ${game.game_id} + ${game.game_type_cd} + ${server.name} + ${map.name} + ${game.start_dt.strftime('%m/%d/%Y %H:%M')} ${game.winner} % else: @@ -106,6 +114,7 @@ Main Page - ${parent.title()} - - - + - % endif % endfor diff --git a/xonstat/templates/player_info.mako b/xonstat/templates/player_info.mako index 405f7d2..e139f76 100755 --- a/xonstat/templates/player_info.mako +++ b/xonstat/templates/player_info.mako @@ -41,7 +41,7 @@ ${parent.title()} ##### STATS ##### % if game_stats:

Overall Game Stats

- +
@@ -87,7 +87,7 @@ ${accuracy(weapon_stats)} ##### RECENT GAMES (v2) #### % if recent_games:

Recent Games

-
Playing Time${game_stats['total_alivetime']} Drops${game_stats['total_drops']}
+
diff --git a/xonstat/templates/scoreboard.mako b/xonstat/templates/scoreboard.mako index 18ad4cb..8a79a33 100755 --- a/xonstat/templates/scoreboard.mako +++ b/xonstat/templates/scoreboard.mako @@ -1,5 +1,5 @@ <%def name="scoreboard(game_type_cd, pgstats)"> -
Game Type Map
+
##### CTF ##### % if game_type_cd == 'ctf': -- 2.39.2