diff --git a/app.py b/app.py index 292b3cf..1cf7653 100644 --- a/app.py +++ b/app.py @@ -33,15 +33,14 @@ def show_app(): return render_template("app.html", js_files=js_files) #Retrieve Monster Sprites -#@app.route('/img/monster/.png') -#def retrieve_monster_sprite(selected_monster): -# return send_from_directory('static/img/monster', f'{selected_monster}.png') +@app.route('/img/monster/.png') +def retrieve_monster_sprite(selected_monster): + return send_from_directory('static/img/monster', f'{selected_monster}.png') -##NOT SURE THIS IS NEEDED #Retrieve Favicon -#@app.route('/img/favicon.ico') -#def retrieve_favicon(): -# return send_from_directory( '','static/img/favicon.ico') +@app.route('/img/favicon.ico') +def retrieve_favicon(): + return send_from_directory( '','static/img/favicon.ico') @app.route("/get_families") def get_families(): diff --git a/static/js/updateMonsterSprite.js b/static/js/updateMonsterSprite.js index 90a75b7..c3f2e51 100644 --- a/static/js/updateMonsterSprite.js +++ b/static/js/updateMonsterSprite.js @@ -1,6 +1,6 @@ function updateMonsterSprite() { var selectedMonster = document.getElementById("monsterDropdown").value; - var spriteUrl = `/static/img/monster/${selectedMonster}.png`; + var spriteUrl = `/img/monster/${selectedMonster}.png`; var iframe = document.getElementById("monsterSpriteIframe"); iframe.src = "about:blank"; // Clear the iframe content diff --git a/templates/.layout.html b/templates/.layout.html index fe07da7..3983e7d 100644 --- a/templates/.layout.html +++ b/templates/.layout.html @@ -3,7 +3,7 @@ - + {% block head %}{% endblock %}