-
Notifications
You must be signed in to change notification settings - Fork 4
/
source code.html
273 lines (236 loc) · 7.12 KB
/
source code.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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
<!DOCTYPE html>
<html>
<head>
<title>Subash Chatbox</title>
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<style type="text/css">
*{
margin: 0;
padding: 0;
font-family: tahoma, sans-serif;
box-sizing: border-box;
}
body{
background: #fff;
}
.chatbox{
width: 500px;
min-width: 390px;
height: 600px;
background: #ddddd6;
padding: 15px;
box-shadow: 2px 3px #b0addb;
border-radius: 10px;
position: relative;
margin-top: 50px;
}
.chatlogs{
padding: 10px;
padding-right: 0px;
width: 100%;
height: 450px;
background: #fbfbfb;
overflow-x: hidden;
overflow-y: scroll;
}
.chatlogs::-webkit-scrollbar{
width: 10px;
}
.chatlogs::-webkit-scrollbar-thumb{
border-radius: 5px;
background: rgba(0,0,0,0.2);
}
.chat{
display: flex;
flex-flow: row wrap;
align-items: flex-start;
margin-bottom: 3px;
}
.chat .user-photo{
width: 50px;
height: 50px;
background: #d6cdcf;
border-radius: 50%;
overflow: hidden;
}
.chat .user-photo img{
width: 100%;
}
.chat .chat-message{
width: 80%;
padding: 15px;
margin: 5px 10px 0;
border-radius: 10px;
color: #fff;
font-size: 15px;
}
.friend .chat-message{
background: #F8BA06;
}
.self .chat-message{
background: #5E5E5E;
order: -1;
}
.chat-form{
margin-top: 20px;
display: flex;
align-items: flex-start;
}
.chat-form textarea{
background: #f9fbfc;
width: 85%;
height: 50px;
border: 2px solid #efe;
border-radius: 3px;
resize: none;
padding: 10px;
font-size: 16px;
color: #333;
}
.chat-form textarea:focus{
background: #fff;
}
.chat-form textarea::-webkit-scrollbar{
width: 8px;
}
.chat-form textarea::-webkit-scrollbar-thumb{
border-radius: 3px;
background: rgba(0,0,0,0.3);
}
.category{
width: 300px;
}
.active{
background: #F8BA06 !important;
border: 1px solid #5E5E5E !important;
}
#phone, #attach, #mail, #emoji{
padding: 20px;
padding-top: 10px;
}
#send{
padding-left: 10px;
}
#send:hover{
color: #F8BA06;
}
#details{
width: 330px;
padding-left: 50px;
margin-top: 100px;
font-style: Georgia, serif;
font-size: 17px;
}
#pic{
height: 150px;
padding-left: 70px;
border-radius: 5px;
}
#online{
height: 10px;
margin-top: 140px;
}
</style>
</head>
<body>
<div class="container">
<div class="row">
<div class="category col-md-4 col-sm-12">
<h2>Friends :</h2>
<div id="list-example" class="list-group">
<a class="list-group-item list-group-item-action active" id="category-1" href="#category-1">Friend 1</a>
<a class="list-group-item list-group-item-action" id="category-2" href="#category-2">Friend 2</a>
<a class="list-group-item list-group-item-action" id="category-3" href="#category-3">Friend 3</a>
<a class="list-group-item list-group-item-action" id="category-4" href="#category-4">Friend 4</a>
</div>
</div>
<div class="chatbox col-md-4 col-sm-12">
<div class="chatlogs">
<div class="chat friend">
<div class="user-photo"><img src="https://vignette2.wikia.nocookie.net/disney/images/3/3e/Robert-downey-jr-2011.jpg/revision/latest?cb=20110926005055"></div>
<p class="chat-message">HI!!! I am your friend <span id="span1"> <b>1</b> </span></p>
</div>
<div class="chat self">
<div class="user-photo"><img src="http://c8.alamy.com/comp/EFABWJ/chris-evans-captain-america-the-first-avenger-2011-EFABWJ.jpg"></div>
<p class="chat-message">Hi!!! How are you?</p>
</div>
<div class="chat friend">
<div class="user-photo"><img src="https://vignette2.wikia.nocookie.net/disney/images/3/3e/Robert-downey-jr-2011.jpg/revision/latest?cb=20110926005055"></div>
<p class="chat-message">I am fine. What about you. And how is your family?</p>
</div>
<div class="chat friend">
<div class="user-photo"><img src="https://vignette2.wikia.nocookie.net/disney/images/3/3e/Robert-downey-jr-2011.jpg/revision/latest?cb=20110926005055"></div>
<p class="chat-message">I'm fine dude... And my family is also fine... Was glad to hear about your promotion. Congtatulations!</p>
</div>
<div class="chat self">
<div class="user-photo"><img src="http://c8.alamy.com/comp/EFABWJ/chris-evans-captain-america-the-first-avenger-2011-EFABWJ.jpg"></div>
<p class="chat-message">Thanks mate. :)</p>
</div>
<div class="chat friend">
<div class="user-photo"><img src="https://vignette2.wikia.nocookie.net/disney/images/3/3e/Robert-downey-jr-2011.jpg/revision/latest?cb=20110926005055"></div>
<p class="chat-message">You are welcome.</p>
</div>
<div class="chat self">
<div class="user-photo"><img src="http://c8.alamy.com/comp/EFABWJ/chris-evans-captain-america-the-first-avenger-2011-EFABWJ.jpg"></div>
<p class="chat-message">Ok.. bye.. talk to you later.</p>
</div>
</div>
<div class="chat-form">
<textarea></textarea>
<i class="fa fa-chevron-circle-right fa-4x" id="send" aria-hidden="true"></i>
</div>
<a><i class="fa fa-phone fa-3x" id="phone" aria-hidden="true"></i></a>
<a><i class="fa fa-envelope-o fa-3x" id="mail" aria-hidden="true"></i></a>
<a><i class="fa fa-paperclip fa-3x" id="attach" aria-hidden="true"></i></a>
<a><i class="fa fa-smile-o fa-3x" id="emoji" aria-hidden="true"></i></a>
</div>
<div class="col-md-4 col-sm-12" id="details">
<img src="https://vignette2.wikia.nocookie.net/disney/images/3/3e/Robert-downey-jr-2011.jpg/revision/latest?cb=20110926005055" id="pic">
<img src="http://www.clker.com/cliparts/4/t/n/Q/b/d/green-glossy-icon-hi.png" id="online">
<p>Name of Friend: Friend <span id="span"> <b>1</b> </span></p>
</div>
</div>
</div>
<script type="text/javascript">
var b1=document.getElementById("category-1");
var b2=document.getElementById("category-2");
var b3=document.getElementById("category-3");
var b4=document.getElementById("category-4");
var span=document.getElementById("span");
var span1=document.getElementById("span1");
b1.addEventListener("click",function(){
b1.classList.add("active");
b2.classList.remove("active");
b3.classList.remove("active");
b4.classList.remove("active");
span.innerHTML="<b>1<b>";
span1.innerHTML="<b>1<b>";
});
b2.addEventListener("click",function(){
b1.classList.remove("active");
b2.classList.add("active");
b3.classList.remove("active");
b4.classList.remove("active");
span.innerHTML="<b>2<b>";
span1.innerHTML="<b>2<b>";
});
b3.addEventListener("click" ,function(){
b1.classList.remove("active");
b2.classList.remove("active");
b3.classList.add("active");
b4.classList.remove("active");
span.innerHTML="<b>3<b>";
span1.innerHTML="<b>3<b>";
});
b4.addEventListener("click",function(){
b1.classList.remove("active");
b2.classList.remove("active");
b3.classList.remove("active");
b4.classList.add("active");
span.innerHTML="<b>4<b>";
span1.innerHTML="<b>4<b>";
});
</script>
<script src="https://use.fontawesome.com/b8ca35c8ba.js"></script>
</body>
</html>