diff --git a/app.py b/app.py index 4aa3b78..581ba32 100644 --- a/app.py +++ b/app.py @@ -17,7 +17,6 @@ def index(): with open('./static/sets/'+set_num+'/info.json') as info: info_file = json.loads(info.read()) set_list.append(info_file) - print(set_list) return render_template('frontpage.html',set_list=set_list) @app.route('/') @@ -28,8 +27,7 @@ def sets(tmp): inventory_file = json.loads(inventory.read()) with open('./info/'+tmp+'.json') as info: json_file = json.loads(info.read()) - pp(json_file['unit'][0]['bricks']['missing']) - return render_template('bootstrap_table.html', tmp=tmp,title=info_file['set_num']+" - "+info_file['name'], + return render_template('bootstrap_table.html', tmp=tmp,title=info_file['name'], info_file=info_file,inventory_file=inventory_file,json_file=json_file) diff --git a/templates/base.html b/templates/base.html index 70cc741..105b82f 100644 --- a/templates/base.html +++ b/templates/base.html @@ -33,6 +33,14 @@ table { text-overflow: ellipsis; } +#data th:nth-child(4), +#data td:nth-child(4) { + max-width: 100px; /* Adjust as needed */ + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; +} + .center-table { } @@ -211,8 +219,11 @@ input[type=number] {
-

{{ title }}

-
+
+ +

{{ tmp }}

+ Image +

{{ title }}

{% block content %}{% endblock %}
{% block scripts %}{% endblock %} diff --git a/templates/bootstrap_table.html b/templates/bootstrap_table.html index ffd6a0f..4bce6d6 100644 --- a/templates/bootstrap_table.html +++ b/templates/bootstrap_table.html @@ -9,7 +9,7 @@ ID Name - Color + Color Qty {% for i in json_file['unit'] %} Missing ({{ loop.index }})