Skip to content

Commit 43945a8

Browse files
committed
mobile styling
1 parent 0d31c05 commit 43945a8

1 file changed

Lines changed: 29 additions & 3 deletions

File tree

index.html

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,43 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, u
6+
ser-scalable=no">
7+
<title>Text Adventure Game</title>
8+
<style>
9+
body {
10+
margin: 0;
11+
padding: 0;
12+
background: #1e1e1e;
13+
overflow: hidden;
14+
position: fixed;
15+
width: 100%;
16+
height: 100%;
17+
touch-action: none;
18+
}
19+
#terminal {
20+
padding: 10px;
21+
flex: 1;
22+
overflow: hidden;
23+
}
24+
</style>
425
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/xterm@5.3.0/css/xterm.css" />
526
<script src="https://cdn.jsdelivr.net/npm/xterm@5.3.0/lib/xterm.js"></script>
627
<script src="https://cdn.jsdelivr.net/npm/xterm-addon-fit@0.8.0/lib/xterm-addon-fit.js"></script>
728
</head>
8-
<body style="margin: 0; padding: 20px; background: #1e1e1e; height: 100vh; box-sizing: border-box;">
9-
<div id="terminal" style="height: 100%;"></div>
29+
<body>
30+
<div id="terminal"></div>
1031

1132
<script>
1233
// Create terminal with responsive font size
1334
const term = new Terminal({
14-
fontSize: window.innerWidth < 768 ? 14 : 16
35+
fontSize: window.innerWidth < 768 ? 14 : 16,
36+
theme: {
37+
background: '#1e1e1e',
38+
foreground: '#d4d4d4'
39+
},
40+
cursorBlink: true
1541
});
1642

1743
// Fit addon

0 commit comments

Comments
 (0)