-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
118 lines (102 loc) · 4.12 KB
/
index.html
File metadata and controls
118 lines (102 loc) · 4.12 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Responsive Product Grid</title>
<!-- Google Fonts for stylish font -->
<link href="https://fonts.googleapis.com/css2?family=Montserrat&family=Roboto&display=swap" rel="stylesheet">
<!-- Boxicons CDN for star icon -->
<link href="https://unpkg.com/boxicons@2.1.4/css/boxicons.min.css" rel="stylesheet">
<!-- Link to external CSS file -->
<link rel="stylesheet" href="style.css">
</head>
<body>
<!-- Product Grid Container -->
<div class="product-grid">
<!-- 🟡 Product Card 1 -->
<div class="card">
<!-- Star icon (default: unfilled) -->
<i class="bx bx-star favorite-icon"></i>
<div class="card-image">
<img src="/img/img1.png" alt="Product 1" />
</div>
<div class="card-content">
<h3>Training Shoes</h3>
<p>Lightweight shoes for daily workouts and comfort with a stylish edge.</p>
<button class="add-to-cart">Add to Cart</button>
</div>
</div>
<!-- 🟡 Repeat other cards similarly (2 to 6) -->
<div class="card">
<i class="bx bx-star favorite-icon"></i>
<div class="card-image">
<img src="/img/images2.png" alt="Product 2" />
</div>
<div class="card-content">
<h3>Running Shoes</h3>
<p>Built for speed and endurance with breathable fabric and bounce sole.</p>
<button class="add-to-cart">Add to Cart</button>
</div>
</div>
<div class="card">
<i class="bx bx-star favorite-icon"></i>
<div class="card-image">
<img src="/img/images6.png" alt="Product 3" />
</div>
<div class="card-content">
<h3>Casual Sneakers</h3>
<p>Everyday comfort meets street-style in these trendy sneakers.</p>
<button class="add-to-cart">Add to Cart</button>
</div>
</div>
<div class="card">
<i class="bx bx-star favorite-icon"></i>
<div class="card-image">
<img src="/img/img2.png" alt="Product 4" />
</div>
<div class="card-content">
<h3>Office Loafers</h3>
<p>Perfect blend of formal and comfort — ideal for daily office wear.</p>
<button class="add-to-cart">Add to Cart</button>
</div>
</div>
<div class="card">
<i class="bx bx-star favorite-icon"></i>
<div class="card-image">
<img src="/img/img3.png" alt="Product 5" />
</div>
<div class="card-content">
<h3>Sports Shoes</h3>
<p>Engineered for agility, stability, and durability for all sports.</p>
<button class="add-to-cart">Add to Cart</button>
</div>
</div>
<div class="card">
<i class="bx bx-star favorite-icon"></i>
<div class="card-image">
<img src="/img/img4.png" alt="Product 6" />
</div>
<div class="card-content">
<h3>Hiking Boots</h3>
<p>Rugged grip and waterproof comfort for outdoor adventures.</p>
<button class="add-to-cart">Add to Cart</button>
</div>
</div>
</div>
<!-- ✅ JavaScript for toggling star icon -->
<script>
// Select all star icons
document.querySelectorAll('.favorite-icon').forEach(star => {
// Add click event to each
star.addEventListener('click', () => {
// Toggle between outline and filled star classes
star.classList.toggle('bx-star'); // outline star
star.classList.toggle('bxs-star'); // filled star
// Toggle active class to change color
star.classList.toggle('active');
});
});
</script>
</body>
</html>