baranayek commited on
Commit
a9644eb
·
verified ·
1 Parent(s): 964da71

first the sadd card page must follow the same style css look and feel of the profile page , and its come on top of the profile page as new page with its own url path , but its same, and must be like the mentioned block background and , so everything in page remain the same and its like that the add card open new page on top of this page with samr style, but not for creating profile , it will be for choosing from the card list that we have.

Browse files
Files changed (2) hide show
  1. card-selector.html +99 -0
  2. index.html +40 -20
card-selector.html ADDED
@@ -0,0 +1,99 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Select Card</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <script src="https://unpkg.com/feather-icons"></script>
9
+ <style>
10
+ @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
11
+ body {
12
+ font-family: 'Inter', sans-serif;
13
+ }
14
+ .glass-card {
15
+ background: rgba(255, 255, 255, 0.08);
16
+ backdrop-filter: blur(10px);
17
+ -webkit-backdrop-filter: blur(10px);
18
+ border-radius: 12px;
19
+ border: 1px solid rgba(255, 255, 255, 0.18);
20
+ }
21
+ .gradient-text {
22
+ background: linear-gradient(90deg, #3b82f6, #8b5cf6);
23
+ -webkit-background-clip: text;
24
+ background-clip: text;
25
+ color: transparent;
26
+ }
27
+ </style>
28
+ </head>
29
+ <body class="bg-gray-900 text-white min-h-screen">
30
+ <div class="min-h-screen w-full flex items-center justify-center px-4 relative">
31
+ <div class="glass-card p-6 w-full max-w-md mx-auto text-center relative" style="aspect-ratio: 9/19; max-height: 95vh;">
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="/training-card.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>
39
+ </a>
40
+
41
+ <a href="/favorites-card.html" class="card-option p-4 border border-gray-700 rounded-lg cursor-pointer hover:bg-indigo-900/30 transition">
42
+ <i data-feather="heart" class="w-6 h-6 mb-2 mx-auto"></i>
43
+ <h4 class="font-medium">Favorite Things</h4>
44
+ <p class="text-sm text-gray-400">Toys, snacks & routines</p>
45
+ </a>
46
+
47
+ <a href="/gallery-card.html" class="card-option p-4 border border-gray-700 rounded-lg cursor-pointer hover:bg-indigo-900/30 transition">
48
+ <i data-feather="image" class="w-6 h-6 mb-2 mx-auto"></i>
49
+ <h4 class="font-medium">Photo Gallery</h4>
50
+ <p class="text-sm text-gray-400">Pictures for identification</p>
51
+ </a>
52
+
53
+ <a href="/video-card.html" class="card-option p-4 border border-gray-700 rounded-lg cursor-pointer hover:bg-indigo-900/30 transition">
54
+ <i data-feather="video" class="w-6 h-6 mb-2 mx-auto"></i>
55
+ <h4 class="font-medium">Video Card</h4>
56
+ <p class="text-sm text-gray-400">Embed video showing behavior</p>
57
+ </a>
58
+
59
+ <a href="/lost-card.html" class="card-option p-4 border border-gray-700 rounded-lg cursor-pointer hover:bg-indigo-900/30 transition">
60
+ <i data-feather="alert-circle" class="w-6 h-6 mb-2 mx-auto"></i>
61
+ <h4 class="font-medium">Lost Poster</h4>
62
+ <p class="text-sm text-gray-400">Auto-generated missing dog flyer</p>
63
+ </a>
64
+
65
+ <a href="/id-card.html" class="card-option p-4 border border-gray-700 rounded-lg cursor-pointer hover:bg-indigo-900/30 transition">
66
+ <i data-feather="credit-card" class="w-6 h-6 mb-2 mx-auto"></i>
67
+ <h4 class="font-medium">Dog ID Card</h4>
68
+ <p class="text-sm text-gray-400">Basic info & QR code</p>
69
+ </a>
70
+
71
+ <a href="/location-card.html" class="card-option p-4 border border-gray-700 rounded-lg cursor-pointer hover:bg-indigo-900/30 transition">
72
+ <i data-feather="home" class="w-6 h-6 mb-2 mx-auto"></i>
73
+ <h4 class="font-medium">Home Location</h4>
74
+ <p class="text-sm text-gray-400">Safe return address</p>
75
+ </a>
76
+
77
+ <a href="/moments-card.html" class="card-option p-4 border border-gray-700 rounded-lg cursor-pointer hover:bg-indigo-900/30 transition">
78
+ <i data-feather="star" class="w-6 h-6 mb-2 mx-auto"></i>
79
+ <h4 class="font-medium">Favorite Moments</h4>
80
+ <p class="text-sm text-gray-400">Fun pictures & gifs</p>
81
+ </a>
82
+
83
+ <a href="/reward-card.html" class="card-option p-4 border border-gray-700 rounded-lg cursor-pointer hover:bg-indigo-900/30 transition">
84
+ <i data-feather="gift" class="w-6 h-6 mb-2 mx-auto"></i>
85
+ <h4 class="font-medium">Reward Card</h4>
86
+ <p class="text-sm text-gray-400">Optional reward info</p>
87
+ </a>
88
+ </div>
89
+
90
+ <div class="mt-6">
91
+ <a href="/" class="px-4 py-2 bg-gray-700 rounded hover:bg-gray-600 inline-block">Back to Profile</a>
92
+ </div>
93
+ </div>
94
+ </div>
95
+ <script>
96
+ feather.replace();
97
+ </script>
98
+ </body>
99
+ </html>
index.html CHANGED
@@ -129,8 +129,15 @@
129
  <body class="bg-gray-900 text-white min-h-screen">
130
  <!-- Profile Section -->
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;">
133
- <!-- Control Buttons -->
 
 
 
 
 
 
 
134
  <div class="absolute top-2 left-2 z-50">
135
  <button id="addCardBtn" class="bg-indigo-600 hover:bg-indigo-700 px-3 py-1 rounded-full text-xs font-medium transition flex items-center">
136
  <i data-feather="plus" class="w-3 h-3 mr-1"></i> Add Card
@@ -762,30 +769,43 @@ if (profileData.bgAnimation !== undefined) {
762
  <script>
763
  // Card modal functionality
764
  document.getElementById('addCardBtn').addEventListener('click', function() {
765
- document.getElementById('cardModal').classList.remove('hidden');
766
  });
767
 
768
- document.getElementById('closeCardModal').addEventListener('click', function() {
769
- document.getElementById('cardModal').classList.add('hidden');
 
 
 
770
  });
771
 
772
- document.querySelectorAll('.card-option').forEach(option => {
773
- option.addEventListener('click', function() {
774
- const cardType = this.getAttribute('data-card');
775
- // Create new card based on type
776
- createNewCard(cardType);
777
- document.getElementById('cardModal').classList.add('hidden');
778
- });
779
  });
780
 
781
- function createNewCard(cardType) {
782
- // This will create a new page/card and add it to the horizontal swipe view
783
- // Implementation depends on how swipe functionality is set up
784
- console.log('Creating new card of type:', cardType);
785
- // In a real implementation, this would:
786
- // 1. Create a new page with the appropriate template
787
- // 2. Add it to the swipeable view
788
- // 3. Allow editing of the card content
 
 
 
 
 
 
 
 
 
 
 
 
 
 
789
  }
790
  </script>
791
  </body>
 
129
  <body class="bg-gray-900 text-white min-h-screen">
130
  <!-- Profile Section -->
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 hidden">
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">
138
+ <i data-feather="chevron-right" class="w-5 h-5"></i>
139
+ </button>
140
+ <!-- Control Buttons -->
141
  <div class="absolute top-2 left-2 z-50">
142
  <button id="addCardBtn" 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
 
769
  <script>
770
  // Card modal functionality
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
+ // In a real implementation, this would load the next card in the sequence
778
+ // For now we'll simulate it with a placeholder
779
+ window.location.href = '/training-card.html';
780
  });
781
 
782
+ document.getElementById('prevCard').addEventListener('click', function() {
783
+ // Navigate back to profile
784
+ window.location.href = '/';
 
 
 
 
785
  });
786
 
787
+ // Swipe detection for mobile
788
+ let touchStartX = 0;
789
+ let touchEndX = 0;
790
+
791
+ document.getElementById('profileCard').addEventListener('touchstart', function(e) {
792
+ touchStartX = e.changedTouches[0].screenX;
793
+ }, false);
794
+
795
+ document.getElementById('profileCard').addEventListener('touchend', function(e) {
796
+ touchEndX = e.changedTouches[0].screenX;
797
+ handleSwipe();
798
+ }, false);
799
+
800
+ function handleSwipe() {
801
+ if (touchEndX < touchStartX - 50) {
802
+ // Swipe left - next card
803
+ document.getElementById('nextCard').click();
804
+ }
805
+ if (touchEndX > touchStartX + 50) {
806
+ // Swipe right - previous card
807
+ document.getElementById('prevCard').click();
808
+ }
809
  }
810
  </script>
811
  </body>