-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexo-arecibo.html
More file actions
468 lines (376 loc) · 14.8 KB
/
exo-arecibo.html
File metadata and controls
468 lines (376 loc) · 14.8 KB
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="description" content="Exoplanètes habitables - Arecibo" />
<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<title>Exoplanètes habitables - Arecibo</title>
<style>
#myImg {
border-radius: 5px;
cursor: pointer;
transition: 0.3s;
}
#myImg:hover {
opacity: 0.7;
}
/* The Modal (background) */
.modal {
display: none;
/* Hidden by default */
position: fixed;
/* Stay in place */
z-index: 1;
/* Sit on top */
padding-top: 100px;
/* Location of the box */
left: 0;
top: 0;
width: 100%;
/* Full width */
height: 100%;
/* Full height */
overflow: auto;
/* Enable scroll if needed */
background-color: rgb(0, 0, 0);
/* Fallback color */
background-color: rgba(0, 0, 0, 0.9);
/* Black w/ opacity */
}
/* Modal Content (image) */
.modal-content {
margin: auto;
display: block;
width: 80%;
max-width: 700px;
}
#w3-menu-container {
position: fixed;
top: 0;
width: 100%;
background-color: #333;
z-index: 1000;
}
/* Caption of Modal Image */
#caption {
margin: auto;
display: block;
width: 80%;
max-width: 700px;
text-align: center;
color: #ccc;
padding: 10px 0;
height: 150px;
}
/* Add Animation */
.modal-content,
#caption {
animation-name: zoom;
animation-duration: 0.6s;
}
@keyframes zoom {
from {
transform: scale(0.1)
}
to {
transform: scale(1)
}
}
/* The Close Button */
.close {
position: absolute;
top: 15px;
right: 35px;
color: #f1f1f1;
font-size: 40px;
font-weight: bold;
transition: 0.3s;
}
.close:hover,
.close:focus {
color: #bbb;
text-decoration: none;
cursor: pointer;
}
/* 100% Image Width on Smaller Screens */
@media only screen and (max-width: 700px) {
.modal-content {
width: 100%;
}
}
html,
body {
margin: 10px;
width: 100%;
height: 180%;
background: url(starryNight2.jpeg) no-repeat center/cover;
}
h2 {
font-family: 'Orbitron', sans-serif;
font-size: xx-large;
text-decoration: underline;
color: white;
}
.test {
font-family: 'Orbitron', sans-serif;
font-size: xx-large;
color: rgb(0, 0, 0);
}
.test2 {
font-family: 'Orbitron', sans-serif;
font-size: x-large;
color: aquamarine;
}
.test3 {
font-family: 'Orbitron', sans-serif;
font-size: medium;
color: black;
}
.test4 {
font-family: 'Rubik Doodle Triangles', system-ui;
font-size: xx-large;
color: black;
}
.test5 {
font-family: 'Orbitron', sans-serif;
font-size: xx-large;
color: black;
}
.test6 {
font-family: 'Architects Daughter', cursive;
font-size: 21px;
color: black;
}
.trans {
background-color: silver;
-moz-opacity: 0.9;
-khtml-opacity: 0.9;
opacity: 0.9;
}
.trans2 {
-moz-opacity: 0.95;
-khtml-opacity: 0.95;
opacity: 0.95;
}
.artout {
outline: 8px ridge rgba(161, 134, 238, 0.6);
border-radius: 2rem;
margin: 8px;
}
.glow-box {
background: rgba(255, 255, 255, 0.1);
padding: 20px;
margin: 20px auto;
border-radius: 10px;
box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
text-shadow: 0 0 5px cyan;
transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}
.glow-box:hover {
transform: scale(1.05);
box-shadow: 0 0 15px cyan;
}
.glow-number {
font-size: 2.5em;
font-weight: bold;
color: cyan;
text-shadow: 0 0 15px cyan, 0 0 30px blue;
animation: glow-pulse 1.5s infinite alternate ease-in-out;
}
@keyframes glow-pulse {
0% { text-shadow: 0 0 15px cyan, 0 0 30px blue; }
100% { text-shadow: 0 0 25px cyan, 0 0 40px blue; }
}
.w3-animate-zoom {
animation: zoomIn 1s ease-in-out;
}
@keyframes zoomIn {
from { transform: scale(0.5); opacity: 0; }
to { transform: scale(1); opacity: 1; }
}
</style>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link
href="https://fonts.googleapis.com/css2?family=Architects+Daughter&family=Caveat+Brush&family=Homemade+Apple&family=Orbitron:wght@600;700&display=swap"
rel="stylesheet">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="/ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Space infos by Cyclotronic index" />
<meta name="keywords"
content="cyclotronic.fr.nf, space infos web site // web app : astronautes , lancements, exoplanètes, space news" />
<meta name="author" content="Franck Dandault - frnck.fr.nf - CYCLOTRONIC 2023" />
<title>SPACE INFOS index</title>
<link rel="stylesheet" href="w3.css" type="text/css">
<link rel="stylesheet" href="space.css" type="text/css">
<!-- Use any element to open the sidenav -->
<link rel="stylesheet"
href="jquery.vidbacking.css"
type="text/css">
</head>
<body>
<!-- Navigation (Stays on Top) -->
<div id="w3-menu-container" class="w3-bar w3-center w3-transparent ">
<!-- Your W3.CSS sidenav goes here -->
<a href="index.html" class="w3-button"><img src="iss4.png" height="40px" width="30px"></img></a>
<a href="space-astro.html" class="w3-button"><img src="cosmo.png" height="40px" width="30px"></img></a>
<a href="lancements.html" class="w3-button"><img src="fusée.png" height="40px" width="30px"></img></a>
<a href="exo-arecibo.html" class="w3-button"><img src="saturne.png" height="40px" width="30px"></img></a>
<a href="apod.html" class="w3-button"><img src="telescope.png" height="40px" width="30px"></img></a>
</div>
<div id="main">
<video poster="starryNight2.jpeg" autoplay muted loop class="vidbacking">
</video>
<script src="https://code.jquery.com/jquery-3.2.1.min.js"
integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
<script src="jquery.vidbacking.js"
type="text/javascript"></script>
<script type="text/javascript">
$(function () {
$('body').vidbacking({
'masked': false
});
});
</script>
<!-- Start Content -->
<div class="w3-content w3-mobile w3-row w3-auto">
<div id="statisticsData">
<p>Loading data...</p>
</div>
<script>
async function fetchData() {
const apiUrl = "https://api.allorigins.win/get?url=" + encodeURIComponent("https://exoplanethunter.com/api/Statistics");
try {
const response = await fetch(apiUrl);
if (!response.ok) {
throw new Error(`HTTP error! Status: ${response.status}`);
}
const jsonResponse = await response.json();
const data = JSON.parse(jsonResponse.contents);
// Create the HTML structure
document.getElementById("statisticsData").innerHTML = `
<div class="w3-container glow-box w3-animate-zoom">
<h2>✨ Exoplanètes confirmées: </h2>
<p class="glow-number" id="confirmedPlanets">0</p>
</div>
<div class="w3-container glow-box w3-animate-zoom">
<h2>🌍 Planètes Habitables confirmées:</h2>
<p class="glow-number" id="confirmedHabitablePlanets">0</p>
</div>
<div class="w3-container glow-box w3-animate-zoom">
<h2>🌙 Lunes habitables: </h2>
<p class="glow-number" id="possibleHabitableMoons">0</p>
</div>
`;
// Animate the numbers
animateNumbers("confirmedPlanets", data.confirmedPlanets);
animateNumbers("confirmedHabitablePlanets", data.confirmedHabitablePlanets);
animateNumbers("possibleHabitableMoons", data.possibleHabitableMoons);
} catch (error) {
console.error("Error:", error);
document.getElementById("statisticsData").innerHTML = `
<div class="w3-text-khaki">Error fetching data: ${error.message}</div>
`;
}
}
// Animation function for the numbers
function animateNumbers(id, targetValue) {
if (targetValue === undefined || targetValue === null || isNaN(targetValue)) {
document.getElementById(id).innerText = "N/A";
return;
}
let current = 0;
const increment = Math.ceil(targetValue / 100);
const duration = 2000; // 2 seconds for the animation
const steps = 50;
const stepTime = duration / steps;
const updateInterval = setInterval(() => {
current += increment;
if (current >= targetValue) {
document.getElementById(id).innerText = targetValue;
clearInterval(updateInterval);
} else {
document.getElementById(id).innerText = current;
}
}, stepTime);
}
// Call fetchData when the page loads
document.addEventListener('DOMContentLoaded', fetchData);
</script>
<script>
async function fetchData() {
const apiUrl = "https://exoplanethunter.com/api/Chart/PlanetTypes?type=0";
try {
const typeresponse = await fetch(apiUrl);
const typedata = await typeresponse.json();
// Debugging: Check the received data
console.log("Planet Type Data:", typedata);
const typeList = document.createElement('ul');
typedata.forEach(data => {
const typeItem = document.createElement('div');
typeItem.innerHTML = `
<br>
<div class="w3-mobile w3-row w3-auto w3-center">
<p class="w3-animate-zoom w3-center w3-container w3-sand artout trans">
<a class="test"><u> ${data.title} </u></a><br>
<a class="w3-center w3-text-red test5"> ${data.value}</a>
</p>
</div>
`;
typeList.appendChild(typeItem);
});
const dataContainer = document.getElementById("data");
dataContainer.innerHTML = ''; // Clear old data
dataContainer.appendChild(typeList);
} catch (error) {
console.error("Error fetching planet type data:", error);
document.getElementById("data").innerHTML = "<p class='w3-text-red'>Failed to fetch data.</p>";
}
}
fetchData();
</script>
<div id="data">
<p>Loading data...</p>
</div><br>
<div>
<p><img id="myImg" src="exo.jpeg" height="110%" width="110%"></img>
<!-- The Modal -->
<div id="myModal" class="modal">
<span class="close">×</span>
<img class="modal-content" id="img01">
<div id="caption"></div>
</div>
<script>
// Get the modal
var modal = document.getElementById('myModal');
// Get the image and insert it inside the modal - use its "alt" text as a caption
var img = document.getElementById('myImg');
var modalImg = document.getElementById("img01");
var captionText = document.getElementById("caption");
img.onclick = function () {
modal.style.display = "block";
modalImg.src = this.src;
captionText.innerHTML = this.alt;
}
// Get the <span> element that closes the modal
var span = document.getElementsByClassName("close")[0];
// When the user clicks on <span> (x), close the modal
span.onclick = function () {
modal.style.display = "none";
}
</script>
</p>
</div>
<div>
<p class="text-bl">source: <a href="https://phl.upr.edu/home" class="w3-tag w3-small">ARECIBO
Planetary Hability
Laboratory</a></p>
</div>
</div>
</div>
</body>
</html>