flpolprojects commited on
Commit
c972fff
·
verified ·
1 Parent(s): 77870ea

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +65 -38
app.py CHANGED
@@ -145,9 +145,10 @@ def catalog():
145
  font-size: 1.5rem;
146
  cursor: pointer;
147
  color: #4a5568;
 
148
  }
149
  .theme-toggle:hover {
150
- color: #2b6cb0;
151
  }
152
  .filters-container {
153
  margin: 20px 0;
@@ -166,30 +167,30 @@ def catalog():
166
  padding: 12px 18px;
167
  font-size: 1rem;
168
  border: 1px solid #e2e8f0;
169
- border-radius: 25px;
170
  outline: none;
171
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
172
  transition: all 0.3s ease;
173
  }
174
  #search-input:focus {
175
- border-color: #2b6cb0;
176
- box-shadow: 0 4px 15px rgba(43, 108, 176, 0.2);
177
  }
178
  .category-filter {
179
  padding: 8px 16px;
180
  border: 1px solid #e2e8f0;
181
- border-radius: 20px;
182
  background-color: #fff;
183
  cursor: pointer;
184
- transition: all 0.3s ease;
185
  font-size: 0.9rem;
186
  font-weight: 400;
187
  }
188
  .category-filter.active, .category-filter:hover {
189
- background-color: #2b6cb0;
190
  color: white;
191
- border-color: #2b6cb0;
192
- box-shadow: 0 2px 10px rgba(43, 108, 176, 0.3);
193
  }
194
  .products-grid {
195
  display: grid;
@@ -202,11 +203,15 @@ def catalog():
202
  border-radius: 15px;
203
  padding: 15px;
204
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
205
- transition: transform 0.3s ease, box-shadow 0.3s ease;
206
  overflow: hidden;
207
  }
 
 
 
 
208
  .product:hover {
209
- transform: translateY(-5px);
210
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
211
  }
212
  .product-image {
@@ -239,7 +244,7 @@ def catalog():
239
  }
240
  .product-price {
241
  font-size: 1.3rem;
242
- color: #e53e3e;
243
  font-weight: 700;
244
  text-align: center;
245
  margin: 5px 0;
@@ -253,37 +258,42 @@ def catalog():
253
  text-overflow: ellipsis;
254
  white-space: nowrap;
255
  }
 
 
 
256
  .product-button {
257
  display: block;
258
  width: 100%;
259
  padding: 10px;
260
  border: none;
261
- border-radius: 25px;
262
- background-color: #2b6cb0;
263
  color: white;
264
  font-size: 0.9rem;
265
  font-weight: 500;
266
  cursor: pointer;
267
- transition: all 0.3s ease;
268
  margin: 5px 0;
269
  text-align: center;
270
  text-decoration: none;
271
  }
272
  .product-button:hover {
273
- background-color: #2c5282;
274
- box-shadow: 0 2px 10px rgba(44, 82, 130, 0.4);
 
275
  }
276
  .add-to-cart {
277
- background-color: #38a169;
278
  }
279
  .add-to-cart:hover {
280
- background-color: #2f855a;
 
281
  }
282
  #cart-button {
283
  position: fixed;
284
  bottom: 20px;
285
  right: 20px;
286
- background-color: #e53e3e;
287
  color: white;
288
  border: none;
289
  border-radius: 50%;
@@ -292,12 +302,12 @@ def catalog():
292
  font-size: 1.5rem;
293
  cursor: pointer;
294
  display: none;
295
- box-shadow: 0 4px 15px rgba(229, 62, 62, 0.4);
296
- transition: all 0.3s ease;
297
  z-index: 1000;
298
  }
299
  #cart-button:hover {
300
- background-color: #c53030;
301
  transform: scale(1.1);
302
  }
303
  .modal {
@@ -321,6 +331,10 @@ def catalog():
321
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
322
  animation: slideIn 0.3s ease-out;
323
  }
 
 
 
 
