From 7ded1eb7bd8b0398b888687d6cdfba7f74afcf93 Mon Sep 17 00:00:00 2001
From: Jonathan de Almeida <47408354+jonathanhost@users.noreply.github.com>
Date: Fri, 14 Jun 2024 01:24:23 -0300
Subject: [PATCH 1/4] new comit
---
package.json | 1 -
src/cart/index.html | 2 +-
src/checkout/index.html | 25 +-------
src/json/sleeping-bags.json | 60 +++++---------------
src/json/tents.json | 2 +-
src/product_pages/cedar-ridge-rimrock-2.html | 2 +-
src/product_pages/marmot-ajax-3.html | 2 +-
src/product_pages/northface-alpine-3.html | 2 +-
src/product_pages/northface-talus-4.html | 2 +-
vite.config.js | 6 +-
10 files changed, 26 insertions(+), 78 deletions(-)
diff --git a/package.json b/package.json
index 86646645b..f24a64c6c 100644
--- a/package.json
+++ b/package.json
@@ -10,7 +10,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 f64b6f0c9..87399f39d 100644
--- a/src/cart/index.html
+++ b/src/cart/index.html
@@ -1,4 +1,4 @@
-
+
diff --git a/src/checkout/index.html b/src/checkout/index.html
index 876458650..7ce7715e5 100644
--- a/src/checkout/index.html
+++ b/src/checkout/index.html
@@ -1,9 +1,7 @@
-
+
-
-
@@ -11,30 +9,22 @@
Sleep Outside | Checkout
-
-
-
-
Review & Place your Order
-
-
-
-
-
diff --git a/src/json/sleeping-bags.json b/src/json/sleeping-bags.json
index 6bf7a1243..5d015123c 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 98029223e..d24bd8bcb 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/src/product_pages/cedar-ridge-rimrock-2.html b/src/product_pages/cedar-ridge-rimrock-2.html
index c05810379..782252ae8 100644
--- a/src/product_pages/cedar-ridge-rimrock-2.html
+++ b/src/product_pages/cedar-ridge-rimrock-2.html
@@ -1,4 +1,4 @@
-
+
diff --git a/src/product_pages/marmot-ajax-3.html b/src/product_pages/marmot-ajax-3.html
index 936f67541..2a501ac01 100644
--- a/src/product_pages/marmot-ajax-3.html
+++ b/src/product_pages/marmot-ajax-3.html
@@ -1,4 +1,4 @@
-
+
diff --git a/src/product_pages/northface-alpine-3.html b/src/product_pages/northface-alpine-3.html
index 8d0ab07e3..c512994ef 100644
--- a/src/product_pages/northface-alpine-3.html
+++ b/src/product_pages/northface-alpine-3.html
@@ -1,4 +1,4 @@
-
+
diff --git a/src/product_pages/northface-talus-4.html b/src/product_pages/northface-talus-4.html
index 891c22612..26ed18477 100644
--- a/src/product_pages/northface-talus-4.html
+++ b/src/product_pages/northface-talus-4.html
@@ -1,4 +1,4 @@
-
+
diff --git a/vite.config.js b/vite.config.js
index 4a5eef384..a74921ad8 100644
--- a/vite.config.js
+++ b/vite.config.js
@@ -13,16 +13,16 @@ export default defineConfig({
checkout: resolve(__dirname, "src/checkout/index.html"),
product1: resolve(
__dirname,
- "src/product_pages/cedar-ridge-rimrock-2.html"
+ "src/product_pages/cedar-ridge-rimrock-2.html",
),
product2: resolve(__dirname, "src/product_pages/marmot-ajax-3.html"),
product3: resolve(
__dirname,
- "src/product_pages/northface-alpine-3.html"
+ "src/product_pages/northface-alpine-3.html",
),
product4: resolve(
__dirname,
- "src/product_pages/northface-talus-4.html"
+ "src/product_pages/northface-talus-4.html",
),
},
},
From 73d06db9cf7f0589de71c72f03473cea01448a85 Mon Sep 17 00:00:00 2001
From: Jonathan de Almeida <47408354+jonathanhost@users.noreply.github.com>
Date: Fri, 14 Jun 2024 01:34:42 -0300
Subject: [PATCH 2/4] Team names
---
team.txt | 1 +
1 file changed, 1 insertion(+)
create mode 100644 team.txt
diff --git a/team.txt b/team.txt
new file mode 100644
index 000000000..bbb703a14
--- /dev/null
+++ b/team.txt
@@ -0,0 +1 @@
+Jonathan de Almeida
\ No newline at end of file
From cc9e632578ebc76885eaa47d159f43f66780fc46 Mon Sep 17 00:00:00 2001
From: Jonathan de Almeida <47408354+jonathanhost@users.noreply.github.com>
Date: Fri, 14 Jun 2024 01:38:49 -0300
Subject: [PATCH 3/4] new Branch
---
jonathan.txt | 1 +
1 file changed, 1 insertion(+)
create mode 100644 jonathan.txt
diff --git a/jonathan.txt b/jonathan.txt
new file mode 100644
index 000000000..bbb703a14
--- /dev/null
+++ b/jonathan.txt
@@ -0,0 +1 @@
+Jonathan de Almeida
\ No newline at end of file
From 0a2a1d51fd75bcfa509246cb0185a9a99bf95b03 Mon Sep 17 00:00:00 2001
From: Jonathan de Almeida <47408354+jonathanhost@users.noreply.github.com>
Date: Sat, 15 Jun 2024 05:28:06 -0300
Subject: [PATCH 4/4] Finished
---
.eslintrc.json | 2 +-
src/index.html | 99 ++++++++++++++++++++++++++---------------------
src/js/cart.js | 5 ++-
src/js/product.js | 15 +++++--
4 files changed, 71 insertions(+), 50 deletions(-)
diff --git a/.eslintrc.json b/.eslintrc.json
index dd5dbdc7a..17f92484f 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/src/index.html b/src/index.html
index 35ac63ce6..36bdab08f 100644
--- a/src/index.html
+++ b/src/index.html
@@ -1,4 +1,4 @@
-
+
@@ -9,20 +9,31 @@
@@ -55,48 +66,48 @@ Top Products
diff --git a/src/js/cart.js b/src/js/cart.js
index a2fb3d8ef..742adc62d 100644
--- a/src/js/cart.js
+++ b/src/js/cart.js
@@ -1,12 +1,15 @@
import { getLocalStorage } from "./utils.mjs";
-function renderCartContents() {
+export default function renderCartContents() {
const cartItems = getLocalStorage("so-cart");
+ console.log(cartItems);
+
const htmlItems = cartItems.map((item) => cartItemTemplate(item));
document.querySelector(".product-list").innerHTML = htmlItems.join("");
}
function cartItemTemplate(item) {
+ console.log(item);
const newItem = `
![]()