Skip to content

Commit 9364fb5

Browse files
committed
Updated HTML/CSS layout; Added Dark-Mode and autorefresh buttons on main page; dark mode works on all pages
Added favicon
1 parent c1968a7 commit 9364fb5

1 file changed

Lines changed: 182 additions & 44 deletions

File tree

marquee/marquee.ino

Lines changed: 182 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,14 @@
3636

3737
// Refresh main web page every x seconds, or disable by uncomment or set to 0
3838
#define WEBPAGE_AUTOREFRESH 20
39-
39+
// DARK mode: Add button to main page to toggle webpage dark mode
40+
#define WEBPAGE_DARKMODE
4041

4142
//declaring prototypes
4243
void configModeCallback(WiFiManager *myWiFiManager);
4344
int8_t getWifiQuality();
45+
void sendHeader(boolean isMainPage = false);
46+
4447

4548
// LED Settings
4649
const int offset = 1;
@@ -89,39 +92,168 @@ ESP8266WebServer server(WEBSERVER_PORT);
8992
ESP8266HTTPUpdateServer serverUpdater;
9093

9194
static const char WEB_HEADER[] PROGMEM = "<!DOCTYPE HTML>"
92-
"<html><head><title>Marquee Scroller</title><link rel='icon' href='data:;base64,='>"
95+
"<html><head>"
96+
"<title>Marquee LED matrix display Scroller</title>"
97+
"<meta charset='UTF-8'>"
9398
"<meta http-equiv='Content-Type' content='text/html; charset=UTF-8' />"
9499
"<meta name='viewport' content='width=device-width, initial-scale=1'>"
100+
"<meta name='description' content='Weather Marquee displaying time and current weather information on LED matrix display.'>"
101+
"<meta name='keywords' content='clock, LED matrix display, weather, marquee, information'>"
95102
"<link rel='stylesheet' href='https://www.w3schools.com/w3css/4/w3.css'>"
96103
"<link rel='stylesheet' href='https://www.w3schools.com/lib/w3-theme-$COLOR$.css'>"
97104
"<link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.8.1/css/all.min.css'>"
98-
"</head>";
105+
"<link rel='icon' href='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACJUlEQVQ4T2NkwAUcHFj0LKPegKQvHV8mwn"
106+
"DgwB9sShlDQ0OZbyk5bf0iIKWEouA/A+N/RkYVBgZGIOPfHSD1H1me58Ozexfv7fNmdEgrFrmpE/z6uZIlin5GIA9FB5r1kvePM0hdXisKMUA3+PUXAWkG9m8fcHiIC"
107+
"Sj+Dy73k0uAgefDUwZ1ZAO4Pr9meCVjwCD++CzOYAFJvJQ1ZhB9coHhO48og/oVJBew/frG8FjZhkHi4Rm8BryQN2GQvXuE4RcrF9SAYqAXFIJfww14RMAAOXQDoGHA"
108+
"+/4xw2dBWQbuTy/gLngvqgpmC76+DRf7yifBAFYrIIvqhZeyRgwsv38iOf8/g8ydw2D+ExVbIAmKFwj4w8oODKtz0EBsAHpBGBiNiqjRCFLI//IuAwMwAj6KKiMZDIo"
109+
"NJgZQNKLEwj9GFgbWHx8ZmP//Y/jKL8XwRkoHb7qAG2CbWrHkK5+4ENPfvwzfeEUYGP/9BaaHjww/eITwxgbHt/fA8Hr5jtE2rXLev38M8xkYOIEavuPVhC7JzMSYwG"
110+
"iXXm7H8BfofiD4xclbddMg2Fn50qaTXF/fVcE0cAAZ77iF2u7q+ZmrX1i7l+375zawHPP/P/CgtU2v1Lqt43fhHws7s/qZFZaH53adQrbRNrnM7KZJxHGmvz//ql7eZ"
111+
"HB4Zvs1kDzcAJu06kVPlawDhV5dX3G2rzgVm1+Mi3pnvxPTjJC+d3T9kVmtcSA1AN+w4BmrADV4AAAAAElFTkSuQmCC'>"
112+
"<style>"
113+
"body{"
114+
"font-family:Arial, sans-serif;"
115+
"font-size:16px;"
116+
"}"
117+
".w3-bar{"
118+
"padding:10px;"
119+
"}"
120+
".w3-bar-item{"
121+
"margin-right:20px;"
122+
"}"
123+
".w3-button{"
124+
"padding:10px 20px;"
125+
"border:none;"
126+
"border-radius:5px;"
127+
"cursor:pointer;"
128+
"}"
129+
".w3-button:hover{"
130+
"background-color:#ccc;"
131+
"}"
132+
".w3-right{"
133+
"float:right-bottom;"
134+
"}"
135+
".w3-right .w3-button{"
136+
"display:block;"
137+
"margin-bottom:5px;"
138+
"}"
139+
".w3-right .w3-button:last-child{"
140+
"margin-bottom:0;"
141+
"}"
142+
".dark-mode{"
143+
"background-color:#333;"
144+
"color:#fff;"
145+
"}"
146+
".dark-mode *{"
147+
"background-color:inherit;"
148+
"color:inherit;"
149+
"}"
150+
".dark-mode .w3-theme{"
151+
"background-color:#444;"
152+
"}"
153+
".dark-mode .w3-theme-d2{"
154+
"background-color:#555;"
155+
"}"
156+
".dark-mode i{"
157+
"color:#fff;"
158+
"}"
159+
"@media only screen and (max-width:768px){"
160+
".w3-right{"
161+
"float:none;"
162+
"}"
163+
".w3-right .w3-button{"
164+
"display:inline-block;"
165+
"margin-right:20px;"
166+
"margin-bottom:0;"
167+
"}"
168+
"}"
169+
"</style>"
170+
"</head>\n"
171+
"<body>\n"
172+
"<header class='w3-top w3-bar w3-theme'>"
173+
"<button class='w3-bar-item w3-button w3-xxxlarge w3-hover-theme' onclick='openSidebar()'>"
174+
"<i class='fas fa-bars'></i>"
175+
"</button>"
176+
"<h2 class='w3-bar-item'>Weather Marquee</h2>"
177+
;
178+
static const char WEB_HEADER_MAIN[] PROGMEM =
179+
"<div class='w3-right'>"
180+
#if defined (WEBPAGE_AUTOREFRESH) && (WEBPAGE_AUTOREFRESH > 0)
181+
"<button id='autorefresh-button' class='w3-button w3-small' onclick='toggleAutoRefresh()' title='toggle Auto Refresh Mode'>"
182+
"<i id='autorefresh-icon' class='fas fa-sync'></i>"
183+
"</button>"
184+
#endif
185+
#if defined (WEBPAGE_DARKMODE)
186+
"<button id='darkmode-button' class='w3-button w3-small' onclick='toggleDarkMode()' title='toggle Dark Mode '>"
187+
"<i id='darkmode-icon' class='fas fa-moon'></i>"
188+
"</button>"
189+
#endif
190+
"</div>"
191+
;
99192

