@@ -47,14 +47,16 @@ void sendPage(EthernetClient &client, byte reqPage) {
4747 chunked.print (F (" <!DOCTYPE html>"
4848 " <html>"
4949 " <head>"
50- " <meta" ));
50+ " <meta charset=utf-8>"
51+ " <meta name=viewport content='width=device-width" ));
5152 if (reqPage == PAGE_WAIT) { // redirect to new IP and web port
52- chunked.print (F (" http-equiv=refresh content=5;url=http://" ));
53+ chunked.print (F (" '>"
54+ " <meta http-equiv=refresh content='5; url=http://" ));
5355 chunked.print (IPAddress (data.config .ip ));
5456 chunked.print (F (" :" ));
5557 chunked.print (data.config .webPort );
5658 }
57- chunked.print (F (" >"
59+ chunked.print (F (" ' >"
5860 " <title>Modbus RTU ⇒ Modbus TCP/UDP Gateway</title>"
5961 " <style>"
6062 /*
@@ -66,10 +68,9 @@ void sendPage(EthernetClient &client, byte reqPage) {
6668 CSS Classes
6769 w - wrapper (includes m + c)
6870 m - navigation menu (left)
69- c - wrapper for the content of a page (incl. smaller header)
70- d - content of the page
71- q - row inside a content (top aligned)
72- r - row inside a content (center-aligned)
71+ c - wrapper for the content of a page (incl. smaller header and main)
72+ q - row inside a content (default: top-aligned)
73+ r - row inside a content (adds: center-aligned)
7374 i - short input (byte or IP address octet)
7475 n - input type=number
7576 s - select input with numbers
@@ -82,10 +83,10 @@ void sendPage(EthernetClient &client, byte reqPage) {
8283 " body,.w,.c,.q{display:flex}"
8384 " body,.c{flex-flow:column}"
8485 " .w{flex-grow:1;min-height:0}"
85- " .m{flex:0 0 20vw;padding:1px }"
86+ " .m{flex:0 0 20vw}"
8687 " .c{flex:1}"
87- " .d {overflow:auto;padding:15px}"
88- " .q{padding:1px}"
88+ " .m,main {overflow:auto;padding:15px}"
89+ " .m,. q{padding:1px}"
8990 " .r{align-items:center}"
9091 " h1,h4{padding:10px}"
9192 " h1,.m,h4{background:#0067AC;margin:1px}"
@@ -139,7 +140,7 @@ void sendPage(EthernetClient &client, byte reqPage) {
139140 " <h4>" ));
140141 stringPageName (chunked, reqPage);
141142 chunked.print (F (" </h4>"
142- " <div class=d >"
143+ " <main >"
143144 " <form method=post>" ));
144145
145146 // PLACE FUNCTIONS PROVIDING CONTENT HERE
@@ -173,7 +174,7 @@ void sendPage(EthernetClient &client, byte reqPage) {
173174 chunked.print (F (" <p><div class=q><label><input type=submit value='Save & Apply'></label><input type=reset value=Cancel></div>" ));
174175 }
175176 chunked.print (F (" </form>"
176- " </div >" ));
177+ " </main >" ));
177178 tagDivClose (chunked); // close tags <div class=c> <div class=w>
178179 chunked.end (); // closing tags not required </body></html>
179180}
@@ -621,9 +622,9 @@ void tagLabelDiv(ChunkedPrint &chunked, const __FlashStringHelper *label) {
621622 tagLabelDiv (chunked, label, false );
622623}
623624void tagLabelDiv (ChunkedPrint &chunked, const __FlashStringHelper *label, bool top) {
624- chunked.print (F (" <div class=\" q" ));
625+ chunked.print (F (" <div class=' q" ));
625626 if (!top) chunked.print (F (" r" ));
626- chunked.print (F (" \" ><label> " ));
627+ chunked.print (F (" ' ><label> " ));
627628 if (label) {
628629 chunked.print (label);
629630 chunked.print (F (" :" ));
0 commit comments