-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchatroom.html
617 lines (616 loc) · 32.8 KB
/
chatroom.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
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
<!doctype html>
<html>
<head>
<title>Developer's Day Feedback </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="/css/bootstrap.min.css"/>
<link rel="stylesheet" href="/css/main.css"/>
<style>
.to-animate{
padding: 20px;
width: 100px;
margin-bottom: 10px;
transition: all 0.5s;
cursor: pointer;
text-align: left;
background: white;
border-radius: 10px;
}
.to-animate:hover{
background: rgba(0, 0, 0, 0.5);
padding-left: 60px;
border-left: 10px solid white;
color: white;
}
.rotatorZ, .rotatorX, .rotatorY{
height: 100px;
width: 150px !important;
color: white;
margin-top: 10px;
background: red;
transition: all 0.5s;
display: inline-flex;
}
@keyframes rotationX {
from {
background-color: red;
color: white;
transform: rotateX(0deg);
}
to {
background-color: white;
color: red;
transform: rotateX(180deg);
}
}
.rotatorX{
animation: rotationX 1s alternate infinite;
}
.rotatorY:hover{
background: white;
transform: rotateY(180deg);
}
.rotatorZ:hover{
background: white;
transform: rotateZ(180deg);
}
</style>
</head>
<body>
<div class="container-fluid">
<div class="row">
<div class="col-sm-3 sidebar">
<div class="terminal-bar">
<span class="glyphicon glyphicon-cog"></span><span> Developer Terminal</span><span style="float: right" class="close-button glyphicon glyphicon-remove"></span>
</div>
<div class="message-box">
<ul id="messages"></ul>
</div>
<form action="">
<input class="container container-fluid" id="m" autocomplete="off"
placeholder=">> click here to type your message"/>
<div style="float: right">press enter to send</div>
</form>
</div>
<div class="col-sm-9 presentation-area">
<div id="show-chat" class="glyphicon glyphicon-chevron-right"></div>
<a class="head-wrapper" target="_blank" href="https://github.com/gawdsnitk/DeveloperDay">
<div style="position: relative; display: inline-block; top: 10px;">
<h3 class="head">gawds</h3>
<h3>Workshop - Day 3</h3>
<div class="line"></div>
</div>
</a>
<div class="control-wrapper">
<span class="slide-control-left glyphicon glyphicon-chevron-left"></span>
<span id="SlideMonitor">1/15</span>
<span class="slide-control-right glyphicon glyphicon-chevron-right"></span>
<div class="comment">or use < and > arrow keys</div>
</div>
<section class="slide-viewer">
<div class="slide">
<h2>HTML</h2>
<h4><i>HyperText Markup Language</i></h4>
<div>
<i>Tags, Elements, Attributes</i>
</div>
</div>
<div class="slide">
<h2>HTML</h2>
<h4><i>What is <u>H</u>ypertext <u>M</u>arkup</i></h4>
<div>
HyperText refers to how web pages are linked
<br/>Markup is the process of using <strong>tags</strong> to tell the browser how to display the
page
</div>
</div>
<div class="slide">
<h2>HTML</h2>
<h4><i>Tags</i></h4>
<div class="code">
<!DOCTYPE html><br/>
<html><br/>
<head><br/>
<title>Paragraph Example</title><br/>
</head><br/>
<body><br/>
<p>Here is a first paragraph of text.</p><br/>
<p>Here is a second paragraph of text.</p><br/>
<p>Here is a third paragraph of text.</p><br/>
</body><br/>
</html><br/>
</div>
</div>
<div class="slide">
<h2>HTML</h2>
<h4><i>Elements <span class="comment">&</span> Attributes</i></h4>
<div class="code">
<p align="left">This is left aligned</p><br/>
<p align="center">This is center aligned</p><br/>
<textarea class="form-input" id="comment" <br/> placeholder="Enter
your text here"></textarea>
</div>
</div>
<div class="slide">
<h2>HTML</h2>
<h4><i><strong>Meta</strong> <span class="comment">&</span> other tags</i></h4>
<div class="code">
<div class="comment"><!-- Meta tag examples --></div>
<head><br/>
<title>Meta Tags Example</title><br/>
<meta name="keywords" content="HTML, Meta Tags, Metadata" /><br/>
<meta name="description" content="Learning about Meta Tags." /><br/>
<meta ame="author" content="GAWDS" /><br/>
<meta charset="UTF-8" /><br/>
</head><br/>
<div> Block & <span>inline</span> elements</div><br/>
</div>
</div>
<div class="slide">
<h2>HTML</h2>
<h4><i>the structure for your chat room</i></h4>
<div class="code">
<!DOCTYPE HTML><br/>
<html lang="en"><br/>
<head><br/>
<meta charset="utf-8"><br/>
<meta name="viewport"
content="width=device-width,initial-scale=1.0"><br/>
<title>Firebase Chat</title><br/>
<link rel="stylesheet" href="styles/main.css"><br/>
<script type="text/javascript" src="https://www.gstatic.com/firebasejs/3.6.2/firebase.js"></script><br/>
</head><br/>
<body><br/>
<div id="login-panel"><br/>
<h2>Login to chat</h2><br/>
<input type="text" id="user" placeholder="type your Username"/><br/>
<input type="password" id="passkey" placeholder="type your password"/><br/>
<button id="loginbutton">Login</button><br/>
</div><br/>
<div id="chat-panel"><br/>
<h2 id="headingname">Chatroom</h2><br/>
<button id="logoutbutton">Logout</button><br/>
<div id="input-container"><br/>
<input id="text" type="text" placeholder="type your Message"><br/>
<button id="post">Post</button><br/>
</div><br/>
<div id="chat-container"></div><br/>
</div><br/>
<script></script><br/>
</body><br/>
</html><br/>
</div>
</div>
<div class="slide">
<h2>Css</h2>
<h4><i>Cascading Style Sheets</i></h4>
<div>Imagine playing pokemon go with every pokemon looking the same</div>
</div>
<div class="slide">
<h2>Css</h2>
<h4><i>Basic syntax <span class="comment">&</span> Selectors</i></h4>
<div>
<div class="code">
selector {<br/>
style-attribute: value;<br/>
.<br/>
.<br/>
}<br/>
<div class="commment">/*A practical example*/</div>
body {<br/>
background-color: red;<br/>
padding: 10px;<br/>
margin: 10px;<br/>
}
<div class="commment">/*The universal selector * */</div>
* {<br/>
box-sizing: border-box;<br/>
padding: 10px;<br/>
margin: 10px;<br/>
}
<div class="commment">/*The id selector*/</div>
#id {<br/>
height: 30px;<br/>
width: 40px;<br/>
border: 1px solid #000000;<br/>
}
<div class="commment">/*The class selector*/</div>
.classname {<br/>
height: 30px;<br/>
width: 40px;<br/>
border: 1px solid #000000;<br/>
}
</div>
</div>
</div>
<div class="slide">
<h2>Css</h2>
<h4><i>The box model</i></h4>
<div class="code">
<img src="png/box-model.PNG"/>
</div>
<div class="code">
<br/>*{<br/>
box-sizing: border-box;<br/>
}<br/>
</div>
</div>
<div class="slide">
<h2>Css</h2>
<h4>Margin & Padding</h4>
<div class="code">
div { <br/>
/*defining margins*/<br/>
margin-top: 10px;<br/>
margin-left: 10px;<br/>
margin-right: 10px;<br/>
margin-bottom: 10px;<br/>
/*defining padding*/<br/>
padding-top: 10px;<br/>
padding-left: 10px;<br/>
padding-right: 10px;<br/>
padding-bottom: 10px;<br/>
} <br/>
div { <br/>
/*shorthand margin*/<br/>
margin: 10px 20px 10px 20px;<br/>
/*shorthand padding*/<br/>
padding: 10px 20px 10px 20px;<br/>
}
</div>
</div>
<div class="slide">
<h2>Css</h2>
<h4>Borders</h4>
<div class="code">
<div style="height: 40px; width: 100px; border: 10px solid green;"></div>
div { <br/>
border: 10px solid green;<br/>
} <br/>
<div style="height: 40px; width: 100px; border-bottom: 5px solid cyan; border-right: 10px solid blue; border-left: 10px solid green; border-top: 5px solid black;"></div>
div { <br/>
/*defining borders*/<br/>
border-top: 5px solid black;<br/>
border-left: 10px solid green;<br/>
border-right: 10px solid blue;<br/>
border-bottom: 5px solid cyan;<br/>
}
<div style="height: 100px; width: 100px; border: 20px solid cyan; border-radius: 50%;"></div>
div { <br/>
/*defining borders*/<br/>
border: 5px solid black;<br/>
border-radius: 50%<br/>
}
</div>
</div>
<div class="slide">
<h2>Css</h2>
<h4>Positioning & Display</h4>
<div style="text-align: center; width: 100%;">
<div style="position: relative; padding: 10px; height: 100px; width: 300px; background: black">
<div style="position: relative; height: 20px; width: 100px; background: blue;"></div>
<div style="position: relative; margin-top: 10px; font-size: 10px; height: 10px; width: 100px; background: white;">RELATIVE</div>
</div>
<br/>
<div style="position: relative; padding: 10px; height: 100px; width: 300px; background: black">
<div style="position: relative; height: 20px; width: 100px; background: blue;"></div>
<div style="position: absolute; top: 20px; font-size: 10px; height: 10px; width: 100px; background: white;">absolute</div>
</div>
<br/>
<div style="position: relative; padding: 10px; height: 100px; width: 300px; background: black;">
<div style="display: inline-block; position: relative; height: 20px; width: 100px; background: blue; font-size: 10px !important;">inline</div>
<div style="display: inline-block; position: relative; height: 10px; width: 100px; background: white; font-size: 10px !important;">inline</div>
</div>
</div>
</div>
<div class="slide">
<h2>Css</h2>
<h4>Float</h4>
<div style="text-align: center; width: 100%;">
<div style="position: relative; padding: 10px; height: 100px; width: 300px; background: black">
<div style="position: relative; float: left; height: 20px; width: 100px; background: blue;">Left</div>
</div>
<br/>
<div style="position: relative; padding: 10px; height: 100px; width: 300px; background: black">
<div style="position: relative; float: right; height: 20px; width: 100px; background: blue;">Right</div>
</div>
<br/>
</div>
</div>
<div class="slide">
<h2>Css</h2>
<h4>z-index</h4>
<div style="text-align: center; width: 100%;">
<div style="position: relative; z-index: 1; padding: 10px; height: 100px; width: 300px; background: black">
<div style="position: absolute; z-index: 1; height: 20px; width: 100px; background: blue;"></div>
<div style="position: absolute; z-index: 2; top: 20px; height: 15px; width: 90px; background: white;"></div>
</div>
<br/>
<div style="position: relative; z-index: 1; padding: 10px; height: 100px; width: 300px; background: black">
<div style="position: absolute; z-index: 2; height: 20px; width: 100px; background: blue;"></div>
<div style="position: absolute; z-index: 1; top: 20px; height: 15px; width: 90px; background: white;"></div>
</div>
<br/>
</div>
</div>
<div class="slide">
<h4>Animations and CSS</h4>
<div>
<div class="to-animate">Hover over me</div>
<div class="to-animate">Menu option 2</div>
<div class="to-animate">Menu option 3</div>
<div class="to-animate">Menu option 4</div>
<div class="rotatorX">RotateX</div>
<div class="rotatorY">RotateY</div>
<div class="rotatorZ">RotateZ</div>
</div>
</div>
<div class="slide">
<h2>Css</h2>
<h4><i>Lets' start styling the Chat app</i></h4>
<div>
<div class="code">
*{<br/>
box-sizing: border-box;<br/>
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;<br/>
transition: all 0.2s;<br/>
outline: none;<br/>
}<br/>
body {<br/>
margin: 0;<br/>
padding: 0;<br/>
color: white;<br/>
}<br/>
input{<br/>
font-size: 1.2em;<br/>
padding: 10px 20px 10px 20px;<br/>
margin: 10px auto;<br/>
background: transparent;<br/>
border: none;<br/>
border-bottom: solid 2px crimson;<br/>
color: white;<br/>
}<br/>
input:focus{<br/>
border-bottom: solid 2px white;<br/>
}<br/>
#logoutbutton{<br/>
position: absolute;<br/>
top: 10px;<br/>
right: 10px;<br/>
background: none;<br/>
border: none;<br/>
color: white;<br/>
cursor: pointer;<br/>
}<br/>
#logoutbutton:hover{<br/>
letter-spacing: 2px;<br/>
color: crimson;<br/>
font-weight: 600;<br/>
}<br/>
#chat-panel > h2{<br/>
width: 100%;<br/>
padding-left: 20px;<br/>
font-weight: 400;<br/>
}<br/>
/*style for each chat bubble*/
.msg, .msg-self {<br/>
margin: 10px 0;<br/>
padding: 10px;<br/>
width: 100%;<br/>
background-color: #efefef;<br/>
}<br/>
.msg > p, .msg-self > p{<br/>
margin-top: 0px;<br/>
}<br/>
.msg-self {<br/>
text-align: right;<br/>
}<br/>
.msg-self > b{<br/>
color: #50b1ff;<br/>
}<br/>
#text {<br/>
margin: 5px 0px;<br/>
width: 90vw;<br/>
}<br/>
/*style for message send button*/<br/>
#post {<br/>
position: absolute;<br/>
right: 0;<br/>
bottom: 0;<br/>
height: 53px;<br/>
width: 10vw;<br/>
background-color: #50b1ff;<br/>
border: none;<br/>
color: #FFF;<br/>
}<br/>
/*style for chat window*/<br/>
#chat-panel{<br/>
background: #1d1d1d;<br/>
top: 0;<br/>
left: 0;<br/>
position: fixed;<br/>
display: none;<br/>
z-index: 1;<br/>
width: 100vw;<br/>
height: 100vh;<br/>
}<br/>
/*style for messages container*/<br/>
#chat-container{<br/>
padding: 10px;<br/>
height: 80vh;<br/>
overflow-y: scroll;<br/>
border-top: solid 2px white;<br/>
border-bottom: solid 2px white;<br/>
color: black;<br/>
}<br/>
#input-container > input {<br/>
border-bottom: none !important;<br/>
height: 53px;<br/>
}<br/>
#input-container{<br/>
display: inline-flex;<br/>
position: absolute;<br/>
bottom: 0;<br/>
width: 100vw;<br/>
}<br/>
/*login panel*/<br/>
#login-panel{<br/>
position: fixed;<br/>
top: 0;<br/>
left: 0;<br/>
height: 100vh;<br/>
width: 100vw;<br/>
text-align: center;<br/>
z-index: 100;<br/>
background-color:#1d1d1d;<br/>
}<br/>
#login-panel > h2 {<br/>
margin-top: 100px;<br/>
color: rgba(255, 255, 255, 0.5);<br/>
}<br/>
#login-panel > button{<br/>
margin: 20px auto;<br/>
display: block;<br/>
padding: 5px 15px 8px 15px;<br/>
font-size: 15px;<br/>
font-weight: 700;<br/>
border: none;<br/>
border-radius: 5px;<br/>
cursor: pointer;<br/>
}<br/>
#login-panel > button:focus{<br/>
outline: none;<br/>
}<br/>
#login-panel > button:hover{<br/>
background: crimson;<br/>
color: white;<br/>
text-decoration: underline;<br/>
}<br/>
#login-panel > input {<br/>
display: block;<br/>
}<br/>
</div>
</div>
</div>
<div class="slide">
<h2>Javascript</h2>
<h4>it is <strong>Not</strong> java</h4>
<div>Making your pokemon <i>dance</i></div>
</div>
<div class="slide">
<h2>Javascript</h2>
<h4>Data Types</h4>
<div>
<ul>
<li>The Universal declaration VAR</li>
<li>Number - 1024</li>
<li>String - "Hello"</li>
<li>Boolean - true/false</li>
</ul>
</div>
</div>
<div class="slide">
<h2>Javascript</h2>
<h4>Complex Datatypes</h4>
<div>
<ul>
<li>Arrays</li>
<li>&</li>
<li>Objects</li>
</ul>
</div>
</div>
<div class="slide">
<h2>Javascript</h2>
<h4>Loops</h4>
<div>
<ul>
<li>for</li>
<li>&</li>
<li>while</li>
</ul>
</div>
</div>
<div class="slide">
<h2>Javascript</h2>
<h4>functions</h4>
<div class="code">
function MyFunctionName(){
<span class="comment">/*Function declaration*/</span>
<br/> statement 1;
<br/> statement 2;
<br/> .
<br/> .
<br/> .
<br/>}
<br/>MyfunctionName();
<span class="comment">/*Function Call*/</span>
</div>
</div>
<div class="slide">
<h2>Javascript</h2>
<h4>DOM</h4>
<div>
Document Object Model
</div>
</div>
<div class="slide">
<h2>API</h2>
<h4>Application Programming Interface</h4>
</div>
<div class="slide">
<h2>API</h2>
<h4><i>API - the general flow</i></h4>
<img src="/png/API3.png">
</div>
<div class="slide">
<h2>API</h2>
<h4>How things work</h4>
<img src="/png/API4.png">
</div>
<div class="slide">
<h2>API</h2>
<h4>My name is API. What's yours?</h4>
<img src="/png/API1.png">
</div>
<div class="slide">
<h2>API</h2>
<h4>Search using a normal website</h4>
<img src="/png/API2.png">
</div>
<div class="slide">
<h2>API</h2>
<h4>Search using a Web Service</h4>
<img style="max-width: 900px; margin-top: -40px;" src="/png/API5.png">
</div>
<!--<div class="slide">
<h2>Get! Set! Go!</h2>
<h4><i>Let's catch'em all</i></h4>
<div>
<div class="code">
var $FeedContainer = $('#FeedContainer', document);<br/>
$.get('https://graph.facebook.com/gawdsnitkkr/feed?access_token=1190755740976083|8d59f9b9119f123e50533bee27e34453',<br/>
function (response) {<br/>
var Data = response.data;<br/>
$FeedContainer.html('');<br/>
for (var i = 0; i < Data.length; i++) {<br/>
if (typeof Data[i].message !== 'undefined') {<br/>
$FeedContainer.append('<div class="Feed">' + Data[i].message + '</div>'>;<br/>
}<br/>
}<br/>
});<br/>
</div>
</div>
</div>-->
</section>
</div>
</div>
</div>
<script src="/socket.io/socket.io.js"></script>
<script src="/js/jquery.min.js"></script>
<script src="/js/TweenMax.min.js"></script>
<script src="/js/timeago.js"></script>
<script src="/js/main.js"></script>
<script src="/js/frontend.js"></script>
</body>
</html>