Spaces:
Running
Running
Não consigo trocar minha seleção de cor e não consigo escolher o tamanho pode arrumar esse erro? - Follow Up Deployment
Browse files- index.html +20 -14
index.html
CHANGED
|
@@ -559,6 +559,7 @@
|
|
| 559 |
color: white !important;
|
| 560 |
border-color: #bc13fe !important;
|
| 561 |
transform: scale(1.05) !important;
|
|
|
|
| 562 |
}
|
| 563 |
|
| 564 |
@keyframes electric-pulse {
|
|
@@ -1108,6 +1109,9 @@
|
|
| 1108 |
document.getElementById('product-price').textContent = product.price;
|
| 1109 |
document.getElementById('product-description').textContent = product.description;
|
| 1110 |
document.getElementById('product-main-image').src = product.image;
|
|
|
|
|
|
|
|
|
|
| 1111 |
}
|
| 1112 |
|
| 1113 |
function closeProductPage() {
|
|
@@ -1351,7 +1355,6 @@
|
|
| 1351 |
image: "https://images.unsplash.com/photo-1529374255404-311a2a4f1fd9?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=776&q=80"
|
| 1352 |
};
|
| 1353 |
openProductPage(product);
|
| 1354 |
-
initializeQuantityControls();
|
| 1355 |
}
|
| 1356 |
|
| 1357 |
// Open product page from buy button
|
|
@@ -1382,15 +1385,19 @@
|
|
| 1382 |
// Add selected class to clicked option
|
| 1383 |
this.classList.add('selected-color');
|
| 1384 |
// Store selected color
|
| 1385 |
-
|
| 1386 |
});
|
| 1387 |
-
|
| 1388 |
-
// Check if this color was previously selected
|
| 1389 |
-
if (this.dataset.color === this.closest('#product-page').dataset.selectedColor) {
|
| 1390 |
-
this.classList.add('selected-color');
|
| 1391 |
-
}
|
| 1392 |
});
|
| 1393 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1394 |
// Size selection
|
| 1395 |
const sizeOptions = document.querySelectorAll('.size-option');
|
| 1396 |
sizeOptions.forEach(option => {
|
|
@@ -1402,15 +1409,14 @@
|
|
| 1402 |
// Add selected class to clicked option
|
| 1403 |
this.classList.add('selected-size');
|
| 1404 |
// Store selected size
|
| 1405 |
-
|
| 1406 |
});
|
| 1407 |
-
|
| 1408 |
-
// Check if this size was previously selected
|
| 1409 |
-
if (this.dataset.size === this.closest('#product-page').dataset.selectedSize) {
|
| 1410 |
-
this.classList.add('selected-size');
|
| 1411 |
-
}
|
| 1412 |
});
|
| 1413 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1414 |
const decreaseBtn = document.getElementById('decrease-qty');
|
| 1415 |
const increaseBtn = document.getElementById('increase-qty');
|
| 1416 |
const quantityInput = document.getElementById('quantity');
|
|
@@ -1583,5 +1589,5 @@
|
|
| 1583 |
});
|
| 1584 |
});
|
| 1585 |
</script>
|
| 1586 |
-
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://deepsite.hf.co/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://deepsite.hf.co" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://deepsite.hf.co?remix=Paolo2000p/volt" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p><p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://deepsite.hf.co/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://deepsite.hf.co" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://deepsite.hf.co?remix=Antoli121/good" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p><p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://deepsite.hf.co/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://deepsite.hf.co" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://deepsite.hf.co?remix=Alex3566m/volts" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p><p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://deepsite.hf.co/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://deepsite.hf.co" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://deepsite.hf.co?remix=Juanelgod5/volt-1" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p><p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://deepsite.hf.co/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://deepsite.hf.co" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://deepsite.hf.co?remix=Matheusopro/g" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
| 1587 |
</html>
|
|
|
|
| 559 |
color: white !important;
|
| 560 |
border-color: #bc13fe !important;
|
| 561 |
transform: scale(1.05) !important;
|
| 562 |
+
box-shadow: 0 0 0 2px #bc13fe;
|
| 563 |
}
|
| 564 |
|
| 565 |
@keyframes electric-pulse {
|
|
|
|
| 1109 |
document.getElementById('product-price').textContent = product.price;
|
| 1110 |
document.getElementById('product-description').textContent = product.description;
|
| 1111 |
document.getElementById('product-main-image').src = product.image;
|
| 1112 |
+
|
| 1113 |
+
// Initialize selection controls
|
| 1114 |
+
initializeQuantityControls();
|
| 1115 |
}
|
| 1116 |
|
| 1117 |
function closeProductPage() {
|
|
|
|
| 1355 |
image: "https://images.unsplash.com/photo-1529374255404-311a2a4f1fd9?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=776&q=80"
|
| 1356 |
};
|
| 1357 |
openProductPage(product);
|
|
|
|
| 1358 |
}
|
| 1359 |
|
| 1360 |
// Open product page from buy button
|
|
|
|
| 1385 |
// Add selected class to clicked option
|
| 1386 |
this.classList.add('selected-color');
|
| 1387 |
// Store selected color
|
| 1388 |
+
document.getElementById('product-page').dataset.selectedColor = this.dataset.color;
|
| 1389 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1390 |
});
|
| 1391 |
|
| 1392 |
+
// Set default selected color if none selected
|
| 1393 |
+
if (!document.getElementById('product-page').dataset.selectedColor) {
|
| 1394 |
+
document.getElementById('product-page').dataset.selectedColor = 'black';
|
| 1395 |
+
document.querySelector('.color-option[data-color="black"]').classList.add('selected-color');
|
| 1396 |
+
} else {
|
| 1397 |
+
const selectedColor = document.getElementById('product-page').dataset.selectedColor;
|
| 1398 |
+
document.querySelector(`.color-option[data-color="${selectedColor}"]`).classList.add('selected-color');
|
| 1399 |
+
}
|
| 1400 |
+
|
| 1401 |
// Size selection
|
| 1402 |
const sizeOptions = document.querySelectorAll('.size-option');
|
| 1403 |
sizeOptions.forEach(option => {
|
|
|
|
| 1409 |
// Add selected class to clicked option
|
| 1410 |
this.classList.add('selected-size');
|
| 1411 |
// Store selected size
|
| 1412 |
+
document.getElementById('product-page').dataset.selectedSize = this.dataset.size;
|
| 1413 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1414 |
});
|
| 1415 |
|
| 1416 |
+
// Initialize selected size (default to M if none selected)
|
| 1417 |
+
const selectedSize = document.getElementById('product-page').dataset.selectedSize || 'M';
|
| 1418 |
+
document.querySelector(`.size-option[data-size="${selectedSize}"]`).classList.add('selected-size');
|
| 1419 |
+
|
| 1420 |
const decreaseBtn = document.getElementById('decrease-qty');
|
| 1421 |
const increaseBtn = document.getElementById('increase-qty');
|
| 1422 |
const quantityInput = document.getElementById('quantity');
|
|
|
|
| 1589 |
});
|
| 1590 |
});
|
| 1591 |
</script>
|
| 1592 |
+
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://deepsite.hf.co/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://deepsite.hf.co" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://deepsite.hf.co?remix=Paolo2000p/volt" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p><p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://deepsite.hf.co/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://deepsite.hf.co" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://deepsite.hf.co?remix=Antoli121/good" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p><p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://deepsite.hf.co/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://deepsite.hf.co" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://deepsite.hf.co?remix=Alex3566m/volts" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p><p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://deepsite.hf.co/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://deepsite.hf.co" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://deepsite.hf.co?remix=Juanelgod5/volt-1" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p><p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://deepsite.hf.co/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://deepsite.hf.co" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://deepsite.hf.co?remix=Matheusopro/g" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p><p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=Proplayer555/Volt-2" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
| 1593 |
</html>
|