diff --git a/server/scripts/modules/currentweatherscroll.js b/server/scripts/modules/currentweatherscroll.js index cffe993..195e006 100644 --- a/server/scripts/modules/currentweatherscroll.js +++ b/server/scripts/modules/currentweatherscroll.js @@ -61,7 +61,7 @@ const currentWeatherScroll = (() => { if (!data) return; // clean up any old text - if (context) context.putImageData(blankDrawArea, 0, 405); + if (context && blankDrawArea) context.putImageData(blankDrawArea, 0, 405); drawCondition(screens[screenIndex](data)); }; diff --git a/server/scripts/modules/hourly.js b/server/scripts/modules/hourly.js index 466cd62..c4b7a3d 100644 --- a/server/scripts/modules/hourly.js +++ b/server/scripts/modules/hourly.js @@ -30,6 +30,7 @@ class Hourly extends WeatherDisplay { console.error('Get hourly forecast failed'); console.error(e.status, e.responseJSON); this.setStatus(STATUS.failed); + return; } this.data = await Hourly.parseForecast(forecast.properties); diff --git a/server/scripts/modules/regionalforecast.js b/server/scripts/modules/regionalforecast.js index 23c1dda..28201a3 100644 --- a/server/scripts/modules/regionalforecast.js +++ b/server/scripts/modules/regionalforecast.js @@ -343,17 +343,24 @@ class RegionalForecast extends WeatherDisplay { draw.triangle(this.context, 'rgb(28, 10, 87)', 500, 30, 450, 90, 500, 90); // draw the appropriate title + const titleTop = this.elem.querySelector('.title.dual .top'); + const titleBottom = this.elem.querySelector('.title.dual .bottom'); if (this.screenIndex === 0) { + titleTop.innerHTML = 'Regional'; + titleBottom.innerHTML = 'Observations'; draw.titleText(this.context, 'Regional', 'Observations'); } else { const forecastDate = DateTime.fromISO(data[0][this.screenIndex].time); // get the name of the day const dayName = forecastDate.toLocaleString({ weekday: 'long' }); + titleTop.innerHTML = 'Forecast for'; // draw the title if (data[0][this.screenIndex].daytime) { + titleBottom.innerHTML = dayName; draw.titleText(this.context, 'Forecast for', dayName); } else { + titleBottom.innerHTML = `${dayName} Night`; draw.titleText(this.context, 'Forecast for', `${dayName} Night`); } } diff --git a/server/styles/compiled.css b/server/styles/compiled.css index 84d1555..dcfec28 100644 --- a/server/styles/compiled.css +++ b/server/styles/compiled.css @@ -27,6 +27,7 @@ font-family: "Star4000"; font-size: 24pt; position: absolute; + width: 200px; } .weather-display .header .title.single { left: 170px; @@ -350,7 +351,7 @@ position: absolute; width: 140px; margin-left: -40px; - margin-top: -30px; + margin-top: -35px; } .weather-display .main.regional-forecast .location > div { position: absolute; @@ -370,7 +371,7 @@ font-family: "Star4000 Large Compressed"; font-size: 28px; color: yellow; - top: 22px; + top: 32px; text-align: right; width: 40px; } diff --git a/server/styles/compiled.css.map b/server/styles/compiled.css.map index 0e23f37..1a173ec 100644 --- a/server/styles/compiled.css.map +++ b/server/styles/compiled.css.map @@ -1 +1 @@ -{"version":3,"sources":["scss/_weatherdisplay.scss","compiled.css","scss/_colors.scss","scss/_utils.scss","scss/_hourly.scss","scss/_current-weather.scss","scss/_local-forecast.scss","scss/_latest-observations.scss","scss/_regional-forecast.scss"],"names":[],"mappings":"AAGA;EACC,YAAA;EACA,aAAA;EACA,gBAAA;EACA,kBAAA;EACA,kDAAA;EAEA,oFAAA;EACA,WAAA;ACHD;ADKC;EACC,aAAA;ACHF;ADMC;EACC,aAAA;ACJF;ADOC;EACC,YAAA;EACA,YAAA;EACA,iBAAA;ACLF;ADOE;EACC,aE3BW;ECGb,mEAAA;EACA,oCAAA;EACA,8BAAA;EACA,0LACC;EHsBC,uBAAA;EACA,eAAA;EACA,kBAAA;ACFH;ADIG;EACC,WAAA;EACA,SAAA;ACFJ;ADKG;EACC,WAAA;ACHJ;ADKI;EACC,kBAAA;ACHL;ADMI;EACC,SAAA;ACJL;ADOI;EACC,SAAA;ACLL;ADWE;EACC,SAAA;EACA,UAAA;EACA,kBAAA;EACA,WAAA;ACTH;ADYE;EACC,kBAAA;EACA,SAAA;EACA,WAAA;ACVH;ADaE;EACC,SAAA;ACXH;ADcE;EACC,gBAAA;EACA,YE1ES;EF2ET,6BAAA;EACA,eAAA;EG1EF,mEAAA;EACA,oCAAA;EACA,8BAAA;EACA,0LACC;EHwEC,WAAA;EACA,YAAA;EACA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;EACA,0LACC;EIiDE,kBAAA;EACA,YAAA;AN8QJ;AM5QI;EACC,kBAAA;EACA,QAAA;AN8QL;AM3QI;EACC,gBAAA;EACA,iBAAA;AN6QL;;AO5UA;EACC,oDAAA;AP+UD;;AO5UA;EAGC,kBAAA;AP6UD;AO3UC;EACC,kBAAA;AP6UF;AO1UC;EACC,kBAAA;EACA,YAAA;EACA,kBAAA;EACA,iBAAA;AP4UF;AO1UE;EACC,kBAAA;ELpBF,mEAAA;EACA,oCAAA;EACA,8BAAA;EACA,0LACC;AFgWF;AO5UE;EACC,SAAA;EACA,UAAA;AP8UH;AO5UG;EACC,eAAA;AP8UJ;AO1UE;EACC,wCAAA;EACA,eAAA;EACA,aNvCW;EMwCX,SAAA;EACA,iBAAA;EACA,WAAA;AP4UH;AOzUE;EACC,qBAAA;EACA,eAAA;AP2UH","file":"compiled.css"} \ No newline at end of file +{"version":3,"sources":["scss/_weatherdisplay.scss","compiled.css","scss/_colors.scss","scss/_utils.scss","scss/_hourly.scss","scss/_current-weather.scss","scss/_local-forecast.scss","scss/_latest-observations.scss","scss/_regional-forecast.scss"],"names":[],"mappings":"AAGA;EACC,YAAA;EACA,aAAA;EACA,gBAAA;EACA,kBAAA;EACA,kDAAA;EAEA,oFAAA;EACA,WAAA;ACHD;ADKC;EACC,aAAA;ACHF;ADMC;EACC,aAAA;ACJF;ADOC;EACC,YAAA;EACA,YAAA;EACA,iBAAA;ACLF;ADOE;EACC,aE3BW;ECGb,mEAAA;EACA,oCAAA;EACA,8BAAA;EACA,0LACC;EHsBC,uBAAA;EACA,eAAA;EACA,kBAAA;EACA,YAAA;ACFH;ADIG;EACC,WAAA;EACA,SAAA;ACFJ;ADKG;EACC,WAAA;ACHJ;ADKI;EACC,kBAAA;ACHL;ADMI;EACC,SAAA;ACJL;ADOI;EACC,SAAA;ACLL;ADWE;EACC,SAAA;EACA,UAAA;EACA,kBAAA;EACA,WAAA;ACTH;ADYE;EACC,kBAAA;EACA,SAAA;EACA,WAA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AN+QH;AM5QE;EACC,WAAA;AN8QH;AM3QE;EACC,WAAA;AN6QH;AM1QE;EACC,iBAAA;EACA,iBAAA;AN4QH;AM1QG;EACC,uBAAA;EACA,eAAA;EJnDH,mEAAA;EACA,oCAAA;EACA,8BAAA;EACA,0LACC;EIiDE,kBAAA;EACA,YAAA;AN+QJ;AM7QI;EACC,kBAAA;EACA,QAAA;AN+QL;AM5QI;EACC,gBAAA;EACA,iBAAA;AN8QL;;AO7UA;EACC,oDAAA;APgVD;;AO7UA;EAGC,kBAAA;AP8UD;AO5UC;EACC,kBAAA;AP8UF;AO3UC;EACC,kBAAA;EACA,YAAA;EACA,kBAAA;EACA,iBAAA;AP6UF;AO3UE;EACC,kBAAA;ELpBF,mEAAA;EACA,oCAAA;EACA,8BAAA;EACA,0LACC;AFiWF;AO7UE;EACC,SAAA;EACA,UAAA;AP+UH;AO7UG;EACC,eAAA;AP+UJ;AO3UE;EACC,wCAAA;EACA,eAAA;EACA,aNvCW;EMwCX,SAAA;EACA,iBAAA;EACA,WAAA;AP6UH;AO1UE;EACC,qBAAA;EACA,eAAA;AP4UH","file":"compiled.css"} \ No newline at end of file diff --git a/server/styles/scss/_regional-forecast.scss b/server/styles/scss/_regional-forecast.scss index 64e333a..8994959 100644 --- a/server/styles/scss/_regional-forecast.scss +++ b/server/styles/scss/_regional-forecast.scss @@ -18,7 +18,7 @@ position: absolute; width: 140px; margin-left: -40px; - margin-top: -30px; + margin-top: -35px; >div { position: absolute; @@ -38,7 +38,7 @@ font-family: 'Star4000 Large Compressed'; font-size: 28px; color: c.$title-color; - top: 22px; + top: 32px; text-align: right; width: 40px; } diff --git a/server/styles/scss/_weatherdisplay.scss b/server/styles/scss/_weatherdisplay.scss index 22256e1..014e9ec 100644 --- a/server/styles/scss/_weatherdisplay.scss +++ b/server/styles/scss/_weatherdisplay.scss @@ -30,6 +30,7 @@ font-family: 'Star4000'; font-size: 24pt; position: absolute; + width: 200px; &.single { left: 170px;