From 719d00b98c8bedb04625acdf533c342ccc882159 Mon Sep 17 00:00:00 2001 From: Ant Zucaro Date: Tue, 17 Mar 2015 18:12:52 -0400 Subject: [PATCH] Convert the player_game_index view. --- xonstat/static/css/app.css | 12 ++ xonstat/templates/player_game_index.mako | 204 ++++++++++++----------- 2 files changed, 117 insertions(+), 99 deletions(-) diff --git a/xonstat/static/css/app.css b/xonstat/static/css/app.css index a15c61d..9425cf6 100644 --- a/xonstat/static/css/app.css +++ b/xonstat/static/css/app.css @@ -199,3 +199,15 @@ table thead tr th, table thead tr td, table tr th, table tr td { background-color: #111; color: #aaa; } + +.eloup { + color: #008000; +} + +.elodown { + color: #BE0000; +} + +.eloneutral { + color: gray; +} diff --git a/xonstat/templates/player_game_index.mako b/xonstat/templates/player_game_index.mako index b3c27bb..855befb 100644 --- a/xonstat/templates/player_game_index.mako +++ b/xonstat/templates/player_game_index.mako @@ -3,125 +3,131 @@ <%namespace file="navlinks.mako" import="navlinks" /> <%block name="css"> -${parent.css()} - + ${parent.css()} + <%block name="navigation"> -${nav.nav('games')} + ${nav.nav('games')} <%block name="title"> -Recent Games + Recent Games % if not games: -

Sorry, no +

Sorry, no % if game_type_descr: - ${game_type_descr.lower()} + ${game_type_descr.lower()} % endif - games yet for - ${player.nick_html_colors()|n}. Get playing! -

-

Back to player info page

+ games yet for + ${player.nick_html_colors()|n}. Get playing! + + +

Back to player info page

% else: -
-
-

Recent - % if game_type_descr: - ${game_type_descr} - % endif - Games by - - ${player.nick_html_colors()|n} - -

+
+
+
Recent + % if game_type_descr: + ${game_type_descr} + % endif + Games by + + ${player.nick_html_colors()|n} + +
+
-
-
-
- +
+
+ +
+
-
- - + +
+
+
+ + + + + + + + + + + + + % for rg in games.items: - - - - - - - - - - - % for rg in games.items: - - - - - - - - + + + + - - % endfor - -
TypeServerMapResultPlayedElo
TypeServerMapResultPlayedElo
view${rg.game_type_cd}${rg.server_name}${rg.map_name} - % if rg.team != None: - % if rg.team == rg.winner: - Win - % else: - Loss - % endif - % else: - % if rg.rank == 1: - Win - % else: - Loss (#${rg.rank}) - % endif - % endif - ${rg.fuzzy_date} - - % if rg.elo_delta is not None: - % if round(rg.elo_delta,2) > 0: - +${round(rg.elo_delta,2)} - % elif round(rg.elo_delta,2) < 0: - ${round(rg.elo_delta,2)} + view${rg.game_type_cd}${rg.server_name}${rg.map_name} + % if rg.team != None: + % if rg.team == rg.winner: + Win + % else: + Loss + % endif % else: - + % if rg.rank == 1: + Win + % else: + Loss (#${rg.rank}) + % endif % endif - % else: - - % endif - -
+ + ${rg.fuzzy_date} + + + % if rg.elo_delta is not None: + % if round(rg.elo_delta,2) > 0: + +${round(rg.elo_delta,2)} + % elif round(rg.elo_delta,2) < 0: + ${round(rg.elo_delta,2)} + % else: + + % endif + % else: + + % endif + + + + % endfor + + +
-
- -${navlinks("player_game_index", games.page, games.last_page, player_id=player_id, search_query=request.GET)} + + ${navlinks("player_game_index", games.page, games.last_page, player_id=player_id, search_query=request.GET)} % endif -- 2.39.2