This commit is contained in:
2025-10-06 19:38:34 -06:00
parent d596116ab0
commit 20ad0bdb2b
43 changed files with 1444 additions and 42 deletions
+15 -9
View File
@@ -1,6 +1,6 @@
<style>
.fake {
background-image: url(img/bg01.jpg);
background-image: url(img/bg04.jpg);
background-repeat: no-repeat;
background-position: center;
background-size: cover;
@@ -8,7 +8,7 @@
}
.fake1 {
background-image: url(img/bg01.jpg);
background-image: url(img/bg03.jpg);
background-repeat: no-repeat;
background-position: center;
background-size: cover;
@@ -123,6 +123,10 @@
font-weight: bold;
z-index: 10;
}
.btn-reintentar {
cursor: pointer;
}
</style>
<div id="inicio" class='page-sco py-2 py-md-0 h-100'>
<div class='container h-100'>
@@ -281,7 +285,6 @@
$('.btn-comenzar').click(function (e) {
e.preventDefault();
CourseNav.soundClick();
$('.wrap-course-content').addClass('fake1').removeClass('fake');
$('#inicio').hide();
$('#desarrollo').show();
inicializarTodasLasOpciones();
@@ -370,8 +373,8 @@
todasLasOpciones.forEach((opcion, index) => {
const $option = $(`
<div class="draggable-option" draggable="true"
data-correct="${opcion.correct}"
<div class="draggable-option" draggable="true"
data-correct="${opcion.correct}"
data-pregunta-index="${opcion.preguntaIndex}"
data-option-id="${opcion.id}">
<div class="option-text">${opcion.text}</div>
@@ -473,7 +476,7 @@
// Mostrar feedback después de un delay
setTimeout(() => {
mostrarFeedback(isCorrectForCurrentQuestion, currentQuestion);
}, 1000);
}, 250);
}
function mostrarFeedback(isCorrect, pregunta) {
@@ -503,7 +506,7 @@
if (currentQuestionIndex >= questions.length) {
setTimeout(() => {
finalizarJuego();
}, 700);
}, 500);
} else {
preguntasActual++;
mostrarPregunta();
@@ -522,8 +525,11 @@
const porcentaje = (preguntasCorrectas / questions.length) * 100;
const aprobado = porcentaje >= 60;
$('.wrap-course-content').addClass('fake1').removeClass('fake');
CourseNav.setSlideVisited();
if (aprobado) {
CourseNav.setSlideVisited();
$('#desarrollo').hide();
$('#cierre').show();
} else {
@@ -539,4 +545,4 @@
preguntasMax = questions.length;
});
});
</script>
</script>