Update static/js/index.js
Browse files- static/js/index.js +12 -78
static/js/index.js
CHANGED
|
@@ -1,78 +1,12 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
}
|
| 14 |
-
|
| 15 |
-
function setInterpolationImage(i) {
|
| 16 |
-
var image = interp_images[i];
|
| 17 |
-
image.ondragstart = function() { return false; };
|
| 18 |
-
image.oncontextmenu = function() { return false; };
|
| 19 |
-
$('#interpolation-image-wrapper').empty().append(image);
|
| 20 |
-
}
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
$(document).ready(function() {
|
| 24 |
-
// Check for click events on the navbar burger icon
|
| 25 |
-
$(".navbar-burger").click(function() {
|
| 26 |
-
// Toggle the "is-active" class on both the "navbar-burger" and the "navbar-menu"
|
| 27 |
-
$(".navbar-burger").toggleClass("is-active");
|
| 28 |
-
$(".navbar-menu").toggleClass("is-active");
|
| 29 |
-
|
| 30 |
-
});
|
| 31 |
-
|
| 32 |
-
var options = {
|
| 33 |
-
slidesToScroll: 1,
|
| 34 |
-
slidesToShow: 3,
|
| 35 |
-
loop: true,
|
| 36 |
-
infinite: true,
|
| 37 |
-
autoplay: false,
|
| 38 |
-
autoplaySpeed: 3000,
|
| 39 |
-
}
|
| 40 |
-
|
| 41 |
-
// Initialize all div with carousel class
|
| 42 |
-
var carousels = bulmaCarousel.attach('.carousel', options);
|
| 43 |
-
|
| 44 |
-
// Loop on each carousel initialized
|
| 45 |
-
for(var i = 0; i < carousels.length; i++) {
|
| 46 |
-
// Add listener to event
|
| 47 |
-
carousels[i].on('before:show', state => {
|
| 48 |
-
console.log(state);
|
| 49 |
-
});
|
| 50 |
-
}
|
| 51 |
-
|
| 52 |
-
// Access to bulmaCarousel instance of an element
|
| 53 |
-
var element = document.querySelector('#my-element');
|
| 54 |
-
if (element && element.bulmaCarousel) {
|
| 55 |
-
// bulmaCarousel instance is available as element.bulmaCarousel
|
| 56 |
-
element.bulmaCarousel.on('before-show', function(state) {
|
| 57 |
-
console.log(state);
|
| 58 |
-
});
|
| 59 |
-
}
|
| 60 |
-
|
| 61 |
-
/*var player = document.getElementById('interpolation-video');
|
| 62 |
-
player.addEventListener('loadedmetadata', function() {
|
| 63 |
-
$('#interpolation-slider').on('input', function(event) {
|
| 64 |
-
console.log(this.value, player.duration);
|
| 65 |
-
player.currentTime = player.duration / 100 * this.value;
|
| 66 |
-
})
|
| 67 |
-
}, false);*/
|
| 68 |
-
preloadInterpolationImages();
|
| 69 |
-
|
| 70 |
-
$('#interpolation-slider').on('input', function(event) {
|
| 71 |
-
setInterpolationImage(this.value);
|
| 72 |
-
});
|
| 73 |
-
setInterpolationImage(0);
|
| 74 |
-
$('#interpolation-slider').prop('max', NUM_INTERP_FRAMES - 1);
|
| 75 |
-
|
| 76 |
-
bulmaSlider.attach();
|
| 77 |
-
|
| 78 |
-
})
|
|
|
|
| 1 |
+
document.addEventListener('DOMContentLoaded', function () {
|
| 2 |
+
console.log('RIMU - Protecci贸n de Fauna Silvestre cargado correctamente');
|
| 3 |
+
|
| 4 |
+
// Simulaci贸n de alertas en la consola
|
| 5 |
+
setTimeout(() => {
|
| 6 |
+
console.log('鈿狅笍 Alerta: Reporte de atropellamiento en la carretera Panamericana Norte');
|
| 7 |
+
}, 5000);
|
| 8 |
+
|
| 9 |
+
setTimeout(() => {
|
| 10 |
+
console.log('鈿狅笍 Alerta: Precauci贸n, zona de alta vulnerabilidad en la selva central');
|
| 11 |
+
}, 10000);
|
| 12 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|