test.html 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
  5. <title>Config ESP</title>
  6. <script>
  7. function c(l,e) {
  8. console.log(l);
  9. // preventDefault();
  10. document.getElementById('s').value = l.innerText || l.textContent;
  11. // document.location.href = document.location +"#wmform";
  12. p = l.nextElementSibling.classList.contains("l");
  13. document.getElementById('p').disabled = !p;
  14. if(p)document.getElementById('p').focus();
  15. return false;
  16. }
  17. </script>
  18. <style>
  19. .c,
  20. body {
  21. text-align: center
  22. }
  23. div,
  24. input {
  25. padding: 5px;
  26. font-size: 1em
  27. }
  28. input {
  29. width: 95%
  30. }
  31. body {
  32. font-family: verdana
  33. }
  34. button {
  35. border: 0;
  36. border-radius: .3rem;
  37. background-color: #1fa3ec;
  38. color: #fff;
  39. line-height: 2.4rem;
  40. font-size: 1.2rem;
  41. width: 100%
  42. }
  43. a {
  44. color: #000;
  45. font-weight: 700;
  46. text-decoration: none
  47. }
  48. a:hover {
  49. color: #1fa3ec;
  50. text-decoration: underline
  51. }
  52. .q {
  53. height: 16px;
  54. margin: 0;
  55. padding: 0 5px;
  56. text-align: right;
  57. min-width: 38px
  58. }
  59. .q.q-0:after {
  60. background-position-x: 0
  61. }
  62. .q.q-1:after {
  63. background-position-x: -16px
  64. }
  65. .q.q-2:after {
  66. background-position-x: -32px
  67. }
  68. .q.q-3:after {
  69. background-position-x: -48px
  70. }
  71. .q.q-4:after {
  72. background-position-x: -64px
  73. }
  74. .q.l:before {
  75. background-position-x: -80px;
  76. padding-right: 5px
  77. }
  78. .ql .q {
  79. float: left
  80. }
  81. .qr .q {
  82. float: right
  83. }
  84. .qinv .q {
  85. -webkit-filter: invert(1);
  86. filter: invert(1)
  87. }
  88. .q:after,
  89. .q:before {
  90. content: '';
  91. width: 16px;
  92. height: 16px;
  93. display: inline-block;
  94. background-repeat: no-repeat;
  95. background-position: 16px 0;
  96. background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAAAQCAMAAADeZIrLAAAAJFBMVEX///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADHJj5lAAAAC3RSTlMAIjN3iJmqu8zd7vF8pzcAAABsSURBVHja7Y1BCsAwCASNSVo3/v+/BUEiXnIoXkoX5jAQMxTHzK9cVSnvDxwD8bFx8PhZ9q8FmghXBhqA1faxk92PsxvRc2CCCFdhQCbRkLoAQ3q/wWUBqG35ZxtVzW4Ed6LngPyBU2CobdIDQ5oPWI5nCUwAAAAASUVORK5CYII=');
  97. }
  98. @media (-webkit-min-device-pixel-ratio: 2),
  99. (min-resolution: 192dpi) {
  100. .q:before,
  101. .q:after {
  102. background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALwAAAAgCAMAAACfM+KhAAAALVBMVEX///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAOrOgAAAADnRSTlMAESIzRGZ3iJmqu8zd7gKjCLQAAACmSURBVHgB7dDBCoMwEEXRmKlVY3L//3NLhyzqIqSUggy8uxnhCR5Mo8xLt+14aZ7wwgsvvPA/ofv9+44334UXXngvb6XsFhO/VoC2RsSv9J7x8BnYLW+AjT56ud/uePMdb7IP8Bsc/e7h8Cfk912ghsNXWPpDC4hvN+D1560A1QPORyh84VKLjjdvfPFm++i9EWq0348XXnjhhT+4dIbCW+WjZim9AKk4UZMnnCEuAAAAAElFTkSuQmCC');
  103. background-size: 95px 16px;
  104. }
  105. }
  106. input:disabled {
  107. opacity: 0.5;
  108. }
  109. </style>
  110. </head>
  111. <body>
  112. <!-- classes, left/right invert -->
  113. <div class="qr" style='text-align:left;display:inline-block;min-width:260px;'>
  114. <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>
  115. <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>
  116. <div><a href='#p' onclick='c(this)'>Acccess Point 03</a><div role='img' aria-label='88%' title='88%' class='q q-3'></div></div>
  117. <div><a href='#p' onclick='c(this)'>Acccess Point 04</a><div role='img' aria-label='88%' title='88%' class='q q-3'></div></div>
  118. <div><a href='#p' onclick='c(this)'>Acccess Point 05</a><div role='img' aria-label='88%' title='88%' class='q q-3'></div></div>
  119. <div><a href='#p' onclick='c(this)'>Acccess Point 06</a><div role='img' aria-label='88%' title='88%' class='q q-2'></div></div>
  120. <div><a href='#p' onclick='c(this)'>Acccess Point 07</a><div role='img' aria-label='88%' title='88%' class='q q-2'></div></div>
  121. <div><a href='#p' onclick='c(this)'>Acccess Point 08</a><div role='img' aria-label='88%' title='88%' class='q q-1'></div></div>
  122. <div><a href='#p' onclick='c(this)'>Acccess Point 09</a><div role='img' aria-label='88%' title='88%' class='q q-1'></div></div>
  123. <div><a href='#p' onclick='c(this)'>Acccess Point 10</a><div role='img' aria-label='88%' title='88%' class='q q-1'></div></div>
  124. <div><a href='#p' onclick='c(this)'>Acccess Point 11</a><div role='img' aria-label='88%' title='88%' class='q q-0'></div></div>
  125. <div><a href='#p' onclick='c(this)'>Acccess Point 12</a><div role='img' aria-label='88%' title='88%' class='q q-0'></div></div>
  126. <div><a href='#p' onclick='c(this)'>Acccess Point 13</a><div role='img' aria-label='88%' title='88%' class='q q-0'></div></div>
  127. <div><a href='#p' onclick='c(this)'>Acccess Point 14</a><div role='img' aria-label='88%' title='88%' class='q q-0 l'></div></div>
  128. <br/>
  129. <form id="wmform" method='get' action='wifisave'>
  130. <input id='s' name='s' length=32 placeholder='SSID'>
  131. <br/>
  132. <input id='p' name='p' length=64 type='password' placeholder='password'>
  133. <br/>
  134. <br/>
  135. <input id='server' name='server' length=4 placeholder='mqtt server' value=''>
  136. <br/>
  137. <input id='port' name='port' length=5 placeholder='mqtt port' value='8080'>
  138. <br/>
  139. <input id='blynk' name='blynk' length=3 placeholder='blynk token' value='YOUR_BLYNK_TOKEN'>
  140. <br/>
  141. <br/>
  142. <input id='ip' name='ip' length=15 placeholder='Static IP' value='10.0.1.56'>
  143. <br/>
  144. <input id='gw' name='gw' length=15 placeholder='Static Gateway' value='10.0.1.1'>
  145. <br/>
  146. <input id='sn' name='sn' length=15 placeholder='Subnet' value='255.255.255.0'>
  147. <br/>
  148. <br/>
  149. <button type='submit'>save</button>
  150. </form>
  151. <br/>
  152. <div class="c"><a href="/wifi">Scan</a></div>
  153. </div>
  154. </body>
  155. </html>