Spaces:
Running
Running
Add 1 files
Browse files- index.html +441 -204
index.html
CHANGED
|
@@ -3,260 +3,497 @@
|
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
-
<title>TagCheck - NFC
|
| 7 |
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
| 9 |
<style>
|
| 10 |
-
|
| 11 |
-
|
|
|
|
|
|
|
| 12 |
}
|
| 13 |
-
|
| 14 |
-
|
|
|
|
|
|
|
|
|
|
| 15 |
}
|
| 16 |
-
|
| 17 |
-
|
|
|
|
| 18 |
}
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
}
|
| 24 |
-
70% {
|
| 25 |
-
transform: scale(1);
|
| 26 |
-
box-shadow: 0 0 0 10px rgba(101, 90, 223, 0);
|
| 27 |
-
}
|
| 28 |
-
100% {
|
| 29 |
-
transform: scale(0.95);
|
| 30 |
-
box-shadow: 0 0 0 0 rgba(101, 90, 223, 0);
|
| 31 |
-
}
|
| 32 |
}
|
| 33 |
-
|
| 34 |
-
|
|
|
|
|
|
|
| 35 |
}
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
}
|
| 46 |
</style>
|
| 47 |
</head>
|
| 48 |
<body class="bg-gray-100 font-sans">
|
| 49 |
-
<div class="
|
| 50 |
-
<
|
| 51 |
-
|
| 52 |
-
<
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 56 |
</div>
|
| 57 |
-
<div class="flex
|
| 58 |
-
<
|
| 59 |
-
|
| 60 |
-
</
|
| 61 |
-
<button class="p-2 rounded-full hover:bg-white/10 transition">
|
| 62 |
-
<i class="fas fa-question-circle"></i>
|
| 63 |
-
</button>
|
| 64 |
</div>
|
| 65 |
</div>
|
| 66 |
-
</header>
|
| 67 |
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
|
|
|
|
|
|
| 75 |
</div>
|
| 76 |
-
<h2 class="text-2xl font-bold text-gray-800 mb-2">Scan NFC Tag</h2>
|
| 77 |
-
<p class="text-gray-600 mb-6">Hold your device near an NFC tag to read its contents</p>
|
| 78 |
-
<button id="scanBtn" class="gradient-bg text-white py-3 px-8 rounded-full font-medium hover:opacity-90 transition shadow-lg">
|
| 79 |
-
Start Scanning
|
| 80 |
-
</button>
|
| 81 |
</div>
|
|
|
|
|
|
|
| 82 |
</div>
|
| 83 |
|
| 84 |
-
<
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
<i class="fas fa-times"></i>
|
| 90 |
-
</button>
|
| 91 |
-
</div>
|
| 92 |
-
<div class="space-y-4">
|
| 93 |
-
<div class="flex items-center p-3 bg-gray-50 rounded-lg">
|
| 94 |
-
<div class="bg-blue-100 p-2 rounded-full mr-3">
|
| 95 |
-
<i class="fas fa-id-card text-blue-600"></i>
|
| 96 |
-
</div>
|
| 97 |
-
<div>
|
| 98 |
-
<p class="text-sm text-gray-500">Tag Type</p>
|
| 99 |
-
<p class="font-medium" id="tagType">NTAG213</p>
|
| 100 |
-
</div>
|
| 101 |
-
</div>
|
| 102 |
-
<div class="flex items-center p-3 bg-gray-50 rounded-lg">
|
| 103 |
-
<div class="bg-purple-100 p-2 rounded-full mr-3">
|
| 104 |
-
<i class="fas fa-memory text-purple-600"></i>
|
| 105 |
-
</div>
|
| 106 |
-
<div>
|
| 107 |
-
<p class="text-sm text-gray-500">Memory Size</p>
|
| 108 |
-
<p class="font-medium" id="tagMemory">144 bytes</p>
|
| 109 |
-
</div>
|
| 110 |
</div>
|
| 111 |
-
<div class="
|
| 112 |
-
<div class="bg-
|
| 113 |
-
<i class="fas fa-unlock text-green-600"></i>
|
| 114 |
-
</div>
|
| 115 |
-
<div>
|
| 116 |
-
<p class="text-sm text-gray-500">Read Status</p>
|
| 117 |
-
<p class="font-medium" id="tagStatus">Successfully read</p>
|
| 118 |
-
</div>
|
| 119 |
</div>
|
| 120 |
</div>
|
| 121 |
-
</div>
|
| 122 |
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
<button class="p-2 text-blue-500 hover:bg-blue-50 rounded-full">
|
| 129 |
-
<i class="fas fa-edit"></i>
|
| 130 |
-
</button>
|
| 131 |
-
<button class="p-2 text-green-500 hover:bg-green-50 rounded-full">
|
| 132 |
-
<i class="fas fa-save"></i>
|
| 133 |
-
</button>
|
| 134 |
</div>
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
<
|
| 139 |
-
<span class="text-sm font-medium text-gray-700">URL Record</span>
|
| 140 |
</div>
|
| 141 |
-
<
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
<i class="fas fa-font text-gray-500 mr-2"></i>
|
| 146 |
-
<span class="text-sm font-medium text-gray-700">Text Record</span>
|
| 147 |
</div>
|
| 148 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 149 |
</div>
|
| 150 |
</div>
|
|
|
|
| 151 |
|
| 152 |
-
|
| 153 |
-
<
|
| 154 |
-
|
| 155 |
-
|
| 156 |
-
|
|
|
|
| 157 |
</div>
|
| 158 |
-
<
|
| 159 |
-
|
| 160 |
-
|
| 161 |
-
<div class="bg-white rounded-xl p-4 shadow-md text-center slide-up" style="animation-delay: 0.2s;">
|
| 162 |
-
<div class="bg-purple-100 w-12 h-12 rounded-full flex items-center justify-center mx-auto mb-3">
|
| 163 |
-
<i class="fas fa-tasks text-purple-600"></i>
|
| 164 |
</div>
|
| 165 |
-
<h4 class="font-bold text-gray-800 mb-1">Tasks</h4>
|
| 166 |
-
<p class="text-xs text-gray-500">Automate with tasks</p>
|
| 167 |
</div>
|
| 168 |
-
<div class="
|
| 169 |
-
<div class="bg-
|
| 170 |
-
<i class="fas fa-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 171 |
</div>
|
| 172 |
-
<h4 class="font-bold text-gray-800 mb-1">History</h4>
|
| 173 |
-
<p class="text-xs text-gray-500">View scan history</p>
|
| 174 |
</div>
|
| 175 |
-
<div class="
|
| 176 |
-
<div class="bg-
|
| 177 |
-
<i class="fas fa-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 178 |
</div>
|
| 179 |
-
<h4 class="font-bold text-gray-800 mb-1">Share</h4>
|
| 180 |
-
<p class="text-xs text-gray-500">Share tag data</p>
|
| 181 |
</div>
|
| 182 |
</div>
|
| 183 |
-
</
|
| 184 |
|
| 185 |
-
<
|
| 186 |
-
|
| 187 |
-
|
| 188 |
-
|
| 189 |
-
|
| 190 |
-
</
|
| 191 |
-
<
|
| 192 |
-
|
| 193 |
-
|
| 194 |
-
<button class="p-2 text-gray-500 hover:text-blue-600 rounded-full">
|
| 195 |
-
<i class="fas fa-bell text-xl"></i>
|
| 196 |
-
</button>
|
| 197 |
-
<button class="p-2 text-gray-500 hover:text-blue-600 rounded-full">
|
| 198 |
-
<i class="fas fa-user text-xl"></i>
|
| 199 |
</button>
|
| 200 |
</div>
|
| 201 |
-
</
|
| 202 |
</div>
|
| 203 |
|
| 204 |
<script>
|
| 205 |
-
//
|
| 206 |
-
|
| 207 |
-
|
| 208 |
-
|
| 209 |
-
|
| 210 |
-
|
| 211 |
-
|
| 212 |
-
|
| 213 |
-
|
| 214 |
-
|
| 215 |
-
|
| 216 |
-
|
| 217 |
-
|
| 218 |
-
|
| 219 |
-
|
| 220 |
-
|
| 221 |
-
|
| 222 |
-
|
| 223 |
-
|
| 224 |
-
|
| 225 |
-
|
| 226 |
-
|
| 227 |
-
|
| 228 |
-
|
| 229 |
-
|
| 230 |
-
|
| 231 |
-
|
| 232 |
-
|
| 233 |
-
|
| 234 |
-
|
| 235 |
-
|
| 236 |
-
|
| 237 |
-
|
| 238 |
-
|
| 239 |
-
|
| 240 |
-
|
| 241 |
-
|
| 242 |
-
|
| 243 |
-
|
| 244 |
-
|
| 245 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 246 |
|
| 247 |
-
|
|
|
|
|
|
|
|
|
|
| 248 |
});
|
| 249 |
|
| 250 |
-
//
|
| 251 |
-
|
| 252 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 253 |
});
|
| 254 |
|
| 255 |
-
//
|
| 256 |
-
|
| 257 |
-
|
| 258 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 259 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 260 |
</script>
|
| 261 |
<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=The22Mindset/nfc" style="color: #fff;text-decoration: underline;" target="_blank" >🧬 Remix</a></p></body>
|
| 262 |
</html>
|
|
|
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>TagCheck Game - Collect NFC Chips!</title>
|
| 7 |
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
| 9 |
<style>
|
| 10 |
+
@keyframes float {
|
| 11 |
+
0% { transform: translateY(0px); }
|
| 12 |
+
50% { transform: translateY(-20px); }
|
| 13 |
+
100% { transform: translateY(0px); }
|
| 14 |
}
|
| 15 |
+
|
| 16 |
+
@keyframes pulse {
|
| 17 |
+
0% { transform: scale(1); }
|
| 18 |
+
50% { transform: scale(1.1); }
|
| 19 |
+
100% { transform: scale(1); }
|
| 20 |
}
|
| 21 |
+
|
| 22 |
+
.phone {
|
| 23 |
+
transition: all 0.2s ease;
|
| 24 |
}
|
| 25 |
+
|
| 26 |
+
.nfc-chip {
|
| 27 |
+
animation: float 3s ease-in-out infinite;
|
| 28 |
+
transition: all 0.3s ease;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
}
|
| 30 |
+
|
| 31 |
+
.collected {
|
| 32 |
+
animation: pulse 0.5s ease-out;
|
| 33 |
+
opacity: 0;
|
| 34 |
}
|
| 35 |
+
|
| 36 |
+
.discount-unlocked {
|
| 37 |
+
animation: pulse 1s ease-in-out;
|
| 38 |
+
}
|
| 39 |
+
|
| 40 |
+
#gameArea {
|
| 41 |
+
background: linear-gradient(135deg, #6e8efb, #a777e3);
|
| 42 |
+
position: relative;
|
| 43 |
+
overflow: hidden;
|
| 44 |
+
}
|
| 45 |
+
|
| 46 |
+
.progress-bar {
|
| 47 |
+
transition: width 0.5s ease;
|
| 48 |
}
|
| 49 |
</style>
|
| 50 |
</head>
|
| 51 |
<body class="bg-gray-100 font-sans">
|
| 52 |
+
<div class="container mx-auto px-4 py-8 max-w-4xl">
|
| 53 |
+
<header class="text-center mb-8">
|
| 54 |
+
<h1 class="text-4xl font-bold text-purple-800 mb-2">TagCheck Game</h1>
|
| 55 |
+
<p class="text-lg text-gray-600">Collect NFC chips to unlock discounts at <a href="https://www.tagcheck.shop" class="text-blue-500 hover:underline" target="_blank">www.tagcheck.shop</a></p>
|
| 56 |
+
</header>
|
| 57 |
+
|
| 58 |
+
<div class="bg-white rounded-xl shadow-xl overflow-hidden mb-8">
|
| 59 |
+
<div class="flex justify-between items-center bg-purple-700 text-white p-4">
|
| 60 |
+
<div class="flex items-center">
|
| 61 |
+
<i class="fas fa-wifi text-yellow-300 mr-2"></i>
|
| 62 |
+
<span id="score" class="font-bold text-xl">0</span>
|
| 63 |
+
<span class="ml-1">NFC chips</span>
|
| 64 |
</div>
|
| 65 |
+
<div class="flex items-center">
|
| 66 |
+
<i class="fas fa-tag text-green-300 mr-2"></i>
|
| 67 |
+
<span id="discount" class="font-bold text-xl">0%</span>
|
| 68 |
+
<span class="ml-1">Discount</span>
|
|
|
|
|
|
|
|
|
|
| 69 |
</div>
|
| 70 |
</div>
|
|
|
|
| 71 |
|
| 72 |
+
<div id="gameArea" class="relative h-96 w-full">
|
| 73 |
+
<!-- Phone character -->
|
| 74 |
+
<div id="phone" class="phone absolute w-16 h-28 bg-black rounded-xl border-4 border-gray-300 flex items-center justify-center" style="bottom: 20px; left: 50%; transform: translateX(-50%);">
|
| 75 |
+
<div class="w-12 h-20 bg-gray-900 rounded flex flex-col items-center justify-between p-1">
|
| 76 |
+
<div class="w-2 h-2 bg-gray-700 rounded-full mt-1"></div>
|
| 77 |
+
<div class="w-8 h-8 rounded-full border-2 border-purple-500 flex items-center justify-center">
|
| 78 |
+
<i class="fas fa-wifi text-purple-400"></i>
|
| 79 |
+
</div>
|
| 80 |
+
<div class="w-8 h-2 bg-gray-700 rounded-full mb-1"></div>
|
| 81 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 82 |
</div>
|
| 83 |
+
|
| 84 |
+
<!-- NFC chips will be generated here -->
|
| 85 |
</div>
|
| 86 |
|
| 87 |
+
<div class="p-4 bg-gray-50">
|
| 88 |
+
<div class="mb-4">
|
| 89 |
+
<div class="flex justify-between mb-1">
|
| 90 |
+
<span class="text-sm font-medium text-purple-700">Next discount at: <span id="nextDiscount">5</span> chips</span>
|
| 91 |
+
<span class="text-sm font-medium text-purple-700"><span id="collected">0</span>/<span id="needed">5</span></span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 92 |
</div>
|
| 93 |
+
<div class="w-full bg-gray-200 rounded-full h-2.5">
|
| 94 |
+
<div id="progressBar" class="progress-bar bg-purple-600 h-2.5 rounded-full" style="width: 0%"></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 95 |
</div>
|
| 96 |
</div>
|
|
|
|
| 97 |
|
| 98 |
+
<div class="grid grid-cols-3 gap-4 mb-4">
|
| 99 |
+
<div class="bg-white p-3 rounded-lg shadow text-center">
|
| 100 |
+
<div class="text-purple-600 mb-1"><i class="fas fa-bolt"></i></div>
|
| 101 |
+
<div class="font-bold" id="speed">1x</div>
|
| 102 |
+
<div class="text-xs text-gray-500">Speed</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 103 |
</div>
|
| 104 |
+
<div class="bg-white p-3 rounded-lg shadow text-center">
|
| 105 |
+
<div class="text-purple-600 mb-1"><i class="fas fa-trophy"></i></div>
|
| 106 |
+
<div class="font-bold" id="level">1</div>
|
| 107 |
+
<div class="text-xs text-gray-500">Level</div>
|
|
|
|
| 108 |
</div>
|
| 109 |
+
<div class="bg-white p-3 rounded-lg shadow text-center">
|
| 110 |
+
<div class="text-purple-600 mb-1"><i class="fas fa-clock"></i></div>
|
| 111 |
+
<div class="font-bold" id="time">60</div>
|
| 112 |
+
<div class="text-xs text-gray-500">Seconds</div>
|
|
|
|
|
|
|
| 113 |
</div>
|
| 114 |
+
</div>
|
| 115 |
+
|
| 116 |
+
<div class="flex justify-between">
|
| 117 |
+
<button id="startBtn" class="bg-purple-600 hover:bg-purple-700 text-white font-bold py-2 px-6 rounded-full transition">
|
| 118 |
+
<i class="fas fa-play mr-2"></i> Start Game
|
| 119 |
+
</button>
|
| 120 |
+
<button id="shopBtn" class="bg-green-600 hover:bg-green-700 text-white font-bold py-2 px-6 rounded-full transition">
|
| 121 |
+
<i class="fas fa-shopping-cart mr-2"></i> Visit Shop
|
| 122 |
+
</button>
|
| 123 |
</div>
|
| 124 |
</div>
|
| 125 |
+
</div>
|
| 126 |
|
| 127 |
+
<div class="bg-white rounded-xl shadow-xl p-6 mb-8">
|
| 128 |
+
<h2 class="text-2xl font-bold text-purple-800 mb-4">How to Play</h2>
|
| 129 |
+
<div class="grid md:grid-cols-3 gap-4">
|
| 130 |
+
<div class="flex items-start">
|
| 131 |
+
<div class="bg-purple-100 p-3 rounded-full mr-3">
|
| 132 |
+
<i class="fas fa-mobile-alt text-purple-600"></i>
|
| 133 |
</div>
|
| 134 |
+
<div>
|
| 135 |
+
<h3 class="font-bold text-gray-800">Move Your Phone</h3>
|
| 136 |
+
<p class="text-gray-600 text-sm">Use arrow keys or swipe to move your smartphone and collect NFC chips</p>
|
|
|
|
|
|
|
|
|
|
| 137 |
</div>
|
|
|
|
|
|
|
| 138 |
</div>
|
| 139 |
+
<div class="flex items-start">
|
| 140 |
+
<div class="bg-purple-100 p-3 rounded-full mr-3">
|
| 141 |
+
<i class="fas fa-tag text-purple-600"></i>
|
| 142 |
+
</div>
|
| 143 |
+
<div>
|
| 144 |
+
<h3 class="font-bold text-gray-800">Collect Chips</h3>
|
| 145 |
+
<p class="text-gray-600 text-sm">Each NFC chip increases your score and brings you closer to discounts</p>
|
| 146 |
</div>
|
|
|
|
|
|
|
| 147 |
</div>
|
| 148 |
+
<div class="flex items-start">
|
| 149 |
+
<div class="bg-purple-100 p-3 rounded-full mr-3">
|
| 150 |
+
<i class="fas fa-percentage text-purple-600"></i>
|
| 151 |
+
</div>
|
| 152 |
+
<div>
|
| 153 |
+
<h3 class="font-bold text-gray-800">Earn Discounts</h3>
|
| 154 |
+
<p class="text-gray-600 text-sm">Redeem your earned discounts at www.tagcheck.shop</p>
|
| 155 |
</div>
|
|
|
|
|
|
|
| 156 |
</div>
|
| 157 |
</div>
|
| 158 |
+
</div>
|
| 159 |
|
| 160 |
+
<div id="discountUnlocked" class="fixed inset-0 flex items-center justify-center bg-black bg-opacity-50 z-50 hidden">
|
| 161 |
+
<div class="bg-white rounded-xl p-8 max-w-sm w-full text-center discount-unlocked">
|
| 162 |
+
<div class="text-6xl text-green-500 mb-4">
|
| 163 |
+
<i class="fas fa-trophy"></i>
|
| 164 |
+
</div>
|
| 165 |
+
<h2 class="text-2xl font-bold text-gray-800 mb-2">Discount Unlocked!</h2>
|
| 166 |
+
<p class="text-gray-600 mb-4">You've earned a <span id="unlockedDiscount" class="font-bold text-green-600">5%</span> discount at TagCheck Shop!</p>
|
| 167 |
+
<button id="continueBtn" class="bg-purple-600 hover:bg-purple-700 text-white font-bold py-2 px-6 rounded-full transition">
|
| 168 |
+
Continue Playing
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 169 |
</button>
|
| 170 |
</div>
|
| 171 |
+
</div>
|
| 172 |
</div>
|
| 173 |
|
| 174 |
<script>
|
| 175 |
+
// Game variables
|
| 176 |
+
let score = 0;
|
| 177 |
+
let discount = 0;
|
| 178 |
+
let level = 1;
|
| 179 |
+
let gameSpeed = 1;
|
| 180 |
+
let gameActive = false;
|
| 181 |
+
let timeLeft = 60;
|
| 182 |
+
let chipsCollected = 0;
|
| 183 |
+
let chipsNeeded = 5;
|
| 184 |
+
let gameInterval;
|
| 185 |
+
let timeInterval;
|
| 186 |
+
let phonePosition = { x: 50, y: 20 };
|
| 187 |
+
let phoneElement = document.getElementById('phone');
|
| 188 |
+
let gameArea = document.getElementById('gameArea');
|
| 189 |
+
let gameAreaRect = gameArea.getBoundingClientRect();
|
| 190 |
+
|
| 191 |
+
// Discount thresholds (chips needed for each discount level)
|
| 192 |
+
const discountThresholds = [
|
| 193 |
+
{ chips: 5, discount: 5 },
|
| 194 |
+
{ chips: 15, discount: 10 },
|
| 195 |
+
{ chips: 30, discount: 15 },
|
| 196 |
+
{ chips: 50, discount: 20 },
|
| 197 |
+
{ chips: 75, discount: 25 },
|
| 198 |
+
{ chips: 100, discount: 30 }
|
| 199 |
+
];
|
| 200 |
+
|
| 201 |
+
// Current threshold index
|
| 202 |
+
let currentThresholdIndex = 0;
|
| 203 |
+
|
| 204 |
+
// Initialize game
|
| 205 |
+
function initGame() {
|
| 206 |
+
score = 0;
|
| 207 |
+
discount = 0;
|
| 208 |
+
level = 1;
|
| 209 |
+
gameSpeed = 1;
|
| 210 |
+
timeLeft = 60;
|
| 211 |
+
chipsCollected = 0;
|
| 212 |
+
chipsNeeded = discountThresholds[0].chips;
|
| 213 |
+
currentThresholdIndex = 0;
|
| 214 |
+
|
| 215 |
+
updateUI();
|
| 216 |
+
resetPhonePosition();
|
| 217 |
+
}
|
| 218 |
+
|
| 219 |
+
// Start game
|
| 220 |
+
document.getElementById('startBtn').addEventListener('click', function() {
|
| 221 |
+
if (gameActive) return;
|
| 222 |
+
|
| 223 |
+
initGame();
|
| 224 |
+
gameActive = true;
|
| 225 |
+
this.innerHTML = '<i class="fas fa-pause mr-2"></i> Pause Game';
|
| 226 |
+
|
| 227 |
+
// Start game loop
|
| 228 |
+
gameInterval = setInterval(createNfcChip, 1000 / gameSpeed);
|
| 229 |
+
|
| 230 |
+
// Start timer
|
| 231 |
+
timeInterval = setInterval(function() {
|
| 232 |
+
timeLeft--;
|
| 233 |
+
document.getElementById('time').textContent = timeLeft;
|
| 234 |
|
| 235 |
+
if (timeLeft <= 0) {
|
| 236 |
+
endGame();
|
| 237 |
+
}
|
| 238 |
+
}, 1000);
|
| 239 |
});
|
| 240 |
|
| 241 |
+
// Pause game
|
| 242 |
+
function togglePause() {
|
| 243 |
+
if (!gameActive) return;
|
| 244 |
+
|
| 245 |
+
gameActive = !gameActive;
|
| 246 |
+
|
| 247 |
+
if (gameActive) {
|
| 248 |
+
document.getElementById('startBtn').innerHTML = '<i class="fas fa-pause mr-2"></i> Pause Game';
|
| 249 |
+
gameInterval = setInterval(createNfcChip, 1000 / gameSpeed);
|
| 250 |
+
timeInterval = setInterval(function() {
|
| 251 |
+
timeLeft--;
|
| 252 |
+
document.getElementById('time').textContent = timeLeft;
|
| 253 |
+
|
| 254 |
+
if (timeLeft <= 0) {
|
| 255 |
+
endGame();
|
| 256 |
+
}
|
| 257 |
+
}, 1000);
|
| 258 |
+
} else {
|
| 259 |
+
document.getElementById('startBtn').innerHTML = '<i class="fas fa-play mr-2"></i> Resume Game';
|
| 260 |
+
clearInterval(gameInterval);
|
| 261 |
+
clearInterval(timeInterval);
|
| 262 |
+
}
|
| 263 |
+
}
|
| 264 |
+
|
| 265 |
+
// End game
|
| 266 |
+
function endGame() {
|
| 267 |
+
gameActive = false;
|
| 268 |
+
clearInterval(gameInterval);
|
| 269 |
+
clearInterval(timeInterval);
|
| 270 |
+
|
| 271 |
+
document.getElementById('startBtn').innerHTML = '<i class="fas fa-play mr-2"></i> Start Game';
|
| 272 |
+
|
| 273 |
+
// Show game over with final score
|
| 274 |
+
alert(`Game Over!\n\nFinal Score: ${score} NFC chips\nDiscount Earned: ${discount}%\n\nVisit www.tagcheck.shop to use your discount!`);
|
| 275 |
+
}
|
| 276 |
+
|
| 277 |
+
// Create NFC chip
|
| 278 |
+
function createNfcChip() {
|
| 279 |
+
if (!gameActive) return;
|
| 280 |
+
|
| 281 |
+
const chip = document.createElement('div');
|
| 282 |
+
chip.className = 'nfc-chip absolute w-8 h-8 bg-blue-500 rounded-full flex items-center justify-center text-white';
|
| 283 |
+
chip.innerHTML = '<i class="fas fa-wifi"></i>';
|
| 284 |
+
|
| 285 |
+
// Random position (avoid edges)
|
| 286 |
+
const x = Math.random() * (gameAreaRect.width - 40) + 20;
|
| 287 |
+
const y = Math.random() * (gameAreaRect.height - 120) + 20;
|
| 288 |
+
|
| 289 |
+
chip.style.left = `${x}px`;
|
| 290 |
+
chip.style.top = `${y}px`;
|
| 291 |
+
|
| 292 |
+
// Add click/touch event
|
| 293 |
+
chip.addEventListener('click', function() {
|
| 294 |
+
collectChip(chip);
|
| 295 |
+
});
|
| 296 |
+
|
| 297 |
+
// Auto-remove after 5 seconds if not collected
|
| 298 |
+
setTimeout(() => {
|
| 299 |
+
if (chip.parentNode) {
|
| 300 |
+
chip.classList.add('opacity-0', 'transition-opacity');
|
| 301 |
+
setTimeout(() => {
|
| 302 |
+
if (chip.parentNode) {
|
| 303 |
+
gameArea.removeChild(chip);
|
| 304 |
+
}
|
| 305 |
+
}, 300);
|
| 306 |
+
}
|
| 307 |
+
}, 5000);
|
| 308 |
+
|
| 309 |
+
gameArea.appendChild(chip);
|
| 310 |
+
}
|
| 311 |
+
|
| 312 |
+
// Collect NFC chip
|
| 313 |
+
function collectChip(chip) {
|
| 314 |
+
if (!gameActive) return;
|
| 315 |
+
|
| 316 |
+
chip.classList.add('collected');
|
| 317 |
+
setTimeout(() => {
|
| 318 |
+
if (chip.parentNode) {
|
| 319 |
+
gameArea.removeChild(chip);
|
| 320 |
+
}
|
| 321 |
+
}, 500);
|
| 322 |
+
|
| 323 |
+
// Increase score
|
| 324 |
+
score++;
|
| 325 |
+
chipsCollected++;
|
| 326 |
+
|
| 327 |
+
// Check if discount threshold reached
|
| 328 |
+
if (chipsCollected >= chipsNeeded) {
|
| 329 |
+
unlockDiscount();
|
| 330 |
+
}
|
| 331 |
+
|
| 332 |
+
// Level up every 10 chips
|
| 333 |
+
if (score % 10 === 0) {
|
| 334 |
+
level++;
|
| 335 |
+
gameSpeed += 0.5;
|
| 336 |
+
document.getElementById('speed').textContent = `${gameSpeed}x`;
|
| 337 |
+
document.getElementById('level').textContent = level;
|
| 338 |
+
}
|
| 339 |
+
|
| 340 |
+
// Add time bonus
|
| 341 |
+
timeLeft = Math.min(timeLeft + 2, 60);
|
| 342 |
+
|
| 343 |
+
updateUI();
|
| 344 |
+
}
|
| 345 |
+
|
| 346 |
+
// Unlock discount
|
| 347 |
+
function unlockDiscount() {
|
| 348 |
+
discount = discountThresholds[currentThresholdIndex].discount;
|
| 349 |
+
|
| 350 |
+
// Show discount unlocked modal
|
| 351 |
+
document.getElementById('unlockedDiscount').textContent = `${discount}%`;
|
| 352 |
+
document.getElementById('discountUnlocked').classList.remove('hidden');
|
| 353 |
+
|
| 354 |
+
// Move to next threshold if available
|
| 355 |
+
currentThresholdIndex++;
|
| 356 |
+
if (currentThresholdIndex < discountThresholds.length) {
|
| 357 |
+
chipsNeeded = discountThresholds[currentThresholdIndex].chips - discountThresholds[currentThresholdIndex - 1].chips;
|
| 358 |
+
} else {
|
| 359 |
+
// If all discounts unlocked, set a repeating pattern
|
| 360 |
+
chipsNeeded = 25;
|
| 361 |
+
}
|
| 362 |
+
|
| 363 |
+
chipsCollected = 0;
|
| 364 |
+
updateUI();
|
| 365 |
+
}
|
| 366 |
+
|
| 367 |
+
// Continue playing after discount unlocked
|
| 368 |
+
document.getElementById('continueBtn').addEventListener('click', function() {
|
| 369 |
+
document.getElementById('discountUnlocked').classList.add('hidden');
|
| 370 |
});
|
| 371 |
|
| 372 |
+
// Update UI elements
|
| 373 |
+
function updateUI() {
|
| 374 |
+
document.getElementById('score').textContent = score;
|
| 375 |
+
document.getElementById('discount').textContent = discount;
|
| 376 |
+
document.getElementById('collected').textContent = chipsCollected;
|
| 377 |
+
document.getElementById('needed').textContent = chipsNeeded;
|
| 378 |
+
document.getElementById('nextDiscount').textContent = discountThresholds[currentThresholdIndex]?.chips || (discountThresholds[discountThresholds.length - 1].chips + (chipsNeeded * (currentThresholdIndex - discountThresholds.length + 1)));
|
| 379 |
+
|
| 380 |
+
// Update progress bar
|
| 381 |
+
const progressPercent = (chipsCollected / chipsNeeded) * 100;
|
| 382 |
+
document.getElementById('progressBar').style.width = `${progressPercent}%`;
|
| 383 |
+
}
|
| 384 |
+
|
| 385 |
+
// Reset phone position
|
| 386 |
+
function resetPhonePosition() {
|
| 387 |
+
phonePosition = {
|
| 388 |
+
x: gameAreaRect.width / 2 - phoneElement.offsetWidth / 2,
|
| 389 |
+
y: gameAreaRect.height - phoneElement.offsetHeight - 20
|
| 390 |
+
};
|
| 391 |
+
updatePhonePosition();
|
| 392 |
+
}
|
| 393 |
+
|
| 394 |
+
// Update phone position
|
| 395 |
+
function updatePhonePosition() {
|
| 396 |
+
phoneElement.style.left = `${phonePosition.x}px`;
|
| 397 |
+
phoneElement.style.bottom = `${gameAreaRect.height - phonePosition.y - phoneElement.offsetHeight}px`;
|
| 398 |
+
}
|
| 399 |
+
|
| 400 |
+
// Handle keyboard controls
|
| 401 |
+
document.addEventListener('keydown', function(e) {
|
| 402 |
+
if (!gameActive) return;
|
| 403 |
+
|
| 404 |
+
const moveAmount = 20;
|
| 405 |
+
|
| 406 |
+
switch(e.key) {
|
| 407 |
+
case 'ArrowLeft':
|
| 408 |
+
phonePosition.x = Math.max(0, phonePosition.x - moveAmount);
|
| 409 |
+
break;
|
| 410 |
+
case 'ArrowRight':
|
| 411 |
+
phonePosition.x = Math.min(gameAreaRect.width - phoneElement.offsetWidth, phonePosition.x + moveAmount);
|
| 412 |
+
break;
|
| 413 |
+
case 'ArrowUp':
|
| 414 |
+
phonePosition.y = Math.min(gameAreaRect.height - phoneElement.offsetHeight, phonePosition.y + moveAmount);
|
| 415 |
+
break;
|
| 416 |
+
case 'ArrowDown':
|
| 417 |
+
phonePosition.y = Math.max(0, phonePosition.y - moveAmount);
|
| 418 |
+
break;
|
| 419 |
+
case ' ':
|
| 420 |
+
// Space bar to pause
|
| 421 |
+
togglePause();
|
| 422 |
+
break;
|
| 423 |
+
}
|
| 424 |
+
|
| 425 |
+
updatePhonePosition();
|
| 426 |
+
|
| 427 |
+
// Check for collision with NFC chips
|
| 428 |
+
checkCollisions();
|
| 429 |
+
});
|
| 430 |
+
|
| 431 |
+
// Handle touch controls for mobile
|
| 432 |
+
let touchStartX = 0;
|
| 433 |
+
let touchStartY = 0;
|
| 434 |
+
|
| 435 |
+
gameArea.addEventListener('touchstart', function(e) {
|
| 436 |
+
if (!gameActive) return;
|
| 437 |
+
|
| 438 |
+
touchStartX = e.touches[0].clientX;
|
| 439 |
+
touchStartY = e.touches[0].clientY;
|
| 440 |
+
e.preventDefault();
|
| 441 |
+
}, { passive: false });
|
| 442 |
+
|
| 443 |
+
gameArea.addEventListener('touchmove', function(e) {
|
| 444 |
+
if (!gameActive) return;
|
| 445 |
+
|
| 446 |
+
const touchX = e.touches[0].clientX;
|
| 447 |
+
const touchY = e.touches[0].clientY;
|
| 448 |
+
|
| 449 |
+
const diffX = touchX - touchStartX;
|
| 450 |
+
const diffY = touchY - touchStartY;
|
| 451 |
+
|
| 452 |
+
phonePosition.x = Math.max(0, Math.min(gameAreaRect.width - phoneElement.offsetWidth, phonePosition.x + diffX));
|
| 453 |
+
phonePosition.y = Math.max(0, Math.min(gameAreaRect.height - phoneElement.offsetHeight, phonePosition.y + diffY));
|
| 454 |
+
|
| 455 |
+
touchStartX = touchX;
|
| 456 |
+
touchStartY = touchY;
|
| 457 |
+
|
| 458 |
+
updatePhonePosition();
|
| 459 |
+
|
| 460 |
+
// Check for collision with NFC chips
|
| 461 |
+
checkCollisions();
|
| 462 |
+
|
| 463 |
+
e.preventDefault();
|
| 464 |
+
}, { passive: false });
|
| 465 |
+
|
| 466 |
+
// Check for collisions with NFC chips
|
| 467 |
+
function checkCollisions() {
|
| 468 |
+
const phoneRect = phoneElement.getBoundingClientRect();
|
| 469 |
+
const chips = document.querySelectorAll('.nfc-chip');
|
| 470 |
+
|
| 471 |
+
chips.forEach(chip => {
|
| 472 |
+
const chipRect = chip.getBoundingClientRect();
|
| 473 |
+
|
| 474 |
+
// Simple collision detection
|
| 475 |
+
if (!(phoneRect.right < chipRect.left ||
|
| 476 |
+
phoneRect.left > chipRect.right ||
|
| 477 |
+
phoneRect.bottom < chipRect.top ||
|
| 478 |
+
phoneRect.top > chipRect.bottom)) {
|
| 479 |
+
collectChip(chip);
|
| 480 |
+
}
|
| 481 |
+
});
|
| 482 |
+
}
|
| 483 |
+
|
| 484 |
+
// Visit shop button
|
| 485 |
+
document.getElementById('shopBtn').addEventListener('click', function() {
|
| 486 |
+
window.open('https://www.tagcheck.shop', '_blank');
|
| 487 |
});
|
| 488 |
+
|
| 489 |
+
// Initialize game area dimensions
|
| 490 |
+
function updateGameAreaDimensions() {
|
| 491 |
+
gameAreaRect = gameArea.getBoundingClientRect();
|
| 492 |
+
resetPhonePosition();
|
| 493 |
+
}
|
| 494 |
+
|
| 495 |
+
window.addEventListener('resize', updateGameAreaDimensions);
|
| 496 |
+
updateGameAreaDimensions();
|
| 497 |
</script>
|
| 498 |
<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=The22Mindset/nfc" style="color: #fff;text-decoration: underline;" target="_blank" >🧬 Remix</a></p></body>
|
| 499 |
</html>
|