mirror of
https://github.com/netbymatt/ws4kp.git
synced 2026-04-17 17:19:30 -07:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
faaf6f770f | ||
|
|
79e4ed6e8b | ||
|
|
f956df1272 | ||
|
|
089ef56b10 |
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "ws4kp",
|
"name": "ws4kp",
|
||||||
"version": "5.23.0",
|
"version": "5.23.2",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "ws4kp",
|
"name": "ws4kp",
|
||||||
"version": "5.23.0",
|
"version": "5.23.2",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"dotenv": "^16.5.0",
|
"dotenv": "^16.5.0",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ws4kp",
|
"name": "ws4kp",
|
||||||
"version": "5.23.0",
|
"version": "5.23.2",
|
||||||
"description": "Welcome to the WeatherStar 4000+ project page!",
|
"description": "Welcome to the WeatherStar 4000+ project page!",
|
||||||
"main": "index.mjs",
|
"main": "index.mjs",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
|||||||
@@ -99,6 +99,12 @@ const drawScreen = async () => {
|
|||||||
break;
|
break;
|
||||||
default: drawCondition(thisScreen);
|
default: drawCondition(thisScreen);
|
||||||
}
|
}
|
||||||
|
// add the header if available
|
||||||
|
if (thisScreen.header) {
|
||||||
|
setHeader(thisScreen.header);
|
||||||
|
} else {
|
||||||
|
setHeader('');
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// can't identify screen, get another one
|
// can't identify screen, get another one
|
||||||
incrementInterval(true);
|
incrementInterval(true);
|
||||||
@@ -115,6 +121,7 @@ const hazards = (data) => {
|
|||||||
text: hazard,
|
text: hazard,
|
||||||
type: 'scroll',
|
type: 'scroll',
|
||||||
classes: ['hazard'],
|
classes: ['hazard'],
|
||||||
|
header: data.hazards[0].properties.event,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -167,6 +174,13 @@ const drawCondition = (text) => {
|
|||||||
elemForEach('.weather-display .scroll .fixed', (elem) => {
|
elemForEach('.weather-display .scroll .fixed', (elem) => {
|
||||||
elem.innerHTML = text;
|
elem.innerHTML = text;
|
||||||
});
|
});
|
||||||
|
setHeader('');
|
||||||
|
};
|
||||||
|
|
||||||
|
const setHeader = (text) => {
|
||||||
|
elemForEach('.weather-display .scroll .scroll-header', (elem) => {
|
||||||
|
elem.innerHTML = text ?? '';
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
// store the original number of screens
|
// store the original number of screens
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -22,9 +22,10 @@
|
|||||||
|
|
||||||
&.right {
|
&.right {
|
||||||
right: 0px;
|
right: 0px;
|
||||||
font-family: 'Star4000 Large';
|
font-family: "Star4000 Large";
|
||||||
font-size: 16pt;
|
font-size: 20px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
line-height: 24px;
|
||||||
|
|
||||||
.row {
|
.row {
|
||||||
margin-bottom: 12px;
|
margin-bottom: 12px;
|
||||||
|
|||||||
@@ -117,18 +117,28 @@
|
|||||||
height: 70px;
|
height: 70px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
margin-top: 3px;
|
margin-top: 3px;
|
||||||
padding-top: 7px;
|
|
||||||
|
|
||||||
&.hazard {
|
&.hazard {
|
||||||
background-color: rgb(112, 35, 35);
|
background-color: rgb(112, 35, 35);
|
||||||
}
|
}
|
||||||
|
|
||||||
.fixed {
|
.fixed,
|
||||||
font-family: 'Star4000';
|
.scroll-header {
|
||||||
font-size: 24pt;
|
|
||||||
margin-left: 55px;
|
margin-left: 55px;
|
||||||
margin-right: 55px;
|
margin-right: 55px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.scroll-header {
|
||||||
|
height: 26px;
|
||||||
|
font-family: "Star4000 Small";
|
||||||
|
font-size: 20pt;
|
||||||
|
margin-top: -10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fixed {
|
||||||
|
font-family: 'Star4000';
|
||||||
|
font-size: 24pt;
|
||||||
|
|
||||||
.scroll-area {
|
.scroll-area {
|
||||||
text-wrap: nowrap;
|
text-wrap: nowrap;
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<div class="scroll">
|
<div class="scroll">
|
||||||
<div class="scrolling template"></div>
|
<div class="scrolling template"></div>
|
||||||
|
<div class="scroll-header"></div>
|
||||||
<div class="fixed"></div>
|
<div class="fixed"></div>
|
||||||
</div>
|
</div>
|
||||||
Reference in New Issue
Block a user