diff --git a/AuroraMovie.mp4 b/AuroraMovie.mp4 new file mode 100644 index 00000000..5f84ab3d Binary files /dev/null and b/AuroraMovie.mp4 differ diff --git a/favicon.ico b/favicon.ico deleted file mode 100644 index bb2eb8d8..00000000 Binary files a/favicon.ico and /dev/null differ diff --git a/index.html b/index.html index e69de29b..1f8bd94a 100644 --- a/index.html +++ b/index.html @@ -0,0 +1,109 @@ + + + + + + + + + AURORA MAP + + + +
+ + +
+ +
+
+

Aurora

+ +

+ An aurora, also known as the + polar lights or aurora polaris, is a + natural light display in Earth's sky, predominantly seen in + high-latitude regions (around the Arctic and Antarctic). +

+

+ Auroras display dynamic patterns of brilliant lights that appear as + curtains, rays, spirals, or dynamic flickers covering the entire sky. +

+

+ Auroras are the result of disturbances in the magnetosphere caused by + the solar wind. Major disturbances result from enhancements in the + speed of the solar wind from coronal holes and coronal mass ejections. + These disturbances alter the trajectories of charged particles in the + magnetospheric plasma. These particles, mainly electrons and protons, + precipitate into the upper atmosphere (thermosphere/exosphere). The + resulting ionization and excitation of atmospheric constituents emit + light of varying colour and complexity. The form of the aurora, + occurring within bands around both polar regions, is also dependent on + the amount of acceleration imparted to the precipitating particles. +

+
+
+

Kp-index

+ +

+ The official planetary Kp-index is derived + by calculating a weighted average of K-indices from a network of 13 + geomagnetic observatories at mid-latitude locations. Since these + observatories do not report their data in real-time, various + operations centers around the globe estimate the index based on data + available from their local network of observatories. The + Kp-index was introduced by Bartels in 1939. +