100-
static const char WEB_BODY1[] PROGMEM = "<body>"
101-
"<nav class='w3-sidebar w3-bar-block w3-card' style='margin-top:88px' id='mySidebar'>"
193+
static const char WEB_BODY1[] PROGMEM =
194+
"</header>\n"
195+
"<nav class='w3-sidebar w3-bar-block w3-card' style='margin-topNOT:108px' id='mySidebar'>"
102196
"<div class='w3-container w3-theme-d2'>"
103197
"<span onclick='closeSidebar()' class='w3-button w3-display-topright w3-large'><i class='fas fa-times'></i></span>"
104198
"<div class='w3-left'><img src='http://openweathermap.org/img/w/$ICO$.png' alt='$IDES$'></div>"
105199
"<div class='w3-padding'>Menu</div></div>";
106200

107-
static const char WEB_BODY2[] PROGMEM = "</nav>"
108-
"<header class='w3-top w3-bar w3-theme'><button class='w3-bar-item w3-button w3-xxxlarge w3-hover-theme' onclick='openSidebar()'>"
109-
"<i class='fas fa-bars'></i></button><h2 class='w3-bar-item'>Weather Marquee</h2></header>"
201+
static const char WEB_BODY2[] PROGMEM =
202+
"</nav>\n"
110203
"<script>"
111204
"function openSidebar(){document.getElementById('mySidebar').style.display='block'}"
112205
"function closeSidebar(){document.getElementById('mySidebar').style.display='none'}"
113206
"closeSidebar();"
114-
"</script>"
115-
"<br><div class='w3-container w3-large' style='margin-top:88px'>";
207+
#if defined (WEBPAGE_DARKMODE)
208+
"function restoreDarkMode(){const darkModeEnabled=localStorage.getItem('darkModeEnabled')==='true';"
209+
"if(darkModeEnabled){document.body.classList.add('dark-mode');}}"
210+
"restoreDarkMode();"
211+
#endif
212+
"</script>\n"
213+
"<div class='w3-container w3-large' style='margin-top:108px'>\n";
214+
215+
static const char WEB_BODY2_MAIN[] PROGMEM =
216+
"<script>"
217+
#if defined (WEBPAGE_AUTOREFRESH) && (WEBPAGE_AUTOREFRESH > 0)
218+
#define str(arg) #arg
219+
#define mkstr(arg) str(arg)
220+
"var intervaltimer=0;"
221+
"function refreshPage(){if(document.getElementById('mySidebar').style.display==='none')window.location.reload();}"
222+
"function toggleAutoRefresh(){const autoRefreshEnabled=localStorage.getItem('autoRefreshEnabled')==='true';"
223+
"const newState=!autoRefreshEnabled;localStorage.setItem('autoRefreshEnabled',newState);updateAutoRefreshButton(newState);"
224+
"if(newState){startAutoRefresh();}else{stopAutoRefresh();}}"
225+
"function updateAutoRefreshButton(enabled){const autoRefreshIcon=document.getElementById('autorefresh-icon');"
226+
"if(enabled){autoRefreshIcon.classList.add('fa-spin');}else{autoRefreshIcon.classList.remove('fa-spin');}}"
227+
"function stopAutoRefresh(){clearInterval(intervaltimer);}"
228+
"function startAutoRefresh(){intervaltimer=setInterval(refreshPage," mkstr(WEBPAGE_AUTOREFRESH) "*1000);}"
229+
"function initAutoRefresh(){const autoRefreshEnabled=localStorage.getItem('autoRefreshEnabled')==='true';"
230+
"if(autoRefreshEnabled){startAutoRefresh();updateAutoRefreshButton(true);}"
231+
"else{stopAutoRefresh();updateAutoRefreshButton(false);}}"
232+
"initAutoRefresh();"
233+
#endif
234+
#if defined (WEBPAGE_DARKMODE)
235+
"function toggleDarkMode(){const darkModeEnabled=localStorage.getItem('darkModeEnabled')==='true';"
236+
"const newState=!darkModeEnabled;localStorage.setItem('darkModeEnabled',newState);updateDarkModeButton(newState);"
237+
"document.body.classList.toggle('dark-mode',newState);}"
238+
"function updateDarkModeButton(enabled){const darkModeIcon=document.getElementById('darkmode-icon');"
239+
"if(enabled){darkModeIcon.classList.replace('fa-moon','fa-sun');}"
240+
"else{darkModeIcon.classList.replace('fa-sun','fa-moon');}}"
241+
"function initDarkMode(){const darkModeEnabled=localStorage.getItem('darkModeEnabled')==='true';"
242+
"if(darkModeEnabled){document.body.classList.add('dark-mode');updateDarkModeButton(true);}"
243+
"else{updateDarkModeButton(false);}}"
244+
"initDarkMode();"
245+
#endif
246+
"</script>\n";
247+
116248

