wifi.html 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>Powerbox Web Server - Wifi Configuration</title>
  5. <script src="script.js"></script>
  6. <link rel="stylesheet" href="style.css">
  7. <style>
  8. * {
  9. box-sizing: border-box;
  10. }
  11. input[type=text],
  12. select,
  13. textarea {
  14. width: 100%;
  15. padding: 12px;
  16. border: 1px solid #ccc;
  17. border-radius: 4px;
  18. resize: vertical;
  19. }
  20. label {
  21. padding: 12px 12px 12px 0;
  22. display: inline-block;
  23. width: auto
  24. }
  25. input[type=submit] {
  26. background-color: #04AA6D;
  27. color: white;
  28. padding: 12px 20px;
  29. border: none;
  30. border-radius: 4px;
  31. cursor: pointer;
  32. float: right;
  33. }
  34. input[type=submit]:hover {
  35. background-color: #45a049;
  36. }
  37. .container {
  38. border-radius: 5px;
  39. background-color: #f2f2f2;
  40. padding: 20px;
  41. }
  42. .col-10 {
  43. float: left;
  44. width: 10%;
  45. margin-top: 6px;
  46. text-align: left;
  47. }
  48. .col-15 {
  49. float: left;
  50. width: 15%;
  51. margin-top: 6px;
  52. text-align: left;
  53. }
  54. .col-50 {
  55. float: left;
  56. width: 50%;
  57. margin-top: 6px;
  58. }
  59. /* Clear floats after the columns */
  60. .row:after {
  61. content: "";
  62. display: table;
  63. clear: both;
  64. }
  65. /* Responsive layout - when the screen is less than 600px wide, make the two columns stack on top of each other instead of next to each other */
  66. @media screen and (max-width: 600px) {
  67. .col-10,
  68. .col-50,
  69. input[type=submit] {
  70. width: 100%;
  71. margin-top: 0;
  72. }
  73. }
  74. </style>
  75. </head>
  76. <body onload="initialLoadWifi()">
  77. <div class="topnav">
  78. <span>
  79. <h1>
  80. Powerbox Web Server<br>
  81. WiFi Configuration
  82. </h1>
  83. </span>
  84. </div>
  85. <section class="container" id="content">
  86. <div class="row">
  87. <div class="col-15"></div>
  88. <div class="col-10">
  89. <label for="wifi_ssid">WiFi SSID</label>
  90. </div>
  91. <div class="col-50">
  92. <input type="text" id="wifi_ssid" name="wifiSSID">
  93. </div>
  94. </div>
  95. <div class="row">
  96. <div class="col-15"></div>
  97. <div class="col-10">
  98. <label for="wifi_password">WiFi password</label>
  99. </div>
  100. <div class="col-50">
  101. <input type="text" id="wifi_password" name="wifiPassword">
  102. </div>
  103. </div>
  104. <br>
  105. <br>
  106. <div class="row">
  107. <div class="col-15"></div>
  108. <div class="col-10">
  109. <label for="ap_ssid">AP SSID</label>
  110. </div>
  111. <div class="col-50">
  112. <input type="text" id="ap_ssid" name="apSSID">
  113. </div>
  114. </div>
  115. <div class="row">
  116. <div class="col-15"></div>
  117. <div class="col-10">
  118. <label for="ap_password">AP Password</label>
  119. </div>
  120. <div class="col-50">
  121. <input type="text" id="ap_password" name="apPassword"></textarea>
  122. </div>
  123. </div>
  124. <br>
  125. <div class="row">
  126. <div class="col-15"></div>
  127. <div class="col-10">
  128. <label for="ap_ipaddress">AP IP address</label>
  129. </div>
  130. <div class="col-50">
  131. <input type="text" id="ap_ipaddress" name="apIPAddress"></textarea>
  132. </div>
  133. </div>
  134. <div class="row">
  135. <div class="col-15"></div>
  136. <div class="col-10">
  137. <label for="ap_gateway">AP Gateway</label>
  138. </div>
  139. <div class="col-50">
  140. <input type="text" id="ap_gateway" name="apGateway"></textarea>
  141. </div>
  142. </div>
  143. <div class="row">
  144. <div class="col-15"></div>
  145. <div class="col-10">
  146. <label for="ap_subnet">AP Subnet mask</label>
  147. </div>
  148. <div class="col-50">
  149. <input type="text" id="ap_subnet" name="apSubnet"></textarea>
  150. </div>
  151. </div>
  152. <br>
  153. <br>
  154. <div class="row">
  155. <button class="toggle_button" onclick="saveWifiConfig()">
  156. Save WiFi
  157. </button>
  158. </div>
  159. </div>
  160. </section>
  161. </body>
  162. </html>