dashboard gauge wip
This commit is contained in:
parent
97e59c61d8
commit
aa068444a1
2 changed files with 4 additions and 3 deletions
include/Webserver
|
@ -348,7 +348,7 @@ a.disabled {
|
|||
}
|
||||
|
||||
|
||||
.gauge { height: calc(60px + 3.8em); }
|
||||
.gauge { height: calc(60px + 3.5em); }
|
||||
.gauge__container { width: 120px; height: 60px; }
|
||||
.gauge__marker { height: 60px; left: 59.5px; }
|
||||
.gauge__background { width: 120px; height: 60px; }
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
#include "Page_root_HTML.h"
|
||||
|
||||
/* TODO make this configurable some nice day */
|
||||
const byte Max_Dashboard_Gauge_PerLine = 3;
|
||||
|
||||
// https://techtutorialsx.com/2018/07/23/esp32-arduino-http-server-template-processing-with-multiple-placeholders/
|
||||
|
@ -51,8 +52,8 @@ String Proc_WebPage_root(const String& var) {
|
|||
html += config.grow.dashboard.gaugeRead[i];
|
||||
html += F("' style='float:left; ");
|
||||
|
||||
/* if it is the last gauge, dont add a margin */
|
||||
if((gaugeNrLine < Max_Dashboard_Gauge_PerLine) || (gaugeNr >= gaugeCount)) {
|
||||
/* if it is the last gauge (from the line), dont add a margin */
|
||||
if(((gaugeNrLine < Max_Dashboard_Gauge_PerLine) && (gaugeNr < gaugeCount)) ) {
|
||||
html += F("margin-right: 10px;'>");
|
||||
} else {
|
||||
html += F("'>");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue