Spaces:
Runtime error
Runtime error
Update templates/index.html
Browse files- templates/index.html +20 -8
templates/index.html
CHANGED
@@ -29,24 +29,36 @@
|
|
29 |
color: gray;
|
30 |
margin-top: 5px;
|
31 |
}
|
32 |
-
#processing-
|
33 |
-
display: none; /* Ocultamos el
|
34 |
-
color: yellow; /* Color del mensaje */
|
35 |
-
font-weight: bold; /* Estilo del mensaje */
|
36 |
margin-top: 10px; /* Espaciado */
|
37 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
</style>
|
39 |
</head>
|
40 |
<body>
|
41 |
<div class="container">
|
42 |
<h1>An谩lisis de Comentarios de YouTube</h1>
|
43 |
<h2>by Cuauht茅moc Bautista</h2>
|
44 |
-
<form method="POST" action="/" onsubmit="
|
45 |
<label for="url">Ingresa una URL de un video de YouTube:</label>
|
46 |
<input type="text" id="url" name="url" required>
|
47 |
<button type="submit">Analizar</button>
|
48 |
</form>
|
49 |
-
<div id="processing-
|
|
|
|
|
|
|
50 |
{% if video_details %}
|
51 |
<div class="video-details">
|
52 |
<h2>Detalles del Video</h2>
|
@@ -73,8 +85,8 @@
|
|
73 |
{% endif %}
|
74 |
</div>
|
75 |
<script>
|
76 |
-
function
|
77 |
-
document.getElementById("processing-
|
78 |
}
|
79 |
</script>
|
80 |
</body>
|
|
|
29 |
color: gray;
|
30 |
margin-top: 5px;
|
31 |
}
|
32 |
+
#processing-spinner {
|
33 |
+
display: none; /* Ocultamos el spinner inicialmente */
|
|
|
|
|
34 |
margin-top: 10px; /* Espaciado */
|
35 |
}
|
36 |
+
.spinner {
|
37 |
+
border: 4px solid rgba(255, 255, 255, 0.3);
|
38 |
+
border-left-color: #ffffff; /* Color del spinner */
|
39 |
+
border-radius: 50%;
|
40 |
+
width: 30px;
|
41 |
+
height: 30px;
|
42 |
+
animation: spin 1s linear infinite; /* Animaci贸n de giro */
|
43 |
+
}
|
44 |
+
@keyframes spin {
|
45 |
+
to { transform: rotate(360deg); } /* Giro completo */
|
46 |
+
}
|
47 |
</style>
|
48 |
</head>
|
49 |
<body>
|
50 |
<div class="container">
|
51 |
<h1>An谩lisis de Comentarios de YouTube</h1>
|
52 |
<h2>by Cuauht茅moc Bautista</h2>
|
53 |
+
<form method="POST" action="/" onsubmit="showProcessingSpinner()">
|
54 |
<label for="url">Ingresa una URL de un video de YouTube:</label>
|
55 |
<input type="text" id="url" name="url" required>
|
56 |
<button type="submit">Analizar</button>
|
57 |
</form>
|
58 |
+
<div id="processing-spinner" aria-live="polite">
|
59 |
+
<div class="spinner"></div> <!-- Spinner de carga -->
|
60 |
+
Procesando, por favor espere...
|
61 |
+
</div>
|
62 |
{% if video_details %}
|
63 |
<div class="video-details">
|
64 |
<h2>Detalles del Video</h2>
|
|
|
85 |
{% endif %}
|
86 |
</div>
|
87 |
<script>
|
88 |
+
function showProcessingSpinner() {
|
89 |
+
document.getElementById("processing-spinner").style.display = "block"; // Mostrar el spinner
|
90 |
}
|
91 |
</script>
|
92 |
</body>
|