+ +
+
+ +
+
+ +
+ + + + + + diff --git a/main.js b/main.js deleted file mode 100644 index e69de29b..00000000 diff --git a/script.js b/script.js new file mode 100644 index 00000000..dcdfaa12 --- /dev/null +++ b/script.js @@ -0,0 +1,81 @@ +document.querySelector("video").playbackRate = 0.75; + +$("#about-aurora-link").click(function () { + $("#about-aurora, #aurora-map, #aurora-gallery").fadeOut(); + $("#about-aurora").fadeIn(); +}); + +$("#aurora-map-link").click(function () { + $("#about-aurora, #aurora-map, #aurora-gallery").fadeOut(); + $("#aurora-map").fadeIn(); +}); + +$("#aurora-gallery-link").click(function () { + $("#about-aurora, #aurora-map, #aurora-gallery").fadeOut(); + $("#aurora-gallery").fadeIn(); +}); + +function initMap() { + const myLatlng = { lat: 52.41573519438039, lng: 16.93194798098 }; + const map = new google.maps.Map(document.getElementById("map"), { + zoom: 5, + center: myLatlng, + }); + // Create the initial InfoWindow. + let infoWindow = new google.maps.InfoWindow({ + content: + "Click on map to check actual Kp index in that place!", + position: myLatlng, + }); + let infoWindow2 = new google.maps.InfoWindow({}); + + infoWindow.open(map); + + // Configure the click listener. + map.addListener("click", (mapsMouseEvent) => { + // Close the current InfoWindow. + infoWindow.close(); + // Create a new InfoWindow. + infoWindow = new google.maps.InfoWindow({ + position: mapsMouseEvent.latLng, + }); + infoWindow.setContent("loading..."); + infoWindow.open(map); + + // API URL AURORA + var apiURLlink = + "https://api.auroras.live/v1/?type=all&" + + "lat=" + + mapsMouseEvent.latLng.toJSON().lat + + "&long=" + + mapsMouseEvent.latLng.toJSON().lng + + "&forecast=false&threeday=false&colour=hex"; + + function getApiResponse(url) { + const postsRequest = fetch(url); + return postsRequest.then((response) => response.json()); + } + + getApiResponse(apiURLlink).then((auroraData) => { + infoWindow.setContent( + "ACTUAL KP: " + auroraData.ace.kp + "" + ); + infoWindow2.close(); + infoWindow2 = new google.maps.InfoWindow({ + position: { + lat: parseFloat(auroraData.probability.highest.lat), + lng: parseFloat(auroraData.probability.highest.long), + }, + }); + + infoWindow2.setContent( + "The bigest probability of Aurora is here: " + + auroraData.probability.highest.value + + "%" + ); + infoWindow2.open(map); + + console.log(auroraData); + }); + }); +} diff --git a/style.css b/style.css index e69de29b..46d7edc0 100644 --- a/style.css +++ b/style.css @@ -0,0 +1,143 @@ +@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&display=swap'); + +html, +body { + height: 100%; + margin: 0; + padding: 0; + background-color: #002171; + font-family: 'Montserrat', sans-serif; +} + +.AuroraMovie { + position: fixed; + top: 0; + bottom: 0; + left: 0; + right: 0; + object-fit: cover; +} + +.navigation { + position: absolute; + top: 60px; + left: 0; + width: 100%; + background-color: #00217180; + display: flex; + padding: 10px 0; + justify-content: space-around; + z-index: 10; + text-align: center; +} + +.navigation a { + text-decoration: none; + font-weight: bold; + color: #6ff9ff80; + font-size: 28px; + cursor: pointer; +} + +.box { + background-color: #00217180; + padding: 10px; + color: #6ff9ff; + -webkit-box-shadow: 0px 0px 24px 0px rgba(0, 33, 113, 1); + -moz-box-shadow: 0px 0px 24px 0px rgba(0, 33, 113, 1); + box-shadow: 0px 0px 24px 0px rgba(0, 33, 113, 1); +} + +#about-aurora, +#aurora-map, +#aurora-gallery { + position: absolute; + top: 150px; + left: 10%; + right: 10%; + display: none; +} + +#about-aurora { + display: flex; + flex-wrap: wrap; + justify-content: space-around; +} + +#about-aurora .box { + width: 40%; +} + +#aurora-map { + color: #002171; +} + +#aurora-gallery {} + +#map { + height: 500px; +} + +.gallery { + display: flex; + flex-wrap: wrap; +} + +.gallerypicture { + width: 27.3333%; + box-sizing: border-box; + border: 3px solid #c0c6d4; + margin: 3%; +} + +.gallerypicture img { + width: 100%; + display: block; + -webkit-transform: scale(1); + transform: scale(1); + -webkit-transition: .3s ease-in-out; + transition: .3s ease-in-out; +} + +.gallerypicture:hover img { + -webkit-transform: scale(1.3); + transform: scale(1.3); +} + +@media (max-width: 1000px) { + .navigation a { + font-size: 18px; + } + + #about-aurora .box { + width: 100%; + margin-bottom: 50px; + } + + .gallerypicture { + width: 44%; + } + + #map { + height: 400px; + } +} + +@media (max-width: 600px) { + .navigation { + top: 40px; + } + + .navigation a { + display: inline-block; + width: 100px; + } + + .gallerypicture { + width: 94%; + } + + #map { + height: 300px; + } +} \ No newline at end of file diff --git a/zdjecia/aurora-borealis-744351_960_720.webp b/zdjecia/aurora-borealis-744351_960_720.webp new file mode 100644 index 00000000..f71ef05a Binary files /dev/null and b/zdjecia/aurora-borealis-744351_960_720.webp differ diff --git a/zdjecia/aurora-g02ff7546e_1920.jpg b/zdjecia/aurora-g02ff7546e_1920.jpg new file mode 100644 index 00000000..14de8151 Binary files /dev/null and b/zdjecia/aurora-g02ff7546e_1920.jpg differ diff --git a/zdjecia/aurora-g537af5b0e_1920.jpg b/zdjecia/aurora-g537af5b0e_1920.jpg new file mode 100644 index 00000000..e30b9e0a Binary files /dev/null and b/zdjecia/aurora-g537af5b0e_1920.jpg differ diff --git a/zdjecia/aurora-g74f410e95_1920.jpg b/zdjecia/aurora-g74f410e95_1920.jpg new file mode 100644 index 00000000..b83615ac Binary files /dev/null and b/zdjecia/aurora-g74f410e95_1920.jpg differ diff --git a/zdjecia/iceland-g20b81ef57_1920.jpg b/zdjecia/iceland-g20b81ef57_1920.jpg new file mode 100644 index 00000000..8075a304 Binary files /dev/null and b/zdjecia/iceland-g20b81ef57_1920.jpg differ diff --git a/zdjecia/nature-gd8b0ff76e_1920.jpg b/zdjecia/nature-gd8b0ff76e_1920.jpg new file mode 100644 index 00000000..b89c8442 Binary files /dev/null and b/zdjecia/nature-gd8b0ff76e_1920.jpg differ diff --git a/zdjecia/northern-lights-g10bf04e4b_1920.jpg b/zdjecia/northern-lights-g10bf04e4b_1920.jpg new file mode 100644 index 00000000..6fc009d4 Binary files /dev/null and b/zdjecia/northern-lights-g10bf04e4b_1920.jpg differ diff --git a/zdjecia/northern-lights-gc31bdc65b_1920.jpg b/zdjecia/northern-lights-gc31bdc65b_1920.jpg new file mode 100644 index 00000000..d71cd422 Binary files /dev/null and b/zdjecia/northern-lights-gc31bdc65b_1920.jpg differ