WiFiManager.template.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320
  1. <!-- HTTP_HEAD -->
  2. <!DOCTYPE html>
  3. <html lang="en">
  4. <head>
  5. <meta name=\"viewport\" content=\"width=device-width, initial-scale=1, user-scalable=no\"/>
  6. <title>{v}</title>
  7. <!-- /HTTP_HEAD -->
  8. <!-- HTTP_STYLE -->
  9. <style>
  10. :root{
  11. /* CSS VARIABLE THEME COLOR */
  12. /*--primarycolor:#9933CC;*/
  13. --primarycolor:#1fa3ec;
  14. }
  15. body.invert,
  16. body.invert a,
  17. body.invert h1 {
  18. background-color:#060606;
  19. color:white;
  20. }
  21. body.invert .msg{
  22. background-color: #282828;
  23. border-top: 1px solid #555;
  24. border-right: 1px solid #555;
  25. border-bottom: 1px solid #555;
  26. color:#fff;
  27. }
  28. body.invert .q[role=img] {
  29. -webkit-filter: invert(1);
  30. filter: invert(1);
  31. }
  32. .c,
  33. body {
  34. text-align: center;
  35. font-family: verdana
  36. }
  37. .wrap {
  38. text-align:left;
  39. display:inline-block;
  40. min-width:260px;
  41. max-width:500px;
  42. }
  43. div,
  44. input {
  45. padding: 5px;
  46. font-size: 1em;
  47. /*width: 100%;*/
  48. margin:5px 0;
  49. box-sizing: border-box;
  50. }
  51. input,button,.msg{
  52. border-radius:.3rem;
  53. width: 100%;
  54. }
  55. button,input[type="button"],input[type="submit"] {
  56. border: 0;
  57. background-color: var(--primarycolor);
  58. color: #fff;
  59. line-height: 2.4rem;
  60. font-size: 1.2rem;
  61. }
  62. input[type="file"]{
  63. border: 1px solid var(--primarycolor);
  64. }
  65. a {
  66. color: #000;
  67. font-weight: 700;
  68. text-decoration: none;
  69. }
  70. a:hover {
  71. color: var(--primarycolor);
  72. text-decoration: underline;
  73. }
  74. .h {
  75. display: none;
  76. }
  77. .q {
  78. height: 16px;
  79. margin: 0;
  80. padding: 0 5px;
  81. text-align: right;
  82. min-width: 38px;
  83. float:right;
  84. }
  85. .q.q-0:after {
  86. background-position-x: 0;
  87. }
  88. .q.q-1:after {
  89. background-position-x: -16px;
  90. }
  91. .q.q-2:after {
  92. background-position-x: -32px;
  93. }
  94. .q.q-3:after {
  95. background-position-x: -48px;
  96. }
  97. .q.q-4:after {
  98. background-position-x: -64px;
  99. }
  100. .q.l:before {
  101. background-position-x: -80px;
  102. padding-right: 5px
  103. }
  104. .ql .q {
  105. float: left;
  106. }
  107. .q:after,
  108. .q:before {
  109. content: '';width:16px;height:16px;display:inline-block;background-repeat:no-repeat;background-position: 16px 0;
  110. background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAAAQCAMAAADeZIrLAAAAJFBMVEX///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADHJj5lAAAAC3RSTlMAIjN3iJmqu8zd7vF8pzcAAABsSURBVHja7Y1BCsAwCASNSVo3/v+/BUEiXnIoXkoX5jAQMxTHzK9cVSnvDxwD8bFx8PhZ9q8FmghXBhqA1faxk92PsxvRc2CCCFdhQCbRkLoAQ3q/wWUBqG35ZxtVzW4Ed6LngPyBU2CobdIDQ5oPWI5nCUwAAAAASUVORK5CYII=');
  111. }
  112. @media (-webkit-min-device-pixel-ratio: 2),
  113. (min-resolution: 192dpi) {
  114. .q:before,
  115. .q:after {
  116. background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALwAAAAgCAMAAACfM+KhAAAALVBMVEX///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAOrOgAAAADnRSTlMAESIzRGZ3iJmqu8zd7gKjCLQAAACmSURBVHgB7dDBCoMwEEXRmKlVY3L//3NLhyzqIqSUggy8uxnhCR5Mo8xLt+14aZ7wwgsvvPA/ofv9+44334UXXngvb6XsFhO/VoC2RsSv9J7x8BnYLW+AjT56ud/uePMdb7IP8Bsc/e7h8Cfk912ghsNXWPpDC4hvN+D1560A1QPORyh84VKLjjdvfPFm++i9EWq0348XXnjhhT+4dIbCW+WjZim9AKk4UZMnnCEuAAAAAElFTkSuQmCC');
  117. background-size: 95px 16px;
  118. }
  119. }
  120. .msg {
  121. padding: 20px;
  122. margin: 20px 0;
  123. border: 1px solid #eee;
  124. border-left-width: 5px;
  125. border-left-color: #777;
  126. }
  127. .msg h4 {
  128. margin-top: 0;
  129. margin-bottom: 5px;
  130. }
  131. .msg.P {
  132. border-left-color: var(--primarycolor);
  133. }
  134. .msg.P h4 {
  135. color: var(--primarycolor);
  136. }
  137. /*.msg.S {
  138. border-left-color: #5cb85c;
  139. }
  140. .msg.S h4 {
  141. color: #5cb85c;
  142. }*/
  143. .msg.D {
  144. border-left-color: #dc3630;
  145. }
  146. .msg.D h4 {
  147. color: #dc3630;
  148. }
  149. dt {
  150. font-weight: bold;
  151. }
  152. dd {
  153. margin: 0;
  154. padding: 0 0 0.5em 0;
  155. }
  156. td {
  157. vertical-align: top;
  158. }
  159. button.D{
  160. background-color:#dc3630;
  161. }
  162. input:disabled {
  163. opacity: 0.5;
  164. }
  165. </style>
  166. <!-- /HTTP_STYLE -->
  167. <!-- HTTP_SCRIPT -->
  168. <script>
  169. function c(l){document.getElementById('s').value=l.innerText||l.textContent;
  170. p = l.nextElementSibling.classList.contains('l');
  171. document.getElementById('p').disabled = !p;
  172. if(p)document.getElementById('p').focus()};
  173. </script>
  174. <!-- /HTTP_SCRIPT -->
  175. <!-- HTTP_HEAD_END -->
  176. </head>
  177. <body class="invert">
  178. <div class='wrap'>
  179. <!-- <div class='wrap ql qinv'> -->
  180. <!-- /HTTP_HEAD_END -->
  181. <!-- SAMPLE -->
  182. <h2>/</h2><hR>
  183. <!-- /SAMPLE -->
  184. <!-- HTTP_PORTAL_OPTIONS -->
  185. <!-- /HTTP_PORTAL_OPTIONS -->
  186. <!-- HTTP_PORTAL_MENU[] -->
  187. <form action='/wifi' method='get'><button>Configure WiFi</button></form><br/>
  188. <form action='/0wifi' method='get'><button>Configure WiFi (No Scan)</button></form><br/>
  189. <form action='/info' method='get'><button>Info</button></form><br/>
  190. <form action='/param' method='get'><button>Setup</button></form><br/>
  191. <Hr><br/>
  192. <form action='/close' method='post'><button>Close</button></form><br/>
  193. <form action='/erase' method='post'><button class='D'>Erase</button></form><br/>
  194. <form action='/restart' method='post'><button>Restart</button></form><br/>
  195. <form action='/exit' method='post'><button>Exit</button></form><br/>
  196. <!-- /HTTP_PORTAL_MENU -->
  197. <!-- SAMPLE -->
  198. <h2>/wifi</h2><hr>
  199. <div><a href='#p' onclick='c(this)'>Acccess Point 01</a><div role='img' aria-label='88%' title='88%' class='q q-4 l'></div></div>
  200. <div><a href='#p' onclick='c(this)'>Acccess Point 02</a><div role='img' aria-label='88%' title='88%' class='q q-4'></div></div>
  201. <div><a href='#p' onclick='c(this)'>Acccess Point 03</a><div role='img' aria-label='60%' title='60%' class='q q-3 l'></div></div>
  202. <div><a href='#p' onclick='c(this)'>Acccess Point 04</a><div role='img' aria-label='60%' title='60%' class='q q-3'></div></div>
  203. <div><a href='#p' onclick='c(this)'>Acccess Point 05</a><div role='img' aria-label='60%' title='60%' class='q q-3'></div></div>
  204. <div><a href='#p' onclick='c(this)'>Acccess Point 06</a><div role='img' aria-label='40%' title='40%' class='q q-2'></div></div>
  205. <div><a href='#p' onclick='c(this)'>Acccess Point 07</a><div role='img' aria-label='40%' title='40%' class='q q-2 l'></div></div>
  206. <div><a href='#p' onclick='c(this)'>Acccess Point 08</a><div role='img' aria-label='20%' title='20%' class='q q-1'></div></div>
  207. <div><a href='#p' onclick='c(this)'>Acccess Point 09</a><div role='img' aria-label='20%' title='20%' class='q q-1'></div></div>
  208. <div><a href='#p' onclick='c(this)'>Acccess Point 10</a><div role='img' aria-label='20%' title='20%' class='q q-4 l'></div><div class='q '>100%</div></div>
  209. <div><a href='#p' onclick='c(this)'>Acccess Point 11</a><div role='img' aria-label='10%' title='10%' class='q q-3'></div><div class='q '>70%</div></div>
  210. <div><a href='#p' onclick='c(this)'>Acccess Point 12</a><div role='img' aria-label='10%' title='10%' class='q q-1 l'></div><div class='q '>10%</div></div>
  211. <div><a href='#p' onclick='c(this)'>Acccess Point 13</a><div role='img' aria-label='10%' title='10%' class='q q-0 h'></div><div class='q '>100%</div></div>
  212. <div><a href='#p' onclick='c(this)'>Acccess Point 14</a><div class='q'>66%</div></div>
  213. <div><a href='#p' onclick='c(this)'>Acccess Point 15</a><div class='q'>56%</div></div>
  214. <!-- /SAMPLE -->
  215. <!-- HTTP_ITEM -->
  216. <div><a href='#p' onclick='c(this)'>{v}</a><div role='img' aria-label='{r}%' title='{r}%' class='q q-{q} {i}'></div></div>
  217. <!-- /HTTP_ITEM -->
  218. <!-- HTTP_FORM_START -->
  219. <form method='get' action='wifisave'><label for='s'>SSID</label><br/><input id='s' name='s' length=32 placeholder='SSID'><br/><label for='p'>Password</label><input id='p' name='p' length=64 type='password' placeholder='password'><br/>
  220. <!-- /HTTP_FORM_START -->
  221. <!-- SAMPLE -->
  222. <h3>custom parameter</h3><hr>
  223. <br/><label for='custom'>Label for Custom Param</label>
  224. <br/><input id='custom' name='custom' length='255' placeholder='placeholder' value='' {c}>
  225. <!-- /SAMPLE -->
  226. <!-- HTTP_FORM_LABEL -->
  227. <br/><label for='{i}'>{p}</label>
  228. <!-- /HTTP_FORM_LABEL -->
  229. <!-- HTTP_FORM_PARAM -->
  230. <br/><input id='{i}' name='{n}' length='{l}' placeholder='{p}' value='{v}' {c}>
  231. <!-- /HTTP_FORM_PARAM -->
  232. <!-- HTTP_FORM_END -->
  233. <br/><button type='submit'>Save</button></form>
  234. <!-- /HTTP_FORM_END -->
  235. <!-- HTTP_SCAN_LINK -->
  236. <br/><form action='/wifi' method='get'><button>Refresh</button></form>
  237. <!-- /HTTP_SCAN_LINK -->
  238. <!-- HTTP_SAVED -->
  239. <div class='msg'><h4>Saving Credentials</h4>Trying to connect ESP to network.<br />If it fails reconnect to AP to try again</div>
  240. <!-- /HTTP_SAVED -->
  241. <!-- HTTP_STATUS_ON -->
  242. <div class='msg P'><strong>Connected</strong> to {v}<br/><em><small>with IP {i}</small></em></div>
  243. <!-- /HTTP_STATUS_ON -->
  244. <!-- HTTP_STATUS_OFF -->
  245. <div class='msg {c}'><strong>Not Connected</strong> to {v}{r}</div>
  246. <!-- /HTTP_STATUS_OFF -->
  247. <!-- sample -->
  248. <div class='msg D'><strong>Not Connected</strong> to apname
  249. <!-- /sample -->
  250. <!-- HTTP_STATUS_OFFPW -->
  251. <br/>Authentication Failure
  252. <!-- /HTTP_STATUS_OFFPW -->
  253. <!-- HTTP_STATUS_OFFNOAP -->
  254. <br/>AP not found
  255. <!-- /HTTP_STATUS_OFFNOAP -->
  256. <!-- HTTP_STATUS_OFFFAIL -->
  257. <br/>Could not Connect
  258. <!-- /HTTP_STATUS_OFFFAIL -->
  259. </div>
  260. <!-- HTTP_STATUS_NONE -->
  261. <div class='msg'>No AP set</div>
  262. <!-- /HTTP_STATUS_NONE -->
  263. <!-- SAMPLE -->
  264. <div class='msg P'><h4>H4 Color Header</h4>content</div>
  265. <!-- /SAMPLE -->
  266. <!-- SAMPLE -->
  267. <h2>/info</h3><hr>
  268. <dl>
  269. <dt>Chip ID</dt><dd>123456</dd>
  270. <dt>Flash Chip ID</dt><dd>1234556</dd>
  271. <dt>IDE Flash Size</dt><dd>4194304 bytes</dd>
  272. <dt>Real Flash Size</dt><dd>4194304 bytes</dd>
  273. <dt>Empty</dt><dd></dd>
  274. <dt>Soft AP IP</dt><dd>192.168.4.1</dd>
  275. <dt>Soft AP MAC</dt><dd>00:00:00:00:00:00</dd>
  276. <dt>Station MAC</dt><dd>00:00:00:00:00:00</dd>
  277. </dl>
  278. <!-- /SAMPLE -->
  279. <!-- HTTP_HELP -->
  280. <br/><h3>Available Pages</h3><hr>
  281. <table class='table'>
  282. <thead><tr><th>Page</th><th>Function</th></tr></thead><tbody>
  283. <tr><td><a href='/'>/</a></td>
  284. <td>Menu page.</td></tr>
  285. <tr><td><a href='/wifi'>/wifi</a></td>
  286. <td>Show WiFi scan results and enter WiFi configuration.(/0wifi noscan)</td></tr>
  287. <tr><td><a href='/wifisave'>/wifisave</a></td>
  288. <td>Save WiFi configuration information and configure device. Needs variables supplied.</td></tr>
  289. <tr><td><a href='/close'>/close</a></td>
  290. <td>Close the configuration server and configuration WiFi network.</td></tr>
  291. <tr><td><a href='/info'>/info</a></td>
  292. <td>Information page</td></tr>
  293. <tr><td><a href='/close'>/close</a></td>
  294. <td>Close the captiveportal popup,configportal will remain active</td></tr>
  295. <tr><td><a href='/exit'>/exit</a></td>
  296. <td>Exit Config Portal, configportal will close</td></tr>
  297. <tr><td><a href='/restart'>/restart</a></td>
  298. <td>Reboot the device</td></tr>
  299. <tr><td><a href='/erase'>/erase</a></td>
  300. <td>Erase WiFi configuration and reboot Device. Device will not reconnect to a network until new WiFi configuration data is entered.</td></tr>
  301. </table>
  302. <p/>More information about WiFiManager at <a href='https://github.com/tzapu/WiFiManager'>https://github.com/tzapu/WiFiManager</a>
  303. <!-- /HTTP_HELP -->
  304. <!-- FORM_UPLOAD -->
  305. <Br/><br/>Form UPLOAD<br/><form method='POST' action='u' enctype='multipart/form-data'><input type='file' name='update' accept='.bin,application/octet-stream'><button type='submit' value='Submit'>Submit</button></form>
  306. <!-- /FORM_UPLOAD -->
  307. <!-- HTTP_END -->
  308. </div>
  309. </body>
  310. </html>
  311. <!-- /HTTP_END -->