|  | 
| 2 | 2 | <html> | 
| 3 | 3 |   <head> | 
| 4 | 4 |     <title>MicroPython WebREPL</title> | 
| 5 |  | -    <link rel="stylesheet" href="webrepl.css" /> | 
|  | 5 | +    <script src="https://edrys-labs.github.io/module/edrys.js"></script> | 
|  | 6 | + | 
|  | 7 | +    <script | 
|  | 8 | +      defer | 
|  | 9 | +      src="https://edrys-labs.github.io/module/vendor/alpine.min.js" | 
|  | 10 | +    ></script> | 
|  | 11 | + | 
|  | 12 | +    <link | 
|  | 13 | +      rel="stylesheet" | 
|  | 14 | +      href="https://edrys-labs.github.io/module/vendor/water.min.css" | 
|  | 15 | +    /> | 
|  | 16 | + | 
|  | 17 | +    <style> | 
|  | 18 | +      body { | 
|  | 19 | +        min-width: calc(100% - 20px); | 
|  | 20 | +        overflow: hidden; | 
|  | 21 | +      } | 
|  | 22 | + | 
|  | 23 | +      strong { | 
|  | 24 | +        position: absolute; | 
|  | 25 | +        margin-top: -25px; | 
|  | 26 | +        padding: 0px 7px; | 
|  | 27 | +        background: rgb(1, 59, 78); | 
|  | 28 | +      } | 
|  | 29 | + | 
|  | 30 | +      input { | 
|  | 31 | +        display: inline; | 
|  | 32 | +      } | 
|  | 33 | + | 
|  | 34 | +      input[type='text'] { | 
|  | 35 | +        width: calc(100% - 20px); | 
|  | 36 | +      } | 
|  | 37 | + | 
|  | 38 | +      #file-boxes { | 
|  | 39 | +        display: flex; | 
|  | 40 | +        flex-direction: row; | 
|  | 41 | +        flex-wrap: wrap; | 
|  | 42 | +        gap: 10px; | 
|  | 43 | +        justify-content: space-between; | 
|  | 44 | +        width: 100%; | 
|  | 45 | +        align-items: stretch; | 
|  | 46 | +      } | 
|  | 47 | + | 
|  | 48 | +      .file-box { | 
|  | 49 | +        margin-bottom: 15px; | 
|  | 50 | + | 
|  | 51 | +        flex: 1 1 calc(25% - 20px); | 
|  | 52 | +        box-sizing: border-box; | 
|  | 53 | +        border: 2px black solid; | 
|  | 54 | +        padding: 5px; | 
|  | 55 | +        padding-top: 10px; | 
|  | 56 | +      } | 
|  | 57 | + | 
|  | 58 | +      #term { | 
|  | 59 | +        display: block; | 
|  | 60 | +        min-width: 100%; | 
|  | 61 | +        background-color: black; | 
|  | 62 | +      } | 
|  | 63 | +    </style> | 
|  | 64 | + | 
| 6 | 65 |     <script src="term.js"></script> | 
| 7 | 66 |     <script src="FileSaver.js"></script> | 
| 8 | 67 |   </head> | 
| 9 | 68 |   <body> | 
| 10 |  | -    <div style="display: inline-block; vertical-align: top"> | 
| 11 |  | -      <form> | 
|  | 69 | +    <div id="file-boxes"> | 
|  | 70 | +      <form class="file-box"> | 
|  | 71 | +        <strong>WebSocket Connection</strong> | 
|  | 72 | + | 
| 12 | 73 |         <input type="text" name="webrepl_url" id="url" value="" /> | 
| 13 | 74 |         <input | 
| 14 | 75 |           type="submit" | 
|  | 
| 17 | 78 |           onclick="button_click(); return false;" | 
| 18 | 79 |         /> | 
| 19 | 80 |       </form> | 
| 20 |  | -      <div id="term"></div> | 
| 21 |  | -    </div> | 
| 22 |  | - | 
| 23 |  | -    <div | 
| 24 |  | -      id="file-boxes" | 
| 25 |  | -      style="display: inline-block; vertical-align: top; width: 230px" | 
| 26 |  | -    > | 
| 27 |  | -      <div class="file-box"> | 
|  | 81 | +      <div class="file-box" id="put-file-list"> | 
| 28 | 82 |         <strong>Send a file</strong> | 
| 29 | 83 |         <input type="file" id="put-file-select" /> | 
| 30 |  | -        <div id="put-file-list"></div> | 
|  | 84 | + | 
| 31 | 85 |         <input | 
| 32 | 86 |           type="button" | 
| 33 | 87 |           value="Send to device" | 
|  | 
| 51 | 105 |           onclick="get_file(); return false;" | 
| 52 | 106 |         /> | 
| 53 | 107 |       </div> | 
| 54 |  | - | 
| 55 | 108 |       <div class="file-box" id="file-status"> | 
|  | 109 | +        <strong>File status</strong> | 
| 56 | 110 |         <span style="color: #707070">(file operation status)</span> | 
| 57 | 111 |       </div> | 
| 58 | 112 |     </div> | 
| 59 |  | - | 
| 60 |  | -    <br clear="both" /> | 
| 61 |  | -    <i | 
| 62 |  | -      >Terminal widget should be focused (text cursor visible) to accept input. | 
| 63 |  | -      Click on it if not.</i | 
| 64 |  | -    ><br /> | 
| 65 |  | -    <i>To paste, press Ctrl+A, then Ctrl+V</i> | 
|  | 113 | +    <div id="term"></div> | 
|  | 114 | +    <div> | 
|  | 115 | +      <i | 
|  | 116 | +        >Terminal widget should be focused (text cursor visible) to accept | 
|  | 117 | +        input. Click on it if not. To paste, press Ctrl+A, then Ctrl+V</i | 
|  | 118 | +      > | 
|  | 119 | +    </div> | 
| 66 | 120 |   </body> | 
| 67 | 121 | 
 | 
| 68 | 122 |   <script src="webrepl.js"></script> | 
|  | 
0 commit comments