Spaces:
Sleeping
Sleeping
Upload static/index.html with huggingface_hub
Browse files- static/index.html +28 -2
static/index.html
CHANGED
|
@@ -2,15 +2,34 @@
|
|
| 2 |
<html lang="en">
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8"/>
|
| 5 |
-
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
| 6 |
-
<title>Terminal</title>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&display=swap" rel="stylesheet"/>
|
| 8 |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/xterm@5.3.0/css/xterm.css"/>
|
| 9 |
<script src="https://cdn.jsdelivr.net/npm/xterm@5.3.0/lib/xterm.js"></script>
|
| 10 |
<script src="https://cdn.jsdelivr.net/npm/xterm-addon-fit@0.8.0/lib/xterm-addon-fit.js"></script>
|
|
|
|
| 11 |
<style>
|
| 12 |
* { box-sizing: border-box; margin: 0; padding: 0; }
|
| 13 |
html, body { height: 100%; overflow: hidden; background: #0d1117; font-family: 'JetBrains Mono', monospace; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
|
| 15 |
#pass-screen {
|
| 16 |
position: fixed; top: 0; left: 0; width: 100%; height: 100%;
|
|
@@ -82,6 +101,13 @@
|
|
| 82 |
</div>
|
| 83 |
|
| 84 |
<script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 85 |
const PASS_HASH = "opencode";
|
| 86 |
let term = null;
|
| 87 |
let ws = null;
|
|
|
|
| 2 |
<html lang="en">
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8"/>
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
|
| 6 |
+
<title>OpenCode AI Terminal</title>
|
| 7 |
+
|
| 8 |
+
<!-- PWA Meta -->
|
| 9 |
+
<meta name="theme-color" content="#27c93f"/>
|
| 10 |
+
<meta name="apple-mobile-web-app-capable" content="yes"/>
|
| 11 |
+
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"/>
|
| 12 |
+
<meta name="apple-mobile-web-app-title" content="Terminal"/>
|
| 13 |
+
<meta name="description" content="Full screen web terminal with dev tools"/>
|
| 14 |
+
|
| 15 |
+
<!-- PWA Links -->
|
| 16 |
+
<link rel="manifest" href="/static/manifest.json"/>
|
| 17 |
+
<link rel="apple-touch-icon" href="/static/icon-192.png"/>
|
| 18 |
+
|
| 19 |
+
<!-- Fonts & Terminal -->
|
| 20 |
<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&display=swap" rel="stylesheet"/>
|
| 21 |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/xterm@5.3.0/css/xterm.css"/>
|
| 22 |
<script src="https://cdn.jsdelivr.net/npm/xterm@5.3.0/lib/xterm.js"></script>
|
| 23 |
<script src="https://cdn.jsdelivr.net/npm/xterm-addon-fit@0.8.0/lib/xterm-addon-fit.js"></script>
|
| 24 |
+
|
| 25 |
<style>
|
| 26 |
* { box-sizing: border-box; margin: 0; padding: 0; }
|
| 27 |
html, body { height: 100%; overflow: hidden; background: #0d1117; font-family: 'JetBrains Mono', monospace; }
|
| 28 |
+
|
| 29 |
+
/* Full screen PWA */
|
| 30 |
+
@media display-mode: fullscreen {
|
| 31 |
+
body { padding: 0; }
|
| 32 |
+
}
|
| 33 |
|
| 34 |
#pass-screen {
|
| 35 |
position: fixed; top: 0; left: 0; width: 100%; height: 100%;
|
|
|
|
| 101 |
</div>
|
| 102 |
|
| 103 |
<script>
|
| 104 |
+
// Register Service Worker
|
| 105 |
+
if ('serviceWorker' in navigator) {
|
| 106 |
+
navigator.serviceWorker.register('/static/sw.js')
|
| 107 |
+
.then(reg => console.log('SW registered'))
|
| 108 |
+
.catch(err => console.log('SW error'));
|
| 109 |
+
}
|
| 110 |
+
|
| 111 |
const PASS_HASH = "opencode";
|
| 112 |
let term = null;
|
| 113 |
let ws = null;
|