Edoruin commited on
Commit
d7dcd2f
·
1 Parent(s): 1636f39

Fixed iphone video reproduction and responsive issues

Browse files
app/static/css/style.css CHANGED
@@ -29,6 +29,21 @@ body {
29
  color: var(--text-main);
30
  min-height: 100vh;
31
  line-height: 1.6;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  }
33
 
34
  /* EFECTO GLASSMORFISMO
@@ -47,7 +62,7 @@ body {
47
  position: sticky;
48
  top: 0;
49
  z-index: 100;
50
- padding: 1rem 2rem;
51
  margin-bottom: 2rem;
52
  }
53
 
@@ -163,7 +178,14 @@ body {
163
  .content-wrapper {
164
  max-width: 1000px;
165
  margin: 0 auto;
166
- padding: 0 2rem 4rem;
 
 
 
 
 
 
 
167
  }
168
 
169
  /* TARJETAS DE NAVEGACIÓN (Dashboard) */
@@ -264,6 +286,29 @@ input:focus {
264
  border-color: var(--accent);
265
  }
266
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
267
  /* SISTEMA DE NOTIFICACIONES FLOTANTES */
268
  #notification-container {
269
  position: fixed;
@@ -339,10 +384,33 @@ input:focus {
339
  grid-template-columns: 1fr 2fr 100px auto;
340
  gap: 1rem;
341
  align-items: flex-end;
342
- margin-bottom: 1rem;
 
343
  }
344
 
345
  /* Adaptabilidad para móviles */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
346
  /* MODALES */
347
  .receipt-modal {
348
  position: fixed;
@@ -378,5 +446,37 @@ input:focus {
378
 
379
  .receipt-modal {
380
  padding: 1.5rem;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
381
  }
382
  }
 
29
  color: var(--text-main);
30
  min-height: 100vh;
31
  line-height: 1.6;
32
+ overflow-x: hidden;
33
+ /* Evitar scroll lateral indeseado */
34
+ }
35
+
36
+ h1 {
37
+ font-size: clamp(1.5rem, 5vw, 2.5rem);
38
+ font-family: 'Outfit', sans-serif;
39
+ }
40
+
41
+ h2 {
42
+ font-size: clamp(1.2rem, 4vw, 2rem);
43
+ }
44
+
45
+ h3 {
46
+ font-size: clamp(1rem, 3vw, 1.5rem);
47
  }
48
 
49
  /* EFECTO GLASSMORFISMO
 
62
  position: sticky;
63
  top: 0;
64
  z-index: 100;
65
+ padding: 0.8rem 1rem;
66
  margin-bottom: 2rem;
67
  }
68
 
 
178
  .content-wrapper {
179
  max-width: 1000px;
180
  margin: 0 auto;
181
+ padding: 0 1rem 4rem;
182
+ /* Reducir padding lateral en móviles */
183
+ }
184
+
185
+ @media (min-width: 768px) {
186
+ .content-wrapper {
187
+ padding: 0 2rem 4rem;
188
+ }
189
  }
190
 
191
  /* TARJETAS DE NAVEGACIÓN (Dashboard) */
 
286
  border-color: var(--accent);
287
  }
288
 
289
+ .responsive-container {
290
+ padding: 1.5rem;
291
+ }
292
+
293
+ @media (min-width: 768px) {
294
+ .responsive-container {
295
+ padding: 2.5rem;
296
+ }
297
+ }
298
+
299
+ .time-grid {
300
+ display: grid;
301
+ grid-template-columns: 1fr 1fr;
302
+ gap: 1rem;
303
+ }
304
+
305
+ @media (max-width: 480px) {
306
+ .time-grid {
307
+ grid-template-columns: 1fr;
308
+ gap: 0.5rem;
309
+ }
310
+ }
311
+
312
  /* SISTEMA DE NOTIFICACIONES FLOTANTES */
313
  #notification-container {
314
  position: fixed;
 
384
  grid-template-columns: 1fr 2fr 100px auto;
385
  gap: 1rem;
386
  align-items: flex-end;
