summaryrefslogtreecommitdiff
path: root/playoff.py
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2017-07-31 14:42:49 +0200
committeremkael <emkael@tlen.pl>2017-07-31 14:42:49 +0200
commite6c2b0521760d32ac3be5b5ca66b98f2c67046e4 (patch)
treedbf049de8438b976e9e3df140a305587e32228e0 /playoff.py
parent1a0d4323cd25b1653663013ca3183fb0b67a878e (diff)
Customizable JS settings
Diffstat (limited to 'playoff.py')
-rw-r--r--playoff.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/playoff.py b/playoff.py
index 70f4925..36cfb35 100644
--- a/playoff.py
+++ b/playoff.py
@@ -96,7 +96,13 @@ def get_match_grid(grid, matches, width, height):
)
row_no += 1
col_no += 1
- return p_temp.MATCH_GRID % (width, height, width, height, grid_boxes)
+ canvas_settings = []
+ if 'canvas' in settings:
+ for setting, value in settings['canvas'].iteritems():
+ canvas_settings.append(
+ 'data-%s="%s"' % (setting.replace('_', '-'), str(value))
+ )
+ return p_temp.MATCH_GRID % (width, height, width, height, ' '.join(canvas_settings), grid_boxes)
def get_leaderboard_table(leaderboard):
if len([t for t in leaderboard if t is not None]) == 0: