-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchatClient.html
More file actions
106 lines (88 loc) · 2.29 KB
/
chatClient.html
File metadata and controls
106 lines (88 loc) · 2.29 KB
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
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
@media (max-width: 2000px) {
body {
font-family: sans-serif;
font-size: 1.4em;
padding: 15px;
margin: 0px;
}
div#messages>div {
background: #e8e8e8;
padding: 5px 10px;
border-radius: 5px;
border-bottom: 1px solid #fafafa;
}
div#messages>div:first-child {
background: #fff;
margin-bottom: 20px;
padding: 0px;
}
div#messages>div:last-child {
margin-bottom: 20px;
}
div#messages>div:nth-child(even) {
margin-left: 60px;
}
div#messages>div:nth-child(odd) {
margin-right: 60px;
}
input#messageBox {
width: -webkit-calc(100% - 24px);
width: -moz-calc(100% - 24px);
width: calc(100% - 24px);
display: block;
padding: 12px;
}
input[type="button"] {
display: block;
width: 100%;
margin-top: 10px;
background: #023359;
border: none;
border-radius: 5px;
color: #fff;
font-weight: 700;
text-transform: uppercase;
padding: 12px 5px;
}
input#registerName {
display: inline;
padding: 12px;
}
input[type="button"]#registerButton {
display: inline;
width: 30%;
margin-top: 50px;
background: #033861;
border: none;
border-radius: 5px;
color: #fff;
font-weight: 700;
text-transform: uppercase;
padding: 12px 8px;
}
input[type="button"]#clearButton {
float: right;
width: 30%;
margin-top: 50px;
}
}
</style>
</head>
<body>
Messages and updates:
<div id='messages'></div>
<input type='text' placeholder='Send a message: ' id='messageBox'>
<input type='button' id="send_button" value='Send'>
<input type='text' placeholder='Register Usernames' id='registerName'>
<input type='button' id="registerButton" value='Connect As'>
<input type='button' id="clearButton" value='Clear Chat'>
<div id='registerMessage'></div>
<script src="/socket.io/socket.io.js"></script>
<script src='chatClient.js'></script>
</body>
</html>