387
+ margin-bottom: 1.5rem;
388
+ /* Más espacio entre filas en móvil */
389
  }
390
 
391
  /* Adaptabilidad para móviles */
392
+ @media (max-width: 768px) {
393
+ .item-row {
394
+ grid-template-columns: 1fr;
395
+ padding-bottom: 1rem;
396
+ border-bottom: 1px solid var(--glass-border);
397
+ }
398
+
399
+ .item-row .form-group {
400
+ margin-bottom: 0.5rem;
401
+ }
402
+
403
+ .repo-item {
404
+ flex-direction: column;
405
+ align-items: flex-start;
406
+ gap: 1rem;
407
+ }
408
+
409
+ .repo-item .btn {
410
+ width: 100%;
411
+ }
412
+ }
413
+
414
  /* MODALES */
415
  .receipt-modal {
416
  position: fixed;
 
446
 
447
  .receipt-modal {
448
  padding: 1.5rem;
449
+ width: 90%;
450
+ }
451
+
452
+ .navbar {
453
+ padding: 0.5rem 1rem;
454
+ }
455
+
456
+ .nav-logo span {
457
+ font-size: 1.1rem;
458
+ /* Logo más pequeño en móvil */
459
+ }
460
+
461
+ .card-grid {
462
+ grid-template-columns: 1fr;
463
+ /* Forzar una columna en móviles muy pequeños */
464
+ gap: 1rem;
465
+ }
466
+
467
+ .hero.section {
468
+ padding: 2rem 1rem 1rem;
469
+ text-align: center;
470
+ }
471
+
472
+ #notification-container {
473
+ right: 1rem;
474
+ left: 1rem;
475
+ bottom: 1rem;
476
+ }
477
+
478
+ .notification {
479
+ padding: 0.8rem 1rem;
480
+ font-size: 0.9rem;
481
  }
482
  }
app/templates/asistencia.html CHANGED
@@ -6,7 +6,7 @@
6
  <p class="text-dim">Reconocimiento facial en tiempo real para el Maker Space.</p>
7
  </div>
8
 
9
- <div class="attendance-container glass" style="padding: 2rem; border-radius: 1rem; max-width: 800px; margin: 0 auto;">
10
  <div id="loading-overlay" style="text-align: center; padding: 2rem;">
11
  <i class="fas fa-spinner fa-spin fa-3x" style="color: #38bdf8;"></i>
12
  <p style="margin-top: 1rem;">Cargando modelos de IA...</p>
@@ -14,17 +14,19 @@
14
 
15
  <div id="camera-container"
16
  style="position: relative; display: none; margin-bottom: 2rem; border-radius: 0.5rem; overflow: hidden; background: #000;">
17
- <video id="video" width="720" height="560" autoplay muted
18
  style="width: 100%; height: auto; display: block;"></video>
19
  <canvas id="overlay" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;"></canvas>
20
  </div>
21
 
22
- <div class="controls-grid" style="display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1rem;">
23
- <button id="btn-attendance" class="btn glass active" style="background: #10b981; color: white;">
24
- <i class="fas fa-id-card"></i> MODO ASISTENCIA
 
 
25
  </button>
26
- <button id="btn-register" class="btn glass">
27
- <i class="fas fa-user-plus"></i> REGISTRAR ROSTRO
28
  </button>
29
  </div>
30
 
@@ -152,9 +154,11 @@
152
  }
153
 
