From: Ant Zucaro Date: Mon, 6 Feb 2012 03:06:18 +0000 (-0500) Subject: Make the scoreboards look more like they used to. X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=3a4fca64967b09ad8ec30dd770fb73312671258a;p=xonotic%2Fxonstat.git Make the scoreboards look more like they used to. --- diff --git a/xonstat/static/css/style.css b/xonstat/static/css/style.css index 3572e43..f43a3fd 100755 --- a/xonstat/static/css/style.css +++ b/xonstat/static/css/style.css @@ -3424,3 +3424,33 @@ a.thumbnail:hover { #navsearch select { width: 80px; } +/* Game scoreboard */ +.game { + background-image: -moz-linear-gradient(center bottom , #062C52, #041B33); + border: 1px solid #A4B7CA; + border-radius: 7px 7px 7px 7px; + box-shadow: 0 0 3px 1px; + float: left; + margin-bottom: 30px; + min-width: 700px; + padding: 10px 7px; +} +.game a { + color: #CCC; +} +.game a:hover { + color: #d95f00; + text-decoration: none; +} +.game tr { + background-color: #000; +} +.game tr.red { + background-color: #571612; +} +.game tr.blue { + background-color: #000F4C; +} +.game tr:hover { + background-color: #222; +} diff --git a/xonstat/templates/game_index.mako b/xonstat/templates/game_index.mako index 1fac682..f9d11de 100755 --- a/xonstat/templates/game_index.mako +++ b/xonstat/templates/game_index.mako @@ -15,37 +15,19 @@ Game Index

Sorry, no games yet. Get playing!

% else: -
-

Filter

- -
-

Gametype

-
-
-
-
-

Sort By

- +
+
+

Recent Games

+ % for (game, server, map) in games: +
+

${map.name} on ${server.name} (permalink)

+ ${scoreboard(game.game_type_cd, pgstats[game.game_id])} +
+ % endfor +
-
-

Recent Games

- % for (game, server, map) in games: -
-

${map.name} on ${server.name} (permalink)

- ## show scoreboard using a def from another file - ${scoreboard(game.game_type_cd, pgstats[game.game_id])} -
-% endfor ${navlinks("game_index_paged", games.page, games.last_page)} - -
% endif diff --git a/xonstat/templates/scoreboard.mako b/xonstat/templates/scoreboard.mako index e697691..148f795 100755 --- a/xonstat/templates/scoreboard.mako +++ b/xonstat/templates/scoreboard.mako @@ -1,32 +1,32 @@ <%def name="scoreboard(game_type_cd, pgstats)"> - +
${scoreboard_header(game_type_cd, pgstats[0])} - - % for pgstat in pgstats: - - - ${scoreboard_row(game_type_cd, pgstat)} - - - - % endfor - + + % for pgstat in pgstats: + + + ${scoreboard_row(game_type_cd, pgstat)} + + + + % endfor +
- % if pgstat.player_id > 2: - - ${pgstat.nick_html_colors()|n} - - % else: - ${pgstat.nick_html_colors()|n} - % endif - ${pgstat.score} - % if pgstat.player_id > 1: - - View - - % endif -
+ % if pgstat.player_id > 2: + + ${pgstat.nick_html_colors()|n} + + % else: + ${pgstat.nick_html_colors()|n} + % endif + ${pgstat.score} + % if pgstat.player_id > 1: + + View + + % endif +
@@ -34,53 +34,53 @@ ${scoreboard_header(game_type_cd, pgstats[0])} <%def name="scoreboard_header(game_type_cd, pgstat)"> % if game_type_cd == 'dm' or game_type_cd == 'tdm' or game_type_cd == 'duel': - - Nick - Kills - Deaths - Suicides - Score - Accuracy - + + Nick + Kills + Deaths + Suicides + Score + Accuracy + % endif % if game_type_cd == 'ctf': - - Nick - Kills - Captures - Pickups - FCK - Returns - Score - Accuracy - + + Nick + Kills + Captures + Pickups + FCK + Returns + Score + Accuracy + % endif % if game_type_cd == 'ca': - - Nick - Kills - Score - Accuracy - + + Nick + Kills + Score + Accuracy + % endif % if game_type_cd == 'freezetag': - - Nick - Kills - Deaths - Suicides - Score - Accuracy - + + Nick + Kills + Deaths + Suicides + Score + Accuracy + % endif