Spaces:
Running
Running
please fix it and make that add card open card list page and the arrow position left and right they only control swiping pages left and right
Browse files- card-selector.html +1 -1
- index.html +27 -11
card-selector.html
CHANGED
|
@@ -32,7 +32,7 @@
|
|
| 32 |
<h1 class="text-2xl font-bold mb-6 gradient-text">Select Card Type</h1>
|
| 33 |
|
| 34 |
<div class="grid grid-cols-2 gap-4">
|
| 35 |
-
<a href="
|
| 36 |
<i data-feather="award" class="w-6 h-6 mb-2 mx-auto"></i>
|
| 37 |
<h4 class="font-medium">Training Card</h4>
|
| 38 |
<p class="text-sm text-gray-400">Commands your dog understands</p>
|
|
|
|
| 32 |
<h1 class="text-2xl font-bold mb-6 gradient-text">Select Card Type</h1>
|
| 33 |
|
| 34 |
<div class="grid grid-cols-2 gap-4">
|
| 35 |
+
<a href="index.html" class="card-option p-4 border border-gray-700 rounded-lg cursor-pointer hover:bg-indigo-900/30 transition">
|
| 36 |
<i data-feather="award" class="w-6 h-6 mb-2 mx-auto"></i>
|
| 37 |
<h4 class="font-medium">Training Card</h4>
|
| 38 |
<p class="text-sm text-gray-400">Commands your dog understands</p>
|
index.html
CHANGED
|
@@ -131,7 +131,7 @@
|
|
| 131 |
<div id="vanta-bg" class="min-h-screen w-full flex items-center justify-center px-4 relative">
|
| 132 |
<div class="glass-card p-6 w-full max-w-md mx-auto text-center relative" style="aspect-ratio: 9/19; max-height: 95vh;" id="profileCard">
|
| 133 |
<!-- Navigation Arrows -->
|
| 134 |
-
<button id="prevCard" class="absolute left-2 top-1/2 transform -translate-y-1/2 bg-gray-800/50 hover:bg-gray-700/50 rounded-full p-2 z-50
|
| 135 |
<i data-feather="chevron-left" class="w-5 h-5"></i>
|
| 136 |
</button>
|
| 137 |
<button id="nextCard" class="absolute right-2 top-1/2 transform -translate-y-1/2 bg-gray-800/50 hover:bg-gray-700/50 rounded-full p-2 z-50">
|
|
@@ -139,11 +139,11 @@
|
|
| 139 |
</button>
|
| 140 |
<!-- Control Buttons -->
|
| 141 |
<div class="absolute top-2 left-2 z-50">
|
| 142 |
-
<
|
| 143 |
<i data-feather="plus" class="w-3 h-3 mr-1"></i> Add Card
|
| 144 |
-
</
|
| 145 |
</div>
|
| 146 |
-
|
| 147 |
<button id="saveProfile" class="bg-indigo-600 hover:bg-indigo-700 px-3 py-1 rounded-full text-xs font-medium transition flex items-center">
|
| 148 |
<i data-feather="save" class="w-3 h-3 mr-1"></i> Save
|
| 149 |
</button>
|
|
@@ -767,18 +767,36 @@ if (profileData.bgAnimation !== undefined) {
|
|
| 767 |
</div>
|
| 768 |
</div>
|
| 769 |
<script>
|
| 770 |
-
// Card
|
| 771 |
document.getElementById('addCardBtn').addEventListener('click', function() {
|
| 772 |
window.location.href = 'card-selector.html';
|
| 773 |
});
|
| 774 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 775 |
// Navigation functionality
|
| 776 |
document.getElementById('nextCard').addEventListener('click', function() {
|
| 777 |
-
window.location.
|
|
|
|
|
|
|
| 778 |
});
|
| 779 |
|
| 780 |
document.getElementById('prevCard').addEventListener('click', function() {
|
| 781 |
-
window.location.
|
|
|
|
|
|
|
| 782 |
});
|
| 783 |
// Swipe detection for mobile
|
| 784 |
let touchStartX = 0;
|
|
@@ -792,17 +810,15 @@ if (profileData.bgAnimation !== undefined) {
|
|
| 792 |
touchEndX = e.changedTouches[0].screenX;
|
| 793 |
handleSwipe();
|
| 794 |
}, false);
|
| 795 |
-
|
| 796 |
function handleSwipe() {
|
| 797 |
if (touchEndX < touchStartX - 50) {
|
| 798 |
// Swipe left - next card
|
| 799 |
document.getElementById('nextCard').click();
|
| 800 |
-
}
|
| 801 |
-
if (touchEndX > touchStartX + 50) {
|
| 802 |
// Swipe right - previous card
|
| 803 |
document.getElementById('prevCard').click();
|
| 804 |
}
|
| 805 |
}
|
| 806 |
-
|
| 807 |
</body>
|
| 808 |
</html>
|
|
|
|
| 131 |
<div id="vanta-bg" class="min-h-screen w-full flex items-center justify-center px-4 relative">
|
| 132 |
<div class="glass-card p-6 w-full max-w-md mx-auto text-center relative" style="aspect-ratio: 9/19; max-height: 95vh;" id="profileCard">
|
| 133 |
<!-- Navigation Arrows -->
|
| 134 |
+
<button id="prevCard" class="absolute left-2 top-1/2 transform -translate-y-1/2 bg-gray-800/50 hover:bg-gray-700/50 rounded-full p-2 z-50">
|
| 135 |
<i data-feather="chevron-left" class="w-5 h-5"></i>
|
| 136 |
</button>
|
| 137 |
<button id="nextCard" class="absolute right-2 top-1/2 transform -translate-y-1/2 bg-gray-800/50 hover:bg-gray-700/50 rounded-full p-2 z-50">
|
|
|
|
| 139 |
</button>
|
| 140 |
<!-- Control Buttons -->
|
| 141 |
<div class="absolute top-2 left-2 z-50">
|
| 142 |
+
<a href="card-selector.html" class="bg-indigo-600 hover:bg-indigo-700 px-3 py-1 rounded-full text-xs font-medium transition flex items-center">
|
| 143 |
<i data-feather="plus" class="w-3 h-3 mr-1"></i> Add Card
|
| 144 |
+
</a>
|
| 145 |
</div>
|
| 146 |
+
<div class="absolute top-2 right-2 z-50 space-y-1">
|
| 147 |
<button id="saveProfile" class="bg-indigo-600 hover:bg-indigo-700 px-3 py-1 rounded-full text-xs font-medium transition flex items-center">
|
| 148 |
<i data-feather="save" class="w-3 h-3 mr-1"></i> Save
|
| 149 |
</button>
|
|
|
|
| 767 |
</div>
|
| 768 |
</div>
|
| 769 |
<script>
|
| 770 |
+
// Card navigation functionality
|
| 771 |
document.getElementById('addCardBtn').addEventListener('click', function() {
|
| 772 |
window.location.href = 'card-selector.html';
|
| 773 |
});
|
| 774 |
|
| 775 |
+
// Set up page order for navigation
|
| 776 |
+
const pages = [
|
| 777 |
+
'index.html',
|
| 778 |
+
'training-card.html',
|
| 779 |
+
'favorites-card.html',
|
| 780 |
+
'gallery-card.html',
|
| 781 |
+
'video-card.html',
|
| 782 |
+
'lost-card.html',
|
| 783 |
+
'id-card.html',
|
| 784 |
+
'location-card.html',
|
| 785 |
+
'moments-card.html',
|
| 786 |
+
'reward-card.html'
|
| 787 |
+
];
|
| 788 |
+
|
| 789 |
// Navigation functionality
|
| 790 |
document.getElementById('nextCard').addEventListener('click', function() {
|
| 791 |
+
const currentIndex = pages.indexOf(window.location.pathname.split('/').pop());
|
| 792 |
+
const nextIndex = (currentIndex + 1) % pages.length;
|
| 793 |
+
window.location.href = pages[nextIndex];
|
| 794 |
});
|
| 795 |
|
| 796 |
document.getElementById('prevCard').addEventListener('click', function() {
|
| 797 |
+
const currentIndex = pages.indexOf(window.location.pathname.split('/').pop());
|
| 798 |
+
const prevIndex = (currentIndex - 1 + pages.length) % pages.length;
|
| 799 |
+
window.location.href = pages[prevIndex];
|
| 800 |
});
|
| 801 |
// Swipe detection for mobile
|
| 802 |
let touchStartX = 0;
|
|
|
|
| 810 |
touchEndX = e.changedTouches[0].screenX;
|
| 811 |
handleSwipe();
|
| 812 |
}, false);
|
|
|
|
| 813 |
function handleSwipe() {
|
| 814 |
if (touchEndX < touchStartX - 50) {
|
| 815 |
// Swipe left - next card
|
| 816 |
document.getElementById('nextCard').click();
|
| 817 |
+
} else if (touchEndX > touchStartX + 50) {
|
|
|
|
| 818 |
// Swipe right - previous card
|
| 819 |
document.getElementById('prevCard').click();
|
| 820 |
}
|
| 821 |
}
|
| 822 |
+
</script>
|
| 823 |
</body>
|
| 824 |
</html>
|