From 4d9a34d7a38533e9ff9808b83b011b3a00bde68f Mon Sep 17 00:00:00 2001 From: emkael Date: Thu, 25 Jul 2019 15:31:20 +0200 Subject: Attaching favicon to results pages Fixes #6 --- ausbutler/interface.py | 9 ++++++--- template/frame.html | 4 ++++ template/segment.html | 4 ++++ template/table.html | 4 ++++ 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/ausbutler/interface.py b/ausbutler/interface.py index b3d7c21..d79686d 100644 --- a/ausbutler/interface.py +++ b/ausbutler/interface.py @@ -149,7 +149,8 @@ class Interface(object): 'prefix': Constants.shortname, 'round_no': round_no, 'segment_no': segment_no, - 'first_board': first_board + 'first_board': first_board, + 'favicon': Constants.favicon }).encode('utf8') ) files.append(filename) @@ -209,7 +210,8 @@ class Interface(object): first_board + Constants.boardspersegment ), 'date': datetime.now().strftime('%Y-%m-%d'), - 'time': datetime.now().strftime('%H:%M') + 'time': datetime.now().strftime('%H:%M'), + 'favicon': Constants.favicon }).encode('utf8') ) files.append(filename) @@ -290,7 +292,8 @@ class Interface(object): 'above_threshold': above_threshold, 'below_threshold': below_threshold, 'date': datetime.now().strftime('%Y-%m-%d'), - 'time': datetime.now().strftime('%H:%M') + 'time': datetime.now().strftime('%H:%M'), + 'favicon': Constants.favicon }).encode('utf8') ) return [filename] diff --git a/template/frame.html b/template/frame.html index e1b7398..a3f1d3c 100644 --- a/template/frame.html +++ b/template/frame.html @@ -9,6 +9,10 @@ {{"PAGE_TITLE"|translate}}: {{"BUTLER"|translate}}, {{"ROUND"|translate}}{{round_no}}, {{"SEGMENT"|translate}}{{segment_no}} + {% if favicon %} + + + {% endif %} diff --git a/template/segment.html b/template/segment.html index 2401e3e..6948ebb 100644 --- a/template/segment.html +++ b/template/segment.html @@ -10,6 +10,10 @@ {{"PAGE_TITLE"|translate}} + {% if favicon %} + + + {% endif %} diff --git a/template/table.html b/template/table.html index 8dceb2a..e6e3d77 100644 --- a/template/table.html +++ b/template/table.html @@ -10,6 +10,10 @@ {{"PAGE_TITLE"|translate}}: {{"BUTLER"|translate}} + {% if favicon %} + + + {% endif %} -- cgit v1.2.3