@@ -47,14 +47,16 @@ void sendPage(EthernetClient &client, byte reqPage) {
47
47
chunked.print (F (" <!DOCTYPE html>"
48
48
" <html>"
49
49
" <head>"
50
- " <meta" ));
50
+ " <meta charset=utf-8>"
51
+ " <meta name=viewport content='width=device-width" ));
51
52
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://" ));
53
55
chunked.print (IPAddress (data.config .ip ));
54
56
chunked.print (F (" :" ));
55
57
chunked.print (data.config .webPort );
56
58
}
57
- chunked.print (F (" >"
59
+ chunked.print (F (" ' >"
58
60
" <title>Modbus RTU ⇒ Modbus TCP/UDP Gateway</title>"
59
61
" <style>"
60
62
/*
@@ -66,10 +68,9 @@ void sendPage(EthernetClient &client, byte reqPage) {
66
68
CSS Classes
67
69
w - wrapper (includes m + c)
68
70
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)
73
74
i - short input (byte or IP address octet)
74
75
n - input type=number
75
76
s - select input with numbers
@@ -82,10 +83,10 @@ void sendPage(EthernetClient &client, byte reqPage) {
82
83
" body,.w,.c,.q{display:flex}"
83
84
" body,.c{flex-flow:column}"
84
85
" .w{flex-grow:1;min-height:0}"
85
- " .m{flex:0 0 20vw;padding:1px }"
86
+ " .m{flex:0 0 20vw}"
86
87
" .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}"
89
90
" .r{align-items:center}"
90
91
" h1,h4{padding:10px}"
91
92
" h1,.m,h4{background:#0067AC;margin:1px}"
@@ -139,7 +140,7 @@ void sendPage(EthernetClient &client, byte reqPage) {
139
140
" <h4>" ));
140
141
stringPageName (chunked, reqPage);
141
142
chunked.print (F (" </h4>"
142
- " <div class=d >"
143
+ " <main >"
143
144
" <form method=post>" ));
144
145
145
146
// PLACE FUNCTIONS PROVIDING CONTENT HERE
@@ -173,7 +174,7 @@ void sendPage(EthernetClient &client, byte reqPage) {
173
174
chunked.print (F (" <p><div class=q><label><input type=submit value='Save & Apply'></label><input type=reset value=Cancel></div>" ));
174
175
}
175
176
chunked.print (F (" </form>"
176
- " </div >" ));
177
+ " </main >" ));
177
178
tagDivClose (chunked); // close tags <div class=c> <div class=w>
178
179
chunked.end (); // closing tags not required </body></html>
179
180
}
@@ -621,9 +622,9 @@ void tagLabelDiv(ChunkedPrint &chunked, const __FlashStringHelper *label) {
621
622
tagLabelDiv (chunked, label, false );
622
623
}
623
624
void tagLabelDiv (ChunkedPrint &chunked, const __FlashStringHelper *label, bool top) {
624
- chunked.print (F (" <div class=\" q" ));
625
+ chunked.print (F (" <div class=' q" ));
625
626
if (!top) chunked.print (F (" r" ));
626
- chunked.print (F (" \" ><label> " ));
627
+ chunked.print (F (" ' ><label> " ));
627
628
if (label) {
628
629
chunked.print (label);
629
630
chunked.print (F (" :" ));
0 commit comments