From: Ant Zucaro Date: Sun, 29 Mar 2015 13:47:07 +0000 (-0400) Subject: Progress on the game info page. X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=1a33fc8c4677e7f52aaf6bab4ede907d67dab89b;p=xonotic%2Fxonstat.git Progress on the game info page. --- diff --git a/xonstat/static/css/app.css b/xonstat/static/css/app.css index 8202e04..2b87734 100644 --- a/xonstat/static/css/app.css +++ b/xonstat/static/css/app.css @@ -50,7 +50,7 @@ table tr td { font-size: 10px; } -table thead { +table thead, table th { background-color: #001021; } @@ -216,6 +216,64 @@ table thead tr th, table thead tr td, table tr th, table tr td { color: gray; } +.game { + margin-bottom: 1rem; +} + +.game a { + color: #CCC; +} + +.game a:hover { + color: #d95f00; + text-decoration: none; +} + +.game tr { + background-color: #000; +} + +.game tr.red { + background-color: #4d0000; +} + +.game tr.blue { + background-color: #00004d; +} + +.game tr.yellow { + background-color: #4d4d00; +} + +.game tr.pink { + background-color: #4d004d; +} + +.game tr:hover { + background-color: #222; +} + +.teamscore { + text-shadow: -1px -1px 0 #222; + font-weight: bold; +} + +.teamscore .red { + color: #ad0000; +} + +.teamscore .blue { + color: #0000ad; +} + +.teamscore .yellow { + color: #adad00; +} + +.teamscore .pink { + color: #ad00ad; +} + .tabs-content { margin-bottom: 0; } diff --git a/xonstat/templates/game_info.mako b/xonstat/templates/game_info.mako index b9ab876..de2acf9 100644 --- a/xonstat/templates/game_info.mako +++ b/xonstat/templates/game_info.mako @@ -4,157 +4,159 @@ <%namespace file="accuracy.mako" import="accuracy" /> <%block name="navigation"> -${nav.nav('games')} + ${nav.nav('games')} <%block name="css"> -${parent.css()} - + ${parent.css()} + <%block name="js"> -${parent.js()} - + // show accordion only when loaded to prevent rollup from being seen + $("#acc-accordion").css('display', ''); + <%block name="title"> -Game Information + Game Information % if game is None: -

Sorry, that game wasn't found!

+

Sorry, that game wasn't found!

% else: -
-

Game Detail

-
- ${game.game_type_cd} -

- Played: ${game.fuzzy_date()}
- Game Type: ${gametype.descr} (${game.game_type_cd})
- Server: ${server.name}
- Map: ${map.name}
- % if game.duration is not None: - Duration: ${"%s:%02d" % (game.duration.seconds/60, game.duration.seconds%60)} +

+ +
+

Game #${game.game_id}

+

+ ${game.game_type_cd} ${gametype.descr} (${game.game_type_cd})
+ Played ${game.fuzzy_date()}
+ Server: ${server.name}
+ Map: ${map.name}
+ % if game.duration is not None: + Duration: ${"%s:%02d" % (game.duration.seconds/60, game.duration.seconds%60)} + % endif +

+
+ + % if teamscores: +
+ + + + + + + % for ts in teamscores: + + % endfor + +
TeamScore
${ts.team.capitalize()}${ts.score}
+
% endif -

-
- % if teamscores: -
- - - - - - - % for ts in teamscores: - + + ##### Games that have team scores push the scoreboard table to the right by + ##### one column. + % if len(tgstats) == len(stats_by_team): + % for tgstat in tgstats: +
+ +
+
+ ${tgstat.team_html_color().capitalize()} +
+
+ % if game.game_type_cd == 'ctf': + ${tgstat.caps} + % elif game.game_type_cd == 'ca': + ${tgstat.rounds} + % else: + ${tgstat.score} + % endif +
+
+ +
+ ${scoreboard(game.game_type_cd, stats_by_team[tgstat.team], show_elo, show_latency)} +
+
% endfor - -
TeamScore
${ts.team.capitalize()}${ts.score}
-
- % endif -
- -% if len(tgstats) == len(stats_by_team): -## if we have teamscores in the db -% for tgstat in tgstats: -
-
-
- ${tgstat.team_html_color().capitalize()} -
-
- % if game.game_type_cd == 'ctf': - ${tgstat.caps} - % elif game.game_type_cd == 'ca': - ${tgstat.rounds} -## dom -> ticks, rc -> laps, nb -> goals, as -> objectives + + ##### Games that do not have team scores use the full width % else: - ${tgstat.score} + % for team in stats_by_team.keys(): +
+
+ ${scoreboard(game.game_type_cd, stats_by_team[team], show_elo, show_latency)} +
+
+ % endfor % endif -
-
-
- ${scoreboard(game.game_type_cd, stats_by_team[tgstat.team], show_elo, show_latency)} -
-
-% endfor -% else: -% for team in stats_by_team.keys(): -
-
- ${scoreboard(game.game_type_cd, stats_by_team[team], show_elo, show_latency)} -
-
-% endfor -% endif -% if len(captimes) > 0: -
-
-

Best Flag Capture Times

- - + % if len(captimes) > 0: +
+
+

Best Flag Capture Times

+
+ + + + + + + + % for pgs in captimes: - - - - - - % for pgs in captimes: - - - - - % endfor - -
NickCaptime
NickCaptime
- % if pgs.player_id > 2: - + + % if pgs.player_id > 2: + + ${pgs.nick_html_colors()|n} + + % else: ${pgs.nick_html_colors()|n} - - % else: - ${pgs.nick_html_colors()|n} - % endif - ${round(float(pgs.fastest.seconds) + (pgs.fastest.microseconds/1000000.0), 2)}
+ % endif + + ${round(float(pgs.fastest.seconds) + (pgs.fastest.microseconds/1000000.0), 2)} + + % endfor + + +
-
% endif - % if len(pgstats) > 0 and len(pwstats) > 0: -
-
-

Accuracy Information

-