1+ <!DOCTYPE html>
2+ < html lang ="en ">
13
4+ < head >
5+ < meta charset ="UTF-8 ">
6+ < meta http-equiv ="X-UA-Compatible " content ="IE=edge ">
7+ < meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
8+ < title > Ninja room</ title >
9+ < link rel ="stylesheet " href ="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css "
10+ integrity ="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T " crossorigin ="anonymous ">
11+ < link rel ="stylesheet " href ="style.css ">
12+ </ head >
13+
14+ < body >
15+
16+ <!-- container && title -->
17+ < div class ="container my-4 ">
18+ < h1 class ="my-4 text-center "> chatroom Wild Code School</ h1 >
19+
20+
21+
22+ <!-- button -->
23+ < div class ="chat-rooms mb-3 text-center ">
24+ < div class ="my-2 choose "> choose a chatroom:</ div >
25+ < button class ="btn " id ="general "> #general</ button >
26+ < button class ="btn " id ="html "> #html/css</ button >
27+ < button class ="btn " id ="javascript "> #javascript</ button >
28+ < button class ="btn " id ="framework "> #framework</ button >
29+
30+ </ div >
31+ <!-- chat list -->
32+ < div class ="chat-window ">
33+ < ul class ="chat-list list-group "> </ ul >
34+ </ div >
35+ <!-- new chatroom -->
36+ < form class ="new-chat my-3 ">
37+ < div class ="input-group ">
38+ < div class ="input-group-prepend ">
39+ < div class ="input-group-text "> tape your message:</ div >
40+ </ div >
41+ < input type ="text " id ="message " class ="form-control " required >
42+ < div class ="input-group-append ">
43+ < input type ="submit " value ="send " class ="btn ">
44+ </ div >
45+ </ div >
46+ </ form >
47+ <!-- update name -->
48+ < form class ="new-name my-3 ">
49+ < div class ="input-group ">
50+ < div class ="input-group-prepend ">
51+ < div class ="input-group-text "> update your name</ div >
52+
53+ </ div >
54+ < input type ="text " id ="name " class ="form-control " required >
55+ < div class ="input-group-append ">
56+ < input type ="submit " value ="update " class ="btn ">
57+ </ div >
58+
59+ </ div >
60+ < div class ="update-mssg "> </ div >
61+ </ form >
62+ </ div >
63+
64+ < script src ="https://www.gstatic.com/firebasejs/8.10.0/firebase-app.js "> </ script >
65+ < script src ="https://www.gstatic.com/firebasejs/8.10.0/firebase-firestore.js "> </ script >
66+ < script >
67+
68+ // Import the functions you need from the SDKs you need
69+
70+
71+ // TODO: Add SDKs for Firebase products that you want to use
72+
73+ // https://firebase.google.com/docs/web/setup#available-libraries
74+
75+
76+ // Your web app's Firebase configuration
77+
78+ var config = {
79+
80+ apiKey : "AIzaSyD3_x4jiOAP_fllNZNufGFQmZqCNbzOKPI" ,
81+
82+ authDomain : "fir-1f6a3.firebaseapp.com" ,
83+
84+ projectId : "fir-1f6a3" ,
85+
86+ storageBucket : "fir-1f6a3.appspot.com" ,
87+
88+ messagingSenderId : "240332069056" ,
89+
90+ appId : "1:240332069056:web:7dacaae1d475880189f525"
91+
92+ } ;
93+
94+
95+ // Initialize Firebase
96+
97+ firebase . initializeApp ( config ) ;
98+ const db = firebase . firestore ( ) ;
99+ </ script >
100+ < script src ="https://cdnjs.cloudflare.com/ajax/libs/date-fns/1.30.1/date_fns.min.js "> </ script >
101+ < script src ="scripts/chat.js "> </ script >
102+ < script src ="scripts/ui.js "> </ script >
103+ < script src ="scripts/app.js "> </ script >
104+
105+ </ body >
106+
107+ </ html >
0 commit comments