index.html 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <meta http-equiv="X-UA-Compatible" content="ie=edge">
  7. <title>ESPWoL</title>
  8. <style>
  9. body{
  10. font-family: Arial, sans-serif;
  11. color: #262626;
  12. }
  13. .box {
  14. display: flex;
  15. align-items: center;
  16. justify-content: center;
  17. }
  18. .wallpaper{
  19. position: absolute;
  20. width: 100%;
  21. height: 100%;
  22. left: 0;
  23. top: 0;
  24. background-color: #ffffff;
  25. }
  26. .main{
  27. width: 480px;
  28. height: calc(90vh - 2em);
  29. padding: 1em;
  30. -webkit-box-shadow: 10px 10px 18px 0px rgba(0,0,0,0.14);
  31. -moz-box-shadow: 10px 10px 18px 0px rgba(0,0,0,0.14);
  32. box-shadow: 10px 10px 18px 0px rgba(0,0,0,0.14);
  33. border-radius: 0.6em;
  34. border: 1px solid rgb(172, 172, 172);
  35. position: relative;
  36. background-color: white;
  37. }
  38. .divider{
  39. width: calc(100% - 4em);
  40. padding-top: 0.4em;
  41. margin-bottom: 0.4em;
  42. border-bottom: 1px solid rgb(226, 226, 226);
  43. padding-right: 2em;
  44. padding-left: 2em;
  45. }
  46. small{
  47. color: rgb(59, 59, 59);
  48. }
  49. .codeblock{
  50. padding: 0.6em;
  51. background-color: #242424;
  52. color: white;
  53. }
  54. /* Properties Table */
  55. .table_component {
  56. overflow: auto;
  57. width: 100%;
  58. }
  59. .table_component table {
  60. border: 1px solid #dededf;
  61. height: 100%;
  62. width: 100%;
  63. table-layout: fixed;
  64. border-collapse: collapse;
  65. border-spacing: 1px;
  66. text-align: left;
  67. }
  68. .table_component caption {
  69. caption-side: top;
  70. text-align: left;
  71. }
  72. .table_component th {
  73. border: 1px solid #dededf;
  74. background-color: #eceff1;
  75. color: #000000;
  76. padding: 5px;
  77. }
  78. .table_component td {
  79. border: 1px solid #dededf;
  80. background-color: #ffffff;
  81. color: #000000;
  82. padding: 5px;
  83. }
  84. /* Front Panel UI emulation */
  85. .controlEmu{
  86. position: absolute;
  87. right: 1.2em;
  88. bottom: 1.2em;
  89. }
  90. /* Power Button */
  91. .pwrbtn {
  92. display:block;
  93. height: 80px;
  94. width: 80px;
  95. border-radius: 50%;
  96. border: 1px solid rgba(156, 156, 156, 0.5);
  97. cursor: pointer;
  98. box-shadow: 10px 10px 18px 0px rgba(0,0,0,0.38);
  99. background-color: #f8f8f8;
  100. }
  101. .pwrbtn:hover{
  102. background-color: #c7c7c7;
  103. }
  104. .pwrbtn:active{
  105. background-color: #868686;
  106. box-shadow: inset 10px 10px 18px 0px rgba(0,0,0,0.38);
  107. }
  108. .pwrbtn svg{
  109. margin-top: 1.5em;
  110. margin-left: 0.2em;
  111. }
  112. /* Reset Button */
  113. .rstbtn {
  114. display:block;
  115. height: 40px;
  116. width: 40px;
  117. border-radius: 50%;
  118. border: 1px solid rgba(156, 156, 156, 0.5);
  119. cursor: pointer;
  120. margin-bottom: 1em;
  121. box-shadow: 10px 10px 18px 0px rgba(0,0,0,0.38);
  122. }
  123. .rstbtn svg{
  124. margin-top: 0.5em;
  125. margin-left: 0.2em;
  126. }
  127. .rstbtn:hover{
  128. background-color: #c7c7c7;
  129. }
  130. .rstbtn:active{
  131. background-color: #868686;
  132. box-shadow: inset 10px 10px 18px 0px rgba(0,0,0,0.38);
  133. }
  134. /* LEDs */
  135. .leds{
  136. margin-bottom: 1em;
  137. }
  138. .ledlabel{
  139. color: rgb(83, 83, 83);
  140. font-size: 0.8em;
  141. pointer-events: none;
  142. user-select: none;
  143. }
  144. .led {
  145. display:block;
  146. height: 10px;
  147. width: 10px;
  148. border-radius: 50%;
  149. background-color: #242424;
  150. }
  151. </style>
  152. </head>
  153. <body>
  154. <div class="wallpaper"></div>
  155. <br>
  156. <div class="box">
  157. <div class="main">
  158. <h2>ESPWoL Control Panel</h2>
  159. <p>Press a button on the bottom to power up / shutdown / reset your computer wirelessly</p>
  160. <div class="table_component" role="region" tabindex="0">
  161. <table>
  162. <thead>
  163. <tr>
  164. <th>Properties</th>
  165. <th>Status</th>
  166. </tr>
  167. </thead>
  168. <tbody>
  169. <tr>
  170. <td>
  171. <div>WLAN IP<br></div>
  172. </td>
  173. <td>0.0.0.0</td>
  174. </tr>
  175. <tr>
  176. <td>Power Status<br></td>
  177. <td>OFF</td>
  178. </tr>
  179. <tr>
  180. <td>HDD Status<br></td>
  181. <td>IDLE</td>
  182. </tr>
  183. </tbody>
  184. </table>
  185. </div>
  186. <h4>RESTFUL API </h4>
  187. <p>You can also access the power status and controls via RESTFUL API requests.</p>
  188. <div class="codeblock"><code>
  189. GET /api/status <br>
  190. POST /api/power <br>
  191. POST /api/reset <br>
  192. </code></div>
  193. <div class="divider"></div>
  194. <small>ESPWoL Prototype | CopyRight tobychui 2023 - 2024</small>
  195. <div class="controlEmu" align="center">
  196. <div class="rstbtn" title="Reset Computer">
  197. <svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path d="M440-122q-121-15-200.5-105.5T160-440q0-66 26-126.5T260-672l57 57q-38 34-57.5 79T240-440q0 88 56 155.5T440-202v80Zm80 0v-80q87-16 143.5-83T720-440q0-100-70-170t-170-70h-3l44 44-56 56-140-140 140-140 56 56-44 44h3q134 0 227 93t93 227q0 121-79.5 211.5T520-122Z"/></svg>
  198. </div>
  199. <div class="leds">
  200. <div class="ledlabel">HDD <div class="led"></div></div><br>
  201. <div class="ledlabel">PWR <div class="led"></div></div>
  202. </div>
  203. <div class="pwrbtn" title="Power On / Off">
  204. <svg xmlns="http://www.w3.org/2000/svg" height="32" viewBox="0 -960 960 960" width="32"><path d="M440-440v-400h80v400h-80Zm40 320q-74 0-139.5-28.5T226-226q-49-49-77.5-114.5T120-480q0-80 33-151t93-123l56 56q-48 40-75 97t-27 121q0 116 82 198t198 82q117 0 198.5-82T760-480q0-64-26.5-121T658-698l56-56q60 52 93 123t33 151q0 74-28.5 139.5t-77 114.5q-48.5 49-114 77.5T480-120Z"/></svg>
  205. </div>
  206. </div>
  207. </div>
  208. </div>
  209. </body>
  210. </html>