Update static/js/index.js
Browse files- static/js/index.js +15 -2
static/js/index.js
CHANGED
|
@@ -1,12 +1,25 @@
|
|
| 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 |
-
|
| 7 |
}, 5000);
|
| 8 |
|
| 9 |
setTimeout(() => {
|
| 10 |
-
|
| 11 |
}, 10000);
|
| 12 |
});
|
|
|
|
| 1 |
document.addEventListener('DOMContentLoaded', function () {
|
| 2 |
console.log('RIMU - Protecci贸n de Fauna Silvestre cargado correctamente');
|
| 3 |
|
| 4 |
+
// Funci贸n para mostrar alertas
|
| 5 |
+
function mostrarAlerta(titulo, mensaje) {
|
| 6 |
+
const alertaContainer = document.getElementById('alert-container');
|
| 7 |
+
const alertaDiv = document.createElement('div');
|
| 8 |
+
alertaDiv.classList.add('alerta');
|
| 9 |
+
alertaDiv.innerHTML = `
|
| 10 |
+
<div class="alerta-titulo">${titulo}</div>
|
| 11 |
+
<div class="alerta-fecha">${new Date().toLocaleString()}</div>
|
| 12 |
+
<p>${mensaje}</p>
|
| 13 |
+
`;
|
| 14 |
+
alertaContainer.appendChild(alertaDiv);
|
| 15 |
+
}
|
| 16 |
+
|
| 17 |
// Simulaci贸n de alertas en la consola
|
| 18 |
setTimeout(() => {
|
| 19 |
+
mostrarAlerta('鈿狅笍 Alerta: Reporte de atropellamiento', 'En la carretera Panamericana Norte, cerca de Huaraz.');
|
| 20 |
}, 5000);
|
| 21 |
|
| 22 |
setTimeout(() => {
|
| 23 |
+
mostrarAlerta('鈿狅笍 Alerta: Precauci贸n', 'Zona de alta vulnerabilidad para fauna en la selva central.');
|
| 24 |
}, 10000);
|
| 25 |
});
|