117249
static const char WEB_FOOTER[] PROGMEM = "<br><br><br>"
118-
"</div>"
250+
"</div>\n"
119251
"<footer class='w3-container w3-bottom w3-theme w3-margin-top'>"
120252
"<i class='far fa-paper-plane'></i> Version: " VERSION " build " __DATE__ " " __TIME__ "<br>"
121253
"<i class='far fa-clock'></i> Next Data Update: $UPD$ <br>"
122254
"<i class='fas fa-rss'></i> Signal Strength: $RSSI$%"
123-
"</footer>"
124-
"</body></html>";
255+
"</footer>\n"
256+
"</body></html>\n";
125257

126258
static const char WEB_ACTIONS1[] PROGMEM =
127259
"<a class='w3-bar-item w3-button' href='/'><i class='fas fa-home'></i> Home</a>"
@@ -141,25 +273,25 @@ static const char WEB_ACTION3[] PROGMEM =
141273
"<a class='w3-bar-item w3-button' href='/forgetwifi' onclick='return confirm(\"Do you want to forget to WiFi connection?\")'><i class='fas fa-wifi'></i> Forget WiFi</a>"
142274
"<a class='w3-bar-item w3-button' href='/restart'><i class='fas fa-sync'></i> Restart</a>"
143275
"<a class='w3-bar-item w3-button' href='/update'><i class='fas fa-wrench'></i> Firmware Update</a>"
144-
"<a class='w3-bar-item w3-button' href='https://github.com/Qrome/marquee-scroller' target='_blank'><i class='fas fa-question-circle'></i> About</a>";
276+
"<a class='w3-bar-item w3-button' href='https://github.com/rob040/LEDmatrixClock' target='_blank'><i class='fas fa-question-circle'></i> About</a>";
145277

