local forecast as html
This commit is contained in:
parent
332f8f8d2f
commit
3e9d7708fa
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "ws4kp",
|
||||
"version": "4.1.3",
|
||||
"version": "5.0.0",
|
||||
"description": "Welcome to the WeatherStar 4000+ project page!",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
|
|
@ -1,17 +1,14 @@
|
|||
// display text based local forecast
|
||||
|
||||
/* globals WeatherDisplay, utils, STATUS, UNITS, draw, navigation */
|
||||
/* globals WeatherDisplay, utils, STATUS, UNITS, navigation */
|
||||
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
class LocalForecast extends WeatherDisplay {
|
||||
constructor(navId, elemId) {
|
||||
super(navId, elemId, 'Local Forecast');
|
||||
super(navId, elemId, 'Local Forecast', true, true);
|
||||
|
||||
// set timings
|
||||
this.timing.baseDelay = 5000;
|
||||
|
||||
// pre-load background image (returns promise)
|
||||
this.backgroundImage = utils.image.load('images/BackGround1_1.png');
|
||||
}
|
||||
|
||||
async getData(_weatherParameters) {
|
||||
|
@ -28,14 +25,8 @@ class LocalForecast extends WeatherDisplay {
|
|||
// parse raw data
|
||||
const conditions = LocalForecast.parse(rawData);
|
||||
|
||||
// split this forecast into the correct number of screens
|
||||
const maxRows = 7;
|
||||
const maxCols = 32;
|
||||
|
||||
this.screenTexts = [];
|
||||
|
||||
// read each text
|
||||
conditions.forEach((condition) => {
|
||||
this.screenTexts = conditions.map((condition) => {
|
||||
// process the text
|
||||
let text = `${condition.DayName.toUpperCase()}...`;
|
||||
let conditionText = condition.Text;
|
||||
|
@ -44,44 +35,23 @@ class LocalForecast extends WeatherDisplay {
|
|||
}
|
||||
text += conditionText.toUpperCase().replace('...', ' ');
|
||||
|
||||
text = utils.string.wordWrap(text, maxCols, '\n');
|
||||
const lines = text.split('\n');
|
||||
const lineCount = lines.length;
|
||||
let ScreenText = '';
|
||||
const maxRowCount = maxRows;
|
||||
let rowCount = 0;
|
||||
|
||||
// if (PrependAlert) {
|
||||
// ScreenText = LocalForecastScreenTexts[LocalForecastScreenTexts.length - 1];
|
||||
// rowCount = ScreenText.split('\n').length - 1;
|
||||
// }
|
||||
|
||||
for (let i = 0; i <= lineCount - 1; i += 1) {
|
||||
if (lines[i] !== '') {
|
||||
if (rowCount > maxRowCount - 1) {
|
||||
// if (PrependAlert) {
|
||||
// LocalForecastScreenTexts[LocalForecastScreenTexts.length - 1] = ScreenText;
|
||||
// PrependAlert = false;
|
||||
// } else {
|
||||
this.screenTexts.push(ScreenText);
|
||||
// }
|
||||
ScreenText = '';
|
||||
rowCount = 0;
|
||||
}
|
||||
|
||||
ScreenText += `${lines[i]}\n`;
|
||||
rowCount += 1;
|
||||
}
|
||||
}
|
||||
// if (PrependAlert) {
|
||||
// this.screenTexts[this.screenTexts.length - 1] = ScreenText;
|
||||
// PrependAlert = false;
|
||||
// } else {
|
||||
this.screenTexts.push(ScreenText);
|
||||
// }
|
||||
return text;
|
||||
});
|
||||
|
||||
this.timing.totalScreens = this.screenTexts.length;
|
||||
// fill the forecast texts
|
||||
const templates = this.screenTexts.map((text) => this.fillTemplate('forecast', { text }));
|
||||
const forecastsElem = this.elem.querySelector('.forecasts');
|
||||
forecastsElem.innerHTML = '';
|
||||
forecastsElem.append(...templates);
|
||||
|
||||
// increase each forecast height to a multiple of container height
|
||||
this.pageHeight = forecastsElem.parentNode.getBoundingClientRect().height;
|
||||
templates.forEach((forecast) => {
|
||||
const newHeight = Math.ceil(forecast.scrollHeight / this.pageHeight) * this.pageHeight;
|
||||
forecast.style.height = `${newHeight}px`;
|
||||
});
|
||||
|
||||
this.timing.totalScreens = forecastsElem.scrollHeight / this.pageHeight;
|
||||
this.calcNavTiming();
|
||||
this.setStatus(STATUS.loaded);
|
||||
}
|
||||
|
@ -105,25 +75,12 @@ class LocalForecast extends WeatherDisplay {
|
|||
}
|
||||
}
|
||||
|
||||
// TODO: alerts needs a cleanup
|
||||
// TODO: second page of screenTexts when needed
|
||||
async drawCanvas() {
|
||||
super.drawCanvas();
|
||||
|
||||
this.context.drawImage(await this.backgroundImage, 0, 0);
|
||||
draw.horizontalGradientSingle(this.context, 0, 30, 500, 90, draw.topColor1, draw.topColor2);
|
||||
draw.triangle(this.context, 'rgb(28, 10, 87)', 500, 30, 450, 90, 500, 90);
|
||||
draw.horizontalGradientSingle(this.context, 0, 90, 52, 399, draw.sideColor1, draw.sideColor2);
|
||||
draw.horizontalGradientSingle(this.context, 584, 90, 640, 399, draw.sideColor1, draw.sideColor2);
|
||||
const top = -this.screenIndex * this.pageHeight;
|
||||
this.elem.querySelector('.forecasts').style.top = `${top}px`;
|
||||
|
||||
draw.titleText(this.context, 'Local ', 'Forecast');
|
||||
|
||||
// clear existing text
|
||||
draw.box(this.context, 'rgb(33, 40, 90)', 65, 105, 505, 280);
|
||||
// Draw the text.
|
||||
this.screenTexts[this.screenIndex].split('\n').forEach((text, index) => {
|
||||
draw.text(this.context, 'Star4000', '24pt', '#FFFFFF', 75, 140 + 40 * index, text, 2);
|
||||
});
|
||||
this.finishDraw();
|
||||
}
|
||||
|
||||
|
|
|
@ -101,7 +101,7 @@ const navigation = (() => {
|
|||
new Hourly(2, 'hourly'),
|
||||
new TravelForecast(3, 'travelForecast', false), // not active by default
|
||||
new RegionalForecast(4, 'regionalForecast'),
|
||||
new LocalForecast(5, 'localForecast'),
|
||||
new LocalForecast(5, 'local-forecast'),
|
||||
new ExtendedForecast(6, 'extendedForecast'),
|
||||
almanac,
|
||||
new Radar(8, 'radar'),
|
||||
|
|
|
@ -284,7 +284,7 @@ class WeatherDisplay {
|
|||
|
||||
isActive() {
|
||||
if (!this.isHtml) return document.getElementById(`${this.elemId}Canvas`).offsetParent !== null;
|
||||
return this.elem.offsetParent !== null;
|
||||
return this.elem.offsetHeight !== 0;
|
||||
}
|
||||
|
||||
isEnabled() {
|
||||
|
|
|
@ -4,10 +4,11 @@
|
|||
overflow: hidden;
|
||||
position: relative;
|
||||
background-image: url(../images/BackGround1_1.png);
|
||||
display: none;
|
||||
/* this method is required to hide blocks so they can be measured while off screen */
|
||||
height: 0px;
|
||||
}
|
||||
.weather-display.show {
|
||||
display: block;
|
||||
height: 480px;
|
||||
}
|
||||
.weather-display .template {
|
||||
display: none;
|
||||
|
@ -94,22 +95,22 @@
|
|||
margin-top: 10px;
|
||||
}
|
||||
|
||||
#hourly-html.weather-display .main {
|
||||
.weather-display .hourly .main {
|
||||
overflow-y: hidden;
|
||||
}
|
||||
#hourly-html.weather-display .main .column-headers {
|
||||
.weather-display .hourly .main .column-headers {
|
||||
background-color: rgb(32, 0, 87);
|
||||
height: 20px;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
}
|
||||
#hourly-html.weather-display .main .column-headers {
|
||||
.weather-display .hourly .main .column-headers {
|
||||
position: -webkit-sticky;
|
||||
position: sticky;
|
||||
top: 0px;
|
||||
z-index: 5;
|
||||
}
|
||||
#hourly-html.weather-display .main .column-headers div {
|
||||
.weather-display .hourly .main .column-headers div {
|
||||
display: inline-block;
|
||||
font-family: "Star4000 Small";
|
||||
font-size: 24pt;
|
||||
|
@ -122,21 +123,21 @@
|
|||
/* paint-order: stroke fill; */
|
||||
text-shadow: 3px 3px 0 black, -1.5px -1.5px 0 black, 0 -1.5px 0 black, 1.5px -1.5px 0 black, 1.5px 0 0 black, 1.5px 1.5px 0 black, 0 1.5px 0 black, -1.5px 1.5px 0 black, -1.5px 0 0 black;
|
||||
}
|
||||
#hourly-html.weather-display .main .column-headers .temp {
|
||||
.weather-display .hourly .main .column-headers .temp {
|
||||
left: 370px;
|
||||
}
|
||||
#hourly-html.weather-display .main .column-headers .like {
|
||||
.weather-display .hourly .main .column-headers .like {
|
||||
left: 450px;
|
||||
}
|
||||
#hourly-html.weather-display .main .column-headers .wind {
|
||||
.weather-display .hourly .main .column-headers .wind {
|
||||
left: 560px;
|
||||
}
|
||||
#hourly-html.weather-display .main .hourly-lines {
|
||||
.weather-display .hourly .main .hourly-lines {
|
||||
min-height: 338px;
|
||||
padding-top: 10px;
|
||||
background: repeating-linear-gradient(0deg, #001040 0px, #102080 136px, #102080 202px, #001040 338px);
|
||||
}
|
||||
#hourly-html.weather-display .main .hourly-lines .hourly-row {
|
||||
.weather-display .hourly .main .hourly-lines .hourly-row {
|
||||
font-family: "Star4000 Large";
|
||||
font-size: 24pt;
|
||||
height: 72px;
|
||||
|
@ -147,33 +148,33 @@
|
|||
text-shadow: 3px 3px 0 black, -1.5px -1.5px 0 black, 0 -1.5px 0 black, 1.5px -1.5px 0 black, 1.5px 0 0 black, 1.5px 1.5px 0 black, 0 1.5px 0 black, -1.5px 1.5px 0 black, -1.5px 0 0 black;
|
||||
position: relative;
|
||||
}
|
||||
#hourly-html.weather-display .main .hourly-lines .hourly-row > div {
|
||||
.weather-display .hourly .main .hourly-lines .hourly-row > div {
|
||||
position: absolute;
|
||||
white-space: pre;
|
||||
top: 8px;
|
||||
}
|
||||
#hourly-html.weather-display .main .hourly-lines .hourly-row .hour {
|
||||
.weather-display .hourly .main .hourly-lines .hourly-row .hour {
|
||||
left: 50px;
|
||||
}
|
||||
#hourly-html.weather-display .main .hourly-lines .hourly-row .icon {
|
||||
.weather-display .hourly .main .hourly-lines .hourly-row .icon {
|
||||
left: 280px;
|
||||
width: 70px;
|
||||
text-align: center;
|
||||
top: unset;
|
||||
}
|
||||
#hourly-html.weather-display .main .hourly-lines .hourly-row .temp {
|
||||
.weather-display .hourly .main .hourly-lines .hourly-row .temp {
|
||||
left: 370px;
|
||||
}
|
||||
#hourly-html.weather-display .main .hourly-lines .hourly-row .like {
|
||||
.weather-display .hourly .main .hourly-lines .hourly-row .like {
|
||||
left: 450px;
|
||||
}
|
||||
#hourly-html.weather-display .main .hourly-lines .hourly-row .wind {
|
||||
.weather-display .hourly .main .hourly-lines .hourly-row .wind {
|
||||
left: 530px;
|
||||
width: 100px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
#current-weather-html.weather-display .main .col {
|
||||
.weather-display .current-weather .main .col {
|
||||
height: 50px;
|
||||
width: 255px;
|
||||
display: inline-block;
|
||||
|
@ -184,61 +185,84 @@
|
|||
/* paint-order: stroke fill; */
|
||||
text-shadow: 3px 3px 0 black, -1.5px -1.5px 0 black, 0 -1.5px 0 black, 1.5px -1.5px 0 black, 1.5px 0 0 black, 1.5px 1.5px 0 black, 0 1.5px 0 black, -1.5px 1.5px 0 black, -1.5px 0 0 black;
|
||||
}
|
||||
#current-weather-html.weather-display .main .col.left {
|
||||
.weather-display .current-weather .main .col.left {
|
||||
font-family: "Star4000 Extended";
|
||||
font-size: 24pt;
|
||||
}
|
||||
#current-weather-html.weather-display .main .col.right {
|
||||
.weather-display .current-weather .main .col.right {
|
||||
right: 0px;
|
||||
font-family: "Star4000 Large";
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
}
|
||||
#current-weather-html.weather-display .main .col.right .row {
|
||||
.weather-display .current-weather .main .col.right .row {
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
#current-weather-html.weather-display .main .col.right .row .label,
|
||||
#current-weather-html.weather-display .main .col.right .row .value {
|
||||
.weather-display .current-weather .main .col.right .row .label,
|
||||
.weather-display .current-weather .main .col.right .row .value {
|
||||
display: inline-block;
|
||||
}
|
||||
#current-weather-html.weather-display .main .col.right .row .label {
|
||||
.weather-display .current-weather .main .col.right .row .label {
|
||||
margin-left: 20px;
|
||||
}
|
||||
#current-weather-html.weather-display .main .col.right .row .value {
|
||||
.weather-display .current-weather .main .col.right .row .value {
|
||||
float: right;
|
||||
margin-right: 10px;
|
||||
}
|
||||
#current-weather-html.weather-display .main .center {
|
||||
.weather-display .current-weather .main .center {
|
||||
text-align: center;
|
||||
}
|
||||
#current-weather-html.weather-display .main .temp {
|
||||
.weather-display .current-weather .main .temp {
|
||||
font-family: "Star4000 Large";
|
||||
font-size: 24pt;
|
||||
}
|
||||
#current-weather-html.weather-display .main .icon {
|
||||
.weather-display .current-weather .main .icon {
|
||||
height: 100px;
|
||||
}
|
||||
#current-weather-html.weather-display .main .icon img {
|
||||
.weather-display .current-weather .main .icon img {
|
||||
max-width: 126px;
|
||||
}
|
||||
#current-weather-html.weather-display .main .wind-container {
|
||||
.weather-display .current-weather .main .wind-container {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
#current-weather-html.weather-display .main .wind-container > div {
|
||||
.weather-display .current-weather .main .wind-container > div {
|
||||
width: 45%;
|
||||
display: inline-block;
|
||||
margin: 0px;
|
||||
}
|
||||
#current-weather-html.weather-display .main .wind-container .wind-label {
|
||||
.weather-display .current-weather .main .wind-container .wind-label {
|
||||
margin-left: 5px;
|
||||
}
|
||||
#current-weather-html.weather-display .main .wind-container .wind {
|
||||
.weather-display .current-weather .main .wind-container .wind {
|
||||
text-align: right;
|
||||
}
|
||||
#current-weather-html.weather-display .main .wind-gusts {
|
||||
.weather-display .current-weather .main .wind-gusts {
|
||||
margin-left: 5px;
|
||||
}
|
||||
#current-weather-html.weather-display .main .location {
|
||||
.weather-display .current-weather .main .location {
|
||||
color: yellow;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.weather-display .local-forecast .container {
|
||||
position: relative;
|
||||
top: 15px;
|
||||
margin: 0px 10px;
|
||||
box-sizing: border-box;
|
||||
height: 280px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.weather-display .local-forecast .forecasts {
|
||||
position: relative;
|
||||
}
|
||||
.weather-display .local-forecast .forecast {
|
||||
font-family: "Star4000";
|
||||
font-size: 24pt;
|
||||
text-transform: uppercase;
|
||||
/* eventually, when chrome supports paint-order for html elements */
|
||||
/* -webkit-text-stroke: 2px black; */
|
||||
/* paint-order: stroke fill; */
|
||||
text-shadow: 3px 3px 0 black, -1.5px -1.5px 0 black, 0 -1.5px 0 black, 1.5px -1.5px 0 black, 1.5px 0 0 black, 1.5px 1.5px 0 black, 0 1.5px 0 black, -1.5px 1.5px 0 black, -1.5px 0 0 black;
|
||||
min-height: 280px;
|
||||
line-height: 40px;
|
||||
}/*# sourceMappingURL=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"],"names":[],"mappings":"AAGA;EACC,YAAA;EACA,aAAA;EACA,gBAAA;EACA,kBAAA;EACA,kDAAA;EACA,aAAA;ACFD;ADIC;EACC,cAAA;ACFF;ADKC;EACC,aAAA;ACHF;ADMC;EACC,YAAA;EACA,YAAA;EACA,iBAAA;ACJF;ADME;EACC,aEzBW;ECGb,mEAAA;EACA,oCAAA;EACA,8BAAA;EACA,0LACC;EHoBC,uBAAA;EACA,eAAA;EACA,kBAAA;ACDH;ADGG;EACC,WAAA;EACA,SAAA;ACDJ;ADIG;EACC,WAAA;ACFJ;ADII;EACC,kBAAA;ACFL;ADKI;EACC,SAAA;ACHL;ADMI;EACC,SAAA;ACJL;ADUE;EACC,SAAA;EACA,UAAA;EACA,kBAAA;EACA,WAAA;ACRH;ADWE;EACC,kBAAA;EACA,SAAA;EACA,WAAA;ACTH;ADYE;EACC,SAAA;ACVH;ADaE;EACC,gBAAA;EACA,YExES;EFyET,6BAAA;EACA,eAAA;EGxEF,mEAAA;EACA,oCAAA;EACA,8BAAA;EACA,0LACC;EHsEC,WAAA;EACA,YAAA;EACA,iBAAA;EACA,kBAAA;ACRH;ADUG;EACC,iBAAA;ACRJ;ADaC;EACC,kBAAA;ACXF;ADaE;EACC,YAAA;EACA,aAAA;EACA,gBAAA;ACXH;ADcE;EACC,iBAAA;EACA,kBAAA;EACA,yBAAA;ACZH;ADiBC;EACC,YAAA;EACA,YAAA;EACA,gBAAA;EACA,gBAAA;ACfF;;AG1FC;EACC,kBAAA;AH6FF;AG3FE;EACC,gCFJa;EEKb,YAAA;EACA,kBAAA;EACA,WAAA;AH6FH;AG1FE;EACC,wBAAA;EAAA,gBAAA;EACA,QAAA;EACA,UAAA;AH4FH;AG1FG;EACC,qBAAA;EACA,6BAAA;EACA,eAAA;EACA,aFpBiB;EEqBjB,kBAAA;EACA,UAAA;EACA,UAAA;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sources":["scss/_weatherdisplay.scss","compiled.css","scss/_colors.scss","scss/_utils.scss","scss/_hourly.scss","scss/_current-weather.scss","scss/_local-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,iBAAA;EACA,kBAAA;ACTH;ADWG;EACC,iBAAA;ACTJ;ADcC;EACC,kBAAA;ACZF;ADcE;EACC,YAAA;EACA,aAAA;EACA,gBAAA;ACZH;ADeE;EACC,iBAAA;EACA,kBAAA;EACA,yBAAA;ACbH;ADkBC;EACC,YAAA;EACA,YAAA;EACA,gBAAA;EACA,gBAAA;AChBF;;AG3FC;EACC,kBAAA;AH8FF;AG5FE;EACC,gCFJa;EEKb,YAAA;EACA,kBAAA;EACA,WAAA;AH8FH;AG3FE;EACC,wBAAA;EAAA,gBAAA;EACA,QAAA;EACA,UAAA;AH6FH;AG3FG;EACC,qBAAA;EACA,6BAAA;EACA,eAAA;EACA,aFpBiB;EEqB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A;AJuJH;;AK/OC;EACC,kBAAA;EACA,SAAA;EACA,gBAAA;EACA,sBAAA;EACA,aAAA;EACA,gBAAA;ALkPF;AK/OC;EACC,kBAAA;ALiPF;AK9OC;EACC,uBAAA;EACA,eAAA;EACA,yBAAA;EHjBD,mEAAA;EACA,oCAAA;EACA,8BAAA;EACA,0LACC;EGeA,iBAAA;EACA,iBAAA;ALmPF","file":"compiled.css"}
|
|
@ -1,7 +1,7 @@
|
|||
@use 'colors'as c;
|
||||
@use 'utils'as u;
|
||||
|
||||
#current-weather-html.weather-display {
|
||||
.weather-display .current-weather {
|
||||
.main {
|
||||
|
||||
.col {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
@use 'colors'as c;
|
||||
@use 'utils'as u;
|
||||
|
||||
#hourly-html.weather-display {
|
||||
.weather-display .hourly {
|
||||
.main {
|
||||
overflow-y: hidden;
|
||||
|
||||
|
|
26
server/styles/scss/_local-forecast.scss
Normal file
26
server/styles/scss/_local-forecast.scss
Normal file
|
@ -0,0 +1,26 @@
|
|||
@use 'colors'as c;
|
||||
@use 'utils'as u;
|
||||
|
||||
.weather-display .local-forecast {
|
||||
.container {
|
||||
position: relative;
|
||||
top: 15px;
|
||||
margin: 0px 10px;
|
||||
box-sizing: border-box;
|
||||
height: 280px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.forecasts {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.forecast {
|
||||
font-family: 'Star4000';
|
||||
font-size: 24pt;
|
||||
text-transform: uppercase;
|
||||
@include u.text-shadow();
|
||||
min-height: 280px;
|
||||
line-height: 40px;
|
||||
}
|
||||
}
|
|
@ -7,10 +7,12 @@
|
|||
overflow: hidden;
|
||||
position: relative;
|
||||
background-image: url(../images/BackGround1_1.png);
|
||||
display: none;
|
||||
|
||||
/* this method is required to hide blocks so they can be measured while off screen */
|
||||
height: 0px;
|
||||
|
||||
&.show {
|
||||
display: block;
|
||||
height: 480px;
|
||||
}
|
||||
|
||||
.template {
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
@use '_weatherdisplay';
|
||||
@use '_hourly';
|
||||
@use '_current-weather';
|
||||
@use '_local-forecast';
|
|
@ -4,13 +4,6 @@
|
|||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="preload" href="fonts/Star4000.woff" as="font" crossorigin="anonymous" />
|
||||
<link rel="preload" href="fonts/Star 4 Radar.woff" as="font" crossorigin="anonymous" />
|
||||
<link rel="preload" href="fonts/Star4000 Extended.woff" as="font" crossorigin="anonymous" />
|
||||
<link rel="preload" href="fonts/Star4000 Large Compressed.woff" as="font" crossorigin="anonymous" />
|
||||
<link rel="preload" href="fonts/Star4000 Large.woff" as="font" crossorigin="anonymous" />
|
||||
<link rel="preload" href="fonts/Star4000 Small.woff" as="font" crossorigin="anonymous" />
|
||||
|
||||
<title>WeatherStar 4000+</title>
|
||||
<meta name="description"
|
||||
content="Web based WeatherStar 4000 simulator that reports current and forecast weather conditions plus a few extras!" />
|
||||
|
@ -103,6 +96,9 @@
|
|||
<div id="current-weather-html" class="weather-display">
|
||||
<%- include('partials/current-weather.ejs') %>
|
||||
</div>
|
||||
<div id="local-forecast-html" class="weather-display">
|
||||
<%- include('partials/local-forecast.ejs') %>
|
||||
</div>
|
||||
</div>
|
||||
<div id="divTwcBottom">
|
||||
<div id="divTwcBottomLeft">
|
||||
|
|
12
views/partials/local-forecast.ejs
Normal file
12
views/partials/local-forecast.ejs
Normal file
|
@ -0,0 +1,12 @@
|
|||
<%- include('header.ejs', {titleDual:{ top: 'Local' , bottom: 'Forecast' }, hasTime: true, noaaLogo: true}) %>
|
||||
<div class="main has-scroll has-box local-forecast">
|
||||
<div class="container">
|
||||
<div class="forecasts">
|
||||
<div class="forecast template">
|
||||
<div class="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%- include('scroll.ejs') %>
|
Loading…
Reference in a new issue