diff --git a/.eslintrc.json b/.eslintrc.json index dd5dbdc7..17f92484 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -25,7 +25,7 @@ } ], "no-console": 1, - "quotes": ["error", "single", { "allowTemplateLiterals": true }], + "quotes": ["error", "double", { "allowTemplateLiterals": true }], "func-names": 0, "space-unary-ops": 2, "space-in-parens": "error", diff --git a/DianaQuispe.txt b/DianaQuispe.txt new file mode 100644 index 00000000..5f60879b --- /dev/null +++ b/DianaQuispe.txt @@ -0,0 +1 @@ +Diana Quispe \ No newline at end of file diff --git a/FelixGuzman.txt b/FelixGuzman.txt new file mode 100644 index 00000000..f3ac7311 --- /dev/null +++ b/FelixGuzman.txt @@ -0,0 +1 @@ +Felix Guzman \ No newline at end of file diff --git a/nikita.txt b/nikita.txt new file mode 100644 index 00000000..92949783 --- /dev/null +++ b/nikita.txt @@ -0,0 +1 @@ +Nikita Wong \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 9ff6702c..7bf37aeb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "outside", - "version": "1.1.0", + "version": "2.0.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "outside", - "version": "1.1.0", + "version": "2.0.0", "license": "ISC", "devDependencies": { "eslint": "^8.26.0", @@ -4038,9 +4038,9 @@ "dev": true }, "node_modules/json5": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", - "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "dev": true, "bin": { "json5": "lib/cli.js" @@ -5130,9 +5130,9 @@ } }, "node_modules/tsconfig-paths/node_modules/json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", "dev": true, "dependencies": { "minimist": "^1.2.0" @@ -8371,9 +8371,9 @@ "dev": true }, "json5": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", - "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "dev": true }, "kleur": { @@ -9138,9 +9138,9 @@ }, "dependencies": { "json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", "dev": true, "requires": { "minimist": "^1.2.0" diff --git a/package.json b/package.json index 829e444f..1e71840a 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,6 @@ "lint": "eslint *.js src/**/*.js", "format": "prettier --ignore-path ./.gitignore --write \"./**/*.{html,json,js,ts,css}\"", "test": "jest" - }, "author": "Shane Thompson", "license": "ISC", diff --git a/src/cart/index.html b/src/cart/index.html index 659c2bb4..7f01e305 100644 --- a/src/cart/index.html +++ b/src/cart/index.html @@ -1,9 +1,7 @@ - - @@ -13,31 +11,22 @@ - -
-
- - - @@ -64,23 +53,16 @@ - - -
-
-
-

My Cart

-
-
- - - diff --git a/src/checkout/index.html b/src/checkout/index.html index 87645865..60615e73 100644 --- a/src/checkout/index.html +++ b/src/checkout/index.html @@ -1,9 +1,7 @@ - - @@ -11,30 +9,22 @@ Sleep Outside | Checkout - -
-
- - - @@ -61,28 +51,17 @@ - - -
-
-
-

Review & Place your Order

-
-
- - - diff --git a/src/index.html b/src/index.html index 35ac63ce..1b84b061 100644 --- a/src/index.html +++ b/src/index.html @@ -9,20 +9,31 @@
- - - - - - - - + + + + + + + @@ -37,7 +48,7 @@ alt="image of a high mountain lake" />
@@ -55,48 +66,47 @@

Top Products