324
  @keyframes slideIn {
325
  from { transform: translateY(-50px); opacity: 0; }
326
  to { transform: translateY(0); opacity: 1; }
@@ -335,6 +349,12 @@ def catalog():
335
  .close:hover {
336
  color: #2d3748;
337
  }
 
 
 
 
 
 
338
  .cart-item {
339
  display: flex;
340
  justify-content: space-between;
@@ -342,6 +362,9 @@ def catalog():
342
  padding: 15px 0;
343
  border-bottom: 1px solid #e2e8f0;
344
  }
 
 
 
345
  .cart-item img {
346
  width: 50px;
347
  height: 50px;
@@ -353,20 +376,22 @@ def catalog():
353
  width: 70px;
354
  padding: 8px;
355
  border: 1px solid #e2e8f0;
356
- border-radius: 10px;
357
  font-size: 1rem;
358
  }
359
  .clear-cart {
360
- background-color: #e53e3e;
361
  }
362
  .clear-cart:hover {
363
- background-color: #c53030;
 
364
  }
365
  .order-button {
366
- background-color: #25D366;
367
  }
368
  .order-button:hover {
369
- background-color: #20B956;
 
370
  }
371
  @media (max-width: 768px) {
372
  .products-grid {
@@ -833,35 +858,37 @@ def admin():
833
  padding: 12px;
834
  margin-top: 5px;
835
  border: 1px solid #e2e8f0;
836
- border-radius: 10px;
837
  font-size: 1rem;
838
  transition: all 0.3s ease;
839
  }
840
  input:focus, textarea:focus, select:focus {
841
- border-color: #2b6cb0;
842
- box-shadow: 0 0 5px rgba(43, 108, 176, 0.3);
843
  outline: none;
844
  }
845
  button {
846
  padding: 12px 20px;
847
  border: none;
848
- border-radius: 25px;
849
- background-color: #2b6cb0;
850
  color: white;
851
  font-weight: 500;
852
  cursor: pointer;
853
- transition: all 0.3s ease;
854
  margin-top: 15px;
855
  }
856
  button:hover {
857
- background-color: #2c5282;
858
- box-shadow: 0 2px 10px rgba(44, 82, 130, 0.4);
 
859
  }
860
  .delete-button {
861
- background-color: #e53e3e;
862
  }
863
  .delete-button:hover {
864
- background-color: #c53030;
 
865
  }
866
  .product-list, .category-list {
867
  display: grid;
 
145
  font-size: 1.5rem;
146
  cursor: pointer;
147
  color: #4a5568;
148
+ transition: color 0.3s ease;
149
  }
150
  .theme-toggle:hover {
151
+ color: #3b82f6;
152
  }
153
  .filters-container {
154
  margin: 20px 0;
 
167
  padding: 12px 18px;
168
  font-size: 1rem;
169
  border: 1px solid #e2e8f0;
170
+ border-radius: 8px;
171
  outline: none;
172
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
173
  transition: all 0.3s ease;
174
  }
175
  #search-input:focus {
176
+ border-color: #3b82f6;
177
+ box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2);
178
  }
179
  .category-filter {
180
  padding: 8px 16px;
181
  border: 1px solid #e2e8f0;
182
+ border-radius: 8px;
183
  background-color: #fff;
184
  cursor: pointer;
185
+ transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
186
  font-size: 0.9rem;
187
  font-weight: 400;
188
  }
189
  .category-filter.active, .category-filter:hover {
190
+ background-color: #3b82f6;
191
  color: white;
192
+ border-color: #3b82f6;
193
+ box-shadow: 0 2px 10px rgba(59, 130, 246, 0.3);
194
  }
195
  .products-grid {
196
  display: grid;
 
203
  border-radius: 15px;
204
  padding: 15px;
205
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
206
+ transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
207
  overflow: hidden;
208
  }
209
+ body.dark-mode .product {
210
+ background: #2d3748;
211
+ color: #fff;
212
+ }
213
  .product:hover {
214
+ transform: translateY(-5px) scale(1.02);
215
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
216
  }
217
  .product-image {
 
244
  }
245
  .product-price {
246
  font-size: 1.3rem;
247
+ color: #ef4444;
248
  font-weight: 700;
249
  text-align: center;
250
  margin: 5px 0;
 
258
  text-overflow: ellipsis;
259
  white-space: nowrap;
260
  }
