mirror of
https://github.com/netbymatt/ws4kp.git
synced 2026-04-21 19:19:31 -07:00
progress/menu #167
This commit is contained in:
@@ -33,7 +33,7 @@ class Progress extends WeatherDisplay {
|
|||||||
// if no displays provided just draw the backgrounds (above)
|
// if no displays provided just draw the backgrounds (above)
|
||||||
if (!displays) return;
|
if (!displays) return;
|
||||||
const lines = displays.map((display, index) => {
|
const lines = displays.map((display, index) => {
|
||||||
if (display.showOnProgress === false) return false;
|
// all displays are drawn, some are tagged as only showing on the progress page in portrait
|
||||||
const fill = {
|
const fill = {
|
||||||
name: display.name,
|
name: display.name,
|
||||||
};
|
};
|
||||||
@@ -50,6 +50,8 @@ class Progress extends WeatherDisplay {
|
|||||||
links.classList.remove(...statusClasses);
|
links.classList.remove(...statusClasses);
|
||||||
links.classList.add(statusClass);
|
links.classList.add(statusClass);
|
||||||
links.dataset.index = index;
|
links.dataset.index = index;
|
||||||
|
// hide items not shown unless in portrait
|
||||||
|
if (!display.showOnProgress) line.classList.add('portrait-only');
|
||||||
return line;
|
return line;
|
||||||
}).filter((d) => d);
|
}).filter((d) => d);
|
||||||
|
|
||||||
|
|||||||
@@ -213,6 +213,12 @@ body {
|
|||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
background-color: #000000;
|
background-color: #000000;
|
||||||
|
|
||||||
|
// stick the nav bar to the bottom of the window in portrait
|
||||||
|
.portrait.enhanced & {
|
||||||
|
position: sticky;
|
||||||
|
bottom: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
width: p.$standard-width;
|
width: p.$standard-width;
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,11 @@
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
line-height: 28px;
|
line-height: 28px;
|
||||||
|
|
||||||
|
.portrait.enhanced & {
|
||||||
|
// variable height to keep the progress bar visible
|
||||||
|
height: unset;
|
||||||
|
}
|
||||||
|
|
||||||
.item {
|
.item {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
@@ -86,6 +91,10 @@
|
|||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.portrait.enhanced & {
|
||||||
|
margin-top: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
.progress-bar {
|
.progress-bar {
|
||||||
height: 20px;
|
height: 20px;
|
||||||
margin: 2px;
|
margin: 2px;
|
||||||
|
|||||||
2
server/styles/ws.min.css
vendored
2
server/styles/ws.min.css
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user