diff --git a/src/js/cart.js b/src/js/cart.js index a2fb3d8e..09eb7f8a 100644 --- a/src/js/cart.js +++ b/src/js/cart.js @@ -7,19 +7,19 @@ function renderCartContents() { } function cartItemTemplate(item) { - const newItem = `
  • - + const newItem = `
  • + ${item.Name} - -

    ${item.Name}

    +
    +

    ${item.Name}

    -

    ${item.Colors[0].ColorName}

    -

    qty: 1

    -

    $${item.FinalPrice}

    +

    ${item.Colors[0].ColorName}

    +

    qty: 1

    +

    $${item.FinalPrice}

  • `; return newItem; diff --git a/src/js/product.js b/src/js/product.js index 0b8d0aa6..a236fc54 100644 --- a/src/js/product.js +++ b/src/js/product.js @@ -4,7 +4,12 @@ import ProductData from "./ProductData.mjs"; const dataSource = new ProductData("tents"); function addProductToCart(product) { - setLocalStorage("so-cart", product); + let cant = localStorage.getItem(product.Id); + if (cant) { + setLocalStorage(product.Id, parseInt(cant) + 1); + } else { + setLocalStorage(product.Id, 1); + } } // add to cart button event handler async function addToCartHandler(e) { diff --git a/src/json/sleeping-bags.json b/src/json/sleeping-bags.json index 6bf7a124..5d015123 100644 --- a/src/json/sleeping-bags.json +++ b/src/json/sleeping-bags.json @@ -35,9 +35,7 @@ ] }, "SizesAvailable": { - "ZIPPER": [ - "L" - ] + "ZIPPER": ["L"] }, "Colors": [ { @@ -93,9 +91,7 @@ ] }, "SizesAvailable": { - "ZIPPER": [ - "LH" - ] + "ZIPPER": ["LH"] }, "Colors": [ { @@ -196,12 +192,8 @@ ] }, "SizesAvailable": { - "LENGTH": [ - "REG" - ], - "ZIPPER": [ - "R" - ] + "LENGTH": ["REG"], + "ZIPPER": ["R"] }, "Colors": [ { @@ -323,9 +315,7 @@ ] }, "SizesAvailable": { - "ZIPPER": [ - "L" - ] + "ZIPPER": ["L"] }, "Colors": [ { @@ -370,9 +360,7 @@ "ExtraImages": null }, "SizesAvailable": { - "HAND": [ - "LH" - ] + "HAND": ["LH"] }, "Colors": [ { @@ -422,9 +410,7 @@ ] }, "SizesAvailable": { - "ZIPPER": [ - "L" - ] + "ZIPPER": ["L"] }, "Colors": [ { @@ -474,9 +460,7 @@ ] }, "SizesAvailable": { - "ZIPPER": [ - "L" - ] + "ZIPPER": ["L"] }, "Colors": [ { @@ -526,9 +510,7 @@ ] }, "SizesAvailable": { - "ZIPPER": [ - "L" - ] + "ZIPPER": ["L"] }, "Colors": [ { @@ -578,9 +560,7 @@ ] }, "SizesAvailable": { - "ZIPPER": [ - "L" - ] + "ZIPPER": ["L"] }, "Colors": [ { @@ -630,9 +610,7 @@ ] }, "SizesAvailable": { - "ZIPPER": [ - "L" - ] + "ZIPPER": ["L"] }, "Colors": [ { @@ -730,9 +708,7 @@ ] }, "SizesAvailable": { - "ZIPPER": [ - "L" - ] + "ZIPPER": ["L"] }, "Colors": [ { @@ -1018,9 +994,7 @@ ] }, "SizesAvailable": { - "ZIPPER": [ - "L" - ] + "ZIPPER": ["L"] }, "Colors": [ { @@ -1070,9 +1044,7 @@ ] }, "SizesAvailable": { - "ZIPPER": [ - "R" - ] + "ZIPPER": ["R"] }, "Colors": [ { @@ -1122,9 +1094,7 @@ ] }, "SizesAvailable": { - "ZIPPER": [ - "RH" - ] + "ZIPPER": ["RH"] }, "Colors": [ { diff --git a/src/json/tents.json b/src/json/tents.json index 98029223..d24bd8bc 100644 --- a/src/json/tents.json +++ b/src/json/tents.json @@ -99,7 +99,7 @@ { "ColorCode": "01", "ColorName": "Pale Pumpkin/Terracotta" - } + } ], "DescriptionHtmlSimple": "Excess. Get out and enjoy nature with Marmot's Ajax tent, featuring a smart design with durable, waterproof construction and two doors for easy access.", "SuggestedRetailPrice": 275.0, diff --git a/team.txt b/team.txt new file mode 100644 index 00000000..bdcb1fee --- /dev/null +++ b/team.txt @@ -0,0 +1,7 @@ +Trello link: https://trello.com/b/KflaqxFD/wdd-330 + +Josue Centurion +Diana Quispe +Zeir Braidi +Felix Guzman +Nikita Wong \ No newline at end of file