abeea commited on
Commit
044cb3e
·
verified ·
1 Parent(s): 5a57dbf

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +72 -84
index.html CHANGED
@@ -3,108 +3,100 @@
3
  <head>
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>Luxury Jewellery</title>
 
 
7
 
8
  <style>
9
  :root {
10
- --c1: #FAE5D7;
11
- --c2: #FAD9D1;
12
- --c3: #FACDCC;
13
- --c4: #FAC0C6;
14
- --c5: #FAB4C0;
15
- --dark: #2b2b2b;
16
  }
17
 
18
  * {
19
  margin: 0;
20
  padding: 0;
21
  box-sizing: border-box;
22
- font-family: 'Segoe UI', sans-serif;
23
  }
24
 
25
  body {
26
- background: var(--c1);
 
27
  color: var(--dark);
28
  }
29
 
30
- /* NAVBAR */
31
  nav {
32
  display: flex;
33
  justify-content: space-between;
34
- padding: 20px 40px;
35
- background: white;
36
- box-shadow: 0 2px 10px rgba(0,0,0,0.05);
 
 
37
  }
38
 
39
  nav h1 {
 
40
  letter-spacing: 2px;
41
  }
42
 
43
  nav button {
44
- background: var(--c5);
45
  border: none;
46
- padding: 10px 15px;
47
- border-radius: 20px;
 
48
  cursor: pointer;
49
  }
50
 
51
  /* HERO */
52
  .hero {
53
- height: 80vh;
54
- background: linear-gradient(to right, var(--c2), var(--c4));
55
  display: flex;
56
  align-items: center;
57
  justify-content: center;
 
58
  text-align: center;
59
  }
60
 
61
  .hero h2 {
62
- font-size: 3rem;
63
- margin-bottom: 10px;
64
  }
65
 
66
  .hero p {
67
- opacity: 0.7;
68
- }
69
-
70
- /* FILTER */
71
- .filter {
72
- text-align: center;
73
- margin: 30px;
74
- }
75
-
76
- .filter button {
77
- margin: 5px;
78
- padding: 10px 15px;
79
- border: none;
80
- background: var(--c3);
81
- border-radius: 20px;
82
- cursor: pointer;
83
  }
84
 
85
  /* PRODUCTS */
86
  .products {
 
87
  display: grid;
88
- grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
89
- padding: 40px;
90
- gap: 25px;
91
  }
92
 
93
  .card {
94
  background: white;
95
  border-radius: 20px;
96
  overflow: hidden;
97
- transition: 0.3s;
98
- box-shadow: 0 10px 20px rgba(0,0,0,0.05);
99
  }
100
 
101
  .card:hover {
102
- transform: translateY(-8px);
 
103
  }
104
 
105
  .card img {
106
  width: 100%;
107
- height: 220px;
108
  object-fit: cover;
109
  }
110
 
@@ -112,39 +104,48 @@ nav button {
112
  padding: 20px;
113
  }
114
 
 
 
 
 
115
  .price {
116
- color: #b76e79;
117
- font-weight: bold;
118
  }
119
 
120
  .card button {
121
- margin-top: 10px;
122
- padding: 10px;
123
  width: 100%;
 
124
  border: none;
125
- background: var(--c5);
 
126
  border-radius: 10px;
127
  cursor: pointer;
 
 
 
 
 
128
  }
129
 
130
  /* FOOTER */
131
  footer {
132
  text-align: center;
133
- padding: 20px;
134
- background: var(--c2);
135
- margin-top: 40px;
136
  }
137
 
138
- /* CART POPUP */
139
  .cart {
140
  position: fixed;
141
  right: 20px;
142
- top: 70px;
143
  background: white;
144
- padding: 15px;
145
- border-radius: 10px;
146
  display: none;
147
- box-shadow: 0 10px 20px rgba(0,0,0,0.1);
148
  }
149
  </style>
150
  </head>
