Fix Error: Solvento el problema del footer que no mostraba el contenido
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
@keyframes scroll {
|
||||
0% {
|
||||
transform: translateX(100%);
|
||||
transform: translateX(0%);
|
||||
}
|
||||
100% {
|
||||
transform: translateX(-100%);
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
}
|
||||
|
||||
.animate-scroll {
|
||||
display: inline-block;
|
||||
animation: scroll 20s linear infinite;
|
||||
animation: scroll 45s linear infinite;
|
||||
}
|
||||
|
||||
|
||||
|
||||
+21
-12
@@ -1,6 +1,8 @@
|
||||
const sonido = new Audio("/static/media/0457.wav");
|
||||
const estadoAnterior = {};
|
||||
|
||||
let ultimoFooter = "";
|
||||
|
||||
function cargarTabla() {
|
||||
fetch("/api/datos")
|
||||
.then(res => res.json())
|
||||
@@ -8,11 +10,11 @@ function cargarTabla() {
|
||||
const tbody = document.getElementById("turnos");
|
||||
tbody.innerHTML = "";
|
||||
|
||||
let sizeClass ="";
|
||||
if (filas.length <= 7){
|
||||
sizeClass ="text-7xl px-4 py-2";
|
||||
let sizeClass = "";
|
||||
if (filas.length <= 7) {
|
||||
sizeClass = "text-7xl px-4 py-2";
|
||||
} else {
|
||||
sizeClass ="text-5xl px-3 py-1"
|
||||
sizeClass = "text-5xl px-3 py-1"
|
||||
}
|
||||
|
||||
filas.forEach(fila => {
|
||||
@@ -50,7 +52,7 @@ function cargarTabla() {
|
||||
}
|
||||
|
||||
estadoAnterior[id] = estadoTurno;
|
||||
|
||||
|
||||
tr.appendChild(td2);
|
||||
tbody.appendChild(tr);
|
||||
});
|
||||
@@ -58,15 +60,22 @@ function cargarTabla() {
|
||||
}
|
||||
|
||||
function cargarFooter() {
|
||||
fetch("/api/footer")
|
||||
.then(res => res.text())
|
||||
.then(data => {
|
||||
const footerText = document.getElementById("footer-text");
|
||||
footerText.textContent = data.mensaje;
|
||||
});
|
||||
fetch("/api/footer")
|
||||
.then(res => res.text())
|
||||
.then(data => {
|
||||
if (data !== ultimoFooter) {
|
||||
const footerText = document.getElementById("footer-text");
|
||||
const footerTextDuplicate = document.getElementById("footer-text-duplicate");
|
||||
|
||||
footerText.innerHTML = data;
|
||||
footerTextDuplicate.innerHTML = data;
|
||||
|
||||
ultimoFooter = data;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
cargarFooter();
|
||||
cargarTabla();
|
||||
setInterval(cargarTabla, 30000);
|
||||
setInterval(cargarFooter, 60000);
|
||||
setInterval(cargarFooter, 45000);
|
||||
Reference in New Issue
Block a user