-
Notifications
You must be signed in to change notification settings - Fork 0
/
contact.html
145 lines (130 loc) · 5.44 KB
/
contact.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Products - Outfit Store</title>
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&family=Roboto:wght@400;500&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/navbar.css">
<link rel="stylesheet" href="css/footer.css">
<link rel="stylesheet" href="css/contact.css">
<link rel="stylesheet" href="css/product.css">
<!-- <link rel="stylesheet" href="css/product.css"> -->
<!-- <link rel="stylesheet" href="css/search.css"> -->
</head>
<body>
<!-- Navbar Section -->
<header>
<nav class="navbar">
<div class="navbar-left">
<a href="#" class="logo">OutfitStore</a>
</div>
<div class="navbar-center">
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="./shop.html">Shop</a></li>
<li><a href="./sale.html">Sale</a></li>
<li><a href="./Categories.html">Categories</a></li>
<li><a href="./contact.html">Contact</a></li>
</ul>
</div>
<div class="navbar-right">
<div class="search-bar">
<input type="text" placeholder="Search products..." aria-label="Search products">
<button aria-label="Search">Search</button>
</div>
<div class="user-cart">
<a href="#">Login</a>
<a href="#">Cart<span class="cart-count">3</span></a>
</div>
</div>
<!-- Hamburger Icon -->
<div class="hamburger" id="hamburger">
<span></span>
<span></span>
<span></span>
</div>
</nav>
</header>
<!-- Product Filter Section -->
<section class="product-filter">
<h3>Filter Products</h3>
<form>
<label for="category">Category:</label>
<select id="category" name="category">
<option value="all">All</option>
<option value="men">Men</option>
<option value="women">Women</option>
<option value="accessories">Accessories</option>
<option value="footwear">Footwear</option>
</select>
<label for="price">Price Range:</label>
<input type="range" id="price" name="price" min="0" max="1000" step="10" value="1000" aria-label="Price Range">
<span id="priceValue">$1000</span>
</form>
</section>
<!-- Product Section -->
<section class="product-section">
<h2>Our Products</h2>
<div class="product-grid">
<div class="product-item" data-category="men" data-price="29.99">
<img src="img/product1.jpg" alt="Stylish Men's Jacket">
<h3>Men's Jacket</h3>
<p>$29.99</p>
<a href="#" class="add-to-cart">Add to Cart</a>
</div>
<div class="product-item" data-category="women" data-price="49.99">
<img src="img/product2.jpg" alt="Elegant Women's Dress">
<h3>Women's Dress</h3>
<p>$49.99</p>
<a href="#" class="add-to-cart">Add to Cart</a>
</div>
<div class="product-item" data-category="footwear" data-price="69.99">
<img src="img/product3.jpg" alt="Durable Leather Shoes">
<h3>Leather Shoes</h3>
<p>$69.99</p>
<a href="#" class="add-to-cart">Add to Cart</a>
</div>
<!-- Add more product items as needed -->
</div>
</section>
<!-- Footer Section -->
<footer>
<p>© 2024 OutfitStore. All Rights Reserved.</p>
</footer>
<script src="script.js" defer></script>
<script>
// Get references to the filter form elements
const categorySelect = document.getElementById('category');
const priceRange = document.getElementById('price');
const priceValue = document.getElementById('priceValue');
const productItems = document.querySelectorAll('.product-item');
// Update price value text
priceRange.addEventListener('input', function() {
priceValue.textContent = `$${priceRange.value}`;
});
// Filter products based on category and price
function filterProducts() {
const selectedCategory = categorySelect.value;
const selectedPrice = parseFloat(priceRange.value);
productItems.forEach(item => {
const itemCategory = item.getAttribute('data-category');
const itemPrice = parseFloat(item.getAttribute('data-price'));
if (
(selectedCategory === 'all' || selectedCategory === itemCategory) &&
itemPrice <= selectedPrice
) {
item.style.display = 'block';
} else {
item.style.display = 'none';
}
});
}
// Add event listeners for filtering
categorySelect.addEventListener('change', filterProducts);
priceRange.addEventListener('input', filterProducts);
// Initialize filter on page load
filterProducts();
</script>
</body>
</html>