2024-02-15 15:09:54 +00:00
|
|
|
from flask import send_from_directory, Blueprint
|
|
|
|
|
2024-02-21 13:26:28 +00:00
|
|
|
serve_img_bp = Blueprint('favicon', __name__)
|
2024-02-15 15:09:54 +00:00
|
|
|
serve_monster_sprite_bp = Blueprint('monster_sprite', __name__)
|
|
|
|
|
|
|
|
#Serve Monster Sprites
|
2024-02-21 13:26:28 +00:00
|
|
|
@serve_img_bp.route('/img/monster/<selected_monster>.png')
|
2024-02-15 15:09:54 +00:00
|
|
|
def serve_monster_sprite(selected_monster):
|
|
|
|
return send_from_directory('static/img/monster/', f'{selected_monster}.png')
|
|
|
|
|
|
|
|
#Serve Favicon
|
2024-02-21 13:26:28 +00:00
|
|
|
@serve_img_bp.route('/img/favicon.ico')
|
2024-02-15 15:09:54 +00:00
|
|
|
def serve_favicon():
|
|
|
|
return send_from_directory( '','static/img/favicon.ico')
|