diff options
author | emkael <emkael@tlen.pl> | 2019-07-25 15:31:20 +0200 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2019-07-25 15:31:34 +0200 |
commit | 4d9a34d7a38533e9ff9808b83b011b3a00bde68f (patch) | |
tree | 4f7c0d3f7bc73027bf4163430f7f494d44c2ff1a | |
parent | 941bf6bb283d8ef1189ee6c10113aa72e204ae1c (diff) |
Attaching favicon to results pages
Fixes #6
-rw-r--r-- | ausbutler/interface.py | 9 | ||||
-rw-r--r-- | template/frame.html | 4 | ||||
-rw-r--r-- | template/segment.html | 4 | ||||
-rw-r--r-- | 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 @@ <meta name="Generator" content="jfr-aus-butler"> <title>{{"PAGE_TITLE"|translate}}: {{"BUTLER"|translate}}, {{"ROUND"|translate}}{{round_no}}, {{"SEGMENT"|translate}}{{segment_no}}</title> <link rel="stylesheet" type="text/css" href="css/kolorki.css"> + {% if favicon %} + <link rel="shortcut icon" href="images/{{favicon}}" type="image/x-icon"> + <link rel="icon" href="images/{{favicon}}" type="image/x-icon"> + {% endif %} </head> <frameset cols="*,325" framespacing="0" border="0" frameborder="0"> <frame noresize name="polew" src="{{prefix}}normbutler{{round_no}}-{{segment_no}}.html"> 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 @@ <meta name="Generator" content="jfrteamy-aus-butler"> <title>{{"PAGE_TITLE"|translate}}</title> <link rel="stylesheet" type="text/css" href="css/kolorki.css"> + {% if favicon %} + <link rel="shortcut icon" href="images/{{favicon}}" type="image/x-icon"> + <link rel="icon" href="images/{{favicon}}" type="image/x-icon"> + {% endif %} <script type="text/javascript" src="sklady/myAjax.js"></script> </head> <body class="all"> 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 @@ <meta name="Generator" content="jfrteamy-aus-butler"> <title>{{"PAGE_TITLE"|translate}}: {{"BUTLER"|translate}}</title> <link rel="stylesheet" type="text/css" href="css/kolorki.css"> + {% if favicon %} + <link rel="shortcut icon" href="images/{{favicon}}" type="image/x-icon"> + <link rel="icon" href="images/{{favicon}}" type="image/x-icon"> + {% endif %} <script type="text/javascript" src="sklady/myAjax.js"></script> </head> <body class="all"> |