summaryrefslogtreecommitdiff
path: root/web/src/sidebar.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'web/src/sidebar.tsx')
-rw-r--r--web/src/sidebar.tsx5
1 files changed, 3 insertions, 2 deletions
diff --git a/web/src/sidebar.tsx b/web/src/sidebar.tsx
index de7b2fd..6ada6f9 100644
--- a/web/src/sidebar.tsx
+++ b/web/src/sidebar.tsx
@@ -50,12 +50,13 @@ async function updateWeather() {
function Weather() {
setTimeout( updateWeather );
const weather = getWeatherCache();
+ const small = !!( window.innerWidth < 750 );
if( weather && weather.current ) {
const temp = weather.current.temperature_2m;
const wind = weather.current.wind_speed_10m;
const humi = weather.current.relative_humidity_2m;
return <div id="weather">
- <div class="sidebar-row" style="margin-top: 0px; margin-bottom: 0px;"><h4>weather in </h4> <h4>愛知県、日本:</h4></div>
+ <div class="sidebar-row" style="margin-top: 0px; margin-bottom: 0px;"><h4>weather in </h4> <h4>愛知県,日本{ !small && <span>:</span> }</h4></div>
<div class="sidebar-row" style="margin-top: 0px; margin-bottom: 0px;"><h4>temperature:</h4><h4><span id="temp">{temp.toString()}</span>°C</h4></div>
<div class="sidebar-row" style="margin-top: 0px; margin-bottom: 0px;"><h4>wind speed:</h4><h4><span id="wind">{wind.toString()}</span>km/h</h4></div>
<div class="sidebar-row" style="margin-top: 0px; margin-bottom: 0px;"><h4>humidity:</h4><h4><span id="humi">{humi.toString()}</span>%</h4></div>
@@ -63,7 +64,7 @@ function Weather() {
}
return <div id="weather">
- <div class="sidebar-row" style="margin-top: 0px; margin-bottom: 0px;"><h4>weather in </h4> <h4>愛知県、日本:</h4></div>
+ <div class="sidebar-row" style="margin-top: 0px; margin-bottom: 0px;"><h4>weather in </h4> <h4>愛知県,日本{ !small && <span>:</span> }</h4></div>
<div class="sidebar-row" style="margin-top: 0px; margin-bottom: 0px;"><h4>temperature:</h4><h4><span id="temp">--</span>°C</h4></div>
<div class="sidebar-row" style="margin-top: 0px; margin-bottom: 0px;"><h4>wind speed:</h4><h4><span id="wind">--</span>km/h</h4></div>
<div class="sidebar-row" style="margin-top: 0px; margin-bottom: 0px;"><h4>humidity:</h4><h4><span id="humi">--</span>%</h4></div>