From e5c3990c2d43ae7e8603e98da8dd7ecea94764a3 Mon Sep 17 00:00:00 2001 From: dbobb220 Date: Mon, 24 Jun 2019 21:50:13 -0400 Subject: [PATCH 01/24] product list and beg of search --- public/index.html | 13 +++++++++++++ public/index.js | 22 ++++++++++++++++++++-- 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/public/index.html b/public/index.html index 138da963..987b13b9 100644 --- a/public/index.html +++ b/public/index.html @@ -8,6 +8,19 @@ +
+ +
+
+
+ + +
+
+
+ diff --git a/public/index.js b/public/index.js index 6515a734..75445541 100644 --- a/public/index.js +++ b/public/index.js @@ -1,2 +1,20 @@ -//stuff -//more stuff \ No newline at end of file +// declaring variable +// make section a variable +let container = document.querySelector('.product_list'); + + +for (let i = 0; i < products.length; i++) { + let product = products[i]; + console.log(product); + let productContainer = document.createElement('div'); + productContainer.setAttribute('class', 'product'); + productContainer.innerHTML = ` +

${product.name}

+ ` + container.appendChild(productContainer); +} + +let searchProduct = () => { + let searchInput = document.querySelector('#search').value; + products.map() +} \ No newline at end of file From 6b6a51c454c58f603d53a3d5cb8b6805b4770e1d Mon Sep 17 00:00:00 2001 From: dbobb220 Date: Tue, 25 Jun 2019 11:38:14 -0400 Subject: [PATCH 02/24] search funct --- public/index.js | 39 ++++++++++++++++++++++++++++----------- 1 file changed, 28 insertions(+), 11 deletions(-) diff --git a/public/index.js b/public/index.js index 75445541..61e6a0c3 100644 --- a/public/index.js +++ b/public/index.js @@ -2,19 +2,36 @@ // make section a variable let container = document.querySelector('.product_list'); +// Add Products to DOM -for (let i = 0; i < products.length; i++) { - let product = products[i]; - console.log(product); - let productContainer = document.createElement('div'); - productContainer.setAttribute('class', 'product'); - productContainer.innerHTML = ` -

${product.name}

- ` - container.appendChild(productContainer); +const loadProducts = (prod) => { + for (let i = 0; i < prod.length; i++) { + let product = prod[i]; + console.log(product); + let productContainer = document.createElement('div'); + productContainer.setAttribute('class', 'product'); + productContainer.innerHTML = ` +

${product.name}

+ ` + container.appendChild(productContainer); + } } +// TODO: clear previous list to replace with regex-ed filtered let searchProduct = () => { let searchInput = document.querySelector('#search').value; - products.map() -} \ No newline at end of file + let myRegEx = new RegExp(`${searchInput}`, 'gi'); + let holderArray = []; + for (let i = 0; i < products.length; i++) { + let productName = products[i].name; + if(productName.match(myRegEx)) { + holderArray.push(products[i]) + } + } + loadProducts(holderArray); +} + +//!! BOOKMARK: Shopping Cart + +// initial product load +loadProducts(products); \ No newline at end of file From 07ca4173bf7eb85c5ccf1654cd9e9cf701787c19 Mon Sep 17 00:00:00 2001 From: dbobb220 Date: Thu, 27 Jun 2019 17:32:42 -0500 Subject: [PATCH 03/24] add sections before branch to change load logic --- public/index.html | 13 ++++++------- public/index.js | 22 ++++++++++++++++++---- 2 files changed, 24 insertions(+), 11 deletions(-) diff --git a/public/index.html b/public/index.html index 987b13b9..17acc55c 100644 --- a/public/index.html +++ b/public/index.html @@ -9,19 +9,18 @@
- -
-
+ +
+ +
-
- -
- +
+ \ No newline at end of file diff --git a/public/index.js b/public/index.js index 61e6a0c3..988955ac 100644 --- a/public/index.js +++ b/public/index.js @@ -5,33 +5,47 @@ let container = document.querySelector('.product_list'); // Add Products to DOM const loadProducts = (prod) => { + container.innerHTML = ''; for (let i = 0; i < prod.length; i++) { let product = prod[i]; - console.log(product); let productContainer = document.createElement('div'); productContainer.setAttribute('class', 'product'); productContainer.innerHTML = `

