Update static/js/index.js
Browse files- static/js/index.js +25 -172
static/js/index.js
CHANGED
@@ -1,172 +1,25 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
}
|
27 |
-
|
28 |
-
header .logo {
|
29 |
-
width: 150px;
|
30 |
-
height: auto;
|
31 |
-
}
|
32 |
-
|
33 |
-
header nav ul {
|
34 |
-
list-style: none;
|
35 |
-
display: flex;
|
36 |
-
justify-content: center;
|
37 |
-
padding: 0;
|
38 |
-
}
|
39 |
-
|
40 |
-
header nav ul li {
|
41 |
-
margin: 0 20px;
|
42 |
-
}
|
43 |
-
|
44 |
-
header nav ul li a {
|
45 |
-
color: white;
|
46 |
-
text-decoration: none;
|
47 |
-
font-weight: bold;
|
48 |
-
text-transform: uppercase;
|
49 |
-
}
|
50 |
-
|
51 |
-
header nav ul li a:hover {
|
52 |
-
text-decoration: underline;
|
53 |
-
}
|
54 |
-
|
55 |
-
/* Hero Section */
|
56 |
-
.hero {
|
57 |
-
background: #8bba76; /* Verde m谩s suave, que evoca la naturaleza */
|
58 |
-
padding: 60px 20px;
|
59 |
-
color: #fff;
|
60 |
-
}
|
61 |
-
|
62 |
-
.hero h1 {
|
63 |
-
font-size: 2.5em;
|
64 |
-
margin-bottom: 10px;
|
65 |
-
}
|
66 |
-
|
67 |
-
.hero p {
|
68 |
-
font-size: 1.2em;
|
69 |
-
margin-bottom: 20px;
|
70 |
-
}
|
71 |
-
|
72 |
-
.cta-button {
|
73 |
-
background-color: #228b22; /* Verde hoja */
|
74 |
-
color: white;
|
75 |
-
padding: 12px 25px;
|
76 |
-
text-decoration: none;
|
77 |
-
font-weight: bold;
|
78 |
-
border-radius: 5px;
|
79 |
-
transition: background-color 0.3s ease;
|
80 |
-
}
|
81 |
-
|
82 |
-
.cta-button:hover {
|
83 |
-
background-color: #1c7a1c; /* Verde m谩s oscuro */
|
84 |
-
}
|
85 |
-
|
86 |
-
/* App Embed Section */
|
87 |
-
.app-embed {
|
88 |
-
margin: 40px 0;
|
89 |
-
padding: 20px;
|
90 |
-
background-color: #fff;
|
91 |
-
border-radius: 8px;
|
92 |
-
}
|
93 |
-
|
94 |
-
.app-embed h2 {
|
95 |
-
margin-bottom: 20px;
|
96 |
-
font-size: 1.8em;
|
97 |
-
color: #333;
|
98 |
-
}
|
99 |
-
|
100 |
-
.app-frame {
|
101 |
-
width: 100%;
|
102 |
-
height: 600px;
|
103 |
-
border: none;
|
104 |
-
border-radius: 8px;
|
105 |
-
}
|
106 |
-
|
107 |
-
/* Alertas */
|
108 |
-
.alertas {
|
109 |
-
background-color: #f1f8f0; /* Fondo suave verde claro */
|
110 |
-
padding: 20px;
|
111 |
-
margin: 40px 0;
|
112 |
-
border-radius: 8px;
|
113 |
-
}
|
114 |
-
|
115 |
-
.alertas h2 {
|
116 |
-
margin-bottom: 20px;
|
117 |
-
font-size: 1.8em;
|
118 |
-
color: #333;
|
119 |
-
}
|
120 |
-
|
121 |
-
.alert-container {
|
122 |
-
max-width: 800px;
|
123 |
-
margin: auto;
|
124 |
-
text-align: left;
|
125 |
-
}
|
126 |
-
|
127 |
-
.alerta {
|
128 |
-
background-color: #ffcc00; /* Amarillo alerta */
|
129 |
-
padding: 15px;
|
130 |
-
margin-bottom: 10px;
|
131 |
-
border-radius: 5px;
|
132 |
-
}
|
133 |
-
|
134 |
-
.alerta .alerta-titulo {
|
135 |
-
font-weight: bold;
|
136 |
-
}
|
137 |
-
|
138 |
-
.alerta .alerta-fecha {
|
139 |
-
font-size: 0.9em;
|
140 |
-
color: #555;
|
141 |
-
}
|
142 |
-
|
143 |
-
/* Footer */
|
144 |
-
footer {
|
145 |
-
background: #333;
|
146 |
-
color: white;
|
147 |
-
padding: 20px 0;
|
148 |
-
}
|
149 |
-
|
150 |
-
footer p {
|
151 |
-
margin-bottom: 10px;
|
152 |
-
}
|
153 |
-
|
154 |
-
footer .social-links {
|
155 |
-
list-style: none;
|
156 |
-
display: flex;
|
157 |
-
justify-content: center;
|
158 |
-
}
|
159 |
-
|
160 |
-
footer .social-links li {
|
161 |
-
margin: 0 15px;
|
162 |
-
}
|
163 |
-
|
164 |
-
footer .social-links li a {
|
165 |
-
color: white;
|
166 |
-
text-decoration: none;
|
167 |
-
font-size: 1.2em;
|
168 |
-
}
|
169 |
-
|
170 |
-
footer .social-links li a:hover {
|
171 |
-
color: #2a9d8f;
|
172 |
-
}
|
|
|
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 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|