-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
136 lines (124 loc) · 3.81 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
<!doctype html>
<html>
<head>
<title>Monsterr</title>
<!-- Don't cache!!! -->
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<style>
html {
box-sizing: border-box;
height: 100%;
}
*, *:before, *:after {
margin: 0;
padding: 0;
box-sizing: inherit;
}
body {
font: 16px Helvetica, Arial;
width: 100%;
height: 100%;
}
#main-container {
height: 100%; width: 100%;
flex-direction: row; display: flex;
min-height: 0;
}
#canvas-html-container {
flex: 1; flex-direction: column; display: flex
}
#canvas { flex: 1; }
#html-container {
flex: 1;
/* border-top: 1px solid black; */
overflow: hidden; overflow-y: auto;
}
#chat-container {
border-left: 1px solid black;
height: 100%; width: 300px;
display: flex;
flex-direction: column;
justify-content: flex-end;
}
#messages {
max-height: 100%;
list-style-type: none;
overflow: hidden;
overflow-y: auto;
}
#messages li {
margin: 5px;
padding: 5px;
border-radius: 5px;
word-wrap: break-word;
background-color: whitesmoke;
}
#messages li.message-right {
text-align: right;
background-color: lightskyblue;
}
#messages li.system-message {
background-color: rgba(255, 80, 80, 0.678);
}
.name-div {
font-size: 8pt;
font-style: italic;
/* font-weight: bold */
}
#input-group input {
flex: 1
}
#loader {
position: absolute;
top: 0;
bottom: 0;
right: 0;
left: 0;
z-index: 10000;
background-color: white;
display: flex;
justify-content: center;
align-items: center;
font-size: 36px;
}
</style>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" integrity="sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="client.css">
<link rel="stylesheet" type="text/css" href="admin-client.css">
</head>
<body>
<div id="main-container">
<div id="canvas-html-container">
<canvas id="canvas"></canvas>
<div id="html-container"></div>
</div>
<div id="chat-container">
<ul id="messages"></ul>
<form cation="">
<div id="input-group" class="input-group">
<input id="m" autocomplete="off" />
<div class="input-group-append">
<button class="btn btn-primary">Send</button>
</div>
</div>
</form>
</div>
</div>
<div id="loader">loading</div>
<!-- External -->
<script
src="https://code.jquery.com/jquery-2.2.4.min.js"
integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44="
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js" integrity="sha384-smHYKdLADwkXOn1EmN1qk/HfnUcbVRZyYmZ4qpPea6sjB/pTJ0euyQp0Mk8ck+5T" crossorigin="anonymous"></script>
<!-- Internal -->
<script src="fabric"></script>
<script>
let isAdmin = window.location.pathname === '/admin'
$.getScript(isAdmin ? 'admin-client.js' : 'client.js')
setTimeout(() => $('#loader').fadeOut(500), 500)
</script>
</body>
</html>