-
Notifications
You must be signed in to change notification settings - Fork 0
/
questions.html
executable file
·239 lines (207 loc) · 8.98 KB
/
questions.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
<!DOCTYPE html>
<html lang="en">
<head>
<title>Girls Do Code</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> <!-- jQuery -->
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script> <!-- Twitter Bootstrap -->
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> <!-- Twitter Bootstrap -->
<link rel="stylesheet" href="final.css"> <!-- my css -->
<script src='https://cdn.firebase.com/js/client/2.2.1/firebase.js'></script>
<script src='https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js'></script>
<link rel='stylesheet' type='text/css' href='/resources/tutorial/css/example.css'>
<!-- favicon generating code -->
<link rel=" icon" type="image/png " href="icon.png" />
</head>
<body>
<div class="container">
<div class="jumbotron">
<h1>Questions</h1>
<p>Spreading the Word About Computer Science</p>
</div>
<nav class="navbar navbar-custom">
<div class="container-fluid">
<div>
<ul class="nav navbar-nav">
<li><a href="homepage.html">Home</a></li>
<li><a href="resources.html">Resources </a></li>
<li class="active"><a href="#">Questions</a></li>
<li><a href="inspiration.html">Inspiration</a></li>
<li><a href="about.html">About Us</a></li>
</ul>
</div>
</div>
</nav>
<div class="navbar-questions navbar-inverse navbar-static-top" role="navigation">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" rel="home" href="/" title="Question pg.">Ask a Question</a>
</div>
<div class="collapse navbar-collapse navbar-ex1-collapse">
<div class="col-sm-3 col-md-3 pull-right">
<form class="navbar-form" role="search">
<div class="input-group">
<input type="text" class="form-control" placeholder="Search" name="srch-term" id="srch-term">
<div class="input-group-btn">
<a href="#" onclick="find();"><button type="button" class="btn btn-info"> </a>
<span class="glyphicon glyphicon-search"></span>
</button>
</div>
</div>
</form>
</div>
</div>
</div>
<div class="row spacer">
<div class="col-md-3">
<img class="img-thumbnail img-responsive" src="prerna.JPG" height="100px" width="300px"/>
<p> Prerna Vij , Computer Scientist at Adobe </p>
</div>
<div class="col-md-6">
<div id='messagesDiv'></div>
<input type='text' id='nameInput' placeholder='Name'>
<input type='text' id='messageInput' placeholder='Message'>
<script>
var myDataRef = new Firebase('https://vpxpzhndm1h.firebaseio-demo.com/');
$('#messageInput').keypress(function (e) {
if (e.keyCode == 13) {
var name = $('#nameInput').val();
var text = $('#messageInput').val();
myDataRef.push({name: name, text: text});
$('#messageInput').val('');
}
});
myDataRef.on('child_added', function(snapshot) {
var message = snapshot.val();
displayChatMessage(message.name, message.text);
});
function displayChatMessage(name, text) {
$('<div/>').text(text).prepend($('<em/>').text(name+': ')).appendTo($('#messagesDiv'));
$('#messagesDiv')[0].scrollTop = $('#messagesDiv')[0].scrollHeight;
};
</script>
</div>
<div class="col-md-3">
<a href="https://king.com/#!/play/candycrush" target="_blank"><img class="img-rounded img-responsive" src="
ads/candy.jpg" height="200" width="200"/></a>
<br> </br>
<a href="http://us.coca-cola.com/home/" target="_blank"><img class="img-rounded img-responsive" src="
ads/coke.jpg" height="200" width="200"/></a>
</div>
</div>
<div class="row spacer">
<div class="col-md-3">
<img class="img-thumbnail img-responsive" src="annie.JPG" height="100px" width="300px"/>
<p> Annie Zhang, Comp Sci Student</p>
</div>
<div class="col-md-6">
<div id='messagesDiv2'></div>
<input type='text' id='nameInput2' placeholder='Name'>
<input type='text' id='messageInput2' placeholder='Message'>
<script>
var myDataRef2 = new Firebase('https://liu9vh8coxi.firebaseio-demo.com/');
$('#messageInput2').keypress(function (e) {
if (e.keyCode == 13) {
var name = $('#nameInput2').val();
var text = $('#messageInput2').val();
myDataRef2.push({name: name, text: text});
$('#messageInput2').val('');
}
});
function displayChatMessage2(name, text) {
$('<div/>').text(text).prepend($('<em/>').text(name+': ')).appendTo($('#messagesDiv2'));
$('#messagesDiv2')[0].scrollTop = $('#messagesDiv2')[0].scrollHeight;
};
myDataRef2.on('child_added', function(snapshot) {
var message = snapshot.val();
displayChatMessage2(message.name, message.text);
});
</script>
</div>
<div class="col-md-3">
<a href="http://www.mcdonalds.com/us/en/home.html" target="_blank"><img class="img-rounded img-responsive" src="ads/mcdonalds.png" height="200" width="200"/></a>
<br> </br>
<a href="http://www.sephora.com/" target="_blank"><img class="img-rounded img-responsive" src="
ads/sephora.jpg" height="200" width="200"/></a>
</div>
</div>
<div class="row spacer">
<div class="col-md-3">
<img class="img-thumbnail img-responsive" src="penguin.JPG" height="200px" width="300px"/>
<p> Frosty, the Freshest Penguin</p>
</div>
<div class="col-md-6">
<div id='messagesDiv3'></div>
<input type='text' id='nameInput3' placeholder='Name'>
<input type='text' id='messageInput3' placeholder='Message'>
<script>
var myDataRef3 = new Firebase('https://n0eh132wwmn.firebaseio-demo.com/');
$('#messageInput3').keypress(function (e) {
if (e.keyCode == 13) {
var name = $('#nameInput3').val();
var text = $('#messageInput3').val();
myDataRef3.push({name: name, text: text});
$('#messageInput3').val('');
}
});
function displayChatMessage3(name, text) {
$('<div/>').text(text).prepend($('<em/>').text(name+': ')).appendTo($('#messagesDiv3'));
$('#messagesDiv3')[0].scrollTop = $('#messagesDiv3')[0].scrollHeight;
};
myDataRef3.on('child_added', function(snapshot) {
var message = snapshot.val();
displayChatMessage3(message.name, message.text);
});
</script>
</div>
<div class="col-md-3">
<a href="http://www.microsoftstore.com/store/msusa/en_US/cat/All-Surface/categoryID.69403400" target="_blank"><img class="img-rounded img-responsive" src="ads/surface.jpg" height="200" width="200"/></a>
<br> </br>
<a href="http://www.amazon.com/" target="_blank"><img class="img-rounded img-responsive" src="
ads/amazon.jpg" height="200" width="200"/></a>
</div>
</div>
<div class="row spacer">
<div class="col-md-3">
<img class="img-thumbnail img-responsive" src="kim.JPG" height="200px" width="300px"/>
<p> Kim Ngo, Cool Person</p>
</div>
<div class="col-md-6">
<div id='messagesDiv4'></div>
<input type='text' id='nameInput4' placeholder='Name'>
<input type='text' id='messageInput4' placeholder='Message'>
<script>
var myDataRef4 = new Firebase('https://bin8j5xejci.firebaseio-demo.com/');
$('#messageInput4').keypress(function (e) {
if (e.keyCode == 13) {
var name = $('#nameInput4').val();
var text = $('#messageInput4').val();
myDataRef4.push({name: name, text: text});
$('#messageInput4').val('');
}
});
function displayChatMessage4(name, text) {
$('<div/>').text(text).prepend($('<em/>').text(name+': ')).appendTo($('#messagesDiv4'));
$('#messagesDiv4')[0].scrollTop = $('#messagesDiv4')[0].scrollHeight;
};
myDataRef4.on('child_added', function(snapshot) {
var message = snapshot.val();
displayChatMessage4(message.name, message.text);
});
</script>
</div>
<div class="col-md-3">
<a href="http://www.target.com/" target="_blank"><img class="img-rounded img-responsive" src="
ads/target.png" height="200" width="200"/></a>
<br> </br>
<a href="http://www.yogurt-land.com/" target="_blank"><img class="img-rounded img-responsive" src="
ads/yogurt.jpg" height="200" width="200"/></a>
</div>
</div>
</div>
</body>
</html>