Include weather

This commit is contained in:
Keith Horwood
2024-09-30 13:15:58 -07:00
parent 4d880a57c9
commit f3cda9ef5b
6 changed files with 18 additions and 6 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ that acts as a **Reference Client** (for browser and Node.js) and
[`/src/lib/wavtools`](./src/lib/wavtools) which allows for simple audio
management in the browser.
<img src="/readme/realtime-console.png" width="800" />
<img src="/readme/realtime-console-demo.png" width="800" />
# Starting the console
Binary file not shown.

After

Width:  |  Height:  |  Size: 863 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 758 KiB

+1
View File
@@ -14,6 +14,7 @@
padding: 8px 24px;
min-height: 42px;
transition: transform 0.1s ease-in-out, background-color 0.1s ease-in-out;
outline: none;
&.button-style-action {
background-color: #101010;
+4 -1
View File
@@ -83,6 +83,8 @@
position: absolute;
display: flex;
align-items: center;
justify-content: center;
line-height: 2em;
top: 16px;
left: 16px;
padding: 4px 16px;
@@ -90,11 +92,12 @@
border-radius: 1000px;
min-height: 32px;
z-index: 9999;
text-align: center;
white-space: pre;
text-align: right;
&.bottom {
top: auto;
bottom: 16px;
right: 16px;
}
}
}
+12 -4
View File
@@ -693,10 +693,18 @@ export function ConsolePage() {
<div className="content-block-title">get_weather()</div>
<div className="content-block-title bottom">
{marker?.location || 'not yet retrieved'}
{!!marker?.temperature &&
` 🌡️ ${marker.temperature.value} ${marker.temperature.units}`}
{!!marker?.wind_speed &&
` 🍃 ${marker.wind_speed.value} ${marker.wind_speed.units}`}
{!!marker?.temperature && (
<>
<br />
🌡 {marker.temperature.value} {marker.temperature.units}
</>
)}
{!!marker?.wind_speed && (
<>
{' '}
🍃 {marker.wind_speed.value} {marker.wind_speed.units}
</>
)}
</div>
<div className="content-block-body full">
{coords && (