summaryrefslogtreecommitdiff
path: root/jfr_playoff/template.py
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2018-02-21 14:09:05 +0100
committeremkael <emkael@tlen.pl>2018-02-21 14:09:05 +0100
commitccc54fde2f8c9301962e9c6f464d5f2eacd5506a (patch)
tree21a2f05ea664065d1aa98a3c69d58d6c14afdf59 /jfr_playoff/template.py
parent415748f29a6b3048bef08703a93c4f441f67d1eb (diff)
Not rendering phase/match links if they're not set
Fixes #13
Diffstat (limited to 'jfr_playoff/template.py')
-rw-r--r--jfr_playoff/template.py44
1 files changed, 33 insertions, 11 deletions
diff --git a/jfr_playoff/template.py b/jfr_playoff/template.py
index b814026..8e2d207 100644
--- a/jfr_playoff/template.py
+++ b/jfr_playoff/template.py
@@ -10,23 +10,37 @@ MATCH_TABLE = '''
</table>
'''
+MATCH_LINK = '''
+<a href="%s" target="_top">
+%s
+</a>
+'''
+
+MATCH_SCORE = '''
+&nbsp;%.1f&nbsp;
+'''
+
+MATCH_TEAM_LINK = '''
+<a href="%s" onmouseover="Tip('%s')" onmouseout="UnTip()">%s</a>
+'''
+
+MATCH_TEAM_NON_LINK = '''
+<a onmouseover="Tip('%s')" onmouseout="UnTip()">%s</a>
+'''
+
MATCH_TEAM_ROW = '''
<tr class="%s">
-<td class="bd1">&nbsp;<a href="%s" onmouseover="Tip('%s')" onmouseout="UnTip()">%s</a>&nbsp;</td>
+<td class="bd1">&nbsp;%s&nbsp;</td>
<td class="bdc">
-<a href="%s" target="_top">
-&nbsp;%.1f&nbsp;
-</a>
+%s
</td>
</tr>
'''
MATCH_RUNNING = '''
-<a href="%s" target="_top">
<img src="images/A.gif" />
-%d
+<span style="font-size: 10pt">%d</span>
<img src="images/A.gif" />
-</a>
'''
MATCH_GRID = '''
@@ -37,18 +51,26 @@ MATCH_GRID = '''
</div>
'''
-MATCH_GRID_PHASE = '''
+MATCH_GRID_PHASE_LINK = '''
<a href="%s" target="_top" style="display: inline-block; width: %dpx; text-align: center; position: absolute; top: 0; left: %dpx">
-<font size="4">%s</font>
+%s
</a>
'''
+MATCH_GRID_PHASE_NON_LINK = '''
+<span class="phase_header" style="display: inline-block; width: %dpx; text-align: center; position: absolute; top: 0; left: %dpx">
+<p style="margin: 0">%s</p>
+</span>
+'''
+
+MATCH_GRID_PHASE = '''
+<font size="4">%s</font>
+'''
+
MATCH_GRID_PHASE_RUNNING = '''
-<a href="%s" target="_top" style="display: inline-block; width: %dpx; text-align: center; position: absolute; top: 0; left: %dpx">
<img src="images/A.gif" />
<font size="4">%s</font>
<img src="images/A.gif" />
-</a>
'''
MATCH_BOX = '''