dashboard gauge wip

This commit is contained in:
DeltaLima 2025-04-07 21:42:19 +02:00
parent 97e59c61d8
commit aa068444a1
2 changed files with 4 additions and 3 deletions

View file

@ -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; }

View file

@ -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("'>");