This repository has been archived by the owner on Jan 12, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
89 lines (80 loc) · 3.31 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="icon" href="/favicon.ico" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.1/css/all.min.css"
integrity="sha512-MV7K8+y+gLIBoVD59lQIYicR65iaqukzvf/nwasF0nqhPay5w/9lJmVM2hMDcnK1OnMGCdVK+iQrJ7lzPJQd1w=="
crossorigin="anonymous"
referrerpolicy="no-referrer"
/>
<link
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65"
crossorigin="anonymous"
/>
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/gh/devicons/[email protected]/devicon.min.css"
/>
<title>Vite App</title>
<script
src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-kenU1KFdBIe4zVF0s0G1M5b4hcpxyD9F7jL+jjXkk+Q2h455rYXK/7HAuoJl+0I4"
crossorigin="anonymous"
></script>
<script src="/scripts/init.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.3/jquery.min.js" integrity="sha512-STof4xm1wgkfm7heWqFJVn58Hm3EtS31XFaagaa8VMReCXAkQnJZ+jEy8PCC/iT18dFy95WcExNHFTqLyp72eQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<link rel="stylesheet" href="node_modules/xterm/css/xterm.css" />
<script src="node_modules/xterm/lib/xterm.js"></script>
</head>
<body onload="idk()">
<div id="app"></div>
<script>
let isDragging = false;
function startDrag() {
isDragging = true;
}
function endDrag() {
isDragging = false;
}
function onDrag(event) {
if(isDragging) {
let toprow = document.getElementById("body");
let mid = document.getElementById('bar');
let botrow = document.getElementById("main");
let screeen = document.getElementsByClassName("nav")[0];
let minn = window.getComputedStyle(toprow).getPropertyValue('min-height');
toprow.style.height = Math.max(parseInt(minn), (isDragging ? event.clientY : toprow.clientHeight) - 50) + 'px';
botrow.style.height = (window.innerHeight - screeen.offsetHeight - toprow.clientHeight - mid.offsetHeight -1) + 'px';
window.editor.layout();
window.fitAddon.fit();
event.preventDefault()
}
}
function idk() {
let toprow = document.getElementById("body");
let mid = document.getElementById('bar');
let botrow = document.getElementById("main");
let screeen = document.getElementsByClassName("nav")[0];
botrow.style.height = (window.innerHeight - screeen.offsetHeight - toprow.clientHeight - mid.offsetHeight -1) + 'px';
if(window.editor) window.editor.layout();
if(window.fitAddon) window.fitAddon.fit();
}
window.onresize = () => idk();
</script>
<script type="module" src="/src/main.js"></script>
<div class="toast-container position-fixed bottom-0 end-0 p-3">
<div id="liveToast" class="toast" role="alert" aria-live="assertive" aria-atomic="true">
<div class="toast-header">
<strong class="me-auto"> Template Saved!
</strong>
<button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button>
</div>
</div>
</div>
</body>
</html>