From 3304a162efa3d59c677ebb4f1675f70590bdec85 Mon Sep 17 00:00:00 2001 From: Yarne Coppens Date: Mon, 5 Aug 2024 17:03:10 +0200 Subject: [PATCH] Switched to Bootstrap --- index.html | 79 +++++++++++++++++-------------------------------- scripts/main.js | 6 ++-- 2 files changed, 31 insertions(+), 54 deletions(-) diff --git a/index.html b/index.html index 9e04e38..3313c6f 100644 --- a/index.html +++ b/index.html @@ -7,7 +7,7 @@ Toddler Shop - + @@ -17,59 +17,34 @@ - -
-
- - - - - - - +
+
+
+
+ +
+
Card title
+
+
+
+
+
+ ... +
+
Card title
+
+
+
+
+
+ ... +
+
Card title
+
+
+
- -
- - - - - - - -
- -
- - - - - - - -
- -
- - - - - - - -
- -
- - - - - - - -
-

€ 0

diff --git a/scripts/main.js b/scripts/main.js index 7c638e0..fc66939 100644 --- a/scripts/main.js +++ b/scripts/main.js @@ -38,7 +38,7 @@ async function loadProducts() { barcode_input.value = "" - const product_placeholders = document.getElementsByClassName('product_placeholder') + const product_placeholders = document.getElementsByClassName('product_col') const chosen_product_placeholder = product_placeholders[to_fill_product_index] const image_product = chosen_product_placeholder.getElementsByClassName('product_image')[0] const price_product = chosen_product_placeholder.getElementsByClassName('product_price')[0] @@ -46,7 +46,9 @@ async function loadProducts() { total_price += chosen_product.price - image_product.setAttribute('href', api_url + "/icons/" + chosen_product.image_filename); + console.log(image_product) + + image_product.setAttribute('src', api_url + "/icons/" + chosen_product.image_filename); price_product.textContent = "\u20AC " + chosen_product.price total_price_holder.textContent = "\u20AC " + total_price