try:
txt = "%.2f%%" % round(win_pct, 2)
except:
- win_pct = 0
+ win_pct = 0.
if self.winp_pos:
- if win_pct >= 0.5:
- nr = 2*(win_pct-0.5)
+ if win_pct >= 50.0:
+ nr = 2*(win_pct/100-0.5)
r = nr*self.winp_colortop[0] + (1-nr)*self.winp_colormid[0]
g = nr*self.winp_colortop[1] + (1-nr)*self.winp_colormid[1]
b = nr*self.winp_colortop[2] + (1-nr)*self.winp_colormid[2]
else:
- nr = 2*win_pct
+ nr = 2*(win_pct/100)
r = nr*self.winp_colormid[0] + (1-nr)*self.winp_colorbot[0]
g = nr*self.winp_colormid[1] + (1-nr)*self.winp_colorbot[1]
b = nr*self.winp_colormid[2] + (1-nr)*self.winp_colorbot[2]
float: left;
}
+
+/* Teamscores */
+.teamscores tr {
+ background-color: #000;
+}
+.teamscores td {
+ padding: 3px;
+ text-align: center;
+ font-size: 12px;
+ font-weight: bold;
+}
+.teamscores tr.red {
+ background-color: #4d0000;
+}
+.teamscores tr.blue {
+ background-color: #00004d;
+}
+.teamscores tr.yellow {
+ background-color: #4d4d00;
+}
+.teamscores tr.pink {
+ background-color: #4d004d;
+}
+
+
/* Gametype filters */
.btn-toolbar .nav > li a {
width: 80px;
% else:
<div class="row">
- <div class="span10 game-detail">
- <h2>Game Detail</h2>
- <img width="48" height="48" src="/static/images/icons/48x48/${game.game_type_cd}.png" alt="${game.game_type_cd}"/>
+ <h2>Game Detail</h2>
+ <div class="span6 game-detail">
+ <img width="64" height="64" src="/static/images/icons/48x48/${game.game_type_cd}.png" alt="${game.game_type_cd}"/>
<p>
Played: <span class="abstime" data-epoch="${game.epoch()}" title="${game.start_dt.strftime('%a, %d %b %Y %H:%M:%S UTC')}">${game.fuzzy_date()}</span><br />
Game Type: ${gametype.descr} (${game.game_type_cd})<br />
</p>
<span class="clear"></span>
</div>
+ % if teamscores:
+ <div class="span3 teamscores">
+ <table class="table table-condensed">
+ <thead>
+ <th>Team</th>
+ <th>Score</th>
+ </thead>
+ <tbody>
+ % for ts in teamscores:
+ <tr class="${ts.team}"><td>${ts.team.capitalize()}</td><td>${ts.score}</td></tr>
+ % endfor
+ </tbody>
+ </table>
+ </div>
+ % endif
</div>
% for team in stats_by_team.keys():