Skip to content

Commit fa3f0e6

Browse files
committed
NEW FEATURES: UV + Humidity + Rainfall
1 parent 77d2030 commit fa3f0e6

6 files changed

Lines changed: 15 additions & 2 deletions

File tree

adelaide.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,9 @@ async function run(city) {
185185
console.log("formatTime = "+formatTime);
186186
p.textContent = formatTime + ". Temp: " + observations.data[i].temp + "°C. Jonty's Temp: " + (observations.data[i].temp_feels_like + 3)+"°C.";
187187
parent.appendChild(p);
188+
let q = document.createElement('p');
189+
q.textContent = "UV: " + observations.data[i].uv + ". Humidity: " + (observations.data[i].relative_humidity)+ "%. Is it raining? Not quite sure.";
190+
parent.appendChild(q);
188191
}
189192

190193
for (let i = 24; i > -1; i--){

brisbane.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,9 @@ async function run(city) {
185185
console.log("formatTime = "+formatTime);
186186
p.textContent = formatTime + ". Temp: " + observations.data[i].temp + "°C. Jonty's Temp: " + (observations.data[i].temp_feels_like + 3)+"°C.";
187187
parent.appendChild(p);
188+
let q = document.createElement('p');
189+
q.textContent = "UV: " + observations.data[i].uv + ". Humidity: " + (observations.data[i].relative_humidity)+ "%. Is it raining? Not quite sure.";
190+
parent.appendChild(q);
188191
}
189192

190193
for (let i = 24; i > -1; i--){

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ <h1 id="placeholder2">Melbourne</h1>
8282
</div> -->
8383
<div id="bot-box">
8484
<div class="row">
85-
<button class="city-btn">Show Humidity $0.99</button>
86-
<button class="city-btn">Show UV $0.99</button>
85+
<button class="city-btn">Show Advanced $0.99</button>
86+
<button class="city-btn">Show Cloud Cover $0.99</button>
8787
<button class="city-btn">Show Wind $0.99</button>
8888
<button class="city-btn">Show Rainfall $0.99</button>
8989
</div>

index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,9 @@ async function run(city) {
179179
console.log("formatTime = "+formatTime);
180180
p.textContent = formatTime + ". Temp: " + observations.data[i].temp + "°C. Jonty's Temp: " + (observations.data[i].temp_feels_like + 3)+"°C.";
181181
parent.appendChild(p);
182+
let q = document.createElement('p');
183+
q.textContent = "UV: " + observations.data[i].uv + ". Humidity: " + (observations.data[i].relative_humidity)+ "%. Is it raining? Not quite sure.";
184+
parent.appendChild(q);
182185
}
183186

184187
for (let i = 24; i > -1; i--){

sydney.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ <h1>Australian Non-governmental Weather</h1>
3737
<h2 id="feels2">You are valued.</h2>
3838
</div> -->
3939
<h1 id="placeholder2">Sydney</h1>
40+
<h1 id="placeholder3"></h1>
4041
<div id="idasdasd">
4142

4243
</div>

sydney.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,9 @@ async function run(city) {
186186
p.textContent = formatTime + ". Temp: " + observations.data[i].temp + "°C. Jonty's Temp: " + (observations.data[i].temp_feels_like + 3)+"°C.";
187187

188188
parent.appendChild(p);
189+
let q = document.createElement('p');
190+
q.textContent = "UV: " + observations.data[i].uv + ". Humidity: " + (observations.data[i].relative_humidity)+ "%. Is it raining? Not quite sure.";
191+
parent.appendChild(q);
189192
}
190193

191194
for (let i = 24; i > -1; i--){

0 commit comments

Comments
 (0)