From e79b9c72b7e50c4d9dbc3c4e7efca8189dd72b3e Mon Sep 17 00:00:00 2001 From: Petr Sahula Date: Wed, 7 Feb 2024 09:47:09 +0100 Subject: [PATCH] Finished dynemic temperature feature --- index.html | 7 ++++--- main.js | 8 ++++++++ 2 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 main.js diff --git a/index.html b/index.html index c1909a9..c9d870c 100644 --- a/index.html +++ b/index.html @@ -49,7 +49,7 @@

Test Your SPEEL Dev

Sunny Play

-

Our center is located in beautiful Miami, and it’s currently 84°F at our pet playground.

+

Our center is located in beautiful Miami, and it’s currently °F at our pet playground.

@@ -127,7 +127,7 @@

Barksalot

Barksalot

-

Meowsalot is the most talkative cat we’ve ever come across. Constant meowing, chirping and purring!

+

Meowsalot is the most talkative cat we’ve ever come across. Constant meowing, chirping and purring!

1 years old

@@ -147,7 +147,7 @@

Barksalot

Barksalot

-

Purrsloud has the loudest and most relaxing purr that’s come through our center. Come hear it yourself.

+

Purrsloud has the loudest and most relaxing purr that’s come through our center. Come hear it yourself.

4 years old

@@ -160,6 +160,7 @@

Barksalot

© 2023 Fake Adoption Center. All rights reserved

+ \ No newline at end of file diff --git a/main.js b/main.js new file mode 100644 index 0000000..fa6960c --- /dev/null +++ b/main.js @@ -0,0 +1,8 @@ +async function start() { + const weatherPromise = await fetch("https://api.weather.gov/gridpoints/MFL/110,50/forecast") + const weatherData = await weatherPromise.json() + const ourTemperature = weatherData.properties.periods[0].temperature + document.querySelector('#temperature-output').textContent = ourTemperature +} + +start()