SulfuceNoir commited on
Commit
3ee96af
·
verified ·
1 Parent(s): f02f69a

undefined - Initial Deployment

Browse files
Files changed (2) hide show
  1. README.md +7 -5
  2. index.html +325 -19
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Ff Cheat
3
- emoji:
4
- colorFrom: purple
5
- colorTo: purple
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: ff-cheat
3
+ emoji: 🐳
4
+ colorFrom: blue
5
+ colorTo: yellow
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite
10
  ---
11
 
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
index.html CHANGED
@@ -1,19 +1,325 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="fr">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Assistante Visuelle Corporelle</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
+ .body-map {
11
+ position: relative;
12
+ background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 400"><circle cx="100" cy="80" r="40" fill="none" stroke="gray" stroke-width="1"/><path d="M100 120 L100 300" fill="none" stroke="gray" stroke-width="1"/><path d="M100 150 L60 200" fill="none" stroke="gray" stroke-width="1"/><path d="M100 150 L140 200" fill="none" stroke="gray" stroke-width="1"/><path d="M100 300 L60 380" fill="none" stroke="gray" stroke-width="1"/><path d="M100 300 L140 380" fill="none" stroke="gray" stroke-width="1"/></svg>');
13
+ background-repeat: no-repeat;
14
+ background-position: center;
15
+ background-size: contain;
16
+ }
17
+
18
+ .target-area {
19
+ position: absolute;
20
+ width: 40px;
21
+ height: 40px;
22
+ border-radius: 50%;
23
+ border: 2px dashed #3B82F6;
24
+ background-color: rgba(59, 130, 246, 0.2);
25
+ transform: translate(-50%, -50%);
26
+ pointer-events: none;
27
+ }
28
+
29
+ .body-zone {
30
+ position: absolute;
31
+ width: 30px;
32
+ height: 30px;
33
+ border-radius: 50%;
34
+ background-color: rgba(239, 68, 68, 0.3);
35
+ transform: translate(-50%, -50%);
36
+ cursor: pointer;
37
+ transition: all 0.2s;
38
+ }
39
+
40
+ .body-zone:hover {
41
+ background-color: rgba(239, 68, 68, 0.6);
42
+ }
43
+
44
+ @media (max-width: 640px) {
45
+ .body-map {
46
+ height: 70vh;
47
+ }
48
+ }
49
+ </style>
50
+ </head>
51
+ <body class="bg-gray-100 min-h-screen">
52
+ <div class="container mx-auto px-4 py-8">
53
+ <div class="bg-white rounded-xl shadow-lg overflow-hidden max-w-md mx-auto">
54
+ <!-- Header -->
55
+ <div class="bg-blue-600 text-white p-4 flex items-center justify-between">
56
+ <div class="flex items-center space-x-3">
57
+ <i class="fas fa-crosshairs text-xl"></i>
58
+ <h1 class="text-xl font-bold">Assistante Visuelle</h1>
59
+ </div>
60
+ <button id="help-btn" class="text-white hover:text-blue-200">
61
+ <i class="fas fa-question-circle text-xl"></i>
62
+ </button>
63
+ </div>
64
+
65
+ <!-- Main Content -->
66
+ <div class="p-4">
67
+ <div class="mb-4">
68
+ <h2 class="text-lg font-semibold text-gray-800">Zone cible sélectionnée:</h2>
69
+ <div id="selected-area" class="mt-2 p-3 bg-blue-50 rounded-lg text-blue-800 font-medium">
70
+ Aucune zone sélectionnée
71
+ </div>
72
+ </div>
73
+
74
+ <div class="mb-6">
75
+ <h2 class="text-lg font-semibold text-gray-800 mb-2">Carte du corps:</h2>
76
+ <div class="body-map w-full h-96 relative" id="body-map">
77
+ <!-- Body zones will be added here -->
78
+ <div class="target-area hidden" id="target-area"></div>
79
+ </div>
80
+ </div>
81
+
82
+ <div class="grid grid-cols-2 gap-4 mb-4">
83
+ <button id="lock-btn" class="bg-blue-600 hover:bg-blue-700 text-white py-3 px-4 rounded-lg font-medium flex items-center justify-center space-x-2">
84
+ <i class="fas fa-lock"></i>
85
+ <span>Verrouiller</span>
86
+ </button>
87
+ <button id="reset-btn" class="bg-gray-200 hover:bg-gray-300 text-gray-800 py-3 px-4 rounded-lg font-medium flex items-center justify-center space-x-2">
88
+ <i class="fas fa-redo"></i>
89
+ <span>Réinitialiser</span>
90
+ </button>
91
+ </div>
92
+
93
+ <div class="bg-yellow-50 border-l-4 border-yellow-400 p-4 mb-4">
94
+ <div class="flex">
95
+ <div class="flex-shrink-0">
96
+ <i class="fas fa-info-circle text-yellow-400"></i>
97
+ </div>
98
+ <div class="ml-3">
99
+ <p class="text-sm text-yellow-700">
100
+ L'assistante utilise les capteurs de votre téléphone pour maintenir le viseur sur la zone sélectionnée.
101
+ </p>
102
+ </div>
103
+ </div>
104
+ </div>
105
+ </div>
106
+ </div>
107
+ </div>
108
+
109
+ <!-- Help Modal -->
110
+ <div id="help-modal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center hidden z-50">
111
+ <div class="bg-white rounded-lg max-w-md w-full mx-4">
112
+ <div class="bg-blue-600 text-white p-4 flex items-center justify-between">
113
+ <h3 class="text-lg font-semibold">Aide</h3>
114
+ <button id="close-help" class="text-white hover:text-blue-200">
115
+ <i class="fas fa-times"></i>
116
+ </button>
117
+ </div>
118
+ <div class="p-4">
119
+ <div class="mb-4">
120
+ <h4 class="font-medium text-gray-800 mb-2">Comment utiliser:</h4>
121
+ <ol class="list-decimal pl-5 space-y-2 text-gray-700">
122
+ <li>Appuyez sur une zone du corps pour la sélectionner</li>
123
+ <li>Cliquez sur "Verrouiller" pour activer le suivi</li>
124
+ <li>L'assistante maintiendra le viseur sur cette zone</li>
125
+ <li>Utilisez "Réinitialiser" pour choisir une nouvelle zone</li>
126
+ </ol>
127
+ </div>
128
+ <div class="bg-blue-50 p-3 rounded-lg">
129
+ <h4 class="font-medium text-blue-800 mb-1">Astuce:</h4>
130
+ <p class="text-blue-700 text-sm">Maintenez votre téléphone stable pour des résultats optimaux.</p>
131
+ </div>
132
+ </div>
133
+ </div>
134
+ </div>
135
+
136
+ <script>
137
+ document.addEventListener('DOMContentLoaded', function() {
138
+ // Body zones positions (x%, y%)
139
+ const bodyZones = [
140
+ { name: "Tête", x: 50, y: 10 },
141
+ { name: "Épaule gauche", x: 30, y: 25 },
142
+ { name: "Épaule droite", x: 70, y: 25 },
143
+ { name: "Poitrine", x: 50, y: 35 },
144
+ { name: "Ventre", x: 50, y: 45 },
145
+ { name: "Main gauche", x: 20, y: 50 },
146
+ { name: "Main droite", x: 80, y: 50 },
147
+ { name: "Hanche gauche", x: 40, y: 55 },
148
+ { name: "Hanche droite", x: 60, y: 55 },
149
+ { name: "Genou gauche", x: 45, y: 70 },
150
+ { name: "Genou droit", x: 55, y: 70 },
151
+ { name: "Pied gauche", x: 45, y: 90 },
152
+ { name: "Pied droit", x: 55, y: 90 }
153
+ ];
154
+
155
+ const bodyMap = document.getElementById('body-map');
156
+ const targetArea = document.getElementById('target-area');
157
+ const selectedAreaDisplay = document.getElementById('selected-area');
158
+ const lockBtn = document.getElementById('lock-btn');
159
+ const resetBtn = document.getElementById('reset-btn');
160
+ const helpBtn = document.getElementById('help-btn');
161
+ const helpModal = document.getElementById('help-modal');
162
+ const closeHelp = document.getElementById('close-help');
163
+
164
+ let selectedZone = null;
165
+ let isLocked = false;
166
+ let deviceOrientationHandler = null;
167
+
168
+ // Create body zones
169
+ bodyZones.forEach(zone => {
170
+ const zoneElement = document.createElement('div');
171
+ zoneElement.className = 'body-zone';
172
+ zoneElement.style.left = `${zone.x}%`;
173
+ zoneElement.style.top = `${zone.y}%`;
174
+ zoneElement.dataset.name = zone.name;
175
+ zoneElement.dataset.x = zone.x;
176
+ zoneElement.dataset.y = zone.y;
177
+
178
+ zoneElement.addEventListener('click', function() {
179
+ if (isLocked) return;
180
+
181
+ // Remove previous selection
182
+ document.querySelectorAll('.body-zone').forEach(el => {
183
+ el.style.backgroundColor = 'rgba(239, 68, 68, 0.3)';
184
+ });
185
+
186
+ // Highlight selected zone
187
+ this.style.backgroundColor = 'rgba(239, 68, 68, 0.8)';
188
+ selectedZone = {
189
+ name: this.dataset.name,
190
+ x: parseFloat(this.dataset.x),
191
+ y: parseFloat(this.dataset.y)
192
+ };
193
+
194
+ // Show target area
195
+ targetArea.style.left = `${selectedZone.x}%`;
196
+ targetArea.style.top = `${selectedZone.y}%`;
197
+ targetArea.classList.remove('hidden');
198
+
199
+ // Update display
200
+ selectedAreaDisplay.textContent = selectedZone.name;
201
+ });
202
+
203
+ bodyMap.appendChild(zoneElement);
204
+ });
205
+
206
+ // Lock button
207
+ lockBtn.addEventListener('click', function() {
208
+ if (!selectedZone) {
209
+ alert('Veuillez sélectionner une zone d\'abord');
210
+ return;
211
+ }
212
+
213
+ isLocked = !isLocked;
214
+
215
+ if (isLocked) {
216
+ this.innerHTML = '<i class="fas fa-unlock"></i><span>Déverrouiller</span>';
217
+ this.classList.remove('bg-blue-600', 'hover:bg-blue-700');
218
+ this.classList.add('bg-green-600', 'hover:bg-green-700');
219
+
220
+ // Simulate device orientation tracking
221
+ startTracking();
222
+
223
+ // Vibrate for feedback
224
+ if (navigator.vibrate) {
225
+ navigator.vibrate(100);
226
+ }
227
+ } else {
228
+ this.innerHTML = '<i class="fas fa-lock"></i><span>Verrouiller</span>';
229
+ this.classList.remove('bg-green-600', 'hover:bg-green-700');
230
+ this.classList.add('bg-blue-600', 'hover:bg-blue-700');
231
+
232
+ // Stop tracking
233
+ stopTracking();
234
+ }
235
+ });
236
+
237
+ // Reset button
238
+ resetBtn.addEventListener('click', function() {
239
+ selectedZone = null;
240
+ isLocked = false;
241
+
242
+ // Reset UI
243
+ targetArea.classList.add('hidden');
244
+ selectedAreaDisplay.textContent = 'Aucune zone sélectionnée';
245
+ document.querySelectorAll('.body-zone').forEach(el => {
246
+ el.style.backgroundColor = 'rgba(239, 68, 68, 0.3)';
247
+ });
248
+
249
+ lockBtn.innerHTML = '<i class="fas fa-lock"></i><span>Verrouiller</span>';
250
+ lockBtn.classList.remove('bg-green-600', 'hover:bg-green-700');
251
+ lockBtn.classList.add('bg-blue-600', 'hover:bg-blue-700');
252
+
253
+ // Stop tracking
254
+ stopTracking();
255
+ });
256
+
257
+ // Help modal
258
+ helpBtn.addEventListener('click', function() {
259
+ helpModal.classList.remove('hidden');
260
+ });
261
+
262
+ closeHelp.addEventListener('click', function() {
263
+ helpModal.classList.add('hidden');
264
+ });
265
+
266
+ helpModal.addEventListener('click', function(e) {
267
+ if (e.target === helpModal) {
268
+ helpModal.classList.add('hidden');
269
+ }
270
+ });
271
+
272
+ // Device orientation tracking (simulated)
273
+ function startTracking() {
274
+ // In a real app, you would use DeviceOrientationEvent
275
+ // This is a simulation for demonstration
276
+ let angle = 0;
277
+
278
+ deviceOrientationHandler = setInterval(() => {
279
+ // Simulate small movements
280
+ angle += 0.05;
281
+ const offsetX = Math.sin(angle) * 2; // 2% movement
282
+ const offsetY = Math.cos(angle) * 1; // 1% movement
283
+
284
+ targetArea.style.left = `${selectedZone.x + offsetX}%`;
285
+ targetArea.style.top = `${selectedZone.y + offsetY}%`;
286
+ }, 100);
287
+ }
288
+
289
+ function stopTracking() {
290
+ if (deviceOrientationHandler) {
291
+ clearInterval(deviceOrientationHandler);
292
+ deviceOrientationHandler = null;
293
+
294
+ // Reset target position
295
+ if (selectedZone) {
296
+ targetArea.style.left = `${selectedZone.x}%`;
297
+ targetArea.style.top = `${selectedZone.y}%`;
298
+ }
299
+ }
300
+ }
301
+
302
+ // Request permission for device orientation (in a real app)
303
+ function requestPermission() {
304
+ if (typeof DeviceOrientationEvent !== 'undefined' &&
305
+ typeof DeviceOrientationEvent.requestPermission === 'function') {
306
+ DeviceOrientationEvent.requestPermission()
307
+ .then(response => {
308
+ if (response === 'granted') {
309
+ window.addEventListener('deviceorientation', handleOrientation);
310
+ }
311
+ })
312
+ .catch(console.error);
313
+ }
314
+ }
315
+
316
+ // Handle real device orientation (not implemented in this demo)
317
+ function handleOrientation(event) {
318
+ // This would be implemented in a real app
319
+ // Using beta (front-to-back) and gamma (left-to-right) angles
320
+ // to adjust the target position
321
+ }
322
+ });
323
+ </script>
324
+ <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=SulfuceNoir/ff-cheat" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
325
+ </html>