261
+ body.dark-mode .product-description {
262
+ color: #a0aec0;
263
+ }
264
  .product-button {
265
  display: block;
266
  width: 100%;
267
  padding: 10px;
268
  border: none;
269
+ border-radius: 8px;
270
+ background-color: #3b82f6;
271
  color: white;
272
  font-size: 0.9rem;
273
  font-weight: 500;
274
  cursor: pointer;
275
+ transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
276
  margin: 5px 0;
277
  text-align: center;
278
  text-decoration: none;
279
  }
280
  .product-button:hover {
281
+ background-color: #2563eb;
282
+ box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
283
+ transform: translateY(-2px);
284
  }
285
  .add-to-cart {
286
+ background-color: #10b981;
287
  }
288
  .add-to-cart:hover {
289
+ background-color: #059669;
290
+ box-shadow: 0 4px 15px rgba(5, 150, 105, 0.4);
291
  }
292
  #cart-button {
293
  position: fixed;
294
  bottom: 20px;
295
  right: 20px;
296
+ background-color: #ef4444;
297
  color: white;
298
  border: none;
299
  border-radius: 50%;
 
302
  font-size: 1.5rem;
303
  cursor: pointer;
304
  display: none;
305
+ box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
306
+ transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
307
  z-index: 1000;
308
  }
309
  #cart-button:hover {
310
+ background-color: #dc2626;
311
  transform: scale(1.1);
312
  }
313
  .modal {
 
331
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
332
  animation: slideIn 0.3s ease-out;
333
  }
334
+ body.dark-mode .modal-content {
335
+ background: #2d3748;
336
+ color: #e2e8f0;
337
+ }
338
  @keyframes slideIn {
339
  from { transform: translateY(-50px); opacity: 0; }
340
  to { transform: translateY(0); opacity: 1; }
 
349
  .close:hover {
350
  color: #2d3748;
351
  }
352
+ body.dark-mode .close {
353
+ color: #a0aec0;
354
+ }
355
+ body.dark-mode .close:hover {
356
+ color: #fff;
357
+ }
358
  .cart-item {
359
  display: flex;
360
  justify-content: space-between;
 
362
  padding: 15px 0;
363
  border-bottom: 1px solid #e2e8f0;
364
  }
365
+ body.dark-mode .cart-item {
366
+ border-bottom: 1px solid #4a5568;
367
+ }
368
  .cart-item img {
369
  width: 50px;
370
  height: 50px;
 
376
  width: 70px;
377
  padding: 8px;
378
  border: 1px solid #e2e8f0;
379
+ border-radius: 8px;
380
  font-size: 1rem;
381
  }
382
  .clear-cart {
383
+ background-color: #ef4444;
384
  }
385
  .clear-cart:hover {
386
+ background-color: #dc2626;
387
+ box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4);
388
  }
389
  .order-button {
390
+ background-color: #10b981;
391
  }
392
  .order-button:hover {
393
+ background-color: #059669;
394
+ box-shadow: 0 4px 15px rgba(5, 150, 105, 0.4);
395
  }
396
  @media (max-width: 768px) {
397
  .products-grid {
 
858
  padding: 12px;
859
  margin-top: 5px;
860
  border: 1px solid #e2e8f0;
861
+ border-radius: 8px;
862
  font-size: 1rem;
863
  transition: all 0.3s ease;
864
  }
865
  input:focus, textarea:focus, select:focus {
866
+ border-color: #3b82f6;
867
+ box-shadow: 0 0 5px rgba(59, 130, 246, 0.3);
868
  outline: none;
869
  }
870
  button {
871
  padding: 12px 20px;
872
  border: none;
873
+ border-radius: 8px;
874
+ background-color: #3b82f6;
875
  color: white;
876
  font-weight: 500;
877
  cursor: pointer;
878
+ transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
879
  margin-top: 15px;
880
  }
881
  button:hover {
882
+ background-color: #2563eb;
883
+ box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
884
+ transform: translateY(-2px);
885
  }
886
  .delete-button {
887
+ background-color: #ef4444;
888
  }
889
  .delete-button:hover {
890
+ background-color: #dc2626;
891
+ box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4);
892
  }
893
  .product-list, .category-list {
894
  display: grid;