This commit is contained in:
2026-07-01 15:47:43 -06:00
parent 0be4d028e1
commit 2e304d7a99
15 changed files with 314 additions and 278 deletions
+51 -43
View File
@@ -21,12 +21,12 @@
height: 35px;
background: #4d4d4d;
border: 4px solid #808080;
box-shadow: 0 0 15px rgba(0,0,0,.5);
box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
}
.med_style.visited {
background: #8EBA1F;
background: linear-gradient(to right, #8EBA1F 0%, #105742 100%);
background: #8eba1f;
background: linear-gradient(to right, #8eba1f 0%, #105742 100%);
border: 4px solid #ffffff;
}
@@ -43,7 +43,7 @@
.btn-answer {
cursor: pointer;
border-radius: 10px;
box-shadow: 0 0 2px rgba(0,0,0,.5);
box-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
width: 95%;
}
@@ -80,18 +80,18 @@
}
.phone-numbers {
pointer-events: none!important;
pointer-events: none !important;
user-select: text;
-webkit-user-select: text;
-moz-user-select: text;
-ms-user-select: text;
}
</style>
<div class='page-sco py-2 py-md-0 h-100'>
<div class='container h-100'>
<div class='row justify-content-center align-items-center h-100'>
<div class='col-12'>
<div class='row justify-content-center'>
<div class="page-sco py-2 py-md-0 h-100">
<div class="container h-100">
<div class="row justify-content-center align-items-center h-100">
<div class="col-12">
<div class="row justify-content-center">
<div class="col-10 mb-2 animate__animated animate__bounceInDown">
<h2 class="text-center fw-bold text-primary">Consejos útiles</h2>
<hr class="border border-3 border-verde-oscuro hr-style mx-auto my-0" />
@@ -121,24 +121,27 @@
<div class="col-11">
<div class="d-flex flex-row justify-content-center gap-2">
<div class="object-btn text-center d-inline-block" data-obj="0">
<img src="img/18.0.png" class="img-fluid mb-2 animate__animated animate__pulse animate__infinite"><br>
<img src="img/18.0.png" class="img-fluid mb-2 animate__animated animate__pulse animate__infinite" /><br />
<h4 class="fw-bold text-center text-primary">Sala: Estilo de vida</h4>
</div>
<div class="object-btn text-center d-inline-block" data-obj="1">
<img src="img/18.1.png" class="img-fluid mb-2 animate__animated animate__pulse animate__infinite"><br>
<img src="img/18.1.png" class="img-fluid mb-2 animate__animated animate__pulse animate__infinite" /><br />
<h4 class="fw-bold text-center text-primary">Sala: Desecho de residuos</h4>
</div>
<div class="object-btn text-center d-inline-block" data-obj="2">
<img src="img/18.2.png" class="img-fluid mb-2 animate__animated animate__pulse animate__infinite"><br>
<img src="img/18.2.png" class="img-fluid mb-2 animate__animated animate__pulse animate__infinite" /><br />
<h4 class="fw-bold text-center text-primary">Sala: Entrega domiciliaria</h4>
</div>
<div class="object-btn text-center d-inline-block" data-obj="3">
<img src="img/18.3.png" class="img-fluid mb-2 animate__animated animate__pulse animate__infinite"><br>
<img src="img/18.3.png" class="img-fluid mb-2 animate__animated animate__pulse animate__infinite" /><br />
<h4 class="fw-bold text-center text-primary">Sala: Soporte técnico</h4>
<h4 class="mb-0 text-primary fw-bold phone-numbers">777 329 6162 <br> 777 160 7199</h4>
<h4 class="mb-0 text-primary fw-bold phone-numbers">
777 329 6162 <br />
777 160 7199
</h4>
</div>
<div class="object-btn text-center d-inline-block" data-obj="4">
<img src="img/18.4.png" class="img-fluid mb-2 animate__animated animate__pulse animate__infinite"><br>
<img src="img/18.4.png" class="img-fluid mb-2 animate__animated animate__pulse animate__infinite" /><br />
<h4 class="fw-bold text-center text-primary">Sala: Reportes</h4>
</div>
</div>
@@ -152,20 +155,23 @@
</div>
<div class="d-none">
<div id="pops-questions">
<div class="container-fluid px-0" style="overflow: hidden;border-top-left-radius: 12px;border-top-right-radius: 12px;">
<div class="container-fluid px-0" style="overflow: hidden; border-top-left-radius: 12px; border-top-right-radius: 12px">
<div class="row justify-content-center align-items-center">
<div class="col-12 text-center mb-3 img-pregunta bg-secondary"></div>
<div id="txt-question" class="col-12 text-center text-verde-oscuro fw-bold mb-3 px-4"></div>
<div class="col-12 px-4">
<div class="col-12 px-4 mb-3">
<div id="txt-answers" class="d-flex flex-column justify-content-center align-items-center gap-3 text-start"></div>
</div>
<div class="col-12 text-center">
<p class="small mb-0">"Estos son casos hipotéticos basados en las referencias bibliográficas."</p>
</div>
</div>
</div>
</div>
<div id="pop0">
<div class="container-fluid">
<div class=" w-100 text-center">
<img src="img/3.5.png" class="img-fluid">
<div class="w-100 text-center">
<img src="img/3.5.png" class="img-fluid" />
</div>
<div class="row justify-content-center">
<div class="col-12 text-center mb-2">
@@ -180,7 +186,7 @@
</div>
<script>
$(function () {
"use strict";
'use strict';
$('.wrap-course-content').addClass('fake');
let questions;
let currentQuestionIndex = 0;
@@ -199,9 +205,9 @@
xhr.onload = function (e) {
var arrayBuffer = xhr.response;
var data = new Uint8Array(arrayBuffer);
var workbook = XLSX.read(data, { type: "array" });
var workbook = XLSX.read(data, { type: 'array' });
var result = {};
workbook.SheetNames.forEach(sheetName => {
workbook.SheetNames.forEach((sheetName) => {
var sheet = workbook.Sheets[sheetName];
result[sheetName] = XLSX.utils.sheet_to_json(sheet);
});
@@ -211,13 +217,13 @@
}
function procesarPreguntas(data) {
const preguntas = data.map(fila => {
const preguntas = data.map((fila) => {
const opciones = [];
Object.keys(fila).forEach(key => {
Object.keys(fila).forEach((key) => {
if (key.startsWith('opcion')) {
opciones.push({
text: fila[key].trim(),
correct: key === 'opcion_c'
correct: key === 'opcion_c',
});
}
});
@@ -225,7 +231,7 @@
pregunta: fila.pregunta.trim(),
opciones: opciones,
retroalimentacion_correcta: fila.retroalimentacion_correcta ? fila.retroalimentacion_correcta.trim() : '',
retroalimentacion_incorrecta: fila.retroalimentacion_incorrecta ? fila.retroalimentacion_incorrecta.trim() : ''
retroalimentacion_incorrecta: fila.retroalimentacion_incorrecta ? fila.retroalimentacion_incorrecta.trim() : '',
};
});
return preguntas;
@@ -243,7 +249,7 @@
let isCorrectAnswer = false;
readExcelFile(urlExcelFile, function (data) {
const hojaDatos = data["Diapositiva 20"];
const hojaDatos = data['Diapositiva 20'];
questions = procesarPreguntas(hojaDatos);
// Enable click handlers after questions are loaded
@@ -261,21 +267,21 @@
const objIndex = currentObjectBtn.data('obj');
currentQuestion = questions[objIndex];
const html = $("#pops-questions").html();
const html = $('#pops-questions').html();
Swal.fire({
html: html,
target: document.getElementById('wrap-course-content'),
customClass: {
popup: 'pop_html_style padd_perso border border-3 border-primary rounded-4',
confirmButton: 'btn text-white bg-primary amor fw-semibold animate__animated animate__pulse animate__infinite'
confirmButton: 'btn text-white bg-primary amor fw-semibold animate__animated animate__pulse animate__infinite',
},
confirmButtonText: "Cerrar",
confirmButtonText: 'Cerrar',
showConfirmButton: false,
allowOutsideClick: false,
allowEscapeKey: false,
focusConfirm: false,
backdrop: "rgba(65, 60, 60, .95)",
width: "50em",
backdrop: 'rgba(65, 60, 60, .95)',
width: '50em',
didOpen: () => {
displayQuestion();
},
@@ -305,10 +311,12 @@
$(container).find('#txt-answers').html(answersHTML);
$(container).find('.btn-answer').click(function() {
const isCorrect = $(this).data('correct');
handleAnswer(isCorrect);
});
$(container)
.find('.btn-answer')
.click(function () {
const isCorrect = $(this).data('correct');
handleAnswer(isCorrect);
});
}
function handleAnswer(isCorrect) {
@@ -332,23 +340,23 @@
function checkAllCompleted() {
if (correctQuestions >= 5) {
setTimeout(() => {
const html = $("#pop0").html();
const html = $('#pop0').html();
Swal.fire({
html: html,
target: document.getElementById('wrap-course-content'),
customClass: {
popup: 'pop_html_style border border-3 border-primary rounded-4',
confirmButton: 'btn text-white bg-primary amor fw-semibold animate__animated animate__pulse animate__infinite'
confirmButton: 'btn text-white bg-primary amor fw-semibold animate__animated animate__pulse animate__infinite',
},
confirmButtonText: "Cerrar",
confirmButtonText: 'Cerrar',
showConfirmButton: true,
allowOutsideClick: false,
allowEscapeKey: false,
backdrop: "rgba(65, 60, 60, .95)",
width: "35em",
backdrop: 'rgba(65, 60, 60, .95)',
width: '35em',
didClose: () => {
CourseNav.setSlideVisited();
}
},
});
}, 250);
}