This commit is contained in:
David Martinez 2025-09-18 16:56:37 -06:00
parent 07100d82de
commit 4bc2a47a96
17 changed files with 529 additions and 2 deletions

View File

@ -27,6 +27,14 @@
{ {
"title": "Navegación", "title": "Navegación",
"content": "contenido/06.html" "content": "contenido/06.html"
},
{
"title": "Navegación",
"content": "contenido/07.html"
},
{
"title": "Navegación",
"content": "contenido/08.html"
} }
] ]
} }

View File

@ -108,7 +108,7 @@
if ($(this).data('order') === index + 1) { if ($(this).data('order') === index + 1) {
$(this).removeClass('bg-verde-claro').addClass('bg-verde-pasto'); $(this).removeClass('bg-verde-claro').addClass('bg-verde-pasto');
} else { } else {
$(this).css('background', ''); // reset $(this).removeClass('bg-verde-pasto').addClass('bg-verde-claro');
correct = false; correct = false;
} }
}); });

View File

@ -0,0 +1,391 @@
<style>
.fake {
background-image: url(img/bg04.jpg);
background-repeat: no-repeat;
background-position: center;
background-size: cover;
}
.hr-style {
opacity: 1;
width: 40%;
}
.bg-custom {
box-shadow: 0 0 10px rgba(0, 0, 0, .5);
}
.btn-answer {
background-color: #808080;
border-radius: 20px;
cursor: pointer;
}
.btn-answer:hover {
background-color: #925c8d;
}
.btn-answer.selected {
background-color: #925c8d;
}
.completed {
filter: grayscale(1);
}
.disabled {
pointer-events: none;
}
.object-btn {
cursor: pointer;
}
.content-medidor {
background-color: #fff;
box-shadow: 0 0 12px rgba(0, 0, 0, .5);
border-radius: 40px;
}
.termometro {
position: relative;
display: grid;
grid-template-columns: repeat(6, 1fr);
grid-template-rows: auto;
gap: 0;
background: #E7E7E7;
background: linear-gradient(to left, #E7E7E7 0%, #C3C3C3 100%);
border-radius: 40px;
}
.med_style {
border-radius: 0;
border: 1px solid #000;
border-right: 3px solid #c3c3c3;
width: 80px;
height: 30px;
}
.med_style:nth-child(6) {
border-top-right-radius: 40px;
border-bottom-right-radius: 40px;
border-left: 0;
border-right: 1px solid #000;
background: #76c300;
background: linear-gradient(to top, #76c300 0%, #386100 100%);
}
.med_style:first-child {
border-top-left-radius: 40px;
border-bottom-left-radius: 40px;
background: #DF0000;
background: linear-gradient(to top, #DF0000 0%, #4F0700 100%);
}
.med_style:nth-child(2),
.med_style:nth-child(3),
.med_style:nth-child(4),
.med_style:nth-child(5) {
border-left: 0;
}
.med_style:nth-child(3) {
background: #ffce00;
background: linear-gradient(to top, #ffce00 0%, #fe6a00 100%);
}
.med_style:nth-child(2) {
background: #ff8400;
background: linear-gradient(to top, #ff8400 0%, #c93000 100%);
}
.med_style:nth-child(4) {
background: #a4f800;
background: linear-gradient(to top, #a4f800 0%, #ffe600 100%);
}
.med_style:nth-child(5) {
background: #aaff00;
background: linear-gradient(to top, #aaff00 0%, #4e8600 100%);
}
.indicador-med {
position: absolute;
width: 60px;
height: 60px;
border-radius: 100%;
bottom: -60px;
left: 10px;
transition: left 0.5s ease;
}
</style>
<div class='page-sco py-2 py-md-4 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">
<h2 class="text-center fw-bold text-primary">Tipos de diálisis peritoneal</h2>
<hr class="border border-3 border-verde-oscuro hr-style mx-auto my-0">
</div>
<div class="col-12 px-0 mb-3">
<div class="card bg-white border-0 my-2 rounded-0 bg-custom p-3 text-center">
<div class="d-flex justify-content-center align-items-center flex-row">
<img src="img/3.1.png" class="img-fluid mx-3">
<p class="mb-0"><strong>Instrucciones:</strong> Presiona cada ícono, lee con atención las oraciones que se presentan acerca de los tipos de diálisis y determina si son falsas o verdaderas para llenar el medidor de salud del paciente.</p>
</div>
</div>
</div>
<div id="actividad-objects" class="col-12">
<div class="row justify-content-center align-items-center">
<div class="col-12 text-center mb-5">
<div class="content-medidor p-2 d-inline-flex flex-row justify-content-center align-items-center gap-3">
<img src="img/07.7.png" class="img-fluid">
<div class="termometro p-1">
<div id="#med0" class="med_style"></div>
<div id="#med1" class="med_style"></div>
<div id="#med2" class="med_style"></div>
<div id="#med3" class="med_style"></div>
<div id="#med4" class="med_style"></div>
<div id="#med5" class="med_style"></div>
<div id="indicador" class="indicador-med d-flex flex-row justify-content-center align-items-center">
<img src="img/07.5.png" class="img-fluid">
</div>
</div>
<img src="img/07.6.png" class="img-fluid">
</div>
</div>
<div class="col-12">
<div class="d-flex flex-row justify-content-center align-items-center gap-3">
<div class="object-btn text-center d-inline-block animate__animated animate__pulse animate__infinite" data-obj="0">
<img src="img/07.0.png" class="img-fluid">
</div>
<div class="object-btn text-center d-inline-block animate__animated animate__pulse animate__infinite" data-obj="1">
<img src="img/07.1.png" class="img-fluid">
</div>
<div class="object-btn text-center d-inline-block animate__animated animate__pulse animate__infinite" data-obj="2">
<img src="img/07.2.png" class="img-fluid">
</div>
<div class="object-btn text-center d-inline-block animate__animated animate__pulse animate__infinite" data-obj="3">
<img src="img/07.3.png" class="img-fluid">
</div>
<div class="object-btn text-center d-inline-block animate__animated animate__pulse animate__infinite" data-obj="4">
<img src="img/07.4.png" class="img-fluid">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="d-none">
<div id="pops-questions">
<div class="container-fluid">
<div class="row justify-content-center align-items-center">
<div id="txt-question" class="col-12 text-center text-verde-oscuro fw-bold mb-3"></div>
<div class="col-12">
<div id="txt-answers" class="d-flex flex-row justify-content-center align-items-center gap-3"></div>
</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>
<div class="row justify-content-center">
<div class="col-12 text-center mb-2">
<h3 class="text-secondary-dark fw-bold">¡Bien hecho!</h3>
</div>
<div class="col-12 text-center">
<p class="mb-0">Has concluido la actividad.</p>
</div>
</div>
</div>
</div>
</div>
<script>
$(function () {
"use strict";
$('body').addClass('fake');
let questions;
let currentQuestionIndex = 0;
let currentQuestion;
let correctQuestions = 0;
let currentObjectBtn;
let isCorrectAnswer = false;
const bad = CourseNav.createSound('audio/feedback-incorrect.mpeg');
const good = CourseNav.createSound('audio/feedback-correct.mpeg');
const urlExcelFile = 'verdadero_falso.xlsx';
function readExcelFile(url, callback) {
var xhr = new XMLHttpRequest();
xhr.open('GET', url, true);
xhr.responseType = 'arraybuffer';
xhr.onload = function (e) {
var arrayBuffer = xhr.response;
var data = new Uint8Array(arrayBuffer);
var workbook = XLSX.read(data, { type: "array" });
var result = {};
workbook.SheetNames.forEach(sheetName => {
var sheet = workbook.Sheets[sheetName];
result[sheetName] = XLSX.utils.sheet_to_json(sheet);
});
callback(result);
};
xhr.send();
}
function procesarPreguntas(data) {
const preguntas = data.map(fila => {
const opciones = [];
Object.keys(fila).forEach(key => {
if (key.startsWith('opcion')) {
opciones.push({
text: fila[key].trim(),
correct: key === 'opcion_c'
});
}
});
return {
pregunta: fila.pregunta.trim(),
opciones: opciones,
retroalimentacion_correcta: fila.retroalimentacion_correcta ? fila.retroalimentacion_correcta.trim() : '',
retroalimentacion_incorrecta: fila.retroalimentacion_incorrecta ? fila.retroalimentacion_incorrecta.trim() : ''
};
});
return preguntas;
}
function shuffleArray(array) {
for (let i = array.length - 1; i > 0; i--) {
const j = Math.floor(Math.random() * (i + 1));
[array[i], array[j]] = [array[j], array[i]];
}
return array;
}
// Cargar preguntas al inicio
readExcelFile(urlExcelFile, function(data) {
const sheetData = data[Object.keys(data)[0]];
questions = procesarPreguntas(sheetData);
});
$('.object-btn').click(function (e) {
e.preventDefault();
if ($(this).hasClass('disabled')) return;
CourseNav.soundClick();
currentObjectBtn = $(this);
if (questions && questions.length > 0) {
showRandomQuestion();
}
});
function showRandomQuestion() {
// Seleccionar pregunta aleatoria
const randomIndex = Math.floor(Math.random() * questions.length);
currentQuestion = questions[randomIndex];
const html = $("#pops-questions").html();
Swal.fire({
html: html,
target: "body",
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'
},
confirmButtonText: "Cerrar",
showConfirmButton: false,
allowOutsideClick: false,
allowEscapeKey: false,
focusConfirm: false,
backdrop: "rgba(65, 60, 60, .95)",
width: "45em",
didOpen: () => {
displayQuestion();
},
didClose: () => {
CourseNav.audioController.stopAudio();
if (currentObjectBtn) {
currentObjectBtn.addClass('completed disabled');
checkAllCompleted();
}
},
});
}
function displayQuestion() {
const contentSwal = $(Swal.getHtmlContainer());
const txtPregunta = contentSwal.find('#txt-question');
const txtAnswers = contentSwal.find('#txt-answers');
txtPregunta.html(currentQuestion.pregunta);
// Aleatorizar respuestas
const shuffledOpciones = shuffleArray([...currentQuestion.opciones]);
let answersHtml = '';
shuffledOpciones.forEach((opcion, index) => {
answersHtml += `<div class="btn-answer text-white p-2 px-3" data-correct="${opcion.correct}">${opcion.text}</div>`;
});
txtAnswers.html(answersHtml);
// Event listener para respuestas
contentSwal.find('.btn-answer').click(function() {
isCorrectAnswer = $(this).data('correct');
$(this).addClass('selected');
if (isCorrectAnswer) {
good.play();
correctQuestions++;
moveIndicator();
Swal.close();
} else {
bad.play();
}
});
}
function moveIndicator() {
const positions = ['left: 90px', 'left: 170px', 'left: 250px', 'left: 330px', 'left: 410px'];
if (correctQuestions <= 5) {
$('#indicador').attr('style', positions[correctQuestions - 1]);
}
}
function checkAllCompleted() {
const totalButtons = $('.object-btn').length;
const completedButtons = $('.object-btn.completed').length;
if (totalButtons === completedButtons) {
setTimeout(() => {
const html = $("#pop0").html();
Swal.fire({
html: html,
target: "body",
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'
},
confirmButtonText: "Cerrar",
showConfirmButton: true,
allowOutsideClick: false,
allowEscapeKey: false,
backdrop: "rgba(65, 60, 60, .95)",
width: "35em",
didClose: () => {
CourseNav.setSlideVisited();
}
});
}, 250);
}
}
});
</script>

41
contenido/08.html Normal file
View File

@ -0,0 +1,41 @@
<style>
.fake {
background-image: url(img/bg04.jpg);
background-repeat: no-repeat;
background-position: center;
background-size: cover;
}
.hr-style {
opacity: 1;
width: 70%;
}
</style>
<div class='page-sco py-2 py-md-4'>
<div class='container'>
<div class='row justify-content-center align-items-center'>
<div class='col-12'>
<div class='row justify-content-center'>
<div class="col-10 mb-2">
<h2 class="text-center fw-bold text-primary">¿Qué necesito para poder realizar la Diálisis Peritoneal Continua Ambulatoria (DPCA)?</h2>
<hr class="border border-3 border-verde-oscuro hr-style mx-auto my-0">
</div>
<div class="col-10 px-0 mb-3">
<div class="card bg-verde-gris border-0 my-2 rounded-4 bg-custom p-3 text-center">
<div class="d-flex justify-content-center align-items-center flex-row">
<img src="img/08.0.png" class="img-fluid mx-3">
<p class="mb-0"><strong>Instrucciones:</strong> Da clic en las tarjetas para encontrar los pares y descubrir los elementos necesarios para llevar a cabo la DPCA.</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
$(function () {
"use strict";
$('body').addClass('fake');
});
</script>

2
css/theme.min.css vendored

File diff suppressed because one or more lines are too long

View File

@ -12,6 +12,7 @@ $custom-colors: (
'verde-pino': #4c8071, 'verde-pino': #4c8071,
'verde-pasto': #84a816, 'verde-pasto': #84a816,
'verde-claro': #d6e3da, 'verde-claro': #d6e3da,
'verde-gris': #cadcd4,
'lila-claro': #905c8b, 'lila-claro': #905c8b,
'morado-claro': #915c8c, 'morado-claro': #915c8c,
'gris': #959595, 'gris': #959595,

View File

@ -72,6 +72,7 @@
--bs-verde-pino: #4c8071; --bs-verde-pino: #4c8071;
--bs-verde-pasto: #84a816; --bs-verde-pasto: #84a816;
--bs-verde-claro: #d6e3da; --bs-verde-claro: #d6e3da;
--bs-verde-gris: #cadcd4;
--bs-lila-claro: #905c8b; --bs-lila-claro: #905c8b;
--bs-morado-claro: #915c8c; --bs-morado-claro: #915c8c;
--bs-gris: #959595; --bs-gris: #959595;
@ -100,6 +101,7 @@
--bs-verde-pino-rgb: 76, 128, 113; --bs-verde-pino-rgb: 76, 128, 113;
--bs-verde-pasto-rgb: 132, 168, 22; --bs-verde-pasto-rgb: 132, 168, 22;
--bs-verde-claro-rgb: 214, 227, 218; --bs-verde-claro-rgb: 214, 227, 218;
--bs-verde-gris-rgb: 202, 220, 212;
--bs-lila-claro-rgb: 144, 92, 139; --bs-lila-claro-rgb: 144, 92, 139;
--bs-morado-claro-rgb: 145, 92, 140; --bs-morado-claro-rgb: 145, 92, 140;
--bs-gris-rgb: 149, 149, 149; --bs-gris-rgb: 149, 149, 149;
@ -3320,6 +3322,23 @@ textarea.form-control-lg {
--bs-btn-disabled-border-color: #d6e3da; --bs-btn-disabled-border-color: #d6e3da;
} }
.btn-verde-gris {
--bs-btn-color: #000;
--bs-btn-bg: #cadcd4;
--bs-btn-border-color: #cadcd4;
--bs-btn-hover-color: #000;
--bs-btn-hover-bg: #d2e1da;
--bs-btn-hover-border-color: #cfe0d8;
--bs-btn-focus-shadow-rgb: 172, 187, 180;
--bs-btn-active-color: #000;
--bs-btn-active-bg: #d5e3dd;
--bs-btn-active-border-color: #cfe0d8;
--bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
--bs-btn-disabled-color: #000;
--bs-btn-disabled-bg: #cadcd4;
--bs-btn-disabled-border-color: #cadcd4;
}
.btn-lila-claro { .btn-lila-claro {
--bs-btn-color: #fff; --bs-btn-color: #fff;
--bs-btn-bg: #905c8b; --bs-btn-bg: #905c8b;
@ -3796,6 +3815,23 @@ textarea.form-control-lg {
--bs-gradient: none; --bs-gradient: none;
} }
.btn-outline-verde-gris {
--bs-btn-color: #cadcd4;
--bs-btn-border-color: #cadcd4;
--bs-btn-hover-color: #000;
--bs-btn-hover-bg: #cadcd4;
--bs-btn-hover-border-color: #cadcd4;
--bs-btn-focus-shadow-rgb: 202, 220, 212;
--bs-btn-active-color: #000;
--bs-btn-active-bg: #cadcd4;
--bs-btn-active-border-color: #cadcd4;
--bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
--bs-btn-disabled-color: #cadcd4;
--bs-btn-disabled-bg: transparent;
--bs-btn-disabled-border-color: #cadcd4;
--bs-gradient: none;
}
.btn-outline-lila-claro { .btn-outline-lila-claro {
--bs-btn-color: #905c8b; --bs-btn-color: #905c8b;
--bs-btn-border-color: #905c8b; --bs-btn-border-color: #905c8b;
@ -5612,6 +5648,15 @@ textarea.form-control-lg {
color: #454946; color: #454946;
} }
.alert-verde-gris {
--bs-alert-color: #515855;
--bs-alert-bg: #f4f8f6;
--bs-alert-border-color: #eff5f2;
}
.alert-verde-gris .alert-link {
color: #414644;
}
.alert-lila-claro { .alert-lila-claro {
--bs-alert-color: #563753; --bs-alert-color: #563753;
--bs-alert-bg: #e9dee8; --bs-alert-bg: #e9dee8;
@ -6281,6 +6326,20 @@ textarea.form-control-lg {
border-color: #565b57; border-color: #565b57;
} }
.list-group-item-verde-gris {
color: #515855;
background-color: #f4f8f6;
}
.list-group-item-verde-gris.list-group-item-action:hover, .list-group-item-verde-gris.list-group-item-action:focus {
color: #515855;
background-color: #dcdfdd;
}
.list-group-item-verde-gris.list-group-item-action.active {
color: #ffffff;
background-color: #515855;
border-color: #515855;
}
.list-group-item-lila-claro { .list-group-item-lila-claro {
color: #563753; color: #563753;
background-color: #e9dee8; background-color: #e9dee8;
@ -7971,6 +8030,11 @@ textarea.form-control-lg {
background-color: RGBA(214, 227, 218, var(--bs-bg-opacity, 1)) !important; background-color: RGBA(214, 227, 218, var(--bs-bg-opacity, 1)) !important;
} }
.text-bg-verde-gris {
color: #000 !important;
background-color: RGBA(202, 220, 212, var(--bs-bg-opacity, 1)) !important;
}
.text-bg-lila-claro { .text-bg-lila-claro {
color: #fff !important; color: #fff !important;
background-color: RGBA(144, 92, 139, var(--bs-bg-opacity, 1)) !important; background-color: RGBA(144, 92, 139, var(--bs-bg-opacity, 1)) !important;
@ -8161,6 +8225,13 @@ textarea.form-control-lg {
color: #dee9e1 !important; color: #dee9e1 !important;
} }
.link-verde-gris {
color: #cadcd4 !important;
}
.link-verde-gris:hover, .link-verde-gris:focus {
color: #d5e3dd !important;
}
.link-lila-claro { .link-lila-claro {
color: #905c8b !important; color: #905c8b !important;
} }
@ -8728,6 +8799,11 @@ textarea.form-control-lg {
border-color: rgba(var(--bs-verde-claro-rgb), var(--bs-border-opacity)) !important; border-color: rgba(var(--bs-verde-claro-rgb), var(--bs-border-opacity)) !important;
} }
.border-verde-gris {
--bs-border-opacity: 1;
border-color: rgba(var(--bs-verde-gris-rgb), var(--bs-border-opacity)) !important;
}
.border-lila-claro { .border-lila-claro {
--bs-border-opacity: 1; --bs-border-opacity: 1;
border-color: rgba(var(--bs-lila-claro-rgb), var(--bs-border-opacity)) !important; border-color: rgba(var(--bs-lila-claro-rgb), var(--bs-border-opacity)) !important;
@ -9685,6 +9761,11 @@ textarea.form-control-lg {
color: rgba(var(--bs-verde-claro-rgb), var(--bs-text-opacity)) !important; color: rgba(var(--bs-verde-claro-rgb), var(--bs-text-opacity)) !important;
} }
.text-verde-gris {
--bs-text-opacity: 1;
color: rgba(var(--bs-verde-gris-rgb), var(--bs-text-opacity)) !important;
}
.text-lila-claro { .text-lila-claro {
--bs-text-opacity: 1; --bs-text-opacity: 1;
color: rgba(var(--bs-lila-claro-rgb), var(--bs-text-opacity)) !important; color: rgba(var(--bs-lila-claro-rgb), var(--bs-text-opacity)) !important;
@ -9866,6 +9947,11 @@ textarea.form-control-lg {
background-color: rgba(var(--bs-verde-claro-rgb), var(--bs-bg-opacity)) !important; background-color: rgba(var(--bs-verde-claro-rgb), var(--bs-bg-opacity)) !important;
} }
.bg-verde-gris {
--bs-bg-opacity: 1;
background-color: rgba(var(--bs-verde-gris-rgb), var(--bs-bg-opacity)) !important;
}
.bg-lila-claro { .bg-lila-claro {
--bs-bg-opacity: 1; --bs-bg-opacity: 1;
background-color: rgba(var(--bs-lila-claro-rgb), var(--bs-bg-opacity)) !important; background-color: rgba(var(--bs-lila-claro-rgb), var(--bs-bg-opacity)) !important;

BIN
img/07.0.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

BIN
img/07.1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

BIN
img/07.2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

BIN
img/07.3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

BIN
img/07.4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

BIN
img/07.5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

BIN
img/07.6.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
img/07.7.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
img/08.0.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 467 B

BIN
verdadero_falso.xlsx Normal file

Binary file not shown.