-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from singh-aman-0/main
Add files via upload
- Loading branch information
Showing
3 changed files
with
88 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>E-Commerce Store</title> | ||
<link rel="stylesheet" href="styles.css"> | ||
</head> | ||
<body> | ||
<header> | ||
<h1>E-Commerce Store</h1> | ||
</header> | ||
|
||
<div class="product-list"> | ||
<div class="product"> | ||
<img src="product1.jpg" alt="Product 1"> | ||
<h2>Product 1</h2> | ||
<p>Description of Product 1.</p> | ||
<span class="price">$19.99</span> | ||
<button class="add-to-cart">Add to Cart</button> | ||
</div> | ||
<div class="product"> | ||
<img src="product2.jpg" alt="Product 2"> | ||
<h2>Product 2</h2> | ||
<p>Description of Product 2.</p> | ||
<span class="price">$29.99</span> | ||
<button class="add-to-cart">Add to Cart</button> | ||
</div> | ||
<!-- More product listings here --> | ||
</div> | ||
|
||
<script src="script.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// You can add JavaScript functionality here, like handling the "Add to Cart" button clicks. | ||
document.querySelectorAll('.add-to-cart').forEach(button => { | ||
button.addEventListener('click', () => { | ||
alert('Product added to cart'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
body { | ||
font-family: Arial, sans-serif; | ||
margin: 0; | ||
padding: 0; | ||
} | ||
|
||
header { | ||
background-color: #333; | ||
color: #fff; | ||
text-align: center; | ||
padding: 10px; | ||
} | ||
|
||
.product-list { | ||
display: flex; | ||
justify-content: center; | ||
flex-wrap: wrap; | ||
} | ||
|
||
.product { | ||
margin: 20px; | ||
padding: 10px; | ||
border: 1px solid #ccc; | ||
text-align: center; | ||
max-width: 250px; | ||
} | ||
|
||
.product img { | ||
max-width: 100%; | ||
} | ||
|
||
.price { | ||
font-weight: bold; | ||
color: #f00; | ||
} | ||
|
||
.add-to-cart { | ||
background-color: #4caf50; | ||
color: #fff; | ||
border: none; | ||
padding: 10px; | ||
cursor: pointer; | ||
width: 100%; | ||
} | ||
|
||
.add-to-cart:hover { | ||
background-color: #45a049; | ||
} |