diff options
author | emkael <emkael@tlen.pl> | 2018-02-21 14:09:05 +0100 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2018-02-21 14:09:05 +0100 |
commit | ccc54fde2f8c9301962e9c6f464d5f2eacd5506a (patch) | |
tree | 21a2f05ea664065d1aa98a3c69d58d6c14afdf59 /jfr_playoff/template.py | |
parent | 415748f29a6b3048bef08703a93c4f441f67d1eb (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.py | 44 |
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 = ''' + %.1f +''' + +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"> <a href="%s" onmouseover="Tip('%s')" onmouseout="UnTip()">%s</a> </td> +<td class="bd1"> %s </td> <td class="bdc"> -<a href="%s" target="_top"> - %.1f -</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 = ''' |