favicon2 #15
1 changed files with 5 additions and 4 deletions
|
@ -27,18 +27,19 @@ def index(hours=None, minutes=None):
|
||||||
return data
|
return data
|
||||||
|
|
||||||
@app.route('/favicon.ico')
|
@app.route('/favicon.ico')
|
||||||
def favicon():
|
def default_favicon():
|
||||||
""" serve default favicon """
|
""" serve default favicon """
|
||||||
return send_from_directory('static', 'clock-icon.png')
|
return send_from_directory('static', 'clock-icon.png')
|
||||||
|
|
||||||
@app.route('/favicon/<mode>')
|
@app.route('/favicon/<mode>')
|
||||||
def favicon():
|
def favicon(mode):
|
||||||
""" serve the favicon according to the timer """
|
""" serve the favicon according to the timer """
|
||||||
if mode == 'beer':
|
if mode == 'beer':
|
||||||
return send_from_directory('static', 'beer-icon.png')
|
filename = 'beer-icon.png'
|
||||||
else:
|
else:
|
||||||
return send_from_directory('static', 'clock-icon.png')
|
filename = 'clock-icon.png'
|
||||||
|
|
||||||
|
return send_from_directory('static', filename)
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
""" main func """
|
""" main func """
|
||||||
|
|
Loading…
Reference in a new issue