Skip to content

Commit 8d274c5

Browse files
committed
update the code
1 parent 14b4d80 commit 8d274c5

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

05_weather-app/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<title>Weather App</title>
77
<script src="https://cdn.tailwindcss.com"></script>
88
</head>
9-
<body class="bg-[url('./download.jpeg')] bg-cover bg-center bg-no-repeat h-screen flex items-center justify-center backdrop-brightness-80">
9+
<body class="bg-gray-600">
1010

1111
<div class=" p-8 rounded-xl shadow-lg w-full max-w-md backdrop-blur-sm">
1212
<form id="weather-form" class="flex gap-2 mb-6">

05_weather-app/script.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
const cityInput = document.getElementById('city-input');
2+
const weatherData = document.getElementById('weather-data');
3+
const cityName = document.getElementById('city-name');
4+
const temperature = document.getElementById('temperature');
5+
const weatherDesc = document.getElementById('weather-description');
6+
const humidityValue = document.getElementById('humidity');
7+
const windspeedValue = document.getElementById('windspeed');
8+
const search = document.querySelector('#weather-form button');
9+
10+
search.addEventListener('click', () => {
11+
const APIKey = 'f23d9832cb86b7e516bf0bc3272bf1de';
12+
const city = cityInput.value;
13+
if (city == '') {
14+
return;
15+
}
16+
})

0 commit comments

Comments
 (0)