146278
static const char CHANGE_FORM1[] PROGMEM =
147279
"<form class='w3-container' action='/saveconfig' method='get'><h2>Configure:</h2>"
148280
"<label>OpenWeatherMap API Key (get from <a href='https://openweathermap.org/' target='_BLANK'>here</a>)</label>"
149281
"<input class='w3-input w3-border w3-margin-bottom' type='text' name='openWeatherMapApiKey' value='%OWMKEY%' maxlength='70'>"
150282
"<p><label>%CTYNM% (<a href='http://openweathermap.org/find' target='_BLANK'><i class='fas fa-search'></i> Search for City ID</a>)</label>"
151283
"<input class='w3-input w3-border w3-margin-bottom' type='text' name='city' value='%CITY%' onkeypress='return isNumberKey(event)'></p>"
152-
"<p><input name='metric' class='w3-check w3-margin-top' type='checkbox' %METRIC_CB%> Use Metric (Celsius)</p>"
153284
"<p><input name='showdate' class='w3-check w3-margin-top' type='checkbox' %DATE_CB%> Display Date</p>"
154285
"<p><input name='showcity' class='w3-check w3-margin-top' type='checkbox' %CITY_CB%> Display City Name</p>"
155286
"<p><input name='showhighlow' class='w3-check w3-margin-top' type='checkbox' %HILO_CB%> Display Current High/Low Temperatures</p>"
156287
"<p><input name='showcondition' class='w3-check w3-margin-top' type='checkbox' %COND_CB%> Display Weather Condition</p>"
157288
"<p><input name='showhumidity' class='w3-check w3-margin-top' type='checkbox' %HUM_CB%> Display Humidity</p>"
158289
"<p><input name='showwind' class='w3-check w3-margin-top' type='checkbox' %WIND_CB%> Display Wind</p>"
159-
"<p><input name='showpressure' class='w3-check w3-margin-top' type='checkbox' %PRES_CB%> Display Barometric Pressure</p>"
160-
"<p><input name='is24hour' class='w3-check w3-margin-top' type='checkbox' %24HR_CB%> Use 24 Hour Clock (military time)</p>";
290+
"<p><input name='showpressure' class='w3-check w3-margin-top' type='checkbox' %PRES_CB%> Display Barometric Pressure</p>";
161291

