Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
0dd998b
hhkaerak
Asharib706 Apr 2, 2024
51bdf61
Html with Js
Asharib706 Apr 2, 2024
6ba5c5c
Make Home page interactive
Asharib706 Apr 3, 2024
0d0dad8
Make Cart Quantity Interactive
Asharib706 Apr 3, 2024
89236a5
setTimeout for Add to cart confirmation
Asharib706 Apr 4, 2024
dd90edd
create module for cart.js
Asharib706 Apr 4, 2024
b1ee128
Creating Add to Cart,UpdateQuantity Function and move it to their res…
Asharib706 Apr 4, 2024
5664806
Creating Add to Cart,UpdateQuantity Function and move it to their res…
Asharib706 Apr 4, 2024
f4a1f33
generate html for order summary
Asharib706 Apr 5, 2024
da603d5
fix price Formatting and Radio Selectors
Asharib706 Apr 6, 2024
3d84ae6
implement the logic behind behingd delete link in checkout.html
Asharib706 Apr 6, 2024
fe2ce8f
delete container from the cart when press delete
Asharib706 Apr 6, 2024
56236a0
save cart to locat storage
Asharib706 Apr 6, 2024
9b91d6e
Show cart quantity on checkout and home page
Asharib706 Apr 19, 2024
88bcb95
make update button interactive
Asharib706 Apr 19, 2024
35bc2cd
correctly implement add to cart function
Asharib706 Apr 25, 2024
7c31ec8
Create README.md
Asharib706 Apr 25, 2024
5c3b1dc
Save data and generate html for delivery options
Asharib706 Apr 26, 2024
4012412
make delivery options interactive
Asharib706 Apr 27, 2024
cba4495
lecture 15 complete
Asharib706 Apr 27, 2024
092286d
Revert "make delivery options interactive"
Asharib706 Apr 27, 2024
a711fec
recover the code
Asharib706 Apr 27, 2024
e0f9537
..
Asharib706 Apr 27, 2024
31ea358
regenrate html when cahnge delivery option
Asharib706 Apr 27, 2024
a5dec8b
move order summary into its own file
Asharib706 Apr 27, 2024
c177f6f
made payment summary interactive
Asharib706 Apr 27, 2024
1deb643
add jasmine testing framework
Asharib706 Apr 28, 2024
e3d9124
remove default test and add money test
Asharib706 Apr 28, 2024
a12a1b2
Create automated Test to add to Cart
Asharib706 Apr 28, 2024
6a9c5d3
apply oop on product.js
Asharib706 Apr 30, 2024
f8ae78a
use inheritance and polymorsphism to add size chart
Asharib706 Apr 30, 2024
330faf8
create a backend practice file
Asharib706 May 2, 2024
7f97f1a
load products from the backend
Asharib706 May 2, 2024
9f7aae7
learn promises and convert code to promises
Asharib706 May 3, 2024
2ca751b
learn how to use fetch to load Products
Asharib706 May 3, 2024
870aee8
learn about async and awaits use it instead of promises and callbacks
Asharib706 May 3, 2024
0433330
error handling
Asharib706 May 3, 2024
e961963
create order using the backend
Asharib706 May 6, 2024
e3b9cb9
Learn how to use url parametrs
Asharib706 May 6, 2024
f22a382
..
Asharib706 May 6, 2024
c4026a6
use LoadProductsFetch for amazon.js
Asharib706 May 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"liveServer.settings.port": 5501
}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
It is the amazon project made by the help of SuperSimpleDev tutorial on <b>Javascript Full Course</b>
242 changes: 50 additions & 192 deletions amazon.html
Original file line number Diff line number Diff line change
@@ -1,205 +1,63 @@
<!DOCTYPE html>
<html>
<head>
<title>Amazon Project</title>

<!-- This code is needed for responsive design to work.
<head>
<title>Amazon Project</title>

<!-- This code is needed for responsive design to work.
(Responsive design = make the website look good on
smaller screen sizes like a phone or a tablet). -->
<meta name="viewport" content="width=device-width, initial-scale=1">

<!-- Load a font called Roboto from Google Fonts. -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet">

<!-- Here are the CSS files for this page. -->
<link rel="stylesheet" href="styles/shared/general.css">
<link rel="stylesheet" href="styles/shared/amazon-header.css">
<link rel="stylesheet" href="styles/pages/amazon.css">
</head>
<body>
<div class="amazon-header">
<div class="amazon-header-left-section">
<a href="amazon.html" class="header-link">
<img class="amazon-logo"
src="images/amazon-logo-white.png">
<img class="amazon-mobile-logo"
src="images/amazon-mobile-logo-white.png">
</a>
</div>

