From 276f48e4a382cd424d722625a239afa225cb52b7 Mon Sep 17 00:00:00 2001 From: FrederikBaerentsen Date: Sun, 3 Mar 2024 06:43:35 -0500 Subject: [PATCH] Working frontpage with responsive grid. Fixed issue with part without element_id --- templates/bootstrap_table.html | 14 +++++++-- templates/frontpage.html | 53 ++++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+), 3 deletions(-) create mode 100644 templates/frontpage.html diff --git a/templates/bootstrap_table.html b/templates/bootstrap_table.html index 269d879..a5290e6 100644 --- a/templates/bootstrap_table.html +++ b/templates/bootstrap_table.html @@ -21,8 +21,12 @@ {% for brick in inventory_file.results %} {% if brick.is_spare == False %} - - {{ brick.element_id }} + {% if brick.element_id == None %} + + {% else %} + + {% endif %} + {{ brick.element_id }} {{ brick.part.part_num }} {{ brick.part.name }} {{ brick.color.id }} @@ -76,7 +80,11 @@ {% for brick in inventory_file.results %} {% if brick.is_spare == True %} - + {% if brick.element_id == None %} + + {% else %} + + {% endif %} {{ brick.element_id }} {{ brick.part.part_num }} {{ brick.part.name }} diff --git a/templates/frontpage.html b/templates/frontpage.html new file mode 100644 index 0000000..6eb0cf3 --- /dev/null +++ b/templates/frontpage.html @@ -0,0 +1,53 @@ + + + + + +Responsive Grid + + + + +
+ +{% for i in set_list %} + +
+ Image +

{{ i['name'] }}

+

Set: {{ i['set_num'] }}

+

Year: {{ i['year'] }}

+

Parts: {{ i['num_parts'] }}

+

Inventory: Link

+
+ +{% endfor %} + +
+ +