From 28e994e5797da13e7f671a77d3c50de8cf77677a Mon Sep 17 00:00:00 2001
From: AllTrueVision <85555604+AllTrueVision@users.noreply.github.com>
Date: Tue, 1 Apr 2025 21:34:25 -0400
Subject: [PATCH] progress
---
index.html | 14 ++++++++++++++
main.js | 22 ++++++++++++++++++++++
style.css | 3 +++
3 files changed, 39 insertions(+)
create mode 100644 index.html
create mode 100644 main.js
create mode 100644 style.css
diff --git a/index.html b/index.html
new file mode 100644
index 0000000..98865f7
--- /dev/null
+++ b/index.html
@@ -0,0 +1,14 @@
+
+
+
+
+
+ Document
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/main.js b/main.js
new file mode 100644
index 0000000..a42f654
--- /dev/null
+++ b/main.js
@@ -0,0 +1,22 @@
+document.querySelector('button').addEventListener('click',letsGo)
+
+function letsGo(){
+ fetch("https://data.nasa.gov/resource/gvk9-iz74.json")
+ .then(res => res.json())
+ .then(data => {
+ const dataInformed = Math.floor(Math.random() * data.length)
+ facility = data[dataInformed]
+ document.querySelector('#center').innerHTML = facility.center
+ document.querySelector('#city').innerHTML = facility.city +','+ facility.state
+ let lat = facility.location.latitude
+ let lon = facility.location.longitude
+ fetch('https://api.openweathermap.org/data/2.5/weather?lat=${lat}&lon=${lon}&units=imperial&appid=')
+ .then(res => res.json())
+ .then(dataTwo =>{
+ console.log(dataTwo)
+ let temp = dataTwo.main.temp
+ let tempRound = Math.trunc(temp)
+ document.querySelector('#temp').innerHTML = '${tempRound}'
+ })
+ })
+}
\ No newline at end of file
diff --git a/style.css b/style.css
new file mode 100644
index 0000000..d731d06
--- /dev/null
+++ b/style.css
@@ -0,0 +1,3 @@
+*{
+ box-sizing: border-box;
+}