${product.name}

+

Rating: ${product.rating}

+

Number of Reviews: ${product.reviews.length}

+

Price: ${product.price}

+

` container.appendChild(productContainer); } } -// TODO: clear previous list to replace with regex-ed filtered let searchProduct = () => { let searchInput = document.querySelector('#search').value; let myRegEx = new RegExp(`${searchInput}`, 'gi'); let holderArray = []; for (let i = 0; i < products.length; i++) { let productName = products[i].name; - if(productName.match(myRegEx)) { + let productDesc = products[i].description; + if(productName.match(myRegEx) || productDesc.match(myRegEx)) { holderArray.push(products[i]) } } loadProducts(holderArray); } -//!! BOOKMARK: Shopping Cart +//!! Shopping Cart + +let viewCart = () => { + //viewCart code +} + +//!! View Details + +let viewDetail = (id) => { + //code +} // initial product load loadProducts(products); \ No newline at end of file From ce896c5ec96385b926931fd7e3881d6add563909 Mon Sep 17 00:00:00 2001 From: dbobb220 Date: Thu, 27 Jun 2019 18:20:55 -0500 Subject: [PATCH 04/24] logic worked --- public/index.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/public/index.js b/public/index.js index 988955ac..d53577a0 100644 --- a/public/index.js +++ b/public/index.js @@ -4,21 +4,23 @@ let container = document.querySelector('.product_list'); // Add Products to DOM +const changeContainer = (value) => { + container.innerHTML = `${value}`; +} + const loadProducts = (prod) => { - container.innerHTML = ''; + let holder = ''; for (let i = 0; i < prod.length; i++) { let product = prod[i]; - let productContainer = document.createElement('div'); - productContainer.setAttribute('class', 'product'); - productContainer.innerHTML = ` + holder += `

${product.name}

Rating: ${product.rating}

Number of Reviews: ${product.reviews.length}

Price: ${product.price}

` - container.appendChild(productContainer); } + changeContainer(holder); } let searchProduct = () => { From 49d728f8c011dbbaeabc70a97c6ecea95dde23b4 Mon Sep 17 00:00:00 2001 From: dbobb220 Date: Thu, 27 Jun 2019 19:53:46 -0500 Subject: [PATCH 05/24] view details --- public/index.js | 48 +++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 45 insertions(+), 3 deletions(-) diff --git a/public/index.js b/public/index.js index d53577a0..5a79f009 100644 --- a/public/index.js +++ b/public/index.js @@ -1,6 +1,7 @@ // declaring variable // make section a variable let container = document.querySelector('.product_list'); +let holder = ''; // Add Products to DOM @@ -9,7 +10,7 @@ const changeContainer = (value) => { } const loadProducts = (prod) => { - let holder = ''; + holder = ''; for (let i = 0; i < prod.length; i++) { let product = prod[i]; holder += ` @@ -45,8 +46,49 @@ let viewCart = () => { //!! View Details -let viewDetail = (id) => { - //code +let viewDetail = (num) => { + let filterProduct = products.filter(x => x.id == num); + let product = filterProduct[0]; + let holder = '' + let ratingHolder = document.createElement('ul'); + for (let i = 0; i < product.reviews.length; i++) { + let eachRating = ''; + eachRating.innerHTML = ` +
  • Rating: ${product.reviews.rating} - ${product.reviews.description}
  • + ` + } + holder += ` +
    +
    + ${product.name} +
    +
    +

    ${product.name}

    +

    ${product.description}

    +

    Rating: ${product.rating}

    +

    Number of Reviews: ${product.reviews.length}

    +

    Price: ${product.price}

    +

    Category: ${product.category}

    +

    + + + +

    +
    +
    + ` + changeContainer(holder); } // initial product load From 49f71aa3c1ef65bbb02802a7e8903b50fa2de09a Mon Sep 17 00:00:00 2001 From: dbobb220 Date: Thu, 27 Jun 2019 19:55:02 -0500 Subject: [PATCH 06/24] note for view details --- public/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/public/index.js b/public/index.js index 5a79f009..52e64f23 100644 --- a/public/index.js +++ b/public/index.js @@ -45,6 +45,7 @@ let viewCart = () => { } //!! View Details +//TODO: add rating loop results to HTML let viewDetail = (num) => { let filterProduct = products.filter(x => x.id == num); From a6a2dc71f55db83cf08bb2d048512a4337cbef4f Mon Sep 17 00:00:00 2001 From: dbobb220 Date: Thu, 27 Jun 2019 23:05:26 -0500 Subject: [PATCH 07/24] view details DOM complete --- public/index.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/public/index.js b/public/index.js index 52e64f23..aa8f7f5a 100644 --- a/public/index.js +++ b/public/index.js @@ -50,13 +50,10 @@ let viewCart = () => { let viewDetail = (num) => { let filterProduct = products.filter(x => x.id == num); let product = filterProduct[0]; - let holder = '' - let ratingHolder = document.createElement('ul'); + holder = '' + let eachRating = ''; for (let i = 0; i < product.reviews.length; i++) { - let eachRating = ''; - eachRating.innerHTML = ` -
  • Rating: ${product.reviews.rating} - ${product.reviews.description}
  • - ` + eachRating += `
  • Rating: ${product.reviews[i].rating} - ${product.reviews[i].description}
  • ` } holder += `
    @@ -86,6 +83,8 @@ let viewDetail = (num) => {

    +

    Ratings:

    +

    ${eachRating}

    ` From c78662c53cb4dc857ebcbbd1592466ff989d5a08 Mon Sep 17 00:00:00 2001 From: dbobb220 Date: Fri, 28 Jun 2019 00:10:32 -0500 Subject: [PATCH 08/24] category filter --- public/index.html | 6 ++++++ public/index.js | 29 ++++++++++++++++++++++++++++- 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/public/index.html b/public/index.html index 17acc55c..7a08a887 100644 --- a/public/index.html +++ b/public/index.html @@ -14,6 +14,12 @@ +
    diff --git a/public/index.js b/public/index.js index aa8f7f5a..0d87725d 100644 --- a/public/index.js +++ b/public/index.js @@ -7,6 +7,7 @@ let holder = ''; const changeContainer = (value) => { container.innerHTML = `${value}`; + console.log('container changed'); } const loadProducts = (prod) => { @@ -22,6 +23,7 @@ const loadProducts = (prod) => { ` } changeContainer(holder); + console.log('products overview'); } let searchProduct = () => { @@ -36,6 +38,7 @@ let searchProduct = () => { } } loadProducts(holderArray); + console.log('search results'); } //!! Shopping Cart @@ -45,7 +48,6 @@ let viewCart = () => { } //!! View Details -//TODO: add rating loop results to HTML let viewDetail = (num) => { let filterProduct = products.filter(x => x.id == num); @@ -69,6 +71,8 @@ let viewDetail = (num) => {

    Category: ${product.category}

    +

    +

    - + + - +

    Ratings:

    ${eachRating}

    @@ -98,8 +118,15 @@ let viewDetail = (num) => { //!! Add to cart -let addToCart = () => { - +let addToCart = (num) => { + let quantityItem = document.querySelector('#quantity').value; + let cartItem = products.filter(x => x.id == num); + let cartItemName = cartItem[0].name; + let holderArray = []; + holderArray.push(quantityItem, cartItem[0]); + console.log(holderArray); + sessionStorage.setItem(`${cartItemName}`, JSON.stringify(holderArray)); + prodSeshStorage += 1; } //!! Category Filter From 23f3adfcae84353a3583c5f447e1e11ff4c2ae1b Mon Sep 17 00:00:00 2001 From: dbobb220 Date: Fri, 28 Jun 2019 22:17:48 -0500 Subject: [PATCH 11/24] checkout func --- public/index.js | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/public/index.js b/public/index.js index f5013b8d..1c30a964 100644 --- a/public/index.js +++ b/public/index.js @@ -27,6 +27,8 @@ const loadProducts = (prod) => { console.log('products overview view'); } +//!! Search Functionality + let searchProduct = () => { let searchInput = document.querySelector('#search').value; let myRegEx = new RegExp(`${searchInput}`, 'gi'); @@ -61,10 +63,34 @@ let viewCart = () => { totalCost += parseFloat(removeDollar) * parseInt(parsedItem[0]); } holder += ` -

    Cart Total: $${totalCost}

    +

    Cart Total: $${totalCost}

    ` changeContainer(holder); +} + +//!! Checkout Functionality +const checkoutFunc = (cost) => { + let holder = ''; + holder += ` +

    Cart Total: $${cost}

    +
    + First name: +
    + +
    + Last name: +
    + +
    + Email: +
    + +
    + +
    + ` + changeContainer(holder); } //!! View Details @@ -116,6 +142,14 @@ let viewDetail = (num) => { console.log('product detail view'); } +//!! Reset functionality + +const resetFunc = () => { + console.log('reset clicked'); + document.querySelector('#search').value = ''; + loadProducts(products); +} + //!! Add to cart let addToCart = (num) => { From c73f0198ed1b28a21e383455473093d969c77052 Mon Sep 17 00:00:00 2001 From: dbobb220 Date: Fri, 28 Jun 2019 22:20:49 -0500 Subject: [PATCH 12/24] to do comments at top of js file --- public/index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/public/index.js b/public/index.js index 1c30a964..c6883d31 100644 --- a/public/index.js +++ b/public/index.js @@ -1,3 +1,8 @@ +//TODO: Add comments and console.log for function and testing +//TODO: Add functionality for removing items from the cart +//TODO: Add 'are you still there' functionality +//?? Answer questions at the end of the readme.md? + // declaring variable // make section a variable let container = document.querySelector('.product_list'); From 6861ca0435b355666903617a32a4a5cf1c2330bb Mon Sep 17 00:00:00 2001 From: dbobb220 Date: Fri, 28 Jun 2019 23:24:08 -0500 Subject: [PATCH 13/24] remove from cart func --- public/index.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/public/index.js b/public/index.js index c6883d31..c33c63f5 100644 --- a/public/index.js +++ b/public/index.js @@ -8,7 +8,7 @@ let container = document.querySelector('.product_list'); let holder = ''; -// Add Products to DOM +//!! Add Products to DOM const changeContainer = (value) => { container.innerHTML = `${value}`; @@ -63,16 +63,24 @@ let viewCart = () => {

    Price: ${parsedItem[1].price}

    Quantity: ${parsedItem[0]}

    Cost: $${parseFloat(removeDollar) * parseInt(parsedItem[0])}

    - + ` - totalCost += parseFloat(removeDollar) * parseInt(parsedItem[0]); + let multiplyQuantity = parseFloat(removeDollar) * parseInt(parsedItem[0]); + totalCost += multiplyQuantity; } + totalCost = parseFloat(Math.round(totalCost * 100) / 100).toFixed(2); holder += `

    Cart Total: $${totalCost}

    ` changeContainer(holder); } +const removeCartItem = (item) => { + sessionStorage.removeItem(item); + console.log(`${item} removed from cart`); + viewCart(); +} + //!! Checkout Functionality const checkoutFunc = (cost) => { @@ -165,7 +173,6 @@ let addToCart = (num) => { holderArray.push(quantityItem, cartItem[0]); console.log(holderArray); sessionStorage.setItem(`${cartItemName}`, JSON.stringify(holderArray)); - prodSeshStorage += 1; } //!! Category Filter From 47af133f46c085e0aee2f276f0811de2f2cf2c1e Mon Sep 17 00:00:00 2001 From: dbobb220 Date: Fri, 28 Jun 2019 23:26:24 -0500 Subject: [PATCH 14/24] add comments to functions --- public/index.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/public/index.js b/public/index.js index c33c63f5..bad1e082 100644 --- a/public/index.js +++ b/public/index.js @@ -1,5 +1,3 @@ -//TODO: Add comments and console.log for function and testing -//TODO: Add functionality for removing items from the cart //TODO: Add 'are you still there' functionality //?? Answer questions at the end of the readme.md? @@ -104,6 +102,7 @@ const checkoutFunc = (cost) => { ` changeContainer(holder); + console.log('checkout form dislpayed') } //!! View Details @@ -171,8 +170,8 @@ let addToCart = (num) => { let cartItemName = cartItem[0].name; let holderArray = []; holderArray.push(quantityItem, cartItem[0]); - console.log(holderArray); sessionStorage.setItem(`${cartItemName}`, JSON.stringify(holderArray)); + console.log('item added to cart') } //!! Category Filter From 682e793d8061882e2e9653d75a5f867f85ce74f5 Mon Sep 17 00:00:00 2001 From: dbobb220 Date: Fri, 28 Jun 2019 23:27:43 -0500 Subject: [PATCH 15/24] added comments for todo --- public/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/index.js b/public/index.js index bad1e082..3c5f5e06 100644 --- a/public/index.js +++ b/public/index.js @@ -1,4 +1,5 @@ -//TODO: Add 'are you still there' functionality +//TODO: Add 'are you still there' functionality - add comments +//TODO: change form button to place order //?? Answer questions at the end of the readme.md? // declaring variable From 8e007b98a43e9c504f66633a8ec51532c8a2cf73 Mon Sep 17 00:00:00 2001 From: dbobb220 Date: Sun, 30 Jun 2019 12:45:53 -0500 Subject: [PATCH 16/24] add timeout feature and dev comments to some functions --- public/index.js | 55 ++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 45 insertions(+), 10 deletions(-) diff --git a/public/index.js b/public/index.js index 3c5f5e06..1fab4d2a 100644 --- a/public/index.js +++ b/public/index.js @@ -1,19 +1,40 @@ -//TODO: Add 'are you still there' functionality - add comments -//TODO: change form button to place order -//?? Answer questions at the end of the readme.md? +//? Why is storing the shopping cart in sessionStorage not the best choice? +//* It is not the best choice because local storage is a much better option. If the customer leaves their tab in +//* any way (close tab/browser, shuts down computer, battery dies, etc) they would lose everything they placed in their cart */ +//? What should happen when the Place Order button is clicked? +//* We should use the POST to send out data (cart and client info) to the server */ -// declaring variable -// make section a variable +//! declaring variables for container, holding data for functions, and are you there feature let container = document.querySelector('.product_list'); let holder = ''; - -//!! Add Products to DOM +let areYouThere = true; + +//! SetTimeout for 'Are you there' +let promptTimeout = () => { + // maintains timeout true each time a click occurs + areYouThere = true; + console.log('user click - 60 sec timer til prompt'); + setInterval(() => { + // switch varaibale to false + areYouThere = false; + console.log('Are you still there? prompt initiated'); + // alert user if variable is false + if (!areYouThere) {alert("Are you still there");}; + areYouThere = true; + console.log('user returned - 60 sec timer til prompt'); + }, 60000); +}; + +document.body.addEventListener('click', promptTimeout); + +//!! Change the container DOM const changeContainer = (value) => { container.innerHTML = `${value}`; - console.log('container changing to'); + console.log('container changing to...'); } +//!! Load product overview view when different functions are complete const loadProducts = (prod) => { holder = ''; for (let i = 0; i < prod.length; i++) { @@ -40,6 +61,7 @@ let searchProduct = () => { for (let i = 0; i < products.length; i++) { let productName = products[i].name; let productDesc = products[i].description; + // search for regex match in name and description if(productName.match(myRegEx) || productDesc.match(myRegEx)) { holderArray.push(products[i]) } @@ -53,6 +75,7 @@ let searchProduct = () => { let viewCart = () => { holder = '

    Cart

    '; let totalCost = 0; + // loop through session storage to grab all add to cart items for(let i = 1; i < sessionStorage.length; i++) { let cartSeshItem = sessionStorage.getItem(sessionStorage.key(i)); let parsedItem = JSON.parse(cartSeshItem); @@ -64,9 +87,12 @@ let viewCart = () => {

    Cost: $${parseFloat(removeDollar) * parseInt(parsedItem[0])}

    ` + // multiply the quantity and price for each let multiplyQuantity = parseFloat(removeDollar) * parseInt(parsedItem[0]); + // then add to totalCost variable totalCost += multiplyQuantity; } + // maintain 2 decimal points with total totalCost = parseFloat(Math.round(totalCost * 100) / 100).toFixed(2); holder += `

    Cart Total: $${totalCost}

    @@ -83,7 +109,7 @@ const removeCartItem = (item) => { //!! Checkout Functionality const checkoutFunc = (cost) => { - let holder = ''; + holder = ''; holder += `

    Cart Total: $${cost}

    @@ -99,7 +125,7 @@ const checkoutFunc = (cost) => {

    - +
    ` changeContainer(holder); @@ -109,10 +135,12 @@ const checkoutFunc = (cost) => { //!! View Details let viewDetail = (num) => { + // loop through array to find product id of item clicked let filterProduct = products.filter(x => x.id == num); let product = filterProduct[0]; holder = '' let eachRating = ''; + // loop to store each rating in object for (let i = 0; i < product.reviews.length; i++) { eachRating += `
  • Rating: ${product.reviews[i].rating} - ${product.reviews[i].description}
  • ` } @@ -159,17 +187,22 @@ let viewDetail = (num) => { const resetFunc = () => { console.log('reset clicked'); + // empty search input document.querySelector('#search').value = ''; + //reload all products loadProducts(products); } //!! Add to cart let addToCart = (num) => { + // grab quantity so it can be stored in sessionStorage let quantityItem = document.querySelector('#quantity').value; let cartItem = products.filter(x => x.id == num); let cartItemName = cartItem[0].name; let holderArray = []; + // set key to item name for storage + //* if item already exist in sessionStorage, the new addToCart will override holderArray.push(quantityItem, cartItem[0]); sessionStorage.setItem(`${cartItemName}`, JSON.stringify(holderArray)); console.log('item added to cart') @@ -180,7 +213,9 @@ let addToCart = (num) => { let categoryFilter = (category) => { console.log(`filter select for ${category}`); let holderArray = []; + // load all products if all categories is selected category == '' ? holderArray = products : + // loop through products array to find matching categories products.forEach(val => { if(category === val.category) { holderArray.push(val) From e5062772b13eebc03013a5210a0fca15d3f8c689 Mon Sep 17 00:00:00 2001 From: dbobb220 Date: Mon, 1 Jul 2019 16:39:59 -0500 Subject: [PATCH 17/24] quantity in cart --- public/index.js | 46 ++++++++++++++++++++++++++++++++-------------- 1 file changed, 32 insertions(+), 14 deletions(-) diff --git a/public/index.js b/public/index.js index 1fab4d2a..c873d2d0 100644 --- a/public/index.js +++ b/public/index.js @@ -72,25 +72,43 @@ let searchProduct = () => { //!! Shopping Cart +let changeQuant = (name) => { + let newQuant = document.querySelector(`#select_${name}`).value; + let sessionItem = sessionStorage.getItem(`${name}`); + let sessionArray = JSON.parse(sessionItem); + sessionArray[0] = newQuant; + sessionStorage.setItem(`${name}`, JSON.stringify(sessionArray)); + viewCart(); +} + let viewCart = () => { holder = '

    Cart

    '; let totalCost = 0; // loop through session storage to grab all add to cart items - for(let i = 1; i < sessionStorage.length; i++) { + for(let i = 0; i < sessionStorage.length; i++) { let cartSeshItem = sessionStorage.getItem(sessionStorage.key(i)); - let parsedItem = JSON.parse(cartSeshItem); - let removeDollar = parsedItem[1].price.slice(1); - holder += ` -

    Product: ${parsedItem[1].name}

    -

    Price: ${parsedItem[1].price}

    -

    Quantity: ${parsedItem[0]}

    -

    Cost: $${parseFloat(removeDollar) * parseInt(parsedItem[0])}

    - - ` - // multiply the quantity and price for each - let multiplyQuantity = parseFloat(removeDollar) * parseInt(parsedItem[0]); - // then add to totalCost variable - totalCost += multiplyQuantity; + if(cartSeshItem !== 'true') { + let parsedItem = JSON.parse(cartSeshItem); + let removeDollar = parsedItem[1].price.slice(1); + // to build drop down in view cart + let optionHolder = ''; + // build options + for (let j = 1; j <= 10; j++) { + j == parsedItem[0] ? optionHolder += `` + : optionHolder += `` + } + holder += ` +

    Product: ${parsedItem[1].name}

    +

    Price: ${parsedItem[1].price}

    +

    Quantity: +

    Cost: $${parseFloat(Math.round(parseFloat(removeDollar) * parseFloat(parsedItem[0] * 100)) / 100).toFixed(2)}

    + + ` + // multiply the quantity and price for each + let multiplyQuantity = parseFloat(removeDollar) * parseInt(parsedItem[0]); + // then add to totalCost variable + totalCost += multiplyQuantity; + } } // maintain 2 decimal points with total totalCost = parseFloat(Math.round(totalCost * 100) / 100).toFixed(2); From bd6420f9e1f857f8e3efcbc5eaf97b17e16de3b5 Mon Sep 17 00:00:00 2001 From: dbobb220 Date: Mon, 1 Jul 2019 17:03:05 -0500 Subject: [PATCH 18/24] fix cart quant for prod w/ spaces --- public/index.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/public/index.js b/public/index.js index c873d2d0..689ca993 100644 --- a/public/index.js +++ b/public/index.js @@ -22,7 +22,7 @@ let promptTimeout = () => { if (!areYouThere) {alert("Are you still there");}; areYouThere = true; console.log('user returned - 60 sec timer til prompt'); - }, 60000); + }, 600000); }; document.body.addEventListener('click', promptTimeout); @@ -72,8 +72,8 @@ let searchProduct = () => { //!! Shopping Cart -let changeQuant = (name) => { - let newQuant = document.querySelector(`#select_${name}`).value; +let changeQuant = (name, id) => { + let newQuant = document.querySelector(`#${id}`).value; let sessionItem = sessionStorage.getItem(`${name}`); let sessionArray = JSON.parse(sessionItem); sessionArray[0] = newQuant; @@ -92,6 +92,7 @@ let viewCart = () => { let removeDollar = parsedItem[1].price.slice(1); // to build drop down in view cart let optionHolder = ''; + let itemNameId = parsedItem[1].id; // build options for (let j = 1; j <= 10; j++) { j == parsedItem[0] ? optionHolder += `` @@ -100,7 +101,7 @@ let viewCart = () => { holder += `

    Product: ${parsedItem[1].name}

    Price: ${parsedItem[1].price}

    -

    Quantity: +

    Quantity:

    Cost: $${parseFloat(Math.round(parseFloat(removeDollar) * parseFloat(parsedItem[0] * 100)) / 100).toFixed(2)}

    ` From ca08c3d0ed1fa4eb9c0dd45b4a5e056819b8e6c4 Mon Sep 17 00:00:00 2001 From: dbobb220 Date: Wed, 17 Jul 2019 19:52:53 -0500 Subject: [PATCH 19/24] login mockup --- public/index.html | 57 ++++++++++++++++++++++++++++++----------------- 1 file changed, 37 insertions(+), 20 deletions(-) diff --git a/public/index.html b/public/index.html index 3b6ab88c..0bf4b8df 100644 --- a/public/index.html +++ b/public/index.html @@ -8,25 +8,42 @@ -
    -
    - - - - - -
    -
    -
    -
    -
    -
    - - +
    +

    Login

    +
    + Email +
    + +
    +
    + Password +
    + +
    +
    + +
    +
    + \ No newline at end of file From 07424f228f001f21002d1200aaf166273fc3f5f6 Mon Sep 17 00:00:00 2001 From: dbobb220 Date: Wed, 17 Jul 2019 20:38:00 -0500 Subject: [PATCH 20/24] add login func --- .gitignore | 1 + index.js | 6 + package-lock.json | 374 ++++++++++++++++++++++++++++++++++++++++++++++ package.json | 22 +++ public/index.html | 4 +- public/index.js | 42 ++++-- 6 files changed, 431 insertions(+), 18 deletions(-) create mode 100644 .gitignore create mode 100644 index.js create mode 100644 package-lock.json create mode 100644 package.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..3c3629e6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +node_modules diff --git a/index.js b/index.js new file mode 100644 index 00000000..955d3ccb --- /dev/null +++ b/index.js @@ -0,0 +1,6 @@ +const express = require('express'); +const app = express(); +app.listen(8080, (err) => { + err ? console.log('Error:' + err) : app.use(express.static('public')); +}); + diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 00000000..f0ea9b35 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,374 @@ +{ + "name": "aca-store", + "version": "1.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "accepts": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", + "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", + "requires": { + "mime-types": "~2.1.24", + "negotiator": "0.6.2" + } + }, + "array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" + }, + "body-parser": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", + "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", + "requires": { + "bytes": "3.1.0", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "~1.1.2", + "http-errors": "1.7.2", + "iconv-lite": "0.4.24", + "on-finished": "~2.3.0", + "qs": "6.7.0", + "raw-body": "2.4.0", + "type-is": "~1.6.17" + } + }, + "bytes": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", + "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==" + }, + "content-disposition": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", + "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", + "requires": { + "safe-buffer": "5.1.2" + } + }, + "content-type": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" + }, + "cookie": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", + "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==" + }, + "cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" + }, + "destroy": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" + }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" + }, + "encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" + }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" + }, + "etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" + }, + "express": { + "version": "4.17.1", + "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", + "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==", + "requires": { + "accepts": "~1.3.7", + "array-flatten": "1.1.1", + "body-parser": "1.19.0", + "content-disposition": "0.5.3", + "content-type": "~1.0.4", + "cookie": "0.4.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "~1.1.2", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "~1.1.2", + "fresh": "0.5.2", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.5", + "qs": "6.7.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.1.2", + "send": "0.17.1", + "serve-static": "1.14.1", + "setprototypeof": "1.1.1", + "statuses": "~1.5.0", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + } + }, + "finalhandler": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", + "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "statuses": "~1.5.0", + "unpipe": "~1.0.0" + } + }, + "forwarded": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", + "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=" + }, + "fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" + }, + "http-errors": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", + "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.1", + "statuses": ">= 1.5.0 < 2", + "toidentifier": "1.0.0" + } + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "ipaddr.js": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.0.tgz", + "integrity": "sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA==" + }, + "media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" + }, + "merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" + }, + "methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" + }, + "mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" + }, + "mime-db": { + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz", + "integrity": "sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA==" + }, + "mime-types": { + "version": "2.1.24", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.24.tgz", + "integrity": "sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ==", + "requires": { + "mime-db": "1.40.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "negotiator": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", + "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" + }, + "on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "requires": { + "ee-first": "1.1.1" + } + }, + "parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" + }, + "path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" + }, + "proxy-addr": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.5.tgz", + "integrity": "sha512-t/7RxHXPH6cJtP0pRG6smSr9QJidhB+3kXu0KgXnbGYMgzEnUxRQ4/LDdfOwZEMyIh3/xHb8PX3t+lfL9z+YVQ==", + "requires": { + "forwarded": "~0.1.2", + "ipaddr.js": "1.9.0" + } + }, + "qs": { + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", + "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" + }, + "range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" + }, + "raw-body": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", + "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", + "requires": { + "bytes": "3.1.0", + "http-errors": "1.7.2", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "send": { + "version": "0.17.1", + "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", + "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", + "requires": { + "debug": "2.6.9", + "depd": "~1.1.2", + "destroy": "~1.0.4", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "~1.7.2", + "mime": "1.6.0", + "ms": "2.1.1", + "on-finished": "~2.3.0", + "range-parser": "~1.2.1", + "statuses": "~1.5.0" + }, + "dependencies": { + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" + } + } + }, + "serve-static": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", + "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==", + "requires": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.17.1" + } + }, + "setprototypeof": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", + "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" + }, + "statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" + }, + "toidentifier": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", + "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==" + }, + "type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "requires": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + } + }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" + }, + "utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" + }, + "vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 00000000..66671935 --- /dev/null +++ b/package.json @@ -0,0 +1,22 @@ +{ + "name": "aca-store", + "version": "1.0.0", + "description": "The purpose of this project is to build an Amazon.com like ecommerce website using the front end skills that we should possess by now. You may be suprised that you have already learned all the skills necessary to do this. # Prerequisite * Know how to loop arrays and use array functions like map. * Know how to construct strings, concatenation or string template literals. * Know how to learn about the use of built in tools such as innerHTML or sessionStorage. (read instruction manual)", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/dbobb220/aca-store.git" + }, + "author": "", + "license": "ISC", + "bugs": { + "url": "https://github.com/dbobb220/aca-store/issues" + }, + "homepage": "https://github.com/dbobb220/aca-store#readme", + "dependencies": { + "express": "^4.17.1" + } +} diff --git a/public/index.html b/public/index.html index 0bf4b8df..bccabbdc 100644 --- a/public/index.html +++ b/public/index.html @@ -8,7 +8,7 @@ -
    +

    Login

    Email @@ -21,8 +21,8 @@

    Login



    -
    +