Spaces:
Running
Running
multiple selections at once are possible, re-clicking deactivates the selection - Follow Up Deployment
Browse files- index.html +16 -13
index.html
CHANGED
|
@@ -25,7 +25,6 @@
|
|
| 25 |
transform: translateY(-5px);
|
| 26 |
box-shadow: 0 10px 25px -5px rgba(212, 175, 55, 0.3);
|
| 27 |
border-color: #d4af37;
|
| 28 |
-
background-color: #111111;
|
| 29 |
}
|
| 30 |
|
| 31 |
.gold-gradient {
|
|
@@ -139,13 +138,13 @@
|
|
| 139 |
<!-- Equipment Selection -->
|
| 140 |
<div class="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-6">
|
| 141 |
<!-- Bodyweight Card -->
|
| 142 |
-
<div class="equipment-card rounded-
|
| 143 |
<div class="p-6 flex flex-col items-center">
|
| 144 |
<div class="w-20 h-20 mb-4 flex items-center justify-center">
|
| 145 |
<img src="https://ktworkout-kintsugi-tradings-projects.vercel.app/_next/static/media/bodyweight.e08c10a8.png"
|
| 146 |
alt="Bodyweight" class="w-full h-full object-contain">
|
| 147 |
</div>
|
| 148 |
-
<h3 class="text-lg font-semibold">Bodyweight</h3>
|
| 149 |
</div>
|
| 150 |
</div>
|
| 151 |
|
|
@@ -268,20 +267,24 @@
|
|
| 268 |
menu.classList.toggle('hidden');
|
| 269 |
});
|
| 270 |
|
| 271 |
-
// Equipment card selection
|
| 272 |
const equipmentCards = document.querySelectorAll('.equipment-card');
|
| 273 |
equipmentCards.forEach(card => {
|
| 274 |
card.addEventListener('click', function() {
|
| 275 |
-
|
| 276 |
-
equipmentCards.forEach(c => {
|
| 277 |
-
c.classList.remove('border-2', 'border-amber-500');
|
| 278 |
-
c.style.backgroundColor = '#000000';
|
| 279 |
-
});
|
| 280 |
|
| 281 |
-
//
|
| 282 |
-
|
| 283 |
-
|
| 284 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 285 |
});
|
| 286 |
});
|
| 287 |
</script>
|
|
|
|
| 25 |
transform: translateY(-5px);
|
| 26 |
box-shadow: 0 10px 25px -5px rgba(212, 175, 55, 0.3);
|
| 27 |
border-color: #d4af37;
|
|
|
|
| 28 |
}
|
| 29 |
|
| 30 |
.gold-gradient {
|
|
|
|
| 138 |
<!-- Equipment Selection -->
|
| 139 |
<div class="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-6">
|
| 140 |
<!-- Bodyweight Card -->
|
| 141 |
+
<div class="equipment-card bg-white rounded-xl shadow-md overflow-hidden transition duration-300 cursor-pointer">
|
| 142 |
<div class="p-6 flex flex-col items-center">
|
| 143 |
<div class="w-20 h-20 mb-4 flex items-center justify-center">
|
| 144 |
<img src="https://ktworkout-kintsugi-tradings-projects.vercel.app/_next/static/media/bodyweight.e08c10a8.png"
|
| 145 |
alt="Bodyweight" class="w-full h-full object-contain">
|
| 146 |
</div>
|
| 147 |
+
<h3 class="text-lg font-semibold text-gray-800">Bodyweight</h3>
|
| 148 |
</div>
|
| 149 |
</div>
|
| 150 |
|
|
|
|
| 267 |
menu.classList.toggle('hidden');
|
| 268 |
});
|
| 269 |
|
| 270 |
+
// Equipment card selection (multiple with toggle)
|
| 271 |
const equipmentCards = document.querySelectorAll('.equipment-card');
|
| 272 |
equipmentCards.forEach(card => {
|
| 273 |
card.addEventListener('click', function() {
|
| 274 |
+
const isActive = this.classList.contains('border-2');
|
|
|
|
|
|
|
|
|
|
|
|
|
| 275 |
|
| 276 |
+
// Toggle the clicked card
|
| 277 |
+
if (isActive) {
|
| 278 |
+
this.classList.remove('border-2', 'border-amber-500');
|
| 279 |
+
this.style.backgroundColor = '#000000';
|
| 280 |
+
const h3 = this.querySelector('h3');
|
| 281 |
+
if (h3) h3.style.color = '#ffffff';
|
| 282 |
+
} else {
|
| 283 |
+
this.classList.add('border-2', 'border-amber-500');
|
| 284 |
+
this.style.backgroundColor = '#ffffff';
|
| 285 |
+
const h3 = this.querySelector('h3');
|
| 286 |
+
if (h3) h3.style.color = '#000000';
|
| 287 |
+
}
|
| 288 |
});
|
| 289 |
});
|
| 290 |
</script>
|