|
| 1 | +<!doctype html> |
| 2 | +<html lang="en" style="background-color: #21252b;"> |
| 3 | + |
| 4 | +<head> |
| 5 | + <meta charset="UTF-8" /> |
| 6 | + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
| 7 | + <title>Observers</title> |
| 8 | + <style> |
| 9 | + body { |
| 10 | + font-family: 'Lucida Console', 'Monaco', monospace; |
| 11 | + background-color: #21252b; |
| 12 | + } |
| 13 | + |
| 14 | + .playground { |
| 15 | + max-width: 800px; |
| 16 | + margin: 0 auto; |
| 17 | + border: 1px solid #444; |
| 18 | + border-radius: 6px; |
| 19 | + overflow: hidden; |
| 20 | + background: #282c34; |
| 21 | + } |
| 22 | + |
| 23 | + .toolbar { |
| 24 | + padding: 10px; |
| 25 | + background: #21252b; |
| 26 | + border-bottom: 1px solid #444; |
| 27 | + display: flex; |
| 28 | + gap: 10px; |
| 29 | + } |
| 30 | + |
| 31 | + button { |
| 32 | + background: #3b4048; |
| 33 | + color: white; |
| 34 | + border: 1px solid #181a1f; |
| 35 | + padding: 6px 12px; |
| 36 | + border-radius: 4px; |
| 37 | + cursor: pointer; |
| 38 | + font-weight: 600; |
| 39 | + } |
| 40 | + |
| 41 | + button:hover { |
| 42 | + background: #4b5263; |
| 43 | + } |
| 44 | + |
| 45 | + .tabs { |
| 46 | + display: flex; |
| 47 | + gap: 0; |
| 48 | + background: #21252b; |
| 49 | + border-bottom: 1px solid #444; |
| 50 | + } |
| 51 | + |
| 52 | + .tab { |
| 53 | + appearance: none; |
| 54 | + background: transparent; |
| 55 | + color: #fff; |
| 56 | + border: none; |
| 57 | + border-right: 1px solid #444; |
| 58 | + padding: 10px 14px; |
| 59 | + cursor: pointer; |
| 60 | + font-weight: 600; |
| 61 | + } |
| 62 | + |
| 63 | + .tab:last-child { |
| 64 | + border-right: none; |
| 65 | + } |
| 66 | + |
| 67 | + .tab[aria-selected="true"] { |
| 68 | + background: #282c34; |
| 69 | + border-bottom: 2px solid #fff; |
| 70 | + } |
| 71 | + |
| 72 | + .tab:hover { |
| 73 | + background: #3b4048; |
| 74 | + } |
| 75 | + |
| 76 | + .tab:focus-visible { |
| 77 | + outline: 2px solid #4b5263; |
| 78 | + outline-offset: -2px; |
| 79 | + } |
| 80 | + |
| 81 | + .tabpanel { |
| 82 | + background: #282c34; |
| 83 | + } |
| 84 | + |
| 85 | + /* Editor area */ |
| 86 | + .cm-editor { |
| 87 | + height: 400px; |
| 88 | + font-size: 14px; |
| 89 | + } |
| 90 | + |
| 91 | + /* Console Output */ |
| 92 | + .console { |
| 93 | + height: 150px; |
| 94 | + background: #282c34; |
| 95 | + overflow-y: auto; |
| 96 | + padding: 10px; |
| 97 | + font-family: 'Lucida Console', 'Monaco', monospace; |
| 98 | + border-top: 1px solid #444; |
| 99 | + font-size: 13px; |
| 100 | + } |
| 101 | + |
| 102 | + .log-line { |
| 103 | + border-bottom: 1px solid #222; |
| 104 | + padding: 2px 0; |
| 105 | + } |
| 106 | + |
| 107 | + .log-error { |
| 108 | + color: #ff5555; |
| 109 | + } |
| 110 | + |
| 111 | + .log-warn { |
| 112 | + color: #ffb86c; |
| 113 | + } |
| 114 | + |
| 115 | + .log-log { |
| 116 | + color: #f8f8f2; |
| 117 | + } |
| 118 | + |
| 119 | + iframe { |
| 120 | + width: 100%; |
| 121 | + border: none; |
| 122 | + display: block; |
| 123 | + } |
| 124 | + </style> |
| 125 | +</head> |
| 126 | + |
| 127 | +<body> |
| 128 | + <div class="playground"> |
| 129 | + <iframe id="vtk-iframe" src="about:blank" scrolling="no"></iframe> |
| 130 | + |
| 131 | + <div class="tabs" role="tablist" aria-label="Code tabs"> |
| 132 | + <button class="tab" id="tab-js" type="button" role="tab" aria-selected="true" aria-controls="panel-js" |
| 133 | + tabindex="0">JS</button> |
| 134 | + <button class="tab" id="tab-html" type="button" role="tab" aria-selected="false" aria-controls="panel-html" |
| 135 | + tabindex="-1">HTML</button> |
| 136 | + </div> |
| 137 | + |
| 138 | + <div id="panel-html" class="tabpanel" role="tabpanel" aria-labelledby="tab-html" hidden> |
| 139 | + <div id="editor-host-html"></div> |
| 140 | + </div> |
| 141 | + <div id="panel-js" class="tabpanel" role="tabpanel" aria-labelledby="tab-js"> |
| 142 | + <div id="editor-host-js"></div> |
| 143 | + </div> |
| 144 | + |
| 145 | + <div class="toolbar"> |
| 146 | + <button id="run-btn">Run</button> |
| 147 | + <button id="reset-btn">Reset</button> |
| 148 | + </div> |
| 149 | + <div id="console-output" class="console"> |
| 150 | + <div class="log-line">> Ready.</div> |
| 151 | + </div> |
| 152 | + </div> |
| 153 | + |
| 154 | + <script type="module" src="./src/main.js"></script> |
| 155 | +</body> |
| 156 | + |
| 157 | +</html> |
0 commit comments