Files

220 lines
7.3 KiB
HTML
Raw Permalink Normal View History

2025-09-24 22:51:53 -06:00
<style>
.fake {
background-image: url(img/bg07.jpg);
background-repeat: no-repeat;
background-position: center;
background-size: cover;
}
.hr-style {
opacity: 1;
}
.custom-grid {
position: relative;
display: grid;
grid-template-columns: repeat(6, 1fr);
grid-template-rows: repeat(2, 1fr);
gap: 15px;
justify-content: center;
align-items: center;
max-width: 1320px; /* Esto limita el ancho total */
margin: 0 auto;
width: 100%;
}
.img-sotable {
cursor: move;
}
.img-sotable.disabled {
pointer-events: none;
2025-09-25 13:03:23 -06:00
background-color: #84a816;
2025-09-24 22:51:53 -06:00
}
2026-03-11 11:20:54 -06:00
.sortable-placeholder {
background-color: rgba(132, 168, 22, 0.3);
border: 2px dashed #84a816;
visibility: visible !important;
}
2025-09-24 22:51:53 -06:00
</style>
2026-03-11 11:20:54 -06:00
<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" id="activity1">
2025-12-05 10:31:16 -06:00
<div class="col-10 mb-2 text-center">
2026-03-11 11:20:54 -06:00
<div class="position-relative d-inline-block">
<h2 class="text-center fw-bold text-primary">
Técnica correcta para higiene de manos <br />
2026-07-01 02:25:52 -06:00
de acuerdo con la técnica de la OMS<sup class="fw-bold">12</sup>
2026-03-11 11:20:54 -06:00
</h2>
<hr class="border border-3 border-verde-oscuro hr-style mx-auto my-0" />
2025-12-05 10:31:16 -06:00
</div>
2025-09-24 22:51:53 -06:00
</div>
<div class="col-10 px-0 mb-1 col-instrucciones">
<div class="card bg-lila-rosa border-0 my-2 rounded-4 bg-custom px-3 py-2 text-center">
<div class="d-flex justify-content-center align-items-center flex-row">
2026-03-11 11:20:54 -06:00
<img src="img/14.12.png" class="img-fluid mx-3" />
2026-07-01 02:25:52 -06:00
<p class="mb-0 text-start">Arrastra los pasos del lavado de manos para colocarlos en el orden correcto.</p>
2025-09-24 22:51:53 -06:00
</div>
</div>
</div>
2026-07-01 15:47:43 -06:00
<div class="col-12 text-center mb-2">
<p class="small mb-0">"Estos son casos hipotéticos basados en las referencias bibliográficas."</p>
</div>
2026-03-11 11:20:54 -06:00
<div class="col-12 col-actividad" style="overflow: hidden">
2025-09-24 22:51:53 -06:00
<div class="custom-grid">
<div class="img-sotable" data-order="0">
2026-03-11 11:20:54 -06:00
<img src="img/14.0.png" class="img-fluid" />
2025-09-24 22:51:53 -06:00
</div>
<div class="img-sotable" data-order="1">
2026-03-11 11:20:54 -06:00
<img src="img/14.1.png" class="img-fluid" />
2025-09-24 22:51:53 -06:00
</div>
<div class="img-sotable" data-order="2">
2026-03-11 11:20:54 -06:00
<img src="img/14.2.png" class="img-fluid" />
2025-09-24 22:51:53 -06:00
</div>
<div class="img-sotable" data-order="3">
2026-03-11 11:20:54 -06:00
<img src="img/14.3.png" class="img-fluid" />
2025-09-24 22:51:53 -06:00
</div>
<div class="img-sotable" data-order="4">
2026-03-11 11:20:54 -06:00
<img src="img/14.4.png" class="img-fluid" />
2025-09-24 22:51:53 -06:00
</div>
<div class="img-sotable" data-order="5">
2026-03-11 11:20:54 -06:00
<img src="img/14.5.png" class="img-fluid" />
2025-09-24 22:51:53 -06:00
</div>
<div class="img-sotable" data-order="6">
2026-03-11 11:20:54 -06:00
<img src="img/14.6.png" class="img-fluid" />
2025-09-24 22:51:53 -06:00
</div>
<div class="img-sotable" data-order="7">
2026-03-11 11:20:54 -06:00
<img src="img/14.7.png" class="img-fluid" />
2025-09-24 22:51:53 -06:00
</div>
<div class="img-sotable" data-order="8">
2026-03-11 11:20:54 -06:00
<img src="img/14.8.png" class="img-fluid" />
2025-09-24 22:51:53 -06:00
</div>
<div class="img-sotable" data-order="9">
2026-03-11 11:20:54 -06:00
<img src="img/14.9.png" class="img-fluid" />
2025-09-24 22:51:53 -06:00
</div>
<div class="img-sotable" data-order="10">
2026-03-11 11:20:54 -06:00
<img src="img/14.10.png" class="img-fluid" />
2025-09-24 22:51:53 -06:00
</div>
<div class="img-sotable" data-order="11">
2026-03-11 11:20:54 -06:00
<img src="img/14.11.png" class="img-fluid" />
2025-09-24 22:51:53 -06:00
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="d-none">
<div id="pop0">
<div class="container-fluid">
2026-03-11 11:20:54 -06:00
<div class="w-100 text-center">
<img src="img/14.13.png" class="img-fluid" />
2025-09-24 22:51:53 -06:00
</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>Una vez secas, <strong class="text-verde-ceniza">tus manos son seguras.</strong></p>
2026-03-11 11:20:54 -06:00
<p class="mb-0">
El procedimiento tiene una duración total de
<strong class="text-verde-ceniza">40-60 segundos.</strong>
</p>
2025-09-24 22:51:53 -06:00
</div>
</div>
</div>
</div>
</div>
<script>
$(function () {
2026-07-01 02:25:52 -06:00
'use strict';
$('.wrap-course-content').addClass('fake');
2025-09-24 22:51:53 -06:00
2026-07-01 02:25:52 -06:00
const bad = CourseNav.createSound('audio/feedback-incorrect.mpeg');
const good = CourseNav.createSound('audio/feedback-correct.mpeg');
2025-09-24 22:51:53 -06:00
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;
}
// Shuffle elements
2026-07-01 02:25:52 -06:00
const $sortables = $('.img-sotable');
2025-09-24 22:51:53 -06:00
const shuffled = shuffleArray($sortables.toArray());
2026-07-01 02:25:52 -06:00
$('.custom-grid').empty().append(shuffled);
2025-09-24 22:51:53 -06:00
// Initialize sortable
2026-07-01 02:25:52 -06:00
$('.custom-grid').sortable({
items: '.img-sotable',
containment: '.wrap-course-content',
cursor: 'grabbing',
tolerance: 'pointer',
2026-03-11 11:20:54 -06:00
forceHelperSize: true,
forcePlaceholderSize: true,
2026-07-01 02:25:52 -06:00
placeholder: 'sortable-placeholder',
2026-03-11 11:20:54 -06:00
distance: 5,
2025-10-22 09:04:17 -06:00
sort: function (event, ui) {
2026-07-01 02:25:52 -06:00
var scale = parseFloat($('.wrap-course-content').css('transform').split('(')[1]) || 1;
2025-10-22 09:04:17 -06:00
var mouseX = event.pageX;
var mouseY = event.pageY;
ui.helper.css({
2026-03-11 11:20:54 -06:00
left: (mouseX - ui.helper.parent().offset().left) / scale - ui.helper.width() / 2,
top: (mouseY - ui.helper.parent().offset().top) / scale - ui.helper.height() / 2,
2025-10-22 09:04:17 -06:00
});
},
2026-03-11 11:20:54 -06:00
update: function () {
2025-09-24 22:51:53 -06:00
checkOrder();
2026-03-11 11:20:54 -06:00
},
2025-09-24 22:51:53 -06:00
});
function checkOrder() {
2026-07-01 02:25:52 -06:00
const $items = $('.custom-grid .img-sotable');
2025-09-24 22:51:53 -06:00
let isCorrect = true;
2026-03-11 11:20:54 -06:00
$items.each(function (index) {
2026-07-01 02:25:52 -06:00
if (parseInt($(this).data('order')) !== index) {
2025-09-24 22:51:53 -06:00
isCorrect = false;
return false;
}
});
if (isCorrect) {
good.play();
2026-07-01 02:25:52 -06:00
$('.custom-grid').sortable('disable');
2025-09-24 22:51:53 -06:00
checkAllCompleted();
}
}
function checkAllCompleted() {
setTimeout(() => {
2026-07-01 02:25:52 -06:00
const html = $('#pop0').html();
2025-09-24 22:51:53 -06:00
Swal.fire({
html: html,
2026-07-01 02:25:52 -06:00
target: document.getElementById('wrap-course-content'),
2025-09-24 22:51:53 -06:00
customClass: {
2026-07-01 02:25:52 -06:00
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',
2025-09-24 22:51:53 -06:00
},
2026-07-01 02:25:52 -06:00
confirmButtonText: 'Cerrar',
2025-09-24 22:51:53 -06:00
showConfirmButton: true,
allowOutsideClick: false,
allowEscapeKey: false,
2026-07-01 02:25:52 -06:00
backdrop: 'rgba(65, 60, 60, .95)',
width: '35em',
2025-09-24 22:51:53 -06:00
didClose: () => {
CourseNav.setSlideVisited();
2026-07-01 02:25:52 -06:00
$('.img-sotable').addClass('disabled');
2026-03-11 11:20:54 -06:00
},
2025-09-24 22:51:53 -06:00
});
}, 250);
}
});
</script>