162292
static const char CHANGE_FORM2[] PROGMEM =
293+
"<p><input name='metric' class='w3-check w3-margin-top' type='checkbox' %METRIC_CB%> Use Metric units (Celsius,kmh,hPa)</p>"
294+
"<p><input name='is24hour' class='w3-check w3-margin-top' type='checkbox' %24HR_CB%> Use 24 Hour Clock</p>"
163295
"<p><input name='isPM' class='w3-check w3-margin-top' type='checkbox' %PM_CB%> Show PM indicator (only 12h format)</p>"
164296
"<p><input name='flashseconds' class='w3-check w3-margin-top' type='checkbox' %FLASH_CB%> Flash \":\" in the time</p>"
165297
"<p><label>Marquee Message (up to 60 chars)</label><input class='w3-input w3-border w3-margin-bottom' type='text' name='marqueeMsg' value='%MSG%' maxlength='60'></p>"
@@ -831,7 +963,7 @@ void handleNewsConfigure() {
831963
sendHeader();
832964

833965
String form = FPSTR(NEWS_FORM1);
834-
form.replace(F("%NEWS_CB%"), (NEWS_ENABLED) ? "checked='checked'" : "");
966+
form.replace(F("%NEWS_CB%"), (NEWS_ENABLED) ? "checked" : "");
835967
form.replace(F("%NEWSKEY%"), NEWS_API_KEY);
836968
form.replace(F("%NEWSSRC%"), NEWS_SOURCE);
837969
server.sendContent(form); //Send news form
@@ -858,8 +990,8 @@ void handleOctoprintConfigure() {
858990
sendHeader();
859991

860992
String form = FPSTR(OCTO_FORM);
861-
form.replace(F("%OCTO_CB%"), (OCTOPRINT_ENABLED) ? "checked='checked'" : "");
862-
form.replace(F("%OCTPG_CB%"), (OCTOPRINT_PROGRESS) ? "checked='checked'" : "");
993+
form.replace(F("%OCTO_CB%"), (OCTOPRINT_ENABLED) ? "checked" : "");
994+
form.replace(F("%OCTPG_CB%"), (OCTOPRINT_PROGRESS) ? "checked" : "");
863995
form.replace(F("%OCTOKEY%"), OctoPrintApiKey);
864996
form.replace(F("%OCTOADR%"), OctoPrintServer);
865997
form.replace(F("%OCTOPOR%"), String(OctoPrintPort));
@@ -891,7 +1023,7 @@ void handlePiholeConfigure() {
8911023
server.sendContent(FPSTR(PIHOLE_TEST));
8921024

8931025
String form = FPSTR(PIHOLE_FORM);
894-
form.replace(F("%PIHO_CB%"), (USE_PIHOLE) ? "checked='checked'" : "");
1026+
form.replace(F("%PIHO_CB%"), (USE_PIHOLE) ? "checked" : "");
8951027
form.replace(F("%PIHO_ADR%"), PiHoleServer);
8961028
form.replace(F("%PIHO_PRT%"), String(PiHolePort));
8971029
form.replace(F("%PIHO_API%"), PiHoleApiKey);
@@ -921,7 +1053,7 @@ void handleMqttConfigure() {
9211053
sendHeader();
9221054

9231055
String form = FPSTR(MQTT_FORM);
924-
form.replace(F("%MQTT_CB%"), (USE_MQTT) ? "checked='checked'" : "");
1056+
form.replace(F("%MQTT_CB%"), (USE_MQTT) ? "checked" : "");
9251057
form.replace(F("%MQTT_ADR%"), MqttServer);
9261058
form.replace(F("%MQTT_PRT%"), String(MqttPort));
9271059
form.replace(F("%MQTT_TOP%"), MqttTopic);
@@ -956,20 +1088,20 @@ void handleConfigure() {
9561088
form.replace(F("%OWMKEY%"), APIKEY);
9571089
form.replace(F("%CTYNM%"), (weatherClient.getCity() != "") ? weatherClient.getCity() + ", " + weatherClient.getCountry() : "");
9581090
form.replace(F("%CITY%"), String(CityID));
959-
form.replace(F("%DATE_CB%"), (SHOW_DATE) ? "checked" : "unchecked"); //FIXME TEST; this works well; ='checked' is unnecessary, browser removes it.
960-
form.replace(F("%CITY_CB%"), (SHOW_CITY) ? "checked='checked'" : "");
961-
form.replace(F("%COND_CB%"), (SHOW_CONDITION) ? "checked='checked'" : "");
962-
form.replace(F("%HUM_CB%"), (SHOW_HUMIDITY) ? "checked='checked'" : "");
963-
form.replace(F("%WIND_CB%"), (SHOW_WIND) ? "checked='checked'" : "");
964-
form.replace(F("%PRES_CB%"), (SHOW_PRESSURE) ? "checked='checked'" : "");
965-
form.replace(F("%HILO_CB%"), (SHOW_HIGHLOW) ? "checked='checked'" : "");
966-
form.replace(F("%24HR_CB%"), (IS_24HOUR) ? "checked='checked'" : "");
967-
form.replace(F("%METRIC_CB%"), (IS_METRIC) ? "checked='checked'" : "");
1091+
form.replace(F("%DATE_CB%"), (SHOW_DATE) ? "checked" : "");
1092+
form.replace(F("%CITY_CB%"), (SHOW_CITY) ? "checked" : "");
1093+
form.replace(F("%COND_CB%"), (SHOW_CONDITION) ? "checked" : "");
1094+
form.replace(F("%HUM_CB%"), (SHOW_HUMIDITY) ? "checked" : "");
1095+
form.replace(F("%WIND_CB%"), (SHOW_WIND) ? "checked" : "");
1096+
form.replace(F("%PRES_CB%"), (SHOW_PRESSURE) ? "checked" : "");
1097+
form.replace(F("%HILO_CB%"), (SHOW_HIGHLOW) ? "checked" : "");
9681098
server.sendContent(form);
9691099

9701100
form = FPSTR(CHANGE_FORM2);
971-
form.replace(F("%PM_CB%"), (IS_PM) ? "checked='checked'" : "");
972-
form.replace(F("%FLASH_CB%"), (flashOnSeconds) ? "checked='checked'" : "");
1101+
form.replace(F("%24HR_CB%"), (IS_24HOUR) ? "checked" : "");
1102+
form.replace(F("%METRIC_CB%"), (IS_METRIC) ? "checked" : "");
1103+
form.replace(F("%PM_CB%"), (IS_PM) ? "checked" : "");
1104+
form.replace(F("%FLASH_CB%"), (flashOnSeconds) ? "checked" : "");
9731105
form.replace(F("%MSG%"), marqueeMessage);
9741106
form.replace(F("%STRT_TM%"), timeDisplayTurnsOn);
9751107
form.replace(F("%END_TM%"), timeDisplayTurnsOff);
@@ -989,7 +1121,7 @@ void handleConfigure() {
9891121
server.sendContent(form); //Send another chunk of the form
9901122

9911123
form = FPSTR(CHANGE_FORM3);
992-
form.replace(F("%AUTH_CB%"), (IS_BASIC_AUTH) ? "checked='checked'" : "");
1124+
form.replace(F("%AUTH_CB%"), (IS_BASIC_AUTH) ? "checked" : "");
9931125
form.replace(F("%CFGUID%"), String(www_username));
9941126
form.replace(F("%CFGPW%"), String(www_password));
9951127
server.sendContent(form); // Send the second chunk of Data
@@ -1098,10 +1230,13 @@ void redirectHome() {
10981230
delay(1000);
10991231
}
11001232

1101-
void sendHeader() {
1233+
void sendHeader(boolean isMainPage) {
11021234
String html = FPSTR(WEB_HEADER);
11031235
html.replace(F("$COLOR$"), themeColor);
11041236
server.sendContent(html);
1237+
if (isMainPage) {
1238+
server.sendContent(FPSTR(WEB_HEADER_MAIN));
1239+
}
11051240
html = FPSTR(WEB_BODY1);
11061241
html.replace(F("$ICO$"), weatherClient.getIcon());
11071242
html.replace(F("$IDES$"), weatherClient.getWeatherDescription());
@@ -1121,6 +1256,9 @@ void sendHeader() {
11211256
server.sendContent(FPSTR(WEB_ACTION3));
11221257

11231258
server.sendContent(FPSTR(WEB_BODY2));
1259+
if (isMainPage) {
1260+
server.sendContent(FPSTR(WEB_BODY2_MAIN));
1261+
}
11241262
}
11251263

11261264
void sendFooter() {
@@ -1144,7 +1282,7 @@ void displayWeatherData() {
11441282
server.sendHeader(F("Expires"), "-1");
11451283
server.setContentLength(CONTENT_LENGTH_UNKNOWN);
11461284
server.send(200, F("text/html"), "");
1147-
sendHeader();
1285+
sendHeader(true);
11481286

11491287
String temperature = String(weatherClient.getTemperature(),1);
11501288

@@ -1207,14 +1345,14 @@ void displayWeatherData() {
12071345
"<a href='https://www.google.com/maps/@") + weatherClient.getLat() + "," + weatherClient.getLon() + F(",10000m/data=!3m1!1e3' target='_BLANK'><i class='fas fa-map-marker' style='color:red'></i> Map It!</a><br>"
12081346
"</p></div></div><hr>"
12091347
"<div class='w3-cell-row' style='width:100%'><h3>") + dtstr + F("</h3></div><hr>");
1210-
#if defined (WEBPAGE_AUTOREFRESH) && (WEBPAGE_AUTOREFRESH > 0)
1211-
#define str(arg) #arg
1212-
#define mkstr(arg) str(arg)
1213-
html += F("<script>"
1214-
"function refreshPage(){if(document.getElementById('mySidebar').style.display==='none')window.location.reload();}"
1215-
"var intervaltimer=setInterval(refreshPage," mkstr(WEBPAGE_AUTOREFRESH) "*1000);"
1216-
"</script>");
1217-
#endif
1348+
// #if defined (WEBPAGE_AUTOREFRESH) && (WEBPAGE_AUTOREFRESH > 0)
1349+
// #define str(arg) #arg
1350+
// #define mkstr(arg) str(arg)
1351+
// html += F("<script>"
1352+
// "function refreshPage(){if(document.getElementById('mySidebar').style.display==='none')window.location.reload();}"
1353+
// "var intervaltimer=setInterval(refreshPage," mkstr(WEBPAGE_AUTOREFRESH) "*1000);"
1354+
// "</script>");
1355+
// #endif
12181356
}
12191357

12201358

0 commit comments

Comments
 (0)