154
  function startVideo() {
155
- navigator.mediaDevices.getUserMedia({ video: {} })
156
  .then(stream => {
157
  video.srcObject = stream;
 
 
158
  loadingOverlay.style.display = 'none';
159
  cameraContainer.style.display = 'block';
160
  detectionActive = true;
@@ -285,17 +289,23 @@
285
  </script>
286
 
287
  <style>
288
- .btn.active {
289
- border: 1px solid white;
290
- }
 
291
 
292
- .controls-grid .btn {
293
- padding: 1rem;
294
- border-radius: 0.5rem;
295
- }
296
 
297
- input.glass::placeholder {
298
- color: rgba(255, 255, 255, 0.4);
 
 
 
 
 
 
299
  }
300
  </style>
301
  {% endblock %}
 
6
  <p class="text-dim">Reconocimiento facial en tiempo real para el Maker Space.</p>
7
  </div>
8
 
9
+ <div class="attendance-container glass" style="padding: 1rem; border-radius: 1rem; max-width: 800px; margin: 0 auto;">
10
  <div id="loading-overlay" style="text-align: center; padding: 2rem;">
11
  <i class="fas fa-spinner fa-spin fa-3x" style="color: #38bdf8;"></i>
12
  <p style="margin-top: 1rem;">Cargando modelos de IA...</p>
 
14
 
15
  <div id="camera-container"
16
  style="position: relative; display: none; margin-bottom: 2rem; border-radius: 0.5rem; overflow: hidden; background: #000;">
17
+ <video id="video" width="720" height="560" autoplay muted playsinline webkit-playsinline
18
  style="width: 100%; height: auto; display: block;"></video>
19
  <canvas id="overlay" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;"></canvas>
20
  </div>
21
 
22
+ <div class="controls-grid"
23
+ style="display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.8rem; margin-top: 1rem;">
24
+ <button id="btn-attendance" class="btn glass active"
25
+ style="background: #10b981; color: white; padding: 0.8rem;">
26
+ <i class="fas fa-id-card"></i> <span class="hide-mobile">MODO</span> ASISTENCIA
27
  </button>
28
+ <button id="btn-register" class="btn glass" style="padding: 0.8rem;">
29
+ <i class="fas fa-user-plus"></i> <span class="hide-mobile">REGISTRAR</span> ROSTRO
30
  </button>
31
  </div>
32
 
 
154
  }
155
 
156
  function startVideo() {
157
+ navigator.mediaDevices.getUserMedia({ video: { facingMode: "user" } })
158
  .then(stream => {
159
  video.srcObject = stream;
160
+ video.setAttribute('playsinline', true);
161
+ video.play(); // Forzar play para navegadores móviles
162
  loadingOverlay.style.display = 'none';
163
  cameraContainer.style.display = 'block';
164
  detectionActive = true;
 
289
  </script>
290
 
291
  <style>
292
+ @media (max-width: 480px) {
293
+ .hide-mobile {
294
+ display: none;
295
+ }
296
 
297
+ .attendance-container {
298
+ padding: 0.8rem !important;
299
+ }
 
300
 
301
+ .controls-grid {
302
+ grid-template-columns: 1fr 1fr !important;
303
+ }
304
+
305
+ .btn {
306
+ font-size: 0.8rem;
307
+ padding: 0.6rem !important;
308
+ }
309
  }
310
  </style>
311
  {% endblock %}
app/templates/prestamos.html CHANGED
@@ -8,7 +8,7 @@
8
  </div>
9
 
10
  <!-- Formulario de Solicitud de Préstamo -->
11
- <div class="glass" style="padding: 2rem; border-radius: 24px; margin-bottom: 3rem;">
12
  <form id="loan-form">
13
  <div class="form-group">
14
  <label for="solicitante">Nombre del solicitante</label>
@@ -16,7 +16,7 @@
16
  </div>
17
 
18
  <!-- Selección de Horarios (AST/Republica Dominicana) -->
19
- <div style="display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;">
20
  <div class="form-group">
21
  <label for="hora_salida">Hora Salida</label>
22
  <select id="hora_salida" name="hora_salida">
 
8
  </div>
9
 
10
  <!-- Formulario de Solicitud de Préstamo -->
11
+ <div class="glass responsive-container" style="border-radius: 24px; margin-bottom: 3rem;">
12
  <form id="loan-form">
13
  <div class="form-group">
14
  <label for="solicitante">Nombre del solicitante</label>
 
16
  </div>
17
 
18
  <!-- Selección de Horarios (AST/Republica Dominicana) -->
19
+ <div class="time-grid">
20
  <div class="form-group">
21
  <label for="hora_salida">Hora Salida</label>
22
  <select id="hora_salida" name="hora_salida">