test image dependancy
This commit is contained in:
parent
a9b9693795
commit
819f321387
12
app.py
12
app.py
@ -1,4 +1,4 @@
|
||||
from flask import Flask, render_template, g, abort, request, jsonify
|
||||
from flask import Flask, render_template, g, abort, request, jsonify, send_from_directory
|
||||
import sqlite3, os
|
||||
|
||||
app = Flask(__name__)
|
||||
@ -32,6 +32,16 @@ def show_app():
|
||||
js_files = get_js_files()
|
||||
return render_template("app.html", js_files=js_files)
|
||||
|
||||
#Retrieve Monster Sprites
|
||||
#@app.route('/img/monster/<selected_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("/get_families")
|
||||
def get_families():
|
||||
|
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 41 KiB |
@ -1,12 +0,0 @@
|
||||
//function updateMonstersDropdownBySelected() {
|
||||
// const selectedMonster = parent.value;
|
||||
//
|
||||
// // Fetch monsters data from the server based on the selected monster
|
||||
// fetch(`/monster_info_json/${selectedMonster}`)
|
||||
// .then(response => response.json())
|
||||
// .then(data => populateDropdown(monsterDropdown, data))
|
||||
// .catch(error => console.error("Error fetching monsters:", error));
|
||||
//}
|
||||
|
||||
// I was using this to try to update the page when a monster
|
||||
// in the breeding page is clicked
|
@ -1,6 +1,6 @@
|
||||
function updateMonsterSprite() {
|
||||
var selectedMonster = document.getElementById("monsterDropdown").value;
|
||||
var spriteUrl = `https://happytavern.co/.pictures/dwm/monster/${selectedMonster}.png`;
|
||||
var spriteUrl = `/static/img/monster/${selectedMonster}.png`;
|
||||
|
||||
var iframe = document.getElementById("monsterSpriteIframe");
|
||||
iframe.src = "about:blank"; // Clear the iframe content
|
||||
|
@ -3,11 +3,11 @@
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<link rel="icon" href="https://happytavern.co/.pictures/dwm/favicon.ico" />
|
||||
<link rel="icon" href="../static/img/favicon.ico" />
|
||||
<link rel="stylesheet" href="../static/style/output.css" />
|
||||
{% block head %}{% endblock %}
|
||||
</head>
|
||||
<body class="content-center p-2 m-2 font-mono text-white bg-slate-800">
|
||||
<body class="content-center justify-center p-2 m-2 font-mono text-white bg-slate-800">
|
||||
{% block body %} {% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<h1 class="text-2xl font-black text-white">
|
||||
Welcome to the Dragon Warrior Monsters 2 App
|
||||
</h1>
|
||||
<div>
|
||||
|
||||
<label for="familyDropdown">Select Family:</label>
|
||||
<select id="familyDropdown" class="p-2 rounded-md bg-slate-900">
|
||||
<option value="">All Families</option>
|
||||
@ -46,7 +46,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer mx-auto">
|
||||
<div class="mx-auto footer">
|
||||
<h2 class="m-2 text-2xl font-bold">About The App</h2>
|
||||
<p class="leading-7">
|
||||
Dragon Warrior Monsters 2 App, an open-source project where you can explore
|
||||
|
Loading…
Reference in New Issue
Block a user