From 5361f6395b610af2d7088302978f4fdc4cad0c2e Mon Sep 17 00:00:00 2001 From: Andrew Sommere Date: Thu, 11 Apr 2019 18:55:36 -0500 Subject: [PATCH] first commit --- public/index.html | 9 +++++++-- public/index.js | 46 ++++++++++++++++++++++++++++++++++++++++++++++ public/products.js | 2 ++ 3 files changed, 55 insertions(+), 2 deletions(-) diff --git a/public/index.html b/public/index.html index 138da963..66b09d4d 100644 --- a/public/index.html +++ b/public/index.html @@ -8,7 +8,12 @@ - - + +
+
+
+ + + \ No newline at end of file diff --git a/public/index.js b/public/index.js index e69de29b..78fb55ef 100644 --- a/public/index.js +++ b/public/index.js @@ -0,0 +1,46 @@ + + +//Code to get the products to render +let productHTML= ""; +let productDiv = document.getElementById("products"); + +for(let i = 0; i < products.length; i++){ + let product = products[i]; + productHTML = productHTML + `` +} + +productDiv.innerHTML = productHTML; + +//code to render a search bar +let searchDiv = document.getElementById('search'); +let searchHTML = ` `; + +searchHTML = searchHTML + `` +searchDiv.innerHTML = searchHTML; + +// make the search bar actually search + + +//Code for shopping cart +let cartDiv = document.getElementById('shoppingCart'); +cartDiv.innerHTML = `` + +//Category Selector +let categoryDiv = document.getElementById('category'); +categoryDiv.innerHTML = `` + + + + diff --git a/public/products.js b/public/products.js index 4f07bb51..c571e88f 100644 --- a/public/products.js +++ b/public/products.js @@ -219,3 +219,5 @@ const products = [{ } ] }]; + + console.log(products); \ No newline at end of file