<div class="amazon-header-middle-section">
<input class="search-bar" type="text" placeholder="Search">

<button class="search-button">
<img class="search-icon" src="images/icons/search-icon.png">
</button>
</div>

<div class="amazon-header-right-section">
<a class="orders-link header-link" href="orders.html">
<span class="returns-text">Returns</span>
<span class="orders-text">& Orders</span>
</a>

<a class="cart-link header-link" href="checkout.html">
<img class="cart-icon" src="images/icons/cart-icon.png">
<div class="cart-quantity">3</div>
<div class="cart-text">Cart</div>
</a>
</div>
<meta name="viewport" content="width=device-width, initial-scale=1">

<!-- Load a font called Roboto from Google Fonts. -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet">

<!-- Here are the CSS files for this page. -->
<link rel="stylesheet" href="styles/shared/general.css">
<link rel="stylesheet" href="styles/shared/amazon-header.css">
<link rel="stylesheet" href="styles/pages/amazon.css">
</head>

<body>
<div class="amazon-header">
<div class="amazon-header-left-section">
<a href="amazon.html" class="header-link">
<img class="amazon-logo" src="images/amazon-logo-white.png">
<img class="amazon-mobile-logo" src="images/amazon-mobile-logo-white.png">
</a>
</div>

<div class="main">
<div class="products-grid">
<div class="product-container">
<div class="product-image-container">
<img class="product-image"
src="images/products/athletic-cotton-socks-6-pairs.jpg">
</div>

<div class="product-name limit-text-to-2-lines">
Black and Gray Athletic Cotton Socks - 6 Pairs
</div>

<div class="product-rating-container">
<img class="product-rating-stars"
src="images/ratings/rating-45.png">
<div class="product-rating-count link-primary">
87
</div>
</div>

<div class="product-price">
$10.90
</div>

<div class="product-quantity-container">
<select>
<option selected value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
</select>
</div>

<div class="product-spacer"></div>

<div class="added-to-cart">
<img src="images/icons/checkmark.png">
Added
</div>

<button class="add-to-cart-button button-primary">
Add to Cart
</button>
</div>

<div class="product-container">
<div class="product-image-container">
<img class="product-image"
src="images/products/intermediate-composite-basketball.jpg">
</div>
<div class="amazon-header-middle-section">
<input class="search-bar" type="text" placeholder="Search">

<div class="product-name limit-text-to-2-lines">
Intermediate Size Basketball
</div>

<div class="product-rating-container">
<img class="product-rating-stars"
src="images/ratings/rating-40.png">
<div class="product-rating-count link-primary">
127
</div>
</div>

<div class="product-price">
$20.95
</div>

<div class="product-quantity-container">
<select>
<option selected value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
</select>
</div>

<div class="product-spacer"></div>

<div class="added-to-cart">
<img src="images/icons/checkmark.png">
Added
</div>

<button class="add-to-cart-button button-primary">
Add to Cart
</button>
</div>

<div class="product-container">
<div class="product-image-container">
<img class="product-image"
src="images/products/adults-plain-cotton-tshirt-2-pack-teal.jpg">
</div>

<div class="product-name limit-text-to-2-lines">
Adults Plain Cotton T-Shirt - 2 Pack
</div>

<div class="product-rating-container">
<img class="product-rating-stars"
src="images/ratings/rating-45.png">
<div class="product-rating-count link-primary">
56
</div>
</div>
<button class="search-button">
<img class="search-icon" src="images/icons/search-icon.png">
</button>
</div>

<div class="product-price">
$7.99
</div>
<div class="amazon-header-right-section">
<a class="orders-link header-link" href="orders.html">
<span class="returns-text">Returns</span>
<span class="orders-text">& Orders</span>
</a>

<a class="cart-link header-link" href="checkout.html">
<img class="cart-icon" src="images/icons/cart-icon.png">
<div class="cart-quantity js-cart-quantity"></div>
<div class="cart-text">Cart</div>
</a>
</div>
</div>

<div class="product-quantity-container">
<select>
<option selected value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
</select>
</div>
<div class="main">
<div class="products-grid js-products-grid">

<div class="product-spacer"></div>
</div>
</div>

<div class="added-to-cart">
<img src="images/icons/checkmark.png">
Added
</div>
<script type ="module" src="scripts/amazon.js" ></script>
</body>

<button class="add-to-cart-button button-primary">
Add to Cart
</button>
</div>
</div>
</div>
</body>
</html>
</html>
6 changes: 6 additions & 0 deletions backend-practice.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
const xhr =new XMLHttpRequest();
xhr.addEventListener('load',()=>{
console.log(xhr.response);
});
xhr.open('GET','https://supersimplebackend.dev');
xhr.send();
Loading