-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathproduct.html
154 lines (134 loc) · 5.24 KB
/
product.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
146
147
148
149
150
151
152
153
154
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>EasyShop.com - Products</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap">
<style>
body {
font-family: 'Roboto', sans-serif;
margin: 0;
padding: 0;
background-color: #f8f8f8;
color: #333;
transition: background-color 0.5s;
}
.container {
max-width: 1400px;
margin: 0 auto;
padding: 20px;
display: flex;
justify-content: space-between;
flex-wrap: wrap;
gap: 20px;
}
h1, h2, h3 {
color: #333;
margin-bottom: 10px;
}
.product-item {
background-color: #fff;
border: 1px solid #ddd;
border-radius: 10px;
overflow: hidden;
box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
transition: transform 0.3s, box-shadow 0.3s;
width: calc(33.33% - 20px);
cursor: pointer;
}
.product-item:hover {
transform: translateY(-5px);
box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
}
.item-image {
height: 200px;
background-size: cover;
background-position: center;
border-bottom: 1px solid #ddd;
border-radius: 10px 10px 0 0;
}
.item-category {
padding: 15px;
background-color: #ffcc00;
color: #333;
font-weight: bold;
border-radius: 0 0 10px 10px;
text-align: center;
}
.item-description {
padding: 15px;
color: #555;
text-align: justify;
}
.view-button {
display: block;
width: 100%;
padding: 12px;
text-align: center;
background-color: #333;
color: #fff;
text-decoration: none;
font-weight: bold;
border: none;
cursor: pointer;
transition: background-color 0.3s;
border-radius: 0 0 10px 10px;
}
.view-button:hover {
background-color: #555;
}
@media only screen and (max-width: 1024px) {
.product-item {
width: calc(50% - 20px);
}
}
@media only screen and (max-width: 600px) {
.product-item {
width: calc(100% - 20px);
}
}
</style>
<script>
function logItemClick(category) {
console.log("User clicked on a " + category + " item.");
// Add your custom logic here if needed
}
</script>
</head>
<body>
<div class="container">
<div class="product-item" onclick="logItemClick('Toys')">
<div class="item-image" style="background-image: url('toys.jpg');"></div>
<div class="item-category">Toys</div>
<div class="item-description">Explore our delightful collection of toys for all ages. From educational toys to fun playtime companions, we have something for every child.</div>
<a href="toys.html" class="view-button">View Item</a>
</div>
<div class="product-item" onclick="logItemClick('Home-made Items')">
<div class="item-image" style="background-image: url('homemade.jpg');"></div>
<div class="item-category">Home-made Items</div>
<div class="item-description">Discover the charm of handcrafted, home-made items. Each piece tells a story and adds a personal touch to your home. Browse our unique selection.</div>
<a href="#" class="view-button">View Item</a>
</div>
<div class="product-item" onclick="logItemClick('Useful Items')">
<div class="item-image" style="background-image: url('useful.jpg');"></div>
<div class="item-category">Useful Items</div>
<div class="item-description">Find practical and useful items that make your daily life easier. From kitchen gadgets to innovative tools, our collection is designed to enhance your lifestyle.</div>
<a href="#" class="view-button">View Item</a>
</div>
<div class="product-item" onclick="logItemClick('Books')">
<div class="item-image" style="background-image: url('books.jpg');"></div>
<div class="item-category">Books</div>
<div class="item-description">Dive into captivating stories and insightful knowledge with our diverse collection of books. Explore various genres to satisfy your literary cravings.</div>
<a href="#" class="view-button">View Item</a>
</div>
<div class="product-item" onclick="logItemClick('Bags')">
<div class="item-image" style="background-image: url('bags.jpg');"></div>
<div class="item-category">Bags</div>
<div class="item-description">Carry your essentials in style with our fashionable and functional bags. Whether for work or leisure, our collection offers trendy options for every occasion.</div>
<a href="#" class="view-button">View Item</a>
</div>
<!-- Add more product items with similar structure -->
</div>
</body>
</html>