From: Ant Zucaro Date: Sat, 6 Oct 2012 15:00:30 +0000 (-0400) Subject: Add elo deltas to the player info page. X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=99f47ca05d3248caa1d7ebf0b82ec7a861c08b16;p=xonotic%2Fxonstat.git Add elo deltas to the player info page. The elo deltas will just show an up, down, or neutral icon for how their elo has changed during the games in the "recent games" table at the bottom of the page. Hovering over these icons will show the actual delta value in the event it went up or down (rather than stayed the same). --- diff --git a/xonstat/static/css/img/glyphicons-halflings-white.png b/xonstat/static/css/img/glyphicons-halflings-white.png new file mode 100644 index 0000000..3bf6484 Binary files /dev/null and b/xonstat/static/css/img/glyphicons-halflings-white.png differ diff --git a/xonstat/static/css/img/glyphicons-halflings.png b/xonstat/static/css/img/glyphicons-halflings.png new file mode 100644 index 0000000..a996999 Binary files /dev/null and b/xonstat/static/css/img/glyphicons-halflings.png differ diff --git a/xonstat/static/css/style.css b/xonstat/static/css/style.css index d872066..58aa20d 100755 --- a/xonstat/static/css/style.css +++ b/xonstat/static/css/style.css @@ -1147,7 +1147,7 @@ table .span12 { width: 14px; height: 14px; vertical-align: text-top; - background-image: url(../img/glyphicons-halflings.png); + background-image: url('img/glyphicons-halflings.png'); background-position: 14px 14px; background-repeat: no-repeat; *margin-right: .3em; @@ -1156,7 +1156,7 @@ table .span12 { *margin-left: 0; } .icon-white { - background-image: url(../img/glyphicons-halflings-white.png); + background-image: url('img/glyphicons-halflings-white.png'); } .icon-glass { background-position: 0 0; @@ -3512,3 +3512,5 @@ header h2 { display:none; } .nav-tabs > li > a { border-radius: 4px 4px 4px 4px; text-align: center; } .nav-tabs > li > a:hover { background-color: #111; border-color: #333; } .nav-tabs { border-bottom: 0px solid #000; } + +.table .tdcenter { text-align: center; } diff --git a/xonstat/templates/player_info.mako b/xonstat/templates/player_info.mako index 6ec476e..34737f6 100644 --- a/xonstat/templates/player_info.mako +++ b/xonstat/templates/player_info.mako @@ -219,7 +219,7 @@ Player Information

- Win Percentage: ${round(g.win_pct,2)}% (${g.wins} wins, ${g.losses} losses)
+ Win Percentage: ${round(g.win_pct,2)}% (${g.wins} wins, ${g.losses} losses)
% if g.game_type_cd in overall_stats: % if overall_stats[g.game_type_cd].k_d_ratio is not None: @@ -430,13 +430,14 @@ Player Information Map Result Played + Elo % for (gamestat, game, server, map) in recent_games: - view - ${game.game_type_cd} + view + ${game.game_type_cd} ${server.name} ${map.name} @@ -455,6 +456,15 @@ Player Information % endif ${game.fuzzy_date()} + + % if round(gamestat.elo_delta,2) > 0: + + % elif round(gamestat.elo_delta,2) < 0: + + % else: + + % endif + % endfor