Skip to content

Commit

Permalink
Merge pull request #21 from singh-aman-0/main
Browse files Browse the repository at this point in the history
Add files via upload
  • Loading branch information
tecky708 authored Oct 16, 2023
2 parents 4ca039c + b39a361 commit eee7828
Show file tree
Hide file tree
Showing 3 changed files with 88 additions and 0 deletions.
34 changes: 34 additions & 0 deletions shopping_Website/index.txt
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>
6 changes: 6 additions & 0 deletions shopping_Website/script.txt
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');
});
});
48 changes: 48 additions & 0 deletions shopping_Website/style.txt
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;
}

0 comments on commit eee7828

Please sign in to comment.