Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5b6352b4ee | |||
| 7e1344a395 | |||
| db5061ec7f | |||
| 737b76e83b | |||
| 3705a9ea9e | |||
| 72134b405c | |||
| 91056a05d9 | |||
| 18a56e0bbd | |||
| ed7067161a | |||
| d3e523ad73 | |||
| 77249ba51b | |||
| 95f7d8dad6 |
+1
-1
@@ -71,7 +71,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancelar</button>
|
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancelar</button>
|
||||||
<button type="button" class="btn btn-kahoot-login" id="btnCrearSala">Crear sala</button>
|
<button type="button" class="btn btn-kahoot-register" id="btnCrearSala">Crear sala</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,79 +1,118 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
session_start();
|
session_start();
|
||||||
|
|
||||||
require_once '../clases/claseJuego.php';
|
require_once '../clases/claseJuego.php';
|
||||||
|
|
||||||
header('Content-Type: application/json; charset=utf-8');
|
header('Content-Type: application/json; charset=utf-8');
|
||||||
|
|
||||||
// Hay que estar logueado y decir de qué partida se trata
|
// Comprobamos que haya un usuario conectado
|
||||||
|
|
||||||
if (!isset($_SESSION['idUsuario'])) {
|
if (!isset($_SESSION['idUsuario'])) {
|
||||||
echo json_encode(['error' => 'Debes iniciar sesión para jugar.']);
|
echo json_encode([
|
||||||
|
'error' => 'Debes iniciar sesión para jugar.'
|
||||||
|
]);
|
||||||
|
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
$idUsuario = (int) $_SESSION['idUsuario'];
|
$idUsuario = (int) $_SESSION['idUsuario'];
|
||||||
$idPartida = intval($_POST['idPartida'] ?? 0);
|
|
||||||
|
|
||||||
if ($idPartida <= 0) {
|
// Comprobamos que se haya indicado la partida
|
||||||
echo json_encode(['error' => 'No se ha indicado la partida.']);
|
|
||||||
|
if (!isset($_POST['idPartida'])) {
|
||||||
|
echo json_encode([
|
||||||
|
'error' => 'No se ha indicado la partida.'
|
||||||
|
]);
|
||||||
|
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Solo pueden jugar los usuarios que están en uno de los equipos de la partida
|
$idPartida = intval($_POST['idPartida']);
|
||||||
|
|
||||||
|
if ($idPartida <= 0) {
|
||||||
|
echo json_encode([
|
||||||
|
'error' => 'La partida indicada no es válida.'
|
||||||
|
]);
|
||||||
|
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comprobamos que el usuario pertenezca a la partida
|
||||||
|
|
||||||
$perteneceAPartida = Juego::usuarioEnPartida($idPartida,$idUsuario);
|
$perteneceAPartida = Juego::usuarioEnPartida($idPartida,$idUsuario);
|
||||||
|
|
||||||
if (is_array($perteneceAPartida)) {
|
if (is_array($perteneceAPartida)) {
|
||||||
echo json_encode($perteneceAPartida);
|
echo json_encode($perteneceAPartida);
|
||||||
|
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!$perteneceAPartida) {
|
if (!$perteneceAPartida) {
|
||||||
echo json_encode(['error' => 'No formas parte de esta partida.']);
|
echo json_encode([
|
||||||
|
'error' => 'No formas parte de esta partida.'
|
||||||
|
]);
|
||||||
|
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Comprobamos la orden
|
||||||
|
|
||||||
switch ($_POST['orden'] ?? '') {
|
$orden = $_POST['orden'] ?? '';
|
||||||
|
|
||||||
|
switch ($orden) {
|
||||||
|
|
||||||
|
// CARGAR LAS PREGUNTAS DE LA PARTIDA
|
||||||
|
|
||||||
// Devuelve las 10 preguntas con sus respuestas (sin marcar la correcta)
|
|
||||||
case 'cargarPreguntas':
|
case 'cargarPreguntas':
|
||||||
|
|
||||||
echo json_encode(Juego::cargarPreguntas($idPartida, $idUsuario));
|
$resultado = Juego::cargarPreguntas($idPartida, $idUsuario);
|
||||||
|
echo json_encode($resultado);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
// REGISTRAR RESPUESTA
|
||||||
|
|
||||||
// Guarda la respuesta del usuario y dice si ha acertado
|
|
||||||
case 'responder':
|
case 'responder':
|
||||||
|
|
||||||
$idPartidaxPregunta = intval($_POST['idPartidaxPregunta'] ?? 0);
|
if (!isset($_POST['idPartidaxPregunta']) || !isset($_POST['idRespuesta'])){
|
||||||
$idRespuesta = intval($_POST['idRespuesta'] ?? 0);
|
echo json_encode([
|
||||||
|
'error' => 'Faltan datos para registrar la respuesta.'
|
||||||
|
]);
|
||||||
|
|
||||||
if ($idPartidaxPregunta <= 0 || $idRespuesta <= 0) {
|
|
||||||
echo json_encode(['error' => 'Faltan datos para registrar la respuesta.']);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
echo json_encode(
|
$idPartidaxPregunta = intval($_POST['idPartidaxPregunta']);
|
||||||
Juego::registrarRespuesta(
|
|
||||||
$idPartida,
|
$idRespuesta = intval($_POST['idRespuesta']);
|
||||||
$idUsuario,
|
|
||||||
$idPartidaxPregunta,
|
if ($idPartidaxPregunta <= 0 || $idRespuesta <= 0){
|
||||||
$idRespuesta
|
|
||||||
)
|
echo json_encode([
|
||||||
);
|
'error' => 'Los datos de la respuesta no son válidos.'
|
||||||
|
]);
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Registramos la respuesta del usuario
|
||||||
|
|
||||||
|
$resultado = Juego::registrarRespuesta($idPartida, $idUsuario, $idPartidaxPregunta, $idRespuesta);
|
||||||
|
|
||||||
|
echo json_encode($resultado);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
// Finalizar la partida y registrar los aciertos del usuario
|
||||||
|
|
||||||
// Recibe los aciertos del jugador al terminar sus 10 preguntas,
|
|
||||||
// para que resultados.php los pueda usar al montar la hoja de resultados
|
|
||||||
case 'finalizarPartida':
|
case 'finalizarPartida':
|
||||||
|
|
||||||
$aciertos = intval($_POST['aciertos'] ?? 0);
|
$aciertos = intval($_POST['aciertos'] ?? 0);
|
||||||
|
|
||||||
|
// Guardamos los aciertos en la sesión
|
||||||
|
|
||||||
if (!isset($_SESSION['aciertosPorPartida'])) {
|
if (!isset($_SESSION['aciertosPorPartida'])) {
|
||||||
|
|
||||||
$_SESSION['aciertosPorPartida'] = [];
|
$_SESSION['aciertosPorPartida'] = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -81,16 +120,21 @@ switch ($_POST['orden'] ?? '') {
|
|||||||
|
|
||||||
echo json_encode([
|
echo json_encode([
|
||||||
'exito' => 'Aciertos registrados correctamente.',
|
'exito' => 'Aciertos registrados correctamente.',
|
||||||
|
|
||||||
'idPartida' => $idPartida,
|
'idPartida' => $idPartida,
|
||||||
|
|
||||||
'aciertos' => $aciertos
|
'aciertos' => $aciertos
|
||||||
]);
|
]);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
echo json_encode(['error' => 'La orden indicada no existe.']);
|
echo json_encode([
|
||||||
|
'error' => 'La orden indicada no existe.'
|
||||||
|
]);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
|||||||
@@ -77,8 +77,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.btn-unirse:hover {
|
.btn-unirse:hover {
|
||||||
background-color: #0f56ab;
|
background-color: #1f6f09;
|
||||||
color: white;
|
color: white;
|
||||||
|
transform: translateY(-2px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal-kahoot {
|
.modal-kahoot {
|
||||||
|
|||||||
@@ -401,3 +401,18 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.modal-kahoot {
|
||||||
|
border: none;
|
||||||
|
border-radius: 20px;
|
||||||
|
overflow: hidden;
|
||||||
|
box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-kahoot-header {
|
||||||
|
background-color: var(--kahoot-purple);
|
||||||
|
color: white;
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
+9
-64
@@ -3,43 +3,6 @@ let usuarioYaEstaEnEquipo = false;
|
|||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
comprobarSalaUsuario();
|
comprobarSalaUsuario();
|
||||||
});
|
});
|
||||||
// ==========================================================================
|
|
||||||
// DETECTOR DE INICIO DE PARTIDA PARA JUGADORES INVITADOS (1 VS 1)
|
|
||||||
// ==========================================================================
|
|
||||||
$(document).ready(function () {
|
|
||||||
// Solo activamos el vigilante si estamos en la página del buscador de salas
|
|
||||||
if (window.location.pathname.includes("buscadorSala.php")) {
|
|
||||||
setInterval(function () {
|
|
||||||
// 1. Preguntamos al servidor en qué partida está metido el usuario actual
|
|
||||||
$.ajax({
|
|
||||||
url: "controladores/controladorEquipoxUsuario.php",
|
|
||||||
type: "POST",
|
|
||||||
dataType: "json",
|
|
||||||
data: { orden: "obtenerSalaUsuario" },
|
|
||||||
success: function (sala) {
|
|
||||||
// Si el usuario está metido en una sala/partida activa...
|
|
||||||
if (sala.asociado && sala.idPartida) {
|
|
||||||
// 2. Comprobamos si el anfitrión ya ha iniciado esa partida concreta
|
|
||||||
$.ajax({
|
|
||||||
url: "controladores/controladorPartida.php",
|
|
||||||
type: "POST",
|
|
||||||
dataType: "json",
|
|
||||||
data: { orden: "buscar", idPartida: sala.idPartida },
|
|
||||||
success: function (partida) {
|
|
||||||
// Si 'fechaInicio' ya no es null, significa que el host le dio a "Jugar"
|
|
||||||
if (partida && partida.fechaInicio !== null) {
|
|
||||||
// Redirigimos instantáneamente al invitado a la pantalla del juego
|
|
||||||
window.location.href =
|
|
||||||
"juego.php?idPartida=" + sala.idPartida;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}, 2000); // Comprueba el estado de la partida automáticamente cada 2 segundos
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// 1. Comprobar si el usuario actual ya pertenece a una sala
|
// 1. Comprobar si el usuario actual ya pertenece a una sala
|
||||||
function comprobarSalaUsuario() {
|
function comprobarSalaUsuario() {
|
||||||
@@ -216,11 +179,11 @@ function mostrarSala(partida, equipos, jugadores) {
|
|||||||
|
|
||||||
// Solo el host puede iniciar la partida
|
// Solo el host puede iniciar la partida
|
||||||
if (esHost) {
|
if (esHost) {
|
||||||
// Así debe renderizarse el botón del host dentro de tu función mostrarSala() para que el AJAX funcione:
|
|
||||||
botonIniciarHTML = `
|
botonIniciarHTML = `
|
||||||
<button type="button" id="btnInicioJuego" data-id-partida="${partida.idPartida}" class="btn btn-success btn-lg px-4">
|
<a href="juego.php?idPartida=${partida.idPartida}"
|
||||||
|
class="btn btn-success btn-lg px-4">
|
||||||
<i class="bi bi-controller"></i> ¡Iniciar Partida!
|
<i class="bi bi-controller"></i> ¡Iniciar Partida!
|
||||||
</button>
|
</a>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -303,8 +266,7 @@ let botonAbandonarReferencia = null;
|
|||||||
$(document).on("click", ".btn-abandonar-sala", function () {
|
$(document).on("click", ".btn-abandonar-sala", function () {
|
||||||
botonAbandonarReferencia = $(this);
|
botonAbandonarReferencia = $(this);
|
||||||
|
|
||||||
const esHost =
|
const esHost = $(this).data("es-host") === true || $(this).data("es-host") === "true";
|
||||||
$(this).data("es-host") === true || $(this).data("es-host") === "true";
|
|
||||||
const titulo = $("#modalAbandonarSalaLabel");
|
const titulo = $("#modalAbandonarSalaLabel");
|
||||||
const mensaje = $("#modalAbandonarSalaMensaje");
|
const mensaje = $("#modalAbandonarSalaMensaje");
|
||||||
const botonConfirmar = $("#btnConfirmarAbandonar");
|
const botonConfirmar = $("#btnConfirmarAbandonar");
|
||||||
@@ -314,10 +276,12 @@ $(document).on("click", ".btn-abandonar-sala", function () {
|
|||||||
mensaje.text(
|
mensaje.text(
|
||||||
"Si abandonas la sala como anfitrión, la partida terminará para todos los jugadores.",
|
"Si abandonas la sala como anfitrión, la partida terminará para todos los jugadores.",
|
||||||
);
|
);
|
||||||
botonConfirmar.text("Sí, abandonar");
|
botonConfirmar.text("Sí, terminar partida");
|
||||||
} else {
|
} else {
|
||||||
titulo.text("¿Abandonar la sala?");
|
titulo.text("¿Abandonar la sala?");
|
||||||
mensaje.text("Si sales de la sala, perderás tu lugar en el equipo.");
|
mensaje.text(
|
||||||
|
"Si sales de la sala, perderás tu lugar en el equipo.",
|
||||||
|
);
|
||||||
botonConfirmar.text("Sí, salir");
|
botonConfirmar.text("Sí, salir");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -328,6 +292,7 @@ $(document).on("click", ".btn-abandonar-sala", function () {
|
|||||||
modal.show();
|
modal.show();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
// B. Al hacer clic en "Sí, salir" dentro del modal Kahoot
|
// B. Al hacer clic en "Sí, salir" dentro del modal Kahoot
|
||||||
$(document).on("click", "#btnConfirmarAbandonar", function () {
|
$(document).on("click", "#btnConfirmarAbandonar", function () {
|
||||||
const modalEl = document.getElementById("modalAbandonarSala");
|
const modalEl = document.getElementById("modalAbandonarSala");
|
||||||
@@ -438,7 +403,6 @@ $("#btnCrearSala").on("click", function () {
|
|||||||
|
|
||||||
if (respuesta.exito) {
|
if (respuesta.exito) {
|
||||||
$("#modalCrearSala").modal("hide");
|
$("#modalCrearSala").modal("hide");
|
||||||
|
|
||||||
location.reload();
|
location.reload();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -469,22 +433,3 @@ $(document).on("input", ".input-kahoot", function () {
|
|||||||
$(this).removeClass("is-invalid");
|
$(this).removeClass("is-invalid");
|
||||||
$(this).next(".mensaje-error-sala").remove();
|
$(this).next(".mensaje-error-sala").remove();
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).on("click", "#btnInicioJuego", function () {
|
|
||||||
// 1. Capturamos el id de la partida de forma dinámica desde el botón que se ha pulsado
|
|
||||||
const idPartida = $(this).data("id-partida");
|
|
||||||
|
|
||||||
// 2. Enviamos la petición AJAX adecuada con TODOS los datos que el controlador espera recibir
|
|
||||||
$.ajax({
|
|
||||||
url: "controladores/controladorPartida.php",
|
|
||||||
type: "POST",
|
|
||||||
dataType: "json",
|
|
||||||
data: {
|
|
||||||
orden: "iniciar",
|
|
||||||
idPartida: idPartida,
|
|
||||||
},
|
|
||||||
error: function (error) {
|
|
||||||
console.error("Error al iniciar el juego por AJAX:", error);
|
|
||||||
},
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|||||||
+5
-5
@@ -36,11 +36,11 @@ function renderizarTablaRanking(jugadores) {
|
|||||||
<thead class="table-dark">
|
<thead class="table-dark">
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col" style="width: 10%;">#</th>
|
<th scope="col" style="width: 10%;">#</th>
|
||||||
<th scope="col" class="text-start" style="width: 35%;">Jugador</th>
|
<th scope="col" class="text-start" style="width: 30%;"><i class="fa-solid fa-user"></i> <br> Jugador</th>
|
||||||
<th scope="col" style="width: 15%;"><i class="fa-solid fa-trophy text-warning me-1"></i> Vic</th>
|
<th scope="col" style="width: 15%;"><i class="fa-solid fa-trophy text-warning me-1"></i> <br> Victorias</th>
|
||||||
<th scope="col" style="width: 15%;"><i class="fa-solid fa-xmark text-danger me-1"></i> Der</th>
|
<th scope="col" style="width: 15%;"><i class="fa-solid fa-xmark text-danger me-1"></i> <br> Derrotas</th>
|
||||||
<th scope="col" style="width: 15%;"><i class="fa-solid fa-bullseye text-success me-1"></i> Aciertos</th>
|
<th scope="col" style="width: 15%;"><i class="fa-solid fa-bullseye text-success me-1"></i> <br> Aciertos</th>
|
||||||
<th scope="col" style="width: 10%;"><i class="fa-solid fa-percent text-info me-1"></i> % Vic</th>
|
<th scope="col" style="width: 15%;"><i class="fa-solid fa-medal text-info me-1"></i> <br> Efectividad</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|||||||
+13
-1
@@ -20,7 +20,18 @@ let bloqueado = false; // true mientras se envía una respuesta o se ve el feedb
|
|||||||
let numeroAciertos = 0; // número de aciertos del jugador
|
let numeroAciertos = 0; // número de aciertos del jugador
|
||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
idPartida = parseInt($("body").data("id-partida"), 10);
|
|
||||||
|
// Obtenemos el idPartida de la URL
|
||||||
|
// Ejemplo: juego.php?idPartida=3
|
||||||
|
|
||||||
|
const parametros = new URLSearchParams(window.location.search);
|
||||||
|
|
||||||
|
idPartida = parseInt(parametros.get("idPartida"), 10);
|
||||||
|
|
||||||
|
if (!idPartida || idPartida < 1) {
|
||||||
|
mostrarError("La partida indicada no es válida.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Un solo listener para todos los botones de respuesta
|
// Un solo listener para todos los botones de respuesta
|
||||||
$("#respuestas").on("click", ".btn-answer", function () {
|
$("#respuestas").on("click", ".btn-answer", function () {
|
||||||
@@ -103,6 +114,7 @@ function responder($botonPulsado) {
|
|||||||
if (bloqueado) {
|
if (bloqueado) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
bloqueado = true;
|
bloqueado = true;
|
||||||
|
|
||||||
const pregunta = preguntas[indice];
|
const pregunta = preguntas[indice];
|
||||||
|
|||||||
@@ -1,22 +1,6 @@
|
|||||||
<?php
|
|
||||||
session_start();
|
|
||||||
|
|
||||||
// Hay que estar logueado para jugar
|
|
||||||
if (!isset($_SESSION['idUsuario'])) {
|
|
||||||
header('Location: index.php');
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
// La partida llega por la URL: juego.php?idPartida=3
|
|
||||||
$idPartida = filter_input(INPUT_GET, 'idPartida', FILTER_VALIDATE_INT);
|
|
||||||
|
|
||||||
if (!$idPartida || $idPartida < 1) {
|
|
||||||
header('Location: buscadorSala.php');
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="es">
|
<html lang="es">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
@@ -24,28 +8,48 @@ if (!$idPartida || $idPartida < 1) {
|
|||||||
<title>Proyecto Trivial</title>
|
<title>Proyecto Trivial</title>
|
||||||
<link rel="stylesheet" href="css/juego.css">
|
<link rel="stylesheet" href="css/juego.css">
|
||||||
<link rel="icon" type="image/svg+xml" href="img/favicon/favicon.svg">
|
<link rel="icon" type="image/svg+xml" href="img/favicon/favicon.svg">
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
<body data-id-partida="<?= (int)$idPartida ?>">
|
|
||||||
|
|
||||||
<!-- Progreso: "Pregunta 3 de 10" + barra -->
|
<body>
|
||||||
|
|
||||||
|
<!-- CABECERA Y PROGRESO -->
|
||||||
|
|
||||||
<div class="game-header">
|
<div class="game-header">
|
||||||
<span id="contadorPregunta">Cargando…</span>
|
|
||||||
|
<span id="contadorPregunta">
|
||||||
|
Cargando…
|
||||||
|
</span>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="progress-track">
|
<div class="progress-track">
|
||||||
|
|
||||||
<div class="progress-fill" id="barraProgreso"></div>
|
<div class="progress-fill" id="barraProgreso"></div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Contenedor de la Pregunta (lo rellena js/juego.js) -->
|
<!-- PREGUNTA -->
|
||||||
|
|
||||||
<div class="question-container">
|
<div class="question-container">
|
||||||
<div id="textoPregunta">Cargando preguntas…</div>
|
|
||||||
<div id="feedback" class="feedback" aria-live="polite"></div>
|
<div id="textoPregunta">
|
||||||
|
Cargando preguntas…
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Contenedor de Respuestas (Estilo Kahoot, lo rellena js/juego.js) -->
|
<div id="feedback" class="feedback" aria-live="polite"></div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- RESPUESTAS -->
|
||||||
|
|
||||||
<div class="answers-grid" id="respuestas"></div>
|
<div class="answers-grid" id="respuestas"></div>
|
||||||
|
|
||||||
|
<!-- JAVASCRIPT -->
|
||||||
|
|
||||||
<script src="js/jquery-4.0.0.min.js"></script>
|
<script src="js/jquery-4.0.0.min.js"></script>
|
||||||
<script src="js/juego.js"></script>
|
<script src="js/juego.js"></script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -293,7 +293,7 @@ $avatarUsuario = htmlspecialchars($_SESSION['avatar'] ?? 'img/avatars/defaultPro
|
|||||||
Cancelar
|
Cancelar
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<button type="submit" form="formCrearPregunta" class="btn btn-kahoot-login" id="btnCrearPregunta">
|
<button type="submit" form="formCrearPregunta" class="btn btn-kahoot-register" id="btnCrearPregunta">
|
||||||
<i class="bi bi-check-lg me-1"></i>
|
<i class="bi bi-check-lg me-1"></i>
|
||||||
Crear pregunta
|
Crear pregunta
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
+1
-1
@@ -89,7 +89,7 @@ usort($equiposFinales, function($a, $b) { return $b['puntos'] <=> $a['puntos'];
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>Resultados - Trivial</title>
|
<title>Resultados - Trivial</title>
|
||||||
<link rel="stylesheet" href="css/resultados.css">
|
<link rel="stylesheet" href="css/resultados.css">
|
||||||
<script src="https://jquery.com"></script>
|
<script src="https://cdn.jsdelivr.net/npm/jquery@4.0.0/dist/jquery.min.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body data-id-partida="<?php echo $idPartida; ?>">
|
<body data-id-partida="<?php echo $idPartida; ?>">
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user