@@ -152,49 +153,43 @@ footer {
152
  <body>
153
 
154
  <nav>
155
- <h1>💎 LUXE</h1>
156
  <button onclick="toggleCart()">Cart (<span id="count">0</span>)</button>
157
  </nav>
158
 
159
  <div class="hero">
160
  <div>
161
- <h2>Elegant Jewellery</h2>
162
- <p>Luxury crafted with love & perfection</p>
163
  </div>
164
  </div>
165
 
166
- <div class="filter">
167
- <button onclick="filter('all')">All</button>
168
- <button onclick="filter('ring')">Rings</button>
169
- <button onclick="filter('necklace')">Necklace</button>
170
- </div>
171
-
172
  <div class="products" id="products"></div>
173
 
174
  <div class="cart" id="cartBox">
175
- <h3>Cart Items</h3>
176
  <ul id="cartItems"></ul>
177
  </div>
178
 
179
  <footer>
180
- © 2026 Luxury Jewellery Store
181
  </footer>
182
 
183
  <script>
184
  const products = [
185
- {name:"Diamond Ring", price:120, type:"ring", img:"https://images.unsplash.com/photo-1602751584552-8ba73aad10e1"},
186
- {name:"Gold Necklace", price:200, type:"necklace", img:"https://images.unsplash.com/photo-1617038220319-276d3cfab638"},
187
- {name:"Rose Ring", price:150, type:"ring", img:"https://images.unsplash.com/photo-1588444650700-6c3b8f3bb3b5"},
188
- {name:"Pearl Necklace", price:180, type:"necklace", img:"https://images.unsplash.com/photo-1603974372033-6f73c4f93a33"}
189
  ];
190
 
191
  let cart = [];
192
 
193
- function display(list){
194
  const container = document.getElementById("products");
195
  container.innerHTML = "";
196
 
197
- list.forEach((p,i)=>{
198
  container.innerHTML += `
199
  <div class="card">
200
  <img src="${p.img}">
@@ -208,25 +203,18 @@ function display(list){
208
  });
209
  }
210
 
211
- function filter(type){
212
- if(type === 'all') display(products);
213
- else display(products.filter(p => p.type === type));
214
- }
215
-
216
  function addToCart(i){
217
  cart.push(products[i]);
218
  document.getElementById("count").innerText = cart.length;
219
-
220
- const list = document.getElementById("cartItems");
221
- list.innerHTML += `<li>${products[i].name}</li>`;
222
  }
223
 
224
  function toggleCart(){
225
- const cartBox = document.getElementById("cartBox");
226
- cartBox.style.display = cartBox.style.display === "block" ? "none" : "block";
227
  }
228
 
229
- display(products);
230
  </script>
231
 
232
  </body>
 
3
  <head>
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Éclat Jewellery</title>
7
+
8
+ <link href="https://fonts.googleapis.com/css2?family=Playfair+Display:wght@500;700&family=Poppins:wght@300;400&display=swap" rel="stylesheet">
9
 
10
  <style>
11
  :root {
12
+ --bg: #fff8f6;
13
+ --soft-pink: #f8e1e7;
14
+ --rose: #e8b4b8;
15
+ --accent: #d4a373;
16
+ --dark: #2a2a2a;
 
17
  }
18
 
19
  * {
20
  margin: 0;
21
  padding: 0;
22
  box-sizing: border-box;
 
23
  }
24
 
25
  body {
26
+ background: var(--bg);
27
+ font-family: 'Poppins', sans-serif;
28
  color: var(--dark);
29
  }
30
 
31
+ /* NAV */
32
  nav {
33
  display: flex;
34
  justify-content: space-between;
35
+ padding: 20px 60px;
36
+ position: sticky;
37
+ top: 0;
38
+ background: rgba(255,255,255,0.7);
39
+ backdrop-filter: blur(10px);
40
  }
41
 
42
  nav h1 {
43
+ font-family: 'Playfair Display', serif;
44
  letter-spacing: 2px;
45
  }
46
 
47
  nav button {
48
+ background: var(--accent);
49
  border: none;
50
+ padding: 10px 18px;
51
+ border-radius: 25px;
52
+ color: white;
53
  cursor: pointer;
54
  }
55
 
56
  /* HERO */
57
  .hero {
58
+ height: 90vh;
 
59
  display: flex;
60
  align-items: center;
61
  justify-content: center;
62
+ background: linear-gradient(135deg, #f8e1e7, #fff);
63
  text-align: center;
64
  }
65
 
66
  .hero h2 {
67
+ font-family: 'Playfair Display', serif;
68
+ font-size: 3.5rem;
69
  }
70
 
71
  .hero p {
72
+ margin-top: 10px;
73
+ opacity: 0.6;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
74
  }
75
 
76
  /* PRODUCTS */
77
  .products {
78
+ padding: 60px;
79
  display: grid;
80
+ grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
81
+ gap: 30px;
 
82
  }
83
 
84
  .card {
85
  background: white;
86
  border-radius: 20px;
87
  overflow: hidden;
88
+ transition: 0.4s;
89
+ box-shadow: 0 15px 30px rgba(0,0,0,0.05);
90
  }
91
 
92
  .card:hover {
93
+ transform: translateY(-10px);
94
+ box-shadow: 0 25px 50px rgba(0,0,0,0.1);
95
  }
96
 
97
  .card img {
98
  width: 100%;
99
+ height: 260px;
100
  object-fit: cover;
101
  }
102
 
 
104
  padding: 20px;
105
  }
106
 
107
+ .card-content h3 {
108
+ font-family: 'Playfair Display', serif;
109
+ }
110
+
111
  .price {
112
+ color: var(--accent);
113
+ margin: 8px 0;
114
  }
115
 
116
  .card button {
 
 
117
  width: 100%;
118
+ padding: 10px;
119
  border: none;
120
+ background: var(--dark);
121
+ color: white;
122
  border-radius: 10px;
123
  cursor: pointer;
124
+ transition: 0.3s;
125
+ }
126
+
127
+ .card button:hover {
128
+ background: var(--accent);
129
  }
130
 
131
  /* FOOTER */
132
  footer {
133
  text-align: center;
134
+ padding: 30px;
135
+ background: var(--soft-pink);
136
+ margin-top: 50px;
137
  }
138
 
139
+ /* CART */
140
  .cart {
141
  position: fixed;
142
  right: 20px;
143
+ top: 80px;
144
  background: white;
145
+ padding: 20px;
146
+ border-radius: 15px;
147
  display: none;
148
+ box-shadow: 0 15px 30px rgba(0,0,0,0.15);
149
  }
150
  </style>
151
  </head>
 
153
  <body>
154
 
155
  <nav>
156
+ <h1>ÉCLAT</h1>
157
  <button onclick="toggleCart()">Cart (<span id="count">0</span>)</button>
158
  </nav>
159
 
160
  <div class="hero">
161
  <div>
162
+ <h2>Timeless Elegance</h2>
163
+ <p>Crafted for moments that shine forever</p>
164
  </div>
165
  </div>
166
 
 
 
 
 
 
 
167
  <div class="products" id="products"></div>
168
 
169
  <div class="cart" id="cartBox">
170
+ <h3>Your Cart</h3>
171
  <ul id="cartItems"></ul>
172
  </div>
173
 
174
  <footer>
175
+ © 2026 Éclat Jewellery
176
  </footer>
177
 
178
  <script>
179
  const products = [
180
+ {name:"Diamond Ring", price:250, img:"https://images.unsplash.com/photo-1602751584552-8ba73aad10e1"},
181
+ {name:"Gold Necklace", price:400, img:"https://images.unsplash.com/photo-1617038220319-276d3cfab638"},
182
+ {name:"Luxury Bracelet", price:180, img:"https://images.unsplash.com/photo-1599643478518-a784e5dc4c8f"},
183
+ {name:"Pearl Set", price:350, img:"https://images.unsplash.com/photo-1603974372033-6f73c4f93a33"}
184
  ];
185
 
186
  let cart = [];
187
 
188
+ function display(){
189
  const container = document.getElementById("products");
190
  container.innerHTML = "";
191
 
192
+ products.forEach((p,i)=>{
193
  container.innerHTML += `
194
  <div class="card">
195
  <img src="${p.img}">
 
203
  });
204
  }
205
 
 
 
 
 
 
206
  function addToCart(i){
207
  cart.push(products[i]);
208
  document.getElementById("count").innerText = cart.length;
209
+ document.getElementById("cartItems").innerHTML += `<li>${products[i].name}</li>`;
 
 
210
  }
211
 
212
  function toggleCart(){
213
+ const c = document.getElementById("cartBox");
214
+ c.style.display = c.style.display === "block" ? "none" : "block";
215
  }
216
 
217
+ display();
218
  </script>
219
 
220
  </body>