-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
55 lines (49 loc) · 2.06 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
<!doctype html>
<html>
<head>
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<meta charset='UTF-8'>
<meta name="robots" content="noindex">
<link href='https://fonts.googleapis.com/css?family=Nunito:400,300,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="/static/style.css">
</head>
<body>
<div class='container' id='app'>
<h1 id='username' v-bind:style="{color: color}">{{username}}</h1>
<div class='chatbox'>
<div class='user-list-container'>
<h1>Users Online ({{onlineUserCount}})</h1>
<div class="user-list">
<div v-for="user in users" class='user-active'>
<p>{{user}}</p>
</div>
</div>
</div>
<div class="message-display" id="message-display">
<div class="messages">
<div class="user-message" v-for="message in messages">
<div class="my-message" v-if="message.username === username">
<p class="name" id='msg-username' v-bind:style="{color: message.color}">{{message.username}} ({{message.time}})</p>
<br/>
<p class="message">{{message.message}}</p>
</div>
<div class="their-message" v-else>
<p class="name" id='msg-username' v-bind:style="{color: message.color}">{{message.username}} ({{message.time}})</p>
<br/>
<p class="message">{{message.message}}</p>
</div>
</div>
</div>
</div>
<form @submit.prevent="sendMessage()">
<input type="text" v-model="messageText" placeholder="Type message or /help for help..">
</form>
</div>
<!-- imports -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.13/vue.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/2.0.4/socket.io.js"></script>
<!-- Client -->
<script src="/static/client.js"